/* svbar · Booking-style Sort · Filters · Map on the root LAB hotel results (28.09.2026).
   Every visible rule is scoped by html[data-svbar], which svbar.js sets only while hotel results
   are on screen: "m" below 1024px (phone + tablet, the rail is a drawer), "d" from 1024px.
   Without the attribute (other surfaces, no results, module off) nothing here shows. */
:root { --svbar-css: 1; } /* svbar.js draws nothing unless this stylesheet arrived */
.svbar-bar, .svbar-row, .svbar-clear, .svbar-foot, .svbar-mapcard { display: none; }
.svbar-bar, .svbar-bar *, .svbar-row, .svbar-row *, .svbar-mapcard, .svbar-mapcard *, .svbar-foot, .svbar-sheet, .svbar-sheet * { box-sizing: border-box; }

.svbar-btn, .svbar-chip, .svbar-clearall, .svbar-clear, .svbar-show, .svbar-mapcard, .svbar-sheet-close {
  font-family: inherit; -webkit-tap-highlight-color: transparent;
}
.svbar-btn:focus-visible, .svbar-chip:focus-visible, .svbar-clearall:focus-visible, .svbar-clear:focus-visible,
.svbar-show:focus-visible, .svbar-mapcard:focus-visible, .svbar-sheet-close:focus-visible {
  outline: 3px solid #2563eb; outline-offset: 2px;
}
.svbar-opt:has(input:focus-visible) { outline: 3px solid #2563eb; outline-offset: -3px; border-radius: 8px; }

/* ── chips (shared) ── */
.svbar-chip {
  flex: none; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px;
  border: 1px solid #c9d1dc; border-radius: 22px; background: #fff; color: #10213d;
  font-size: 14px; font-weight: 500; line-height: 1.2; white-space: nowrap; cursor: pointer;
}
.svbar-chip:hover { border-color: #9aa6b5; }
.svbar-chip-n { color: #64748b; font-size: 14px; }
.svbar-chip[aria-pressed="true"], .svbar-act { border-color: #ff7900; background: #fff4ea; color: #8a3d00; font-weight: 600; }
.svbar-chip[aria-pressed="true"] .svbar-chip-n { color: #8a3d00; }
.svbar-x { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: -4px; }
.svbar-x svg { width: 16px; height: 16px; }
.svbar-chip-all { color: #9a4d00; font-weight: 600; border-color: #f0c49c; }
.svbar-chip-all svg { width: 18px; height: 18px; }
.svbar-active[hidden] { display: none !important; }
.svbar-clearall {
  min-height: 44px; padding: 0 10px; border: 0; border-radius: 8px; background: none; color: #9a4d00;
  font-size: 14px; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}
.svbar-clearall:hover { background: #fff4ea; }

/* ══ phone + tablet (<1024) ════════════════════════════════════════════════ */
/* The results bar keeps „Прикажани N понуди“ and the dates but no longer sticks: our bar takes
   its place under the stuck search summary, and its Мапа/Подреди row is served by our bar. */
html[data-svbar="m"] .sv-results-bar { position: relative !important; top: auto !important; }
html[data-svbar="m"] .sv-results-bar[data-sv-stuck="1"] { box-shadow: none !important; border-bottom-color: transparent !important; }
html[data-svbar="m"] .sv-results-bar[data-sv-stuck="1"] > :first-child { display: block !important; } /* no height jump off-screen */
html[data-svbar="m"] .sv-results-bar > :last-child:has(button) { display: none !important; }
html[data-svbar-fab="off"] .svf-fab { display: none !important; }

html[data-svbar="m"] .svbar-bar {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  position: -webkit-sticky; position: sticky; top: var(--sv-bar-top, 0px); z-index: 1189;
  margin: 4px -10px 0; padding: 2px 6px; background: #fff; border-bottom: 1px solid #e6e9ee;
  transition: box-shadow .15s ease;
}
html[data-svbar="m"] .svbar-bar.is-stuck { box-shadow: 0 4px 12px rgba(15, 23, 42, .12); }
.svbar-btn {
  position: relative; display: flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 0; min-height: 48px; padding: 0 4px; border: 0; border-radius: 8px; background: transparent;
  color: #9a4d00; font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer;
}
.svbar-btn:hover { background: #fff7ef; }
.svbar-btn:disabled { color: #9aa3ad; cursor: default; background: transparent; }
.svbar-btn svg { width: 20px; height: 20px; flex: none; }
.svbar-n:empty { display: none; }
.svbar-n {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 10px; background: #ff7900; color: #fff; font-size: 13px; font-weight: 700; line-height: 1;
}
html[data-svbar="m"] .svbar-row { display: block; margin: 0 -10px; }
html[data-svbar="m"] .svbar-chips {
  display: flex; gap: 8px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
  padding: 10px 10px 6px; -webkit-overflow-scrolling: touch;
}
html[data-svbar="m"] .svbar-chips::-webkit-scrollbar { display: none; }

/* The filter drawer on the full screen: × · Филтри · Исчисти on top, „Прикажи N понуди“ pinned. */
html[data-svbar="m"] .svf-rail {
  top: 0 !important; bottom: 0 !important; height: 100vh; height: 100dvh; max-height: none !important;
  border-radius: 0 !important; display: flex; flex-direction: column; padding-bottom: 0;
}
html[data-svbar="m"] .svf-rail[hidden] { display: none !important; }
html[data-svbar="m"] .svf-rail > * { flex-shrink: 0; }
html[data-svbar="m"] .svf-head {
  display: grid; grid-template-columns: 96px minmax(0, 1fr) 96px; align-items: center; gap: 0;
  min-height: 56px; padding: 4px 6px; box-shadow: 0 1px 0 #e2e8f0;
}
html[data-svbar="m"] .svf-head::before { display: none; }
html[data-svbar="m"] #svfTitle { grid-column: 2; grid-row: 1; text-align: center; font-size: 17px; }
html[data-svbar="m"] #svfClose { grid-column: 1; grid-row: 1; justify-self: start; color: #9a4d00; font-size: 30px; font-weight: 400; }
html[data-svbar="m"] #svfClear { display: none !important; }
html[data-svbar="m"] .svf-head .svbar-clear {
  display: block; grid-column: 3; grid-row: 1; justify-self: end; min-height: 44px; padding: 0 10px;
  border: 0; border-radius: 8px; background: none; color: #9a4d00; font-size: 15px; font-weight: 700; cursor: pointer;
}
html[data-svbar="m"] .svf-head .svbar-clear:disabled { color: #9aa3ad; cursor: default; background: none; }
html[data-svbar="m"] .svbar-foot {
  display: block; position: -webkit-sticky; position: sticky; bottom: 0; z-index: 3; margin-top: auto;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff;
  border-top: 1px solid #e2e8f0; box-shadow: 0 -4px 12px rgba(0, 0, 0, .06);
}
.svbar-show {
  display: block; width: 100%; min-height: 50px; padding: 0 16px; border: 0; border-radius: 10px;
  background: #ff7900; color: #fff; font-size: 16px; font-weight: 700; cursor: pointer;
}
.svbar-show:hover { background: #ec6f00; }

/* Sort: a bottom sheet (a <dialog>; the top layer keeps it above the stuck search and the map). */
.svbar-sheet {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; height: auto; max-height: 85dvh;
  padding: 0; border: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0, 0, 0, .2);
  overflow: auto; background: #fff; color: #10213d;
}
.svbar-sheet::backdrop { background: rgba(16, 33, 61, .45); }
html:has(.svbar-sheet[open]) { overflow: hidden; }
.svbar-sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 6px 4px 16px; }
.svbar-sheet-head h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -.2px; }
.svbar-sheet-close { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: transparent; color: #10213d; cursor: pointer; }
.svbar-sheet-close svg { width: 22px; height: 22px; }
.svbar-sheet-body { padding: 4px 0 calc(14px + env(safe-area-inset-bottom, 0px)); }
.svbar-opt { display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 16px; font-size: 16px; cursor: pointer; }
.svbar-opt input { width: 22px; height: 22px; margin: 0; flex: none; accent-color: #ff7900; }
.svbar-opt:has(input:checked) { font-weight: 700; }

/* Tablet: the three buttons stay a compact group, not three stretched thirds. */
@media (min-width: 640px) {
  html[data-svbar="m"] .svbar-bar { grid-template-columns: repeat(3, minmax(0, 190px)); justify-content: center; margin: 4px -12px 0; }
  html[data-svbar="m"] .svbar-row { margin: 0 -12px; }
  html[data-svbar="m"] .svbar-chips { padding: 10px 12px 6px; }
  .svbar-sheet { max-width: 480px; left: 50%; right: auto; transform: translateX(-50%); }
}
@media (max-width: 359px) {
  .svbar-btn { gap: 4px; font-size: 14px; padding: 0 2px; }
  .svbar-btn svg { width: 18px; height: 18px; }
  .svbar-n { min-width: 18px; height: 18px; padding: 0 4px; }
}

/* ══ desktop (≥1024) ══════════════════════════════════════════════════════ */
html[data-svbar="d"] .svbar-row { display: block; padding: 10px 0 4px; }
html[data-svbar="d"] .svbar-chips { display: flex; flex-wrap: wrap; gap: 8px; }
html[data-svbar="d"] .svbar-chips:empty { display: none; }
html[data-svbar="d"] .svbar-active:not([hidden]) {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #eef0f3;
}
html[data-svbar="d"] .svbar-chips:empty + .svbar-active:not([hidden]) { margin-top: 0; padding-top: 0; border-top: 0; }
/* „Прикажи на мапа“ on top of the rail (Booking's map card above the filters). */
html[data-svbar="d"] .svbar-mapcard {
  display: block; position: relative; width: calc(100% - 28px); height: 112px; margin: 14px 14px 6px; padding: 0;
  border: 1px solid #dbe2ea; border-radius: 12px; overflow: hidden; background: #edf2e4; cursor: pointer;
}
.svbar-mapart { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.svbar-mapcard-label {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: #ff7900; color: #fff; font-size: 14px; font-weight: 700; white-space: nowrap; box-shadow: 0 2px 8px rgba(0, 0, 0, .2);
}
.svbar-mapcard-label svg { width: 18px; height: 18px; flex: none; }
.svbar-mapcard:hover .svbar-mapcard-label { background: #ec6f00; }

/* Desktop: their pinned search form lines up with the results column instead of sliding under the
   fixed filter rail (svbar.js alignForm, 29.09). */
html[data-svbar="d"][data-svbar-col] .sv-searchform.sv-stuck { left: var(--svbar-col-l); right: var(--svbar-col-r); width: auto; max-width: none; margin: 0; }

@media (prefers-reduced-motion: reduce) { .svbar-bar { transition: none !important; } }
