/* ================================================================
   ds-extra-filters.css
   Extra filters slide-out panel for DivaStreet / OSclass Delta
   Upload to: /oc-content/themes/delta/
   Then add in head.php:
     <link rel="stylesheet" href="<?php echo osc_current_web_theme_url('ds-extra-filters.css'); ?>" />
================================================================ */


/* â”€â”€ "More filters" button â€” top-right of search box, all devices â”€â”€ */
.dsxf-toggle-wrap {
  /* Removed: float-based layout. Now positioned absolute top-right. */
  float: none;
  width: auto;
  margin: 0;
  text-align: right;
}

/* Top-right absolute positioning variant */
.dsxf-toggle-topright {
  position: absolute;
  top: -18px;
  right: -11px;
  z-index: 9;
}

/* Ensure the search box outer wrap has position:relative for the above to work */
#home-search .box .wrap {
  position: relative !important;
}

.dsxf-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 6px 14px 6px 10px;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  font-family: inherit;
  line-height: 1.4;
}

.dsxf-toggle-btn:hover {
  border-color: #ff0042;
  color: #ff0042;
  background: #e2e2e2;
}

.dsxf-toggle-btn[aria-expanded="true"] {
  border-color: #ff0042;
  color: #7e7e7e;
  background: #f4f4f4;
}

.dsxf-toggle-btn[aria-expanded="true"] .dsxf-chevron {
  transform: rotate(180deg);
}

.dsxf-chevron {
  transition: transform 0.25s ease;
  flex-shrink: 0;
}

/* Active filter count badge on toggle button */
.dsxf-active-count {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  background: #ff0042;
  color: #fff;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  line-height: 1;
}


/* â”€â”€ PANEL CONTAINER â”€ */
.dsxf-panel {
  float: left;
  margin-top: 10px;
  width: 100%;
  /* Slide-down animation via max-height */
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              opacity   0.3s ease,
              padding   0.3s ease;
  opacity: 0;
}

.dsxf-panel.dsxf-open {
  max-height: 600px;   /* enough for radius + CTPP + existing filters */
  opacity: 1;
}

.dsxf-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 20px;
  padding: 10px 0 10px;
  border-top: 1px solid #eee;
  margin-top: 10px;
  width: 100%;
  float: left;
}


/* â”€â”€ SHARED LABEL â”€â”€â”€â”€ */
.dsxf-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 7px;
  white-space: nowrap;
}

.dsxf-label svg {
  flex-shrink: 0;
  color: #aaa;
}


/* â”€â”€ AGE GROUP â”€â”€â”€â”€â”€â”€â”€ */
.dsxf-group {
  display: flex;
  flex-direction: column;
}

.dsxf-group--age {
  min-width: 150px;
  flex: 0 0 auto;
}

.dsxf-age-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dsxf-sep {
  font-size: 16px;
  color: #bbb;
  flex-shrink: 0;
}

.dsxf-num {
  width: 120px !important;
  height: 36px !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  padding: 8px 10px !important;
  text-align: center;
  color: #333 !important;
  transition: border-color 0.2s;
}

.dsxf-num:focus {
  border-color: #ff0042 !important;
  outline: none;
}

/* Hide number spin arrows */
.dsxf-num::-webkit-outer-spin-button,
.dsxf-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.dsxf-num[type=number] { -moz-appearance: textfield; }


/* â”€â”€ NATIONALITY GROUP â”€â”€ */
.dsxf-group--nat {
  flex: 1 1 160px;
  min-width: 140px;
  max-width: 240px;
}

.dsxf-text {
  height: 40px !important;
  width: 100% !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
  font-size: 14px !important;
  padding: 8px 12px !important;
  color: #333 !important;
  transition: border-color 0.2s;
}

.dsxf-text:focus {
  border-color: #ff0042 !important;
  outline: none;
}


