/* ==========================================================================
   Скаут web2 — offer page (web2/pages/single_offer3, searchRoms,
   single_offer_iframe). Loaded after site2.css. Only s2o- classes plus the
   booking widget's ids, which are fixed by public/theme2/js/custom.js.
   ========================================================================== */

.s2o-top { padding-top: 20px; }
.s2o-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.s2o-title { margin: 0; font-size: 40px; font-weight: 700; overflow-wrap: anywhere; }
.s2o-where { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; font-size: 17px; color: var(--s2-muted); }
.s2o-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.s2o-chips li { list-style: none; padding: 6px 12px; }

/* ---- gallery ------------------------------------------------------------- */
.s2o-gal { display: grid; gap: 10px; margin-top: 20px; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 210px 210px; }
.s2o-gal__item { position: relative; display: block; border-radius: 12px; overflow: hidden; background: var(--s2-bg); }
.s2o-gal__item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.s2o-gal__item:hover img { transform: scale(1.03); }
.s2o-gal__main { grid-row: span 2; }
.s2o-gal__label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px;
    background: rgba(5, 16, 54, .55); color: #fff; font-weight: 600; font-size: 17px; }
.s2o-gal--1 { grid-template-columns: 1fr; grid-template-rows: 420px; }
.s2o-gal--2 { grid-template-columns: 2fr 1fr; }
.s2o-gal--2 .s2o-gal__item:nth-child(2) { grid-row: span 2; }
.s2o-gal a[hidden] { display: none !important; }
.s2o-gal--3 { grid-template-columns: 2fr 1fr; }
.s2o-gal--3 .s2o-gal__main { grid-row: span 2; }
.s2o-gal--4 { grid-template-columns: 2fr 1fr 1fr; }
.s2o-gal--4 .s2o-gal__item:nth-child(4) { grid-column: span 2; }
@media (prefers-reduced-motion: reduce) { .s2o-gal__item img { transition: none; } }

/* ---- two columns ------------------------------------------------------------ */
.s2o-cols { margin-top: 32px; }
.s2o-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--s2-line); overflow-x: auto; scrollbar-width: thin; }
.s2o-tabs a { flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 16px; border-bottom: 3px solid transparent;
    color: var(--s2-muted); font-weight: 500; white-space: nowrap; text-decoration: none; }
.s2o-tabs a:hover { color: var(--s2-ink); }
.s2o-tabs a[aria-current] { border-bottom-color: var(--s2-blue); color: var(--s2-ink); font-weight: 600; }

.s2o-sec { padding-top: 32px; scroll-margin-top: 100px; }
.s2o-sec h2 { margin: 0 0 12px; font-size: 26px; font-weight: 700; }
.s2o-sec__lead { margin: -4px 0 14px; }

/* Rich text from the admin editor (Word paste). */
.s2o-rich { font-size: 17px; line-height: 1.65; overflow-wrap: anywhere; color: var(--s2-ink); }
.s2o-rich p, .s2o-rich strong, .s2o-rich b, .s2o-rich em, .s2o-rich td, .s2o-rich li { color: inherit; }
.s2o-rich p { margin: 0 0 8px; }
.s2o-rich ul, .s2o-rich ol { padding-left: 22px; margin: 0 0 12px; }
.s2o-rich ul li { list-style: disc; }
.s2o-rich ol li { list-style: decimal; }
.s2o-rich img { max-width: 100%; height: auto; }
.s2o-rich table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 8px 0 16px; font-size: 15px; }
.s2o-rich td, .s2o-rich th { border: 1px solid var(--s2-line); padding: 6px 10px; vertical-align: top; overflow-wrap: normal; }
.s2o-rich td p, .s2o-rich th p { margin: 0; }
.s2o-rich h1, .s2o-rich h2, .s2o-rich h3, .s2o-rich h4 { font-size: 20px; margin: 16px 0 8px; }

.s2o-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 32px; }
.s2o-two--one { grid-template-columns: 1fr; }
.s2o-box { border: 1px solid var(--s2-line); border-radius: 14px; padding: 20px; }
.s2o-two .s2o-sec { padding-top: 20px; }
.s2o-box h2 { font-size: 20px; }
.s2o-box--yes h2 { color: var(--s2-ok); }
.s2o-box--no h2 { color: var(--s2-bad); }
.s2o-box .s2o-rich { font-size: 16px; }
@media (max-width: 760px) { .s2o-two { grid-template-columns: 1fr; } }

