
.lfp-overlay{
  position:fixed; inset:0;
  background:rgba(0,0,0,.55);
  display:none; z-index:99999;
  overflow:auto; padding:40px;
  font-family:Arial, sans-serif;
}
.lfp-overlay.active{display:block}

.lfp-modal{
  background:#fff; border-radius:8px;
  padding:25px; max-width:1600px; margin:auto;
}

.lfp-header{
  display:flex; align-items:center; gap:20px;
  border-bottom:1px solid #eee; padding-bottom:15px;
}
.lfp-header h2{margin-left:auto; font-size:22px}
.lfp-close{font-size:26px; background:none; border:none; cursor:pointer}
.lfp-reset{border:1px solid #28a745; color:#28a745; padding:6px 14px; border-radius:20px; background:#fff}

.lfp-grid{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap:20px;
  margin-top:25px;
}



.filter_wrap {
  background: #EFEFEF;
  padding: 14px;
}








.lfp-col h3{
  margin:20px 0 10px;
  font-size:19px;
}

.lfp-field{
margin-bottom:22px;
font-family: 'FT Monopol', sans-serif !important;
}
.lfp-field label{display:block; font-size:16px; margin-bottom:6px}

.lfp-field input[type=range]{width:100%}

.lfp-field select{
  width:100%; padding:6px;
  border:1px solid #ddd; border-radius:6px;
}

.lfp-check-row{
  display:flex; gap:10px; flex-wrap:wrap;
  font-size:13px; margin-bottom:10px;
font-family: 'FT Monopol', sans-serif !important;
}

.lfp-footer{
  margin-top:25px; text-align:left;
}
.lfp-ok{
  background:#168534; color:#fff;
  border:none; padding:8px 18px;
  border-radius:6px;
}


/* ================= MOBILE / TABLET ================= */

@media (max-width: 1100px){

  .lfp-overlay{
    padding:0;
  }

  .lfp-modal{
    border-radius:0;
    min-height:100vh;
    padding:15px;
  }

  .lfp-header{
    position:sticky;
    top:0;
    background:#fff;
    z-index:5;
    padding:10px 0 15px;
  }

  .lfp-header h2{
    font-size:18px;
  }

  /* grid -> single column */
  .lfp-grid{
    display:block;
    margin-top:10px;
  }

  /* COLUMN becomes ACCORDION */
  .lfp-col{
    border-bottom:1px solid #e5e5e5;
    padding:10px 0;
  }

  .lfp-col h3{
    margin:0;
    padding:12px 0;
    font-size:15px;
    cursor:pointer;
    position:relative;
  }

  .lfp-col h3:after{
    content:"+";
    position:absolute;
    right:0;
    top:12px;
    font-size:20px;
    transition:.2s;
  }

  .lfp-col.open h3:after{
    content:"–";
  }

  /* hide content */
  .lfp-col .lfp-field,
  .lfp-col .lfp-check-row{
    display:none;
  }

  .lfp-col.open .lfp-field,
  .lfp-col.open .lfp-check-row{
    display:block;
  }

  /* nicer spacing inside accordion */
  .lfp-col.open{
    padding-bottom:15px;
  }

  .lfp-field label{
    font-size:16px;
  }

  .lfp-field input[type=range]{
    height:32px;
  }

  .lfp-footer{
    position:sticky;
    bottom:0;
    background:#fff;
    padding-top:10px;
  }

  .lfp-ok{
    width:100%;
    padding:12px;
    font-size:16px;
  }
}




@media (max-width: 1100px){

  /* скрываем ВСЁ внутри колонок */
  .lfp-col .lfp-field,
  .lfp-col .lfp-check-row,
  .lfp-col select,
  .lfp-col input {
    display: none;
  }

  /* показываем только активную секцию */
  .lfp-section-open {
    display: block !important;
  }

  /* визуальный active */
  .lfp-col h3.active:after{
    content:"–";
  }
}





.range-wrap{
  position:relative;
  height:30px;
}

/* ВАЖНО: НЕ блокируем input целиком */
.range-wrap input[type=range]{
  position:absolute;
  width:100%;
  margin:0;
  background:none;
  pointer-events:auto;
}

/* разделяем уровни */
.range-wrap input.min{
  z-index:2;
}

.range-wrap input.max{
  z-index:3;
}

/* фикс чтобы thumb был кликабельный */
.range-wrap input[type=range]::-webkit-slider-thumb{
  pointer-events:auto;
  position:relative;
  z-index:5;
}




/*sliders styles*/

/* ========== noUiSlider base line ========== */
.noUi-target{
  height:4px;
  border:none;
  border-radius:2px;
  background:#e5e5e5;
  box-shadow:none;
}

.noUi-connect{
  background:#28a745;
}

/* handles */
.noUi-handle{
  width:13px;
  height:13px;
  top:-7px;
  right:-9px;
  border-radius:50%;
  background:#fff;
  border:1px solid #28a745;
  box-shadow:none;
  cursor:pointer;
}

.noUi-handle:before,
.noUi-handle:after{
  display:none;
}

/* значения над бегунками */
.noUi-tooltip{
  background:transparent;
  border:none;
  color:#333;
  font-size:14px;
  top:-28px;
}



/* убираем дефолт */
.lfp-field input[type=range]{
  -webkit-appearance:none;
  width:100%;
  height:4px;
  background:#e5e5e5;
  border-radius:2px;
  outline:none;
}

/* активная часть трека (заполняем через gradient) */
.lfp-field input[type=range]{
  background:linear-gradient(
    to right,
    #28a745 0%,
    #28a745 var(--value, 0%),
    #e5e5e5 var(--value, 0%),
    #e5e5e5 100%
  );
}

/* бегунок */
.lfp-field input[type=range]::-webkit-slider-thumb{
  -webkit-appearance:none;
  width:13px;
  height:13px;
  border-radius:50%;
  background:#fff;
  border:1px solid #28a745;
  cursor:pointer;
  margin-top:-7px;
  position:relative;
  z-index:5;
}

.lfp-field input[type=range]::-moz-range-thumb{
  width:13px;
  height:13px;
  border-radius:50%;
  background:#fff;
  border:1px solid #28a745;
  cursor:pointer;
}


/* values above sliders */
.lfp-range-values{
  display:flex;
  justify-content:space-between;
  font-size:14px;
  margin-bottom:6px;
  color:#333;
}

.lfp-range-values .lfp-current{
  font-weight:700;
}

/* немного воздуха */
.lfp-range{
  margin-bottom:18px;
}

#power-slider {
  margin-top: 20px !important;
}