/* â”€â”€ TOGGLE PILLS GROUP â”€ */
.dsxf-group--toggles {
  flex: 1 1 auto;
}

.dsxf-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

/* Hide the real checkbox */
.dsxf-pill input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none;
}

.dsxf-pill {
  cursor: pointer;
  display: inline-flex;
}

.dsxf-pill-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border: 1.5px solid #ddd;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  color: #555;
  background: #fff;
  transition: all 0.18s ease;
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.dsxf-pill-inner svg {
  flex-shrink: 0;
  transition: stroke 0.18s;
}

.dsxf-pill:hover .dsxf-pill-inner {
  border-color: #ff0042;
  color: #ff0042;
  background: #fff5f7;
}

/* Checked state */
.dsxf-pill input[type="checkbox"]:checked + .dsxf-pill-inner {
  border-color: #ff0042;
  background: #ff0042;
  color: #fff;
}

.dsxf-pill input[type="checkbox"]:checked + .dsxf-pill-inner svg {
  stroke: #fff;
}


/* â”€â”€ PANEL ACTIONS â”€â”€â”€ */
.dsxf-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
  align-self: flex-end;
  padding-bottom: 2px;
}

.dsxf-btn-apply {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  height: 38px !important;
  padding: 0 18px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  border: none;
  cursor: pointer;
  white-space: nowrap;
}

.dsxf-btn-clear {
  font-size: 13px;
  color: #aaa;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s;
}

.dsxf-btn-clear:hover {
  color: #ff0042;
  text-decoration: underline;
}


/* â”€â”€ RADIUS SLIDER GROUP  */
.dsxf-group--radius {
  flex: 1 1 200px;
  min-width: 180px;
  /* max-width: 280px; */
  padding-bottom: 0px;
  margin-bottom: 14px !important;
}

.dsxf-radius-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dsxf-radius-val {
  font-size: 13px;
  font-weight: 700;
  color: #ff0042;
  min-width: 52px;
  white-space: nowrap;
}

/* Range slider â€” themed to match site */
.dsxf-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100% !important;
  height: 4px !important;
  border-radius: 4px !important;
  background: #ddd !important;
  outline: none !important;
  border: none !important;
  padding: 0 !important;
  cursor: pointer;
  accent-color: #ff0042;
}

.dsxf-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff0042;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(255,0,66,0.4);
  transition: transform 0.15s;
}

.dsxf-range::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

.dsxf-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff0042;
  cursor: pointer;
  border: none;
  box-shadow: 0 1px 4px rgba(255,0,66,0.4);
}


/* â”€â”€ SELECT (Condition / Transaction / Period) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dsxf-group--select {
  flex: 0 0 auto;
  min-width: 130px;
}

.dsxf-select {
  height: 36px !important;
  width: 100% !important;
  border: 1px solid #ddd !important;
  border-radius: 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  padding: 0 8px !important;
  color: #444 !important;
  background: #fff !important;
  cursor: pointer;
  transition: border-color 0.2s;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23aaa'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 10px center !important;
  padding-right: 28px !important;
}

.dsxf-select:focus {
  border-color: #ff0042 !important;
  outline: none;
}


/* â”€â”€ PRICE GROUP (desktop â€” min+max side by side) â”€â”€â”€â”€â”€â”€â”€â”€â”€â”€ */
.dsxf-group--price {
  flex: 0 0 auto;
  min-width: 160px;
}

/* Split price groups â€” used on mobile grid; on desktop behave like select */
.dsxf-group--price-min,
.dsxf-group--price-max {
  flex: 0 0 auto;
  min-width: 90px;
}

.dsxf-num--price {
  /* width: 100% !important; */
}

.dsxf-price-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 280px;
}



.dsxf-price-sym {
  font-size: 14px;
  font-weight: 700;
  color: #888;
  flex-shrink: 0;
}


/* â”€â”€ CTPP visibility â€” controlled by JS  */
.dsxf-ctpp-field {
  transition: opacity 0.2s ease;
}