/* ---- price table ----------------------------------------------------------------- */
.s2o-table { overflow-x: auto; border: 1px solid var(--s2-line); border-radius: 12px; }
.s2o-table:focus-visible { outline: 3px solid var(--s2-sun); }
.s2o-table table { width: 100%; border-collapse: collapse; font-size: 16px; min-width: 520px; }
.s2o-table th, .s2o-table td { padding: 12px 16px; text-align: left; vertical-align: top; }
.s2o-table thead th { background: var(--s2-bg); font-weight: 600; white-space: nowrap; }
.s2o-table tbody tr { border-top: 1px solid var(--s2-line); }
.s2o-table tbody th { font-weight: 600; }
.s2o-table .s2o-num { text-align: right; font-weight: 600; white-space: nowrap; }
.s2o-table tr.is-cheapest { background: var(--s2-sun-soft); }
.s2o-table td.is-min { font-weight: 700; }
.s2o-nowrap { white-space: nowrap; }
.s2o-note { font-size: 13px; color: var(--s2-muted); }
.s2o-badge { display: inline-block; margin-left: 6px; padding: 2px 6px; border-radius: 4px; background: var(--s2-sun); color: var(--s2-navy); font-size: 12px; font-weight: 600; }

/* ---- booking box ---------------------------------------------------------------------- */
.s2o-book { background: var(--s2-surface); border: 1px solid var(--s2-line); border-radius: 14px; padding: 22px; box-shadow: var(--s2-shadow); scroll-margin-top: 90px; display: flex; flex-direction: column; gap: 16px; }
.s2o-book__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.s2o-book__from { font-size: 14px; color: var(--s2-muted); }
.s2o-book__price { font-size: 34px; font-weight: 700; line-height: 1.1; }
.s2o-book__price--sm { font-size: 22px; }
.s2o-book__call { display: flex; flex-direction: column; text-align: right; font-size: 14px; line-height: 1.4; color: var(--s2-ink); min-height: 44px; justify-content: center; }
.s2o-book__call span { color: var(--s2-muted); }
.s2o-book__call:hover b { color: var(--s2-blue); }
.s2o-book__warn { margin: 8px 0 0; font-size: 14px; color: var(--s2-bad); }
.s2o-book__text { margin: 0; color: var(--s2-muted); }
.s2o-book__trust { margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--s2-muted); display: grid; gap: 4px; }
.s2o-book__trust li { list-style: none; padding-left: 22px; position: relative; }
.s2o-book__trust li::before { content: '✓'; position: absolute; left: 2px; color: var(--s2-ok); font-weight: 700; }
.s2o-book--ask { gap: 12px; }

.s2o-pax { border-top: 1px solid var(--s2-line); }
.s2o-pax__row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--s2-line); }
.s2o-pax__label { font-weight: 600; font-size: 16px; }
.s2o-pax__hint { font-size: 14px; color: var(--s2-muted); }
.s2o-pax__extra:empty { display: none; }
.s2o-pax__ages { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--s2-line); }
/* custom.js appends these with inline width:49% and theme classes. */
#child_passengers select { flex: 1 1 calc(50% - 4px) !important; width: auto !important; min-height: 44px; margin: 0 !important; padding: 0 10px !important;
    border: 1px solid var(--s2-field) !important; border-radius: 8px; font: inherit; font-size: 16px; background: var(--s2-surface); color: var(--s2-ink); }
.s2o-counter { gap: 4px; }
.s2o-step { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--s2-blue); border-radius: 8px;
    background: var(--s2-surface); color: var(--s2-blue); cursor: pointer; padding: 0; }
.s2o-step:hover { background: var(--s2-blue-soft); }
.s2o-count { min-width: 36px; text-align: center; font-size: 18px; font-weight: 600; }
.s2o-term { display: flex; flex-direction: column; gap: 6px; }
.s2o-select { width: 100%; min-height: 48px; border: 1px solid var(--s2-field) !important; border-radius: 8px; padding: 0 12px; font: inherit; font-size: 16px;
    background: var(--s2-surface); color: var(--s2-ink); box-sizing: border-box; }
.s2o-book__go { text-decoration: none; }

/* Sticky only where the whole box fits on screen. */
@media (max-height: 760px) { .s2o-side { position: static; } }
@media (max-width: 991px) { .s2o-side { position: static; flex-basis: 100%; } }