.noUi-horizontal .noUi-handle {
  width: 13px;
  height: 13px;
  right: -9px;
  top: -4px;
}
.noUi-handle {
  width: 13px;
  height: 13px;
  border: 1px solid #28a745;
}



/* ===== bubbles over handles ===== */

.noui-with-bubbles{
  position:relative;
  margin-top:38px;
}

.noui-bubble{
  position:absolute;
  top:-28px;
  transform:translateX(-50%);
  font-size:14px;
  font-weight:600;
  color:#333;
  white-space:nowrap;
  pointer-events:none;
}

/* чтобы позиционирование было точным */
.noUi-target{
  position:relative;
}


.noui-with-bubbles{
  position:relative;
  padding-top:28px;
}

.noui-bubble{
  position:absolute;
  top:0;
  transform:translateX(-50%);
  font-size:10px;
  font-weight:400;
  white-space:nowrap;
  pointer-events:none;
}



.noui-bubble {
  margin-top: -22px !important;
  margin-left: 4px !important;
}
#engines-slider {
  margin-top: 20px !important;
}
.noui-with-bubbles {
  position: relative;
  padding-top: 0px !important;
}

.noui-minmax{
  display:flex;
  justify-content:space-between;
  margin-top:2px;
  font-size:12px;
  color:#000;
  font-weight: 500;
}










.select2-container--default .select2-selection--single.select2-selection--single {
  background-color: #fff !important;
  border-radius: 30px !important;
}

.select2-container--default .select2-selection--single.select2-selection--single .select2-selection__rendered {
  font-size: 13px !important;
  font-weight: 500;
  line-height: 30px;
}

.select2-container--default .select2-selection--single.select2-selection--single {
  height: 30px !important;
}

.select2-container--default .select2-selection--single.select2-selection--single .select2-selection__arrow b {
  font-size: 12px !important;
}

.select2-container--default .select2-selection--single.select2-selection--single .select2-selection__arrow {
  height: 30px !important;
}




#lfpClose {
  color: #000;
  border: 1px solid #000;
  border-radius: 5px;
  margin: 0px !important;
  padding: 10px;
  font-weight: 100;
}


.lfp-reset {
  color: #28a745 !important;
  padding: 10px;
  text-transform: none !important;
}


.lfp-header {
  padding-bottom: 5px !important;
}

