/*!
 * Rapid Scooter: mobile filter sheet v1.1
 * Pairs with rs-filter-sheet.js. Only transform and opacity animate, so open and
 * close run on the compositor and never block a tap.
 */

:root {
  --rsf-ink: #222;
  --rsf-muted: #6b6b6b;
  --rsf-line: #dcdcdc;
  --rsf-soft: #f4f4f2;
  --rsf-bg: #fff;
  --rsf-go: #018849;      /* site CTA green */
  --rsf-go-ink: #fff;
  --rsf-accent: #d9534f;  /* Filter button count badge */
  --rsf-radius: 6px;
  --rsf-ease: cubic-bezier(.2, .8, .2, 1);
  --rsf-dur: .28s;
}


/* ---------- Theme shield ----------
 * Elementor kit styles target bare button, input and h2/h3 (and button:focus turns
 * them pink). Everything below is scoped to #rsf-sheet so the theme cannot win. */
#rsf-sheet, #rsf-sheet * { text-transform: none; letter-spacing: normal; box-sizing: border-box; }
#rsf-sheet button {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  color: inherit;
  font: inherit;
  line-height: 1.2;
  box-shadow: none;
  text-decoration: none;
}
#rsf-sheet h2, #rsf-sheet h3 { color: inherit; font-family: inherit; }
#rsf-sheet button:hover, #rsf-sheet button:focus { opacity: 1; }
#rsf-sheet input[type=checkbox], #rsf-sheet input[type=range] {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  font: inherit;
  color: inherit;
}

/* ---------- Trigger button ----------
 * Matches the original UAEL Filter button exactly (measured on the live site at
 * phone width): Oxanium 16px / 400, 22px line height, 12px 18px 9px padding, no border,
 * square corners, white background, 16px sliders icon 11px from the text. */
button.rsf-trigger.rsf-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  margin: 0;
  padding: 12px 18px 9px;
  border: 0;
  border-radius: 0;
  outline: 0;
  box-shadow: none;
  background: #fff;
  color: #222;
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: normal;
  text-transform: capitalize;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
button.rsf-trigger.rsf-trigger:hover,
button.rsf-trigger.rsf-trigger:focus,
button.rsf-trigger.rsf-trigger:active {
  border: 0;
  outline: 0;
  box-shadow: none;
  background: #fff;
  color: #222;
}
button.rsf-trigger.rsf-trigger:focus-visible { outline: 2px solid var(--rsf-go); outline-offset: 2px; }
button.rsf-trigger.rsf-trigger svg { width: 16px; height: 16px; flex: none; fill: currentColor; }
button.rsf-trigger.rsf-trigger .rsf-trigger__n {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  background: var(--rsf-accent);
  color: #fff;
  font-size: 12px;
  line-height: 20px;
  text-align: center;
}
button.rsf-trigger.rsf-trigger .rsf-trigger__n[hidden] { display: none; }

/* Keep the Filter button and its neighbours (Sort) on one line on mobile and tablet, with or
   without the number. The button never shrinks below its content; the neighbours give way.
   The widths set in each template still apply whenever there is room for them. */
@media (max-width: 1024px) {
  .e-con:has(> .elementor-widget .rsf-trigger),
  .elementor-widget-wrap:has(> .elementor-widget .rsf-trigger) { flex-wrap: nowrap !important; }
  .e-con:has(> .elementor-widget .rsf-trigger) > .elementor-widget:has(.rsf-trigger),
  .elementor-widget-wrap:has(> .elementor-widget .rsf-trigger) > .elementor-widget:has(.rsf-trigger) {
    flex-shrink: 0 !important;
    min-width: max-content !important;
  }
  .e-con:has(> .elementor-widget .rsf-trigger) > .elementor-widget:not(:has(.rsf-trigger)),
  .elementor-widget-wrap:has(> .elementor-widget .rsf-trigger) > .elementor-widget:not(:has(.rsf-trigger)) {
    flex-shrink: 1 !important;
    min-width: 0 !important;
  }
}
/* Narrow phones: a slightly tighter button leaves Sort room for its full label. */
@media (max-width: 400px) {
  button.rsf-trigger.rsf-trigger { padding-left: 12px; padding-right: 12px; gap: 8px; }
}

