/* Раздел туров. Каркас — общие компоненты сайта из geo.css: синяя плашка
   поиска (.alert-form-section, .search-bar), призыв (.track-cta), модалка
   (.submodal), график (.dyn-*). Здесь только то, чего у авиабилетов нет. */

/* ── Строка поиска ── */
.tour-search { max-width: 1120px; }
.tour-search .search-bar { align-items: stretch; }
.tour-search .search-field { padding: 10px 14px; }
.tour-field-place { flex: 1.15 1 0; }
.tour-field-date { flex: 1 1 0; }
.tour-field-nights { flex: 1 1 0; }
.tour-field-group { flex: 1.15 1 0; position: relative; }
.tour-select {
    appearance: none; -webkit-appearance: none; cursor: pointer; min-width: 0;
    padding-right: 18px; text-overflow: ellipsis; white-space: nowrap; overflow: hidden;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2376736c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0 center;
}
.tour-group-toggle {
    text-align: left; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    padding-right: 18px;
    background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2376736c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0 center;
}
.tour-group-panel {
    position: absolute; top: calc(100% + 10px); right: 0; z-index: 40; width: 300px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l);
    box-shadow: var(--shadow-l); padding: 16px; display: grid; gap: 14px; color: var(--text);
}
.tour-group-panel[hidden] { display: none; }
.tour-group-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14.5px; }
.tour-stepper { display: inline-flex; align-items: center; gap: 12px; }
.tour-stepper button {
    width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-strong);
    background: var(--surface); color: var(--text); font-size: 18px; line-height: 1; cursor: pointer;
}
.tour-stepper button:disabled { opacity: .35; cursor: default; }
.tour-stepper output { min-width: 14px; text-align: center; font-weight: 700; }
.tour-group-panel select { height: 38px; border: 1px solid var(--line-strong); border-radius: var(--radius-m); padding: 0 10px; font: inherit; font-size: 14px; background: var(--surface); }
.tour-kids { display: flex; flex-wrap: wrap; gap: 6px; }
.tour-kids:empty { display: none; }
.tour-kid {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 10px; border-radius: var(--radius-pill);
    background: var(--fill); font-size: 13px; font-weight: 600;
}
.tour-kid button { border: none; background: none; cursor: pointer; font-size: 16px; line-height: 1; color: var(--text-2); padding: 0 2px; }
.tour-group-note { font-size: 12.5px; color: var(--text-3); line-height: 1.45; }
.tour-search .search-btn { margin-left: 6px; }
.tour-search-note { max-width: 1120px; margin: 12px auto 0; font-size: 13px; color: rgba(255,255,255,.85); }

/* Шесть полей в одну строку помещаются от 1180 px. Уже — два ряда по четыре
   ячейки: на 1024 даты и «7–10 ночей» обрезались. */
@media (min-width: 761px) and (max-width: 1180px) {
    .tour-search .search-bar { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 4px; }
    .tour-search .search-sep { display: none; }
    .tour-search .search-btn { grid-column: span 2; align-self: center; justify-self: stretch; margin: 4px 8px; }
}

/* На странице пары строка поиска на телефоне свёрнута в кнопку: иначе выдача
   начинается через два экрана. Без скрипта (нет класса js-tours) форма видна. */
.tour-search-collapsible .tour-search-open { display: none; }

/* Подсказки «Откуда/Куда» — вёрстка подсказок авиабилетов (.geo-suggest из geo.css). */
.tour-place-field { position: relative; }
.geo-suggest-item.is-active { background: var(--surface-2); }
.tour-search .geo-suggest { min-width: 240px; }

/* ── Шапка пары ── */
.tour-hero-line { margin: 0 0 6px; font-size: 16px; line-height: 1.6; }
.tour-hero-line b { font-weight: 700; }
.tour-hero-query { margin: 0; font-size: 14.5px; color: var(--text-2); line-height: 1.55; }
.tour-hero-query a { white-space: nowrap; }

