/* ── Пар на `svrail.js` (28.08.2026) ────────────────────────────────────────
   Нашите редови ја носат класата `sv-hotel-card`, значи целиот распоред им
   доаѓа од `bookinglook.css` — тука е САМО она што нивниот JSX го носи преку
   MUI, а нашиот јазол го нема: типографија на името, сивиот тон на редот со
   местото, и сликата како позадина (нивната е `<img>`, нашата е `div` за да
   не скока висината додека се вчитува).

   Ниту едно правило тука не го допира нивниот ред. Сите се под `.sv-rail-*`
   или под `.sv-hotel-card.sv-rail-card`.                                    */

/* Лентата што кажува колку сме додале. Зазема цел ред во решетката. */
.sv-rail-host {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 2px;
  font-size: .84rem;
  color: var(--brand-text-muted, #6b7280);
}
.sv-rail-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-accent, #f0801a);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
}

/* Картичката. Позадината и рамката ги презема од нивниот тон, за да не се
   разликува ред од ред — единствената разлика смее да биде содржината. */
.sv-hotel-card.sv-rail-card {
  background: var(--brand-surface, #fff);
  border: 1px solid var(--brand-border, rgba(0, 0, 0, .12));
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  overflow: hidden;
  display: block;                 /* @container во bookinglook.css го прави ред */
}

.sv-rail-img {
  background-color: var(--brand-border, #eceff3);
  background-size: cover;
  background-position: center;
  min-height: 180px;
}
/* Без фотографија: истата илустрација како плочката на билдот
   (`bookinglook.css`, 11.09.2026 — Андреј: „za da ne bide prazno"), со
   истата мала ознака долу лево. Класата ја става и `svrail.js` кога
   фотографијата постои како адреса, а не се вчитува (404 од проксито —
   мерено 5 од 118 наши редови во Париз, дотогаш сиво поле). */
.sv-rail-noimg {
  background-image: url("sv-noimg.svg") !important;
  font-size: 0;
  color: transparent;
}
.sv-rail-noimg::after {
  content: "Нема достапни слики";
  content: "Нема достапни слики" / "";
  position: absolute;
  left: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .86);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  color: var(--brand-text, #1a1a2e);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.45;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Телефон (сложен распоред): нивните слики се 200px, нашите беа 180 — во
   иста листа (мерено 11.09: 586 × 356×200 наспроти 119 × 356×180). */
@container svlist (max-width: 559.98px) {
  .sv-hotel-card.sv-rail-card > .sv-rail-img { min-height: 200px; }
}

/* Зумирање ВО рамката на hover — пар на `.sv-hotel-card:hover` во
   bookinglook.css. Сликата е позадина на `div`, па копија ја носи `::before`
   (`background: inherit`) и само таа се скалира; рамката мирува. */
.sv-rail-img { position: relative; overflow: hidden; }
.sv-rail-img::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  transition: transform .7s cubic-bezier(.2, .8, .2, 1);
}
@media (hover: hover) and (pointer: fine) {
  .sv-rail-card:hover .sv-rail-img::before { transform: scale(1.07); }
}
@media (prefers-reduced-motion: reduce) {
  .sv-rail-img::before { transition: none; }
  .sv-rail-card:hover .sv-rail-img::before { transform: none; }
}

.sv-rail-body { padding: 12px 14px 14px; }

.sv-rail-head { display: flex; }
.sv-rail-name {
  font-weight: 700;
  color: var(--brand-text, #1a1a2e);
  font-size: 1.05rem;
  line-height: 1.3;
}
/* Ѕвездичките како кај нивниот ред (11.09.2026): портокалови на бледа
   пилула, наместо жолт текст — нашите и нивните редови да не се разликуваат. */
.sv-rail-stars {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(var(--brand-accent-rgb, 255, 115, 0), .10);
  color: var(--brand-accent, #ff7300);
  font-size: 16px;
  line-height: 16px;
  letter-spacing: 1px;
  white-space: nowrap;
}

.sv-rail-meta,
.sv-rail-room {
  font-size: .82rem;
  color: var(--brand-text-muted, #6b7280);
  margin-top: 2px;
}

/* ── NRF / откажување / такса (12.09.2026) ─────────────────────────────────
   Чип со `white-space: normal` — на 375 px „Бесплатно откажување д…" се сечеше
   кај нивниот C1-патч; тука редот се прекршува, не се сече. Бојата ја носи
   статусот од серверот; текстот никогаш не се менува во CSS. */
.sv-rail-cxl {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 100%;
  background: var(--brand-border, #f1f3f7);
  color: var(--brand-text-muted, #6b7280);
}
.sv-rail-cxl[data-sv-cancel="non_refundable"] { background: #fdecec; color: #b42318; }
.sv-rail-cxl[data-sv-cancel="free_until"] { background: #e7f6ec; color: #15803d; }
.sv-rail-cxl[data-sv-cancel="fee_applies"] { background: #fff4e5; color: #b45309; }

/* Десната колона ја реди `bookinglook.css` преку `> :last-child`; тука само
   тонот на бројот, за да е ист со нивниот. */
.sv-rail-price { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.sv-rail-price > div { font-weight: 800; font-size: 1.3rem; color: var(--brand-text, #1a1a2e); min-width: 0; }
.sv-rail-price > div > small {
  display: block;
  font-weight: 500;
  font-size: .76rem;
  line-height: 1.35;
  white-space: normal;
  overflow-wrap: anywhere;
  color: var(--brand-text-muted, #6b7280);
}
.sv-rail-alt[data-sv-cancel="free_until"] { color: #15803d; }
.sv-rail-alt[data-sv-cancel="non_refundable"] { color: #b42318; }
.sv-rail-tax { color: #b45309; }
.sv-rail-price button {
  min-height: 44px;                /* прагот за прст, правило 22.04 */
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--brand-accent, #f0801a);
  color: #fff;
  font: inherit;
  font-weight: 700;
  font-size: .88rem;
  cursor: pointer;
}
.sv-rail-price button:hover { background: var(--brand-accent-dark, #d96a08); }

/* ── Формата за барање понуда ──────────────────────────────────────────── */
.sv-rail-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.sv-rail-box {
  position: relative;
  width: min(420px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: var(--brand-surface, #fff);
  color: var(--brand-text, #1a1a2e);
  border-radius: 14px;
  padding: 20px 18px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.sv-rail-box h3 { margin: 0 0 2px; font-size: 1.05rem; line-height: 1.3; }
.sv-rail-sub { margin: 0 0 14px; font-size: .82rem; color: var(--brand-text-muted, #6b7280); }
.sv-rail-box label { display: block; margin-bottom: 10px; font-size: .8rem; color: var(--brand-text-muted, #6b7280); }
.sv-rail-f {
  display: block;
  width: 100%;
  margin-top: 4px;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--brand-border, rgba(0, 0, 0, .18));
  border-radius: 10px;
  font: inherit;
  color: var(--brand-text, #1a1a2e);
  background: var(--brand-surface, #fff);
}
textarea.sv-rail-f { min-height: 64px; resize: vertical; }
.sv-rail-x {
  position: absolute;
  top: 10px; right: 10px;
  width: 36px; height: 36px;
  border: 0; border-radius: 8px;
  background: transparent;
  color: var(--brand-text-muted, #6b7280);
  font-size: 1rem; cursor: pointer;
}
.sv-rail-send {
  width: 100%;
  min-height: 46px;
  border: 0;
  border-radius: 10px;
  background: var(--brand-accent, #f0801a);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.sv-rail-send[disabled] { opacity: .6; cursor: default; }
.sv-rail-msg { margin-top: 10px; font-size: .84rem; min-height: 1.2em; }
.sv-rail-ok { color: #15803d; }
.sv-rail-err { color: #b91c1c; }

/* ── Чекаут во два чекора (29.08.2026) — пар на новата openForm ──────────── */
.sv-co-box { width: min(520px, 100%); }

.sv-co-sum {
  display: flex; gap: 12px; align-items: flex-start;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--brand-border, rgba(0,0,0,.12));
}
.sv-co-img {
  flex: 0 0 96px; height: 72px; border-radius: 10px;
  background-color: var(--brand-border, #eceff3);
  background-size: cover; background-position: center;
}
.sv-co-sum h3 { margin: 0; font-size: 1.02rem; }
.sv-co-price { font-weight: 800; font-size: 1.25rem; margin-top: 4px; }

.sv-co-step h4 { margin: 12px 0 8px; font-size: .92rem; }
.sv-co-grid { display: grid; grid-template-columns: 96px 1fr 1fr; gap: 8px; }
.sv-co-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 8px; }
.sv-co-grid .sv-rail-f, .sv-co-grid2 .sv-rail-f { margin-top: 0; }

.sv-co-trav { display: grid; grid-template-columns: 18px 88px 1fr 1fr; gap: 6px; align-items: center; margin-bottom: 6px; }
.sv-co-trav span { color: var(--brand-text-muted, #6b7280); font-size: .8rem; }
.sv-co-trav .sv-rail-f { margin-top: 0; min-height: 40px; }

.sv-co-lbl { display: block; margin-top: 10px; font-size: .8rem; color: var(--brand-text-muted, #6b7280); }
.sv-co-next { margin-top: 14px; }

.sv-co-pay {
  display: flex; gap: 10px; align-items: flex-start;
  border: 1px solid var(--brand-border, rgba(0,0,0,.14));
  border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer;
}
.sv-co-pay:has(input:checked) { border-color: var(--brand-accent, #f0801a); box-shadow: 0 0 0 1px var(--brand-accent, #f0801a); }
.sv-co-pay input { margin-top: 3px; }
.sv-co-pay b { display: block; font-size: .88rem; }
.sv-co-pay small { color: var(--brand-text-muted, #6b7280); font-size: .76rem; line-height: 1.35; }
.sv-co-pay-off { opacity: .55; cursor: default; }

.sv-co-terms { display: block; font-size: .8rem; margin: 10px 0 6px; }
.sv-co-terms a { color: var(--brand-accent, #f0801a); }
.sv-co-note { font-size: .76rem; color: var(--brand-text-muted, #6b7280); line-height: 1.4; }

.sv-co-row { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.sv-co-back {
  min-height: 46px; padding: 0 14px; border-radius: 10px;
  border: 1px solid var(--brand-border, rgba(0,0,0,.18));
  background: transparent; color: var(--brand-text, #1a1a2e); font: inherit; cursor: pointer;
}
.sv-co-row .sv-rail-send { flex: 1; width: auto; }

.sv-co-done { text-align: center; padding: 18px 6px 8px; }
.sv-co-check {
  width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%;
  background: #15803d; color: #fff; font-size: 1.6rem; line-height: 56px;
}
.sv-co-ref {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 1.05rem; font-weight: 700; letter-spacing: .04em;
  background: var(--brand-border, #f1f3f7); border-radius: 8px; padding: 6px 12px; margin: 6px 0;
}
.sv-co-small { font-size: .78rem; color: var(--brand-text-muted, #6b7280); }
.sv-co-tax { margin-top: 4px; font-size: .78rem; color: #b45309; }

@media (max-width: 480px) {
  .sv-co-grid { grid-template-columns: 1fr; }
  .sv-co-grid2 { grid-template-columns: 1fr; }
  .sv-co-trav { grid-template-columns: 14px 80px 1fr 1fr; }
}

/* ── Наша секција кога нивната решетка не постои (нула нивни резултати) ──── */
.sv-rail-section { max-width: 1200px; margin: 18px auto 0; padding: 0 16px; }
.sv-rail-h { font-size: 1.35rem; font-weight: 800; color: var(--brand-text, #1a1a2e); margin: 8px 0 14px; }
.sv-rail-owngrid { display: grid; grid-template-columns: 1fr; gap: 12px; }

/* Филтерот по име крие со `hidden`, не со инлајн стил: `bookinglook.css` во
   `@container svlist (min-width: 560px)` пишува `.sv-hotel-card { display:
   flex !important }`, а нашите редови ја носат истата класа намерно. Инлајн
   стил губи од `!important` — измерено 31.08.2026: сите 102 реда имаа
   `style.display='none'` и сите 102 се гледаа на екран. */
.sv-rail-card[hidden] { display: none !important; }


/* The result counter belongs to React.  svSetCount writes only the document root,
   while this pseudo-element presents our corrected count without touching React's
   child nodes. */
html[data-sv-count-on] .sv-results-bar > :first-child { font-size: 0 !important; line-height: 0 !important; }
html[data-sv-count-on] .sv-results-bar > :first-child::before { content: var(--sv-count); font-size: 1.4rem; line-height: 1.5; font-weight: 700; color: var(--brand-text, inherit); white-space: normal; }