/* ---- room search results (#reservationContent) -------------------------------------- */
.s2o-results { scroll-margin-top: 90px; }
.s2o-results:empty { display: none; }
.s2o-found { margin-top: 40px; }
.s2o-found__title { margin: 0; font-size: 28px; font-weight: 700; }
.s2o-found__lead { margin: 4px 0 16px; }
.s2o-found__none { margin-top: 32px; }
.s2o-rooms { display: grid; gap: 16px; }
.s2o-room { display: grid; grid-template-columns: 180px minmax(0, 1fr) 260px; gap: 20px; border: 1px solid var(--s2-line); border-radius: 14px; padding: 16px; background: var(--s2-surface); }
.s2o-room__img { border-radius: 10px; overflow: hidden; background: var(--s2-bg); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; color: var(--s2-muted); }
.s2o-room__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s2o-room__title { margin: 0; font-size: 20px; font-weight: 600; }
.s2o-room__date { color: var(--s2-muted); margin-top: 2px; }
.s2o-room__facts { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; font-size: 15px; }
.s2o-room__facts li, .s2o-room__amen li { list-style: none; }
.s2o-room__amen { margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--s2-muted); }
.s2o-room__amen li { display: inline-flex; align-items: center; gap: 6px; }
.s2o-room__amen img { width: 20px; height: 20px; object-fit: contain; }
.s2o-room__buy { display: flex; flex-direction: column; gap: 8px; justify-content: flex-end; }
.s2o-room__label { font-size: 14px; font-weight: 600; display: flex; flex-direction: column; gap: 6px; }
.s2o-room__price { font-size: 26px; font-weight: 700; text-align: right; }
.s2o-room__go { text-decoration: none; }
.s2o-room__go.is-loading { opacity: .7; pointer-events: none; }
.s2o-room__buy .form-status { font-size: 14px; color: var(--s2-bad); background: var(--s2-bad-soft); border-radius: 8px; padding: 8px 12px; }
@media (max-width: 900px) {
    .s2o-room { grid-template-columns: 110px minmax(0, 1fr); }
    .s2o-room__buy { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
    .s2o-room { grid-template-columns: 1fr; }
    .s2o-room__img { aspect-ratio: 16 / 9; }
}

/* ---- phone bottom bar --------------------------------------------------------------- */
.s2o-mbar__price { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.s2o-mbar__price span { font-size: 12px; color: var(--s2-muted); }
.s2o-mbar__price b { font-size: 22px; font-weight: 700; }
.s2o-mbar__price b.s2o-mbar__name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.s2o-mbar__call { flex: none; width: 48px; height: 48px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--s2-line); border-radius: 8px; color: var(--s2-blue); }
.s2o-mbar__go { flex: none; padding: 0 16px; text-decoration: none; }
@media (max-width: 360px) { .s2o-mbar__go { padding: 0 12px; font-size: 15px; } }

/* ---- partner iframe ------------------------------------------------------------------- */
.s2o-partner { margin: 20px 0 0; }
.s2o-frame { margin-top: 16px; border: 1px solid var(--s2-line); border-radius: 12px; overflow: hidden; }
.s2o-frame iframe { display: block; width: 100%; height: 100vh; min-height: 600px; border: 0; }

/* ---- phones ---------------------------------------------------------------------------- */
@media (max-width: 900px) {
    .s2o-gal, .s2o-gal--2, .s2o-gal--3, .s2o-gal--4 { grid-template-columns: 1fr 1fr; grid-template-rows: 240px 120px; }
    .s2o-gal__main { grid-column: span 2; grid-row: span 1 !important; }
    .s2o-gal__item:not(.s2o-gal__main):not(:nth-child(2)):not(.s2o-gal__more) { display: none; }
    .s2o-gal--2 .s2o-gal__item:nth-child(2) { grid-column: span 2; grid-row: span 1; }
    .s2o-gal--4 .s2o-gal__item:nth-child(4) { grid-column: auto; }
    .s2o-gal--1 { grid-template-columns: 1fr; grid-template-rows: 260px; }
}
@media (max-width: 640px) {
    .s2o-title { font-size: 28px; }
    .s2o-where { font-size: 15px; }
    .s2o-sec h2 { font-size: 22px; }
    .s2o-rich { font-size: 16px; }
    .s2o-book { padding: 18px; }
    .s2-wrap.s2o-top, .s2o .s2-wrap { padding-left: 16px; padding-right: 16px; }
    .s2o-frame iframe { height: 80vh; }
}