/* ── Подборки и фильтры ── */
.tour-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.tour-chip {
    display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border-radius: var(--radius-pill);
    border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
    font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.tour-chip small { font-weight: 500; color: var(--text-2); font-size: 13px; }
.tour-chip:hover { border-color: var(--action); color: var(--text); }
.tour-chip.is-current { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tour-chip.is-current small { color: rgba(255,255,255,.85); }

.tour-filters {
    display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px;
    padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface);
}
.tour-filter { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.tour-filter-label { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
.tour-filter select {
    height: 40px; min-width: 160px; max-width: 260px; border: 1px solid var(--line-strong); border-radius: var(--radius-m);
    padding: 0 12px; font: inherit; font-size: 14.5px; background: var(--surface); color: var(--text);
}
.tour-filter .segmented { width: auto; }
.tour-filter .seg-option span { padding: 8px 12px; white-space: nowrap; }
.tour-filter .seg-option a { display: block; text-decoration: none; }
.tour-seg-link {
    display: block; font-size: 13px; font-weight: 500; color: var(--text-2); text-decoration: none;
    padding: 8px 12px; border-radius: var(--radius-s); white-space: nowrap;
}
.tour-seg-link:hover { color: var(--text); }
.tour-seg-link.is-current { background: var(--surface); color: var(--text); font-weight: 600; box-shadow: var(--shadow-s); }
.tour-filters-reset { font-size: 14px; font-weight: 600; align-self: center; }
.tour-filters noscript .btn { height: 40px; }

.tour-summary { display: flex; align-items: baseline; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; font-size: 14.5px; color: var(--text-2); }
.tour-summary b { color: var(--text); }

/* ── График и выбранный тур ── */
.tour-chart .dyn-col.is-empty { cursor: default; }
.tour-chart .dyn-col.is-empty .dyn-bar { height: 4px !important; background: var(--line); }
.tour-chart .dyn-col.is-empty:hover .dyn-bar { background: var(--line); }
.tour-pick { align-items: center; }
.tour-pick-info { display: grid; gap: 3px; min-width: 0; flex: 1 1 320px; }
.tour-pick-date { font-size: 14px; font-weight: 600; color: var(--text-2); }
.tour-pick-hotel { font-size: 16.5px; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.tour-pick-meta { font-size: 13.5px; color: var(--text-2); }
.tour-pick-price { display: grid; justify-items: end; gap: 2px; }
.tour-pick-price b { font-size: 23px; font-weight: 700; }
.tour-pick-price small { font-size: 12.5px; color: var(--text-2); }

/* ── Отели ── */
.tour-hotels { display: grid; gap: 10px; }
.tour-hotel {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 18px;
    padding: 16px 18px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--surface);
}
.tour-hotel[hidden] { display: none; }
/* Лента дат с nowrap раздувала колонку сетки: на 360 px карточка вылезала за экран. */
.tour-hotel > * { min-width: 0; }
.tour-hotel.has-photo { grid-template-columns: 160px minmax(0, 1fr) auto; }
.tour-hotel-photo { width: 160px; height: 120px; object-fit: cover; border-radius: var(--radius-m); background: var(--fill); }
.tour-hotel-name { font-size: 17px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tour-stars { font-size: 13px; font-weight: 700; color: var(--warn-text); margin-left: 4px; white-space: nowrap; }
.tour-rating {
    display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; font-size: 12.5px; font-weight: 700;
    background: var(--positive-bg); color: var(--positive); white-space: nowrap; vertical-align: 2px;
}
.tour-hotel-place, .tour-hotel-meta { font-size: 13.5px; color: var(--text-2); margin-top: 4px; line-height: 1.5; }
.tour-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tour-badge { padding: 3px 9px; border-radius: var(--radius-pill); background: var(--fill); font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.tour-hotel-side { display: grid; justify-items: end; align-content: start; gap: 4px; text-align: right; }
.tour-price { font-size: 13.5px; color: var(--text-2); white-space: nowrap; }
.tour-price b { font-size: 21px; color: var(--text); font-weight: 700; }
.tour-pp { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.tour-hotel-side .btn { margin-top: 6px; white-space: nowrap; }
.tour-dates { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; }
.tour-date {
    display: inline-flex; gap: 6px; align-items: baseline; padding: 5px 10px; border-radius: var(--radius-m);
    border: 1px solid var(--line); font-size: 12.5px; color: var(--text-2); text-decoration: none; white-space: nowrap;
}
.tour-date b { color: var(--text); font-weight: 700; }
.tour-date:hover { border-color: var(--action); color: var(--text); }
.tour-more { justify-self: center; }

/* ── Месяцы и курорты ── */
.tour-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.tour-tile {
    display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-l);
    background: var(--surface); color: var(--text); text-decoration: none;
}
.tour-tile:hover { border-color: var(--action); color: var(--text); box-shadow: var(--shadow-s); }
/* Название города, страны, месяца или курорта — главное в плитке: крупно и тёмным.
   До 11.10.2026 оно было мелкой серой подписью капслоком и читалось хуже цены. */
.tour-tile-title { font-size: 16px; font-weight: 700; color: var(--text); line-height: 1.3; }
.tour-tile-price { font-size: 19px; font-weight: 700; color: var(--green-text); }
.tour-tile-note { font-size: 13px; color: var(--text-2); }
.tour-tile.is-best { border-color: var(--positive-line); background: var(--positive-bg); }

/* ── Вкладки стран (календарь на главной туров и у города) ── */
.tour-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; scrollbar-width: thin; }
.tour-tab {
    flex: 0 0 auto; padding: 8px 14px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong);
    background: var(--surface); font: inherit; font-size: 14px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.tour-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.tour-tab-panel[hidden] { display: none; }
.tour-note { font-size: 13.5px; color: var(--text-2); margin: -8px 0 12px; }

/* Курорт в подсказках «Куда»: рядом страна. */
.geo-suggest-item .place-hint { margin-left: 8px; font-size: 13px; color: var(--text-3); }

/* ── Карточки стран и горящих ── */
.tour-card .home-card-route small { font-weight: 500; color: var(--text-2); }
/* display:flex у .home-card перебивает [hidden] — без этого фильтр стран на горящих ничего не прятал. */
.tour-card[hidden] { display: none; }
/* Отель и дата заезда — то, по чему выбирают тур: не светло-серым. */
.tour-card .home-card-date { font-size: 13px; color: var(--text-2); }
.tour-card-pp { font-size: 12.5px; color: var(--text-2); }
.tour-empty {
    padding: 22px; border: 1px dashed var(--line-strong); border-radius: var(--radius-l); background: var(--surface);
    display: grid; gap: 10px;
}
.tour-empty p { margin: 0; }

/* ── Подписка в модалке: блоки и поля — общие классы модалки авиабилетов ── */
.tour-alert [hidden] { display: none !important; }
.tour-alert-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
/* «Откуда» и «Куда» на телефоне — друг под другом: в два столбца подсказки под
   правым полем вылезали за край окна и обрезались (11.10.2026). */
@media (max-width: 560px) { .tour-alert-places { grid-template-columns: minmax(0, 1fr); } }
.tour-place-field .geo-suggest { max-width: calc(100vw - 32px); }
.tour-alert .form-control { min-width: 0; }
.tour-alert-kids-field, .tour-alert-resort { margin-top: 10px; }
.tour-alert-kids { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tour-alert .email-code-step label, .tour-alert .hint-label-row label { font-size: 14px; font-weight: 600; }

/* ── Все города вылета ── */
.tour-city-list { list-style: none; margin: 0; padding: 0; columns: 4 190px; column-gap: 24px; }
.tour-city-list li { break-inside: avoid; padding: 4px 0; font-size: 15px; }
.tour-city-list a.is-main { font-weight: 700; }
.tour-cities-count { font-size: 15px; font-weight: 500; color: var(--text-3); margin-left: 6px; }
.tour-tile-more { border-style: dashed; border-color: var(--line-strong); }
.tour-tile-more-text { font-size: 16px; font-weight: 700; color: var(--link); }

@media (max-width: 760px) {
    /* Подборки, чипы стран — лентой с прокруткой, а не стопкой строк. */
    .tour-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
    .tour-chip { flex: 0 0 auto; }
    .tour-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .tour-tile { padding: 12px; }
    .tour-tile-price { font-size: 17px; }
    .tour-city-list { columns: 2; }
    .tour-hero-line { font-size: 15px; }
    .js-tours .tour-search-collapsible.is-collapsed .alert-form-section { display: none; }
    .js-tours .tour-search-collapsible.is-collapsed .tour-search-open { display: inline-flex; width: 100%; justify-content: center; margin: 4px 0 16px; }
    /* В колонке flex-basis 0 сжимал поле «Туристы» до нуля: у кнопки overflow hidden. */
    .tour-search .search-field { padding: 12px 4px; flex: 0 0 auto; }
    .tour-search .search-btn { margin-left: 0; }
    .tour-field-group { position: static; }
    .tour-group-panel { position: static; width: auto; margin-top: 10px; box-shadow: none; }
    .tour-filters { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 12px; }
    .tour-filter { min-width: 0; }
    .tour-filter-stars, .tour-filters-reset { grid-column: 1 / -1; }
    .tour-filter select { max-width: none; min-width: 0; width: 100%; height: 38px; font-size: 14px; padding: 0 8px; }
    .tour-filter .segmented { width: 100%; overflow-x: auto; }
    .tour-seg-link { padding: 8px 10px; }
    .tour-hotel, .tour-hotel.has-photo { grid-template-columns: minmax(0, 1fr); padding: 14px; }
    .tour-hotel-photo { width: 100%; height: 170px; }
    .tour-price { white-space: normal; }
    /* Даты отеля на телефоне — лентой с прокруткой, а не столбиком на экран. */
    .tour-dates { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
    .tour-date { flex: 0 0 auto; }
    .tour-hotel-side { justify-items: start; text-align: left; grid-template-columns: 1fr auto; align-items: center; }
    .tour-hotel-side .btn { grid-row: 1 / span 2; grid-column: 2; margin-top: 0; }
    .tour-pick-info { flex: 0 0 auto; }
    .tour-pick-price { justify-items: center; }
}

/* Страница уведомления: фильтры над турами (tours/alert_event.html). */
.tour-event-filters { display: grid; gap: 4px; margin: 0 0 14px; }
.tour-event-summary { display: none; }
.tour-event-group { margin: 0; }
.tour-event-label { min-width: 70px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.tour-event-select { width: auto; max-width: 100%; min-width: 0; padding: 7px 12px; font-size: 14px; }
.tour-event-found { margin: 6px 0 0; font-size: 14px; color: var(--text-2); }
.tour-event-found { margin: 0 0 12px; }
@media (max-width: 760px) {
    .tour-event-summary {
        display: block; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-m);
        background: var(--surface); font-size: 14.5px; font-weight: 600; cursor: pointer;
    }
    .tour-event-filters[open] .tour-event-summary { margin-bottom: 8px; }
    .tour-event-label { min-width: 0; flex-basis: 100%; }
    .tour-event-select { width: 100%; }
}

/* ── Карточка тура (includes/tour_card.html) ──
   Даты вылета и возвращения — крупно и первыми, рядом число ночей; ниже отель,
   звёзды золотыми значками, плашки питания и фактов, цена внизу.
   Ряд дат с плашкой ночей занимает ~245px: в колонке 250px (4 карточки в ряд
   на десктопе) плашка наезжала на «обратно, чт». Колонка от 280px — три в ряд;
   .home-cards общая с авиабилетами, поэтому только там, где лежат туры. */
.tour-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.home-cards:has(> .tour-offer) { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.tour-offer {
    display: flex; flex-direction: column; gap: 8px; min-width: 0;
    padding: 14px 16px 16px; border: 1px solid var(--line); border-radius: var(--radius-l);
    background: var(--surface); color: var(--text); text-decoration: none;
    transition: border-color .12s, box-shadow .12s;
}
.tour-offer:hover { border-color: var(--action); box-shadow: var(--shadow-s); color: var(--text); }
.tour-offer[hidden] { display: none; }
.tour-offer-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 8px; min-height: 22px; }
.tour-offer-top .badge { margin: 0; padding: 3px 9px; font-size: 11.5px; white-space: nowrap; }
.tour-offer-place { font-size: 15.5px; font-weight: 700; }
.tour-offer-dates {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 9px 10px;
    border-radius: var(--radius-m); background: var(--surface-2);
}
.tour-offer-day { display: flex; flex-direction: column; line-height: 1.15; }
.tour-offer-day b { font-size: 17px; font-weight: 800; color: var(--text); white-space: nowrap; }
.tour-offer-day small { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.tour-offer-arrow { color: var(--text-3); font-size: 15px; }
.tour-offer-nights {
    margin-left: auto; padding: 4px 10px; border-radius: var(--radius-pill);
    background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 700; white-space: nowrap;
}
.tour-offer-hotel { font-size: 15.5px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.tour-offer-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: 13.5px; color: var(--text-2); }
.tour-offer-stars { color: #e9a417; font-size: 14px; letter-spacing: 1px; }
.tour-offer-kind { color: var(--text); font-weight: 600; }
.tour-offer-rating {
    padding: 1px 8px; border-radius: var(--radius-pill); background: var(--positive-bg);
    color: var(--positive); font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.tour-offer-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tour-offer-chip {
    padding: 3px 9px; border-radius: var(--radius-s); background: var(--fill);
    color: var(--text); font-size: 12.5px; font-weight: 600;
}
.tour-offer-chip.is-ai { background: var(--positive-bg); color: var(--positive); }
.tour-offer-price { margin-top: auto; display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; padding-top: 4px; }
.tour-offer-price b { font-size: 22px; font-weight: 800; color: var(--green-text); }
.tour-offer-price span { font-size: 13px; color: var(--text-2); }
.tour-offer-pp { font-size: 12.5px; color: var(--text-2); margin-top: -6px; }
.tour-offer-above { font-size: 12.5px; font-weight: 600; color: var(--warn-text); margin-top: -6px; }
.tour-offer.is-above .tour-offer-price b { color: var(--text); }
.tour-offer-buy { margin-top: 4px; justify-content: center; pointer-events: none; }
@media (max-width: 520px) {
    .tour-offers { grid-template-columns: minmax(0, 1fr); }
    .tour-offer-day b { font-size: 16px; }
}

/* Список в статье «Как подписаться на снижение цены тура» — в размер .guide-text. */
.guide-list { margin: 0 0 14px; padding-left: 22px; font-size: 16.5px; line-height: 1.7; color: var(--text); }
.guide-list li { margin: 2px 0; }
@media (max-width: 760px) { .guide-list { font-size: 16px; } }