/* ---------- Sheet ----------
 * Non-modal <dialog> + our own backdrop: no page-wide inert/overflow changes, so
 * opening never triggers a style recalc of the whole page. Background scrolling
 * is blocked with touch-action / overscroll-behavior instead of locking <html>. */
.rsf-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  background: rgb(0 0 0 / .45);
  opacity: 0;
  pointer-events: none;
  touch-action: none;
  transition: opacity var(--rsf-dur) linear;
}
.rsf-backdrop.is-on { opacity: 1; pointer-events: auto; }

#rsf-sheet {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 2147483647;
  width: 100%;
  max-width: 640px;
  max-height: min(92dvh, 820px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 14px 14px 0 0;
  background: var(--rsf-bg);
  color: var(--rsf-ink);
  font: inherit;
  box-shadow: 0 -8px 40px rgb(0 0 0 / .18);
  transform: translate3d(0, 100%, 0);
  transition: transform var(--rsf-dur) var(--rsf-ease);
  will-change: transform;
  contain: layout paint style;
  overscroll-behavior: contain;
  touch-action: none; /* header/footer drags never scroll the page behind */
}
#rsf-sheet[open] { transform: none; }
@starting-style { #rsf-sheet[open] { transform: translate3d(0, 100%, 0); } }
#rsf-sheet.is-closing { transform: translate3d(0, 100%, 0); }
#rsf-sheet.is-dragging { transition: none; }


#rsf-sheet .rsf__form {
  display: flex;
  flex-direction: column;
  max-height: inherit;
  margin: 0;
}

/* Header */
#rsf-sheet .rsf__head {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 8px 10px 20px;
  touch-action: none; /* drag-to-close */
  flex: none;
}
#rsf-sheet .rsf__grab {
  position: absolute;
  top: 7px;
  left: 50%;
  width: 40px;
  height: 4px;
  margin-left: -20px;
  border-radius: 2px;
  background: #cfcfcf;
}
#rsf-sheet .rsf__title {
  flex: 1;
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .01em;
}
#rsf-sheet .rsf__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--rsf-ink);
  cursor: pointer;
  touch-action: manipulation;
}
#rsf-sheet .rsf__close:active { background: var(--rsf-soft); }
#rsf-sheet .rsf__close svg { width: 22px; height: 22px; }

/* Selected chips */
#rsf-sheet .rsf__chips {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 0 20px 12px;
  overflow-x: auto;
  overscroll-behavior: contain;
  touch-action: pan-x;
  scrollbar-width: none;
  border-bottom: 1px solid var(--rsf-line);
  flex: none;
}
#rsf-sheet .rsf__chips::-webkit-scrollbar { display: none; }
#rsf-sheet .rsf__hint {
  font-size: 13px;
  line-height: 1.3;
  color: var(--rsf-muted);
  white-space: normal;
}
#rsf-sheet .rsf-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
  height: 34px;
  padding: 0 10px 0 12px;
  border: 0;
  border-radius: 17px;
  background: var(--rsf-ink);
  color: #fff;
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
#rsf-sheet .rsf-chip svg { width: 14px; height: 14px; opacity: .75; }

/* Scrolling body */
#rsf-sheet .rsf__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
  padding: 4px 20px 8px;
}

#rsf-sheet .rsf-sec {
  padding: 18px 0 20px;
  border-bottom: 1px solid var(--rsf-line);
  contain: layout style;
}
#rsf-sheet .rsf-sec:last-child { border-bottom: 0; }
#rsf-sheet .rsf-sec__h {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.2;
}
#rsf-sheet .rsf-sec__n {
  font-size: 13px;
  font-weight: 500;
  color: var(--rsf-muted);
}

/* Option pills: real checkboxes, visual state is pure CSS */
#rsf-sheet .rsf-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
#rsf-sheet .rsf-opts--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
#rsf-sheet .rsf-opt {
  position: relative;
  display: block;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