/* 
   MOBILE  â‰¤ 760px
   Row 1 : Area slider                    â€” 100%
   Row 2 : Listed (50%)  |  Condition (50%)
   Row 3 : Transaction (33%) | Min (33%) | Max (33%)
   Remaining: Age, Nationality, Pills, Actions â€” full width
*/
@media screen and (max-width: 760px) {

  .dsxf-panel {
    width: 100%;
    background: #fff;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.08);
    padding: 0;
  }

  .dsxf-panel.dsxf-open {
    max-height: 900px;
    background: transparent;
    box-shadow: none;
  }

  /* â”€â”€ Switch to a 6-column CSS grid
       6 cols lets us do exact 50% (3+3) and 33% (2+2+2) splits â”€â”€ */
  .dsxf-inner {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-template-areas:
      "radius  radius  radius  radius  radius  radius"
      "listed  listed  listed  cond    cond    cond  "
      "trans   trans   pmin    pmin    pmax    pmax  "
      "age     age     age     age     age     age   "
      "nat     nat     nat     nat     nat     nat   "
      "pills   pills   pills   pills   pills   pills "
      "acts    acts    acts    acts    acts    acts  ";
    gap: 10px 8px;
    padding: 24px 12px 0px;
    margin-top: 0;
    border-top: 1px solid #f0f0f0;
    background-color: transparent;
    align-items: end;
  }

  /* â”€â”€ Assign each group to its named grid area â”€â”€ */
  .dsxf-group--radius      {grid-area: radius;width: 90% !important;margin: auto;}
  .dsxf-group--period      { grid-area: listed; }
  .dsxf-group--condition   { grid-area: cond;   }
  .dsxf-group--transaction { grid-area: trans;  }
  .dsxf-group--price-min   { grid-area: pmin;   }
  .dsxf-group--price-max   { grid-area: pmax;   }
  .dsxf-group--age         { grid-area: age;    }
  .dsxf-group--nat         { grid-area: nat;    }
  .dsxf-group--toggles     { grid-area: pills;  }
  .dsxf-actions            { grid-area: acts;   }

  /* â”€â”€ All groups fill their cell with no overflow â”€â”€ */
  .dsxf-group,
  .dsxf-group--select,
  .dsxf-group--price-min,
  .dsxf-group--price-max {
    min-width: 0;
    width: 100%;
    max-width: 100%;
  }

  /* â”€â”€ Inputs & selects fill their cell â”€â”€ */
  .dsxf-select,
  .dsxf-num--price,
  .dsxf-range {
    width: 100% !important;
    min-width: 0;
  }

  /* â”€â”€ Age â€” keep horizontal label + min/max layout â”€â”€ */
  .dsxf-group--age {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    margin-top: -20px;
  }

  .dsxf-group--age .dsxf-label {
    margin-bottom: 0;
    min-width: 36px;
  }

  .dsxf-age-wrap { flex: 1; }

  .dsxf-num {
    flex: 1;
    width: auto !important;
  }

  /* â”€â”€ Nationality full width â”€â”€ */
  .dsxf-group--nat {
    width: 100%;
    max-width: 100%;
  }

  .dsxf-group--nat .dsxf-label { margin-bottom: 6px; }

  /* â”€â”€ Pills full width â”€â”€ */
  .dsxf-group--toggles {width: 100%;margin-top: 10px;}

  /* â”€â”€ Actions full width, button stretches â”€â”€ */
  .dsxf-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }

  .dsxf-btn-apply {
    width: 100% !important;
    justify-content: center;
    height: 46px !important;
    font-size: 15px !important;
    border-radius: 8px !important;
  }

  .dsxf-btn-clear {
    text-align: center;
    font-size: 14px;
  }
}


/* 
   TABLET  768px â€“ 1080px adjustments
*/
@media screen and (min-width: 768px) and (max-width: 1080px) {

  .dsxf-group--nat {
    max-width: 180px;
  }

}