.lfp-modal {
  padding-top: 5px !important;
}

.lfp-grid {
  margin-top: 0px !important;
}




/* ===== Drive type checkboxes ===== */

.lfp-check-row{
  display:flex;
  gap:28px;
  align-items:center;
  margin-top:8px;
}

.lfp-check-row label{
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  font-size:15px;
  color:#222;
  user-select:none;
}

/* скрываем стандартный checkbox */
.lfp-check-row input[type="checkbox"]{
  appearance:none;
  -webkit-appearance:none;
  width:18px;
  height:18px;
  border-radius:50%;
  border:2px solid #28a745;
  background:#fff;
  display:inline-block;
  position:relative;
  cursor:pointer;
  transition:.2s;
}

/* зелёная точка внутри */
.lfp-check-row input[type="checkbox"]::after{
  content:"";
  position:absolute;
  width:8px;
  height:8px;
  border-radius:50%;
  background:#28a745;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%) scale(0);
  transition:.2s;
}

/* checked */
.lfp-check-row input[type="checkbox"]:checked::after{
  transform:translate(-50%, -50%) scale(1);
}

/* небольшой hover эффект */
.lfp-check-row input[type="checkbox"]:hover{
  box-shadow:0 0 0 4px rgba(40,167,69,.12);
}


.lfp-check-row input[type="checkbox"] {
  width: 14px;
  height: 14px;
  border: 1px solid #28a745;
}

.lfp-check-row label {
  gap: 8px;
}

.lfp-check-row {
  gap: 8px;
}


.stm-template-listing_one_elementor h3 {
  letter-spacing: 0px;
  word-spacing: 0px;
}


@media (max-width: 1100px) {
  .filter_wrap {
    background: transparent !important;
    padding: 0 !important;
  }
}



.lfp-check-row input[type="radio"]{
  accent-color: #28a745;
}

#kmph_acceleration {
  margin-top: 20px;
}

.lfp-slider-labels {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    margin-top: 0px;
    opacity: 0.6;
}

#israel_safety_slider {
  margin-top: 20px;
}

.noUi-tooltip {
  background: transparent;
  border: none;
  color: #333;
  font-size: 11px !important;
  top: -24px !important;
}

.lfp-slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-top: 0px !important;
  opacity: 0.6;
  font-weight: 600;
  color: #000;
}

#ncap_safety_slider {
  margin-top: 20px;
}

#main_screen_size_slider {
  margin-top: 20px;
}

#number_of_woofers_slider, #years_battery_warranty_slider, #years_vehicle_warranty_slider,#km_battery_warranty_slider, #km_vehicle_warranty_slider, #kwh_battery_capacity, #dc_charging_voltage, #time_time, #mm_underbody_clearance, #seats_number_slider, #trunk_capacity_l, #frunk_capacity_l, #kg_weight, #kg_towing_capacity, #kwh_per_km_consumption, #m_length, #m_width {
  margin-top: 20px;
}


.radio_lable {
  font-family: 'FT Monopol', sans-serif !important;
  font-size: 16px;
}
.lfp-check-row {
  gap: 8px;
  padding-bottom: 12px;
}


/* select2 dropdown above the popup overlay (moved from inline <style> in footer.php).
   Only an OPEN container: on every closed select it lifted the boxes over the
   popup's sticky header and its Close / Reset buttons on mobile (task 14642). */
.select2-container.select2-container--open{
    z-index: 999999 !important;
}

/* =====================================================
 * Merged from QA (filters + cars import), 2026-09-25
 * Rules that lived in QA's inline footer <style> blocks or were added to
 * QA's advanced_filters.css: RTL sliders, price inputs row on phones,
 * Make & Model sheet scroll lock, filters badge, hidden-field spacing.
 * ===================================================== */

