/* Раздел туров. Каркас — общие компоненты сайта из 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-dates { flex: 1.9 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-dates-row { display: flex; align-items: center; gap: 6px; min-width: 0; }
.tour-dates-row .search-input { flex: 1 1 0; min-width: 0; font-size: 15px; }
.tour-dates-dash { color: var(--text-3); flex: 0 0 auto; }
.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); }

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

/* ── Шапка пары ── */
.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; }
.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); }
.tour-tile-title { font-size: 13px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; }
.tour-tile-price { font-size: 19px; font-weight: 700; color: var(--green-text); }
.tour-tile-note { font-size: 12.5px; color: var(--text-3); }
.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-3); margin: -8px 0 12px; }

/* ── Карточки стран и горящих ── */
.tour-card .home-card-route small { font-weight: 500; color: var(--text-2); }
.tour-card-pp { font-size: 12.5px; color: var(--text-3); }
.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-dialog .submodal-body { gap: 14px; }
.tour-alert-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tour-alert-grid .is-wide { grid-column: 1 / -1; }
.tour-alert label.tour-alert-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-2); font-weight: 500; }
.tour-alert input:not([type="radio"]):not([type="checkbox"]), .tour-alert select {
    width: 100%; min-width: 0; height: var(--control-m); border: 1px solid var(--line-strong); border-radius: var(--radius-m);
    padding: 0 12px; font: inherit; font-size: 15px; color: var(--text); background: var(--surface);
}
.tour-alert [hidden] { display: none !important; }
.tour-alert-kids { display: flex; gap: 6px; }
.tour-alert-kids select { flex: 1; }
.tour-alert-channels { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14.5px; }
.tour-alert-channels label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.tour-alert-email { display: flex; flex-wrap: wrap; gap: 8px; }
.tour-alert-email input { flex: 1 1 200px; }
.tour-alert .consent-check { margin-top: 2px; }
.tour-alert-status { font-size: 14px; line-height: 1.5; }
.tour-alert-status:empty { display: none; }
.tour-alert-status.is-error { color: var(--danger); }
.tour-alert-status.is-ok { color: var(--positive); }
.tour-alert-lead { margin: 0; font-size: 14px; color: var(--text-2); line-height: 1.5; }

@media (max-width: 760px) {
    .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 { padding: 12px; }
    .tour-filter { flex: 1 1 100%; }
    .tour-filter select { max-width: none; width: 100%; }
    .tour-filter .segmented { width: 100%; overflow-x: auto; }
    .tour-hotel { grid-template-columns: 1fr; padding: 14px; }
    /* Даты отеля на телефоне — лентой с прокруткой, а не столбиком на экран. */
    .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; }
    .tour-alert-grid { grid-template-columns: 1fr; }
}