/* 
   NATIONALITY AUTOCOMPLETE DROPDOWN
   Appended to <body> so it floats above all other content.
*/
.dsxf-nat-dd {
  position: absolute;
  z-index: 99999;
  list-style: none;
  margin: 0;
  padding: 4px 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0,0,0,0.10);
  max-height: 220px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  /* Smooth scroll inside dropdown */
  scroll-behavior: smooth;
}

/* Scrollbar â€” thin and themed */
.dsxf-nat-dd::-webkit-scrollbar {
  width: 5px;
}
.dsxf-nat-dd::-webkit-scrollbar-track {
  background: #f9f9f9;
  border-radius: 4px;
}
.dsxf-nat-dd::-webkit-scrollbar-thumb {
  background: #ddd;
  border-radius: 4px;
}
.dsxf-nat-dd::-webkit-scrollbar-thumb:hover {
  background: #ff0042;
}

/* Each option row */
.dsxf-nat-opt {
  padding: 9px 14px;
  font-size: 13px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.12s, color 0.12s;
  font-family: inherit;
}

.dsxf-nat-opt:hover,
.dsxf-nat-opt--active {
  background: #fff0f3;
  color: #ff0042;
}

/* "No results" message */
.dsxf-nat-empty {
  padding: 10px 14px;
  font-size: 12px;
  color: #aaa;
  font-style: italic;
  cursor: default;
}


/*  Hide legacy mobile .cx Filters button (More Filters covers all devices) â”€â”€ */
.dsxf-cx-hidden {
  display: none !important;
}


/*
   MOBILE: More Filters button adjustments
 */
@media screen and (max-width: 760px) {
  .dsxf-toggle-topright {
    top: 262px;
    right: 10px;
  }

  .dsxf-toggle-btn {
    padding: 5px 10px 5px 8px;
    font-size: 12px;
  }

  /* Active count badge â€” slightly larger on mobile for tap target */
  .dsxf-active-count {
    font-size: 10px;
    min-width: 16px;
    height: 16px;
  }
}


/* 
   ADULT-ONLY FIELD VISIBILITY
   .dsxf-adult-field  â€” Age, Nationality, Incall, Outcall
   .dsxf-common-field â€” Has Photo, Video, Premium, Featured, New
   JS _updateAdultFields() toggles display on .dsxf-adult-field.
   CSS transition gives a smooth fade so it doesn't just snap.
 */
.dsxf-adult-field {
  transition: opacity 0.2s ease;
}

/* When JS hides them it sets display:none directly.
   We add a tiny animation via max-height on the wrappers.
   The label+pill pattern means we also need to handle
   the group divs fading in/out. */
.dsxf-group.dsxf-adult-field,
.dsxf-pill.dsxf-adult-field {
  overflow: hidden;
}


/*
   HOME PAGE (main.php) #body-home scoped overrides
   Different top position for the More Filters button on the
   home page vs the search/results page. 
*/

@media screen and (min-width: 768px) {
  #body-home .dsxf-toggle-wrap {
    float: none;
    width: auto;
    margin: 0;
  }
  #body-home .dsxf-toggle-topright {
    top: -18px !important;
  }
}

@media screen and (max-width: 760px) {
  #body-home .dsxf-toggle-wrap {
    float: none;
    width: auto;
    margin: 0;
  }
  #body-home .dsxf-toggle-topright {
    top: 274px !important;
  }
}


/* Location dropdown listing count badge */
.loc-picker .shower .option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.ds-loc-count {
  background: rgba(0,0,0,0.08);
  color: #888;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  min-width: 22px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1.6;
}
.loc-picker .shower .option:hover .ds-loc-count,
.loc-picker .shower .option.selected .ds-loc-count {
  background: rgba(255,255,255,0.25);
  color: #fff;
}