.lfp-ok{background:#168534;color:#fff;border:none;padding:8px 18px;border-radius:6px;}

@media (max-width:768px){#gcRangePopup.gc-range-popup{position:fixed;left:8px;right:8px;top:50%;width:auto;}#gcMakePopup.gc-make-popup.active{position:fixed;top:12px;bottom:12px;left:12px;right:12px;width:auto;max-width:none;max-height:none;overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;transform:none;}#gcMakePopup.gc-make-popup{grid-template-columns:minmax(0,1fr);}#gcMakePopup .gc-make-grid{grid-template-columns:repeat(3,minmax(0,1fr));}#gcMakePopup .gc-make-footer{position:sticky;bottom:-12px;background:#fff;padding-bottom:12px;z-index:2;}}

@media (max-width:768px){#gcPricePopup .gc-price-inputs-row{display:flex;justify-content:space-between;gap:12px;margin:4px 0 18px;}#gcPricePopup .gc-price-inputs-row #gcPriceMin,#gcPricePopup .gc-price-inputs-row #gcPriceMax{position:static !important;transform:none !important;left:auto !important;right:auto !important;top:auto !important;margin:0 !important;flex:0 1 140px;width:auto;min-width:0;}}

.lfp-filters-badge{border:1px solid #28a745;color:#28a745;padding:6px 14px;border-radius:20px;background:#fff;cursor:default}

.lfp-reset,.lfp-filters-badge{color:#28a745 !important;padding:10px;text-transform:none !important;}

#years_battery_warranty_slider,#years_vehicle_warranty_slider,#km_battery_warranty_slider,#km_vehicle_warranty_slider,#kwh_battery_capacity,#seats_number_slider,#trunk_capacity_l,#kg_weight,#kwh_per_km_consumption,#m_length,#m_width{margin-top:20px;}

.noUi-txt-dir-rtl.noUi-horizontal .noUi-handle,[dir="rtl"] .noUi-handle,[dir="rtl"] .noUi-horizontal .noUi-handle,[dir="rtl"] #gcPriceSlider .noUi-handle,[dir="rtl"] #gcRangeSlider .noUi-handle{right:auto;left:-9px;}

#gcPricePopup #gcPriceMin,#gcPricePopup #gcPriceMax{line-height:32px;width:116px;padding:0 6px;}

html.gc-sheet-open,html.gc-sheet-open body{overflow:hidden !important;}

html.gc-sheet-open #header,html.gc-sheet-open #header *{opacity:0 !important;pointer-events:none !important;}

html.gc-sheet-open body{position:fixed;left:0;right:0;width:100%;}

[dir="rtl"] .noui-bubble{margin-left:0 !important;margin-right:4px !important;}

[dir="rtl"] .gc-price-title,[dir="rtl"] .gc-price-subtitle{text-align:right;}

#carsPagination .page-btn:not(.load-more-btn){color:#000;}

.noUi-txt-dir-rtl.noUi-horizontal .noUi-handle,[dir="rtl"] .noUi-handle,[dir="rtl"] .noUi-horizontal .noUi-handle{right:auto;left:-9px;}

[dir="rtl"] .noui-bubble{margin-left:0 !important;margin-right:4px !important;}

[dir="rtl"] .gc-price-title,[dir="rtl"] .gc-price-subtitle{text-align:right;}

/* Task 14642. Hidden Make & Model popup: the base rule hides it with
   visibility:hidden only, and some of its buttons stay hit-testable above
   #listingFilterPopup, swallowing clicks there. It is shown by the .active
   class, so while it lacks .active nothing inside it takes pointer events. */
#gcMakePopup:not(.active),
#gcMakePopup:not(.active) *{pointer-events:none !important;}

/* Task 14642. Version (trim) checkboxes: checkbox and text on one line.
   On phones the accordion adds .lfp-section-open (display:block !important)
   to every descendant, which put the checkbox on its own line. */
#listingFilterPopup #trim_filter label{display:flex !important;flex-direction:row;align-items:center;gap:8px;}
#listingFilterPopup #trim_filter label input[type="checkbox"]{display:inline-block !important;flex:0 0 auto;margin:0;}

/* Version (task 14642) is multi-select, so square boxes with a tick like the
   hero badges, not the round single-choice dots of the other check rows;
   rows tall enough to tap on a phone. */
#listingFilterPopup #trim_filter input[type="checkbox"]{width:18px;height:18px;border-radius:3px;border:2px solid #28a745;}
#listingFilterPopup #trim_filter input[type="checkbox"]::after{width:10px;height:5px;border-radius:0;background:transparent;border:solid #28a745;border-width:0 0 2px 2px;transform:translate(-50%,-65%) rotate(-45deg) scale(0);}
#listingFilterPopup #trim_filter input[type="checkbox"]:checked::after{transform:translate(-50%,-65%) rotate(-45deg) scale(1);}
#listingFilterPopup #trim_filter label{min-height:36px;}
@media (max-width:768px){#listingFilterPopup #trim_filter label{min-height:44px;}}
/* One Version option per line, so each box sits clearly with its own label. */
#listingFilterPopup #trim_filter{display:flex;flex-direction:column;align-items:flex-start;gap:0;}