#rsf-sheet .rsf-opt input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
#rsf-sheet .rsf-opt__ui {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--rsf-line);
  border-radius: var(--rsf-radius);
  background: var(--rsf-bg);
  font-size: 15px;
  font-weight: 500;
  line-height: 1.1;
  white-space: nowrap;
  user-select: none;
}
#rsf-sheet .rsf-opt__ui em {
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--rsf-muted);
}
#rsf-sheet .rsf-opt__tick {
  display: none;
  width: 14px;
  height: 14px;
  flex: none;
}
#rsf-sheet .rsf-opt input:checked + .rsf-opt__ui {
  border-color: var(--rsf-ink);
  background: var(--rsf-ink);
  color: #fff;
}
#rsf-sheet .rsf-opt input:checked + .rsf-opt__ui em { color: rgb(255 255 255 / .65); }
#rsf-sheet .rsf-opt input:checked + .rsf-opt__ui .rsf-opt__tick { display: block; }
#rsf-sheet .rsf-opt input:focus-visible + .rsf-opt__ui {
  outline: 2px solid var(--rsf-go);
  outline-offset: 2px;
}
#rsf-sheet .rsf-opt input:disabled + .rsf-opt__ui {
  border-style: dashed;
  color: #b4b4b4;
}
#rsf-sheet .rsf-opt:has(input:disabled) { cursor: default; }

/* Collapsed long lists */
#rsf-sheet .rsf-sec[data-collapsed] .rsf-opt--extra { display: none; }
#rsf-sheet .rsf-more {
  margin-top: 10px;
  padding: 8px 0;
  border: 0;
  background: none;
  color: var(--rsf-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
#rsf-sheet .rsf-sec:not([data-collapsed]) .rsf-more { display: none; }

/* Price */
#rsf-sheet .rsf-price__out {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
#rsf-sheet .rsf-range {
  position: relative;
  height: 44px;
  margin: 0 4px;
  --lo: 0%;
  --hi: 100%;
}
#rsf-sheet .rsf-range__track {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  background: linear-gradient(to right,
    var(--rsf-line) var(--lo), var(--rsf-ink) var(--lo),
    var(--rsf-ink) var(--hi), var(--rsf-line) var(--hi));
}
#rsf-sheet .rsf-range input[type=range] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  background: none;
  pointer-events: none;
  -webkit-appearance: none;
  appearance: none;
}
#rsf-sheet .rsf-range input[type=range]::-webkit-slider-runnable-track { background: none; border: 0; height: 44px; }
#rsf-sheet .rsf-range input[type=range]::-moz-range-track { background: none; border: 0; }
#rsf-sheet .rsf-range input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: 8px;
  border: 2px solid var(--rsf-ink);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / .2);
  pointer-events: auto;
  cursor: grab;
}
#rsf-sheet .rsf-range input[type=range]::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border: 2px solid var(--rsf-ink);
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgb(0 0 0 / .2);
  pointer-events: auto;
  cursor: grab;
}
#rsf-sheet .rsf-range input[type=range]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--rsf-go); outline-offset: 2px; }
#rsf-sheet .rsf-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}
#rsf-sheet .rsf-preset {
  min-height: 40px;
  padding: 0 6px;
  border: 1.5px solid var(--rsf-line);
  border-radius: var(--rsf-radius);
  background: var(--rsf-bg);
  color: var(--rsf-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
}
#rsf-sheet .rsf-preset[aria-pressed=true] {
  border-color: var(--rsf-ink);
  background: var(--rsf-ink);
  color: #fff;
}
#rsf-sheet .rsf-preset:disabled {
  border-style: dashed;
  color: #b4b4b4;
  cursor: default;
}

/* Footer */
#rsf-sheet .rsf__foot {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--rsf-line);
  background: var(--rsf-bg);
  flex: none;
}
#rsf-sheet .rsf__reset {
  min-height: 48px;
  padding: 0 6px;
  border: 0;
  background: none;
  color: var(--rsf-ink);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  touch-action: manipulation;
}
#rsf-sheet .rsf__reset:disabled { color: #b4b4b4; text-decoration: none; cursor: default; }
#rsf-sheet .rsf__apply {
  flex: 1;
  min-height: 52px;
  border: 0;
  border-radius: 4px;
  background: var(--rsf-go);
  color: var(--rsf-go-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  touch-action: manipulation;
}
#rsf-sheet .rsf__apply:active { filter: brightness(.92); }
#rsf-sheet .rsf__apply:disabled {
  background: #c9d6cf;
  color: #fff;
  cursor: default;
  filter: none;
}

@media (prefers-reduced-motion: reduce) {
#rsf-sheet, .rsf-backdrop { transition-duration: .01s; }
}
