/* «Избранное» — отели, отмеченные сердечком в поиске туров.
   Подключается на всех страницах (layouts/layout.blade.php): сердечко в шапке нужно везде.
     .favhead      — сердечко со счётчиком в шапке (include/favorites/header.blade.php)
     .tsearch-fav  — сердечко на карточке отеля в поиске и в балуне карты (tour-search.js)
     .favs, .fav   — страница «Избранное» и вкладка кабинета (include/favorites/list.blade.php)
     .favs-bar     — плашка «Выбрано для сравнения»
     .favs-cmp     — окно сравнения отелей */

/* ---------- сердечко в шапке ---------- */

.favhead {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 48px;
    height: 48px;
    margin-right: 10px;
    color: #282828;
    background: #fff;
    border-radius: 50%;
    text-decoration: none;
    transition: color .15s;
}
.favhead:hover {
    color: #e52423;
}
.favhead b {
    position: absolute;
    top: -2px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    box-sizing: border-box;
    font-size: 12px;
    font-weight: 700;
    line-height: 20px;
    text-align: center;
    color: #fff;
    background: #e52423;
    border-radius: 10px;
}
.favhead b[hidden] {
    display: none;
}
/* в шапке сайта сердечко стоит в одной строке с кнопкой «Вход / Выход» */
.hb__two {
    display: flex;
    align-items: center;
}
/* Сердечку нужно место: на ширине 822–1324px правая половина шапки («Заказать звонок», телефон,
   сердечко, «Вход») не помещалась, и кнопка «Вход» уходила за край экрана. Подписи двух блоков
   занимали по 180px при тексте около 130px — сужены, сердечко придвинуто ближе к кнопке. */
@media (min-width: 822px) and (max-width: 1324px) {
    .header_bottom .hhh_adr {
        width: 145px;
    }
    .favhead {
        margin-right: 6px;
    }
}
/* шапка телефона: тёмная полоса с логотипом, сердечко — справа */
.favhead--mobile {
    width: 40px;
    height: 40px;
    margin: 0 0 0 8px;
}
/* чтобы сердечко поместилось в узкой шапке: логотип может сжиматься, а на экранах уже 400px
   из значков соцсетей остаются WhatsApp и Telegram (Instagram есть в меню и подвале) */
.mobile_version__flex:has(.favhead--mobile) {
    align-items: center;
}
/* Логотип стоит точно по центру полосы по высоте: общие стили на экранах до 468px задавали
   блоку логотипа высоту 38px при картинке 42px со сдвигом сверху — логотип сидел на 3px ниже
   значков. Блок логотипа — по высоте картинки, без сдвигов. */
.mobile_version__flex:has(.favhead--mobile) .mobile_version__logo {
    flex: 0 1 200px;
    min-width: 0;
    display: flex;
    align-items: center;
    height: auto !important;
    padding: 0;
}
/* Ссылка вокруг картинки растягивается на весь блок логотипа. Без этого она сжималась до ширины
   самой надписи, и плашка выходила 141px на любом экране вместо заданных 167 / 200px. */
.mobile_version__flex:has(.favhead--mobile) .mobile_version__logo a {
    display: block;
    flex: 1 1 auto;
    min-width: 0;
    width: 100%;
}
/* Красная плашка — сама картинка логотипа (фон и скругление у <img>). Ширина и поля заданы жёстко:
   в собранных стилях сайта ширина картинки считалась по её высоте, и плашка обрезалась вплотную
   к надписи, без полей по краям. Теперь плашка — во всю ширину блока, надпись внутри неё по центру,
   слева и справа не меньше 12px. */
.mobile_version__flex:has(.favhead--mobile) .mobile_version__logo img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 38px !important;
    padding: 5px 12px !important;
    box-sizing: border-box !important;
    object-fit: contain;
    object-position: center;
}
/* на телефонах логотип поменьше (решение 18.11.2026): 167px вместо 200px */
@media (max-width: 600px) {
    .mobile_version__flex:has(.favhead--mobile) .mobile_version__logo {
        flex-basis: 167px;
    }
}
.mobile_version__flex:has(.favhead--mobile) .mobile_version__social {
    margin-left: auto;
}
@media (max-width: 400px) {
    .mobile_version__flex:has(.favhead--mobile) .s-instagram {
        display: none;
    }
}

/* ---------- сердечко на карточке отеля в поиске ---------- */

.tsearch-card {
    position: relative;
}
.tsearch-fav {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    color: #282828;
    background: rgba(255, 255, 255, .94);
    border: 0;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .18);
    cursor: pointer;
    transition: color .15s, transform .15s;
}
.tsearch-fav:hover {
    color: #e52423;
    transform: scale(1.06);
}
.tsearch-fav.is-on {
    color: #e52423;
}
.tsearch-fav.is-on svg {
    fill: currentColor;
}
/* сохранена часть туров отеля: сердечко красное, но не залитое */
.tsearch-fav.is-part {
    color: #e52423;
}
.tsearch-fav:disabled {
    opacity: .6;
    cursor: progress;
}

/* ---------- сердечко в строке варианта тура: сохраняет один этот тур ----------
   Кнопка стоит в той же ячейке, что «в подборку» у сотрудника (.tsearch-tour__pick), перед ценой.
   В новом виде поиска колонка под неё уже есть; в прежнем добавляется классом tsearch--favs. */
.tsearch-tour .tsearch-tour__pick--fav:hover,
.tsearch-tour .tsearch-tour__pick--fav:focus-visible {
    color: #e52423;
    border-color: #e52423;
}
.tsearch-tour .tsearch-tour__pick--fav.is-on {
    color: #e52423;
    background: #fff;
    border-color: #e52423;
}
.tsearch-tour .tsearch-tour__pick--fav.is-on svg {
    fill: currentColor;
}
@media (min-width: 1101px) {
    .tsearch--favs:not(.tsearch--v2) .tsearch-tour,
    .tsearch--favs:not(.tsearch--v2) .tsearch-card__sort {
        grid-template-columns: 90px 80px 1fr 1fr 30px 132px;
    }
}
@media (max-width: 1100px) {
    .tsearch--favs:not(.tsearch--v2) .tsearch-tour,
    .tsearch--favs:not(.tsearch--v2) .tsearch-card__sort {
        grid-template-columns: 80px 70px 1fr 30px 132px;
    }
}
/* в балуне карты сердечко стоит в строке с ценой, а не поверх фото */
.tsearch-fav--balloon {
    position: static;
    flex: none;
    width: 34px;
    height: 34px;
    box-shadow: none;
    border: 1px solid #d9d9d9;
}
/* в окне тура — круглая кнопка в верхней строке, рядом с «Поделиться» */
.tsm__round.is-on {
    color: #e52423;
}
.tsm__round.is-on svg {
    fill: currentColor;
}

/* ---------- страница «Избранное» ---------- */

/* Серый фон страницы доходит до подвала: нижний отступ белой плашки остаётся внутри фона
   (иначе он выпадал наружу белой полосой), а при пустом списке страница не короче экрана */
.favs-page {
    display: flow-root;
    min-height: calc(100vh - 240px);
}
/* телефон (до 793px): шапка сайта не закреплена сверху, поэтому отступ 122px под неё у .cabinet
   (cabinet.scss) превращался в пустую полосу над заголовком «Избранное» */
@media (max-width: 793px) {
    .favs-page {
        margin-top: 0;
        padding-top: 16px;
    }
}
.favs__empty {
    padding: 8px 0 4px;
}
.favs__empty[hidden] {
    display: none;
}
.favs__hint {
    margin: 8px 0 16px;
    font-size: 14px;
    line-height: 1.45;
    color: #6b717c;
}
.favs__hint--guest {
    margin: 10px 0 14px;
}
.favs__hint a {
    color: #e52423;
}
.fav__actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin-top: 12px;
}
.fav__compare {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    font-weight: 600;
    color: #282828;
    cursor: pointer;
}
.fav__compare input {
    width: 17px;
    height: 17px;
    margin: 0;
    accent-color: #f7931e;
    cursor: pointer;
}
.fav__remove {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0;
    font: inherit;
    font-size: 14px;
    color: #6b717c;
    background: none;
    border: 0;
    cursor: pointer;
}
.fav__remove svg {
    color: #e52423;
}
.fav__remove:hover {
    color: #e52423;
}
.fav__remove:disabled {
    opacity: .6;
    cursor: progress;
}
.fav__more {
    justify-self: start;
    padding: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: #f7931e;
    background: none;
    border: 0;
    cursor: pointer;
}
.fav__more:hover {
    text-decoration: underline;
}
.fav .sptour[hidden] {
    display: none;
}
/* тур, вылет которого прошёл: серый, вместо «Подробнее» — пометка; через сутки удаляется */
.fav .sptour.is-past {
    background: #f6f6f6;
}
.fav .sptour.is-past .sptour__facts,
.fav .sptour.is-past .sptour__price {
    opacity: .5;
}
.fav__past {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    color: #6b717c;
    background: #e9eaec;
    border-radius: 8px;
}

/* ---------- поиск туров: тур по ссылке больше недоступен (tour-search.js, tourGone) ---------- */
.tsearch-gone {
    /* в обновлённом поиске блок поиска — сетка с колонкой фильтров 260px: сообщение — на всю ширину */
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 0 0 16px;
    padding: 14px 16px;
    font-size: 14px;
    line-height: 1.45;
    color: #282828;
    background: #fff6e5;
    border: 1px solid #f1d9a8;
    border-radius: 12px;
}
.tsearch-gone > div {
    flex: 1;
    min-width: 0;
}
.tsearch-gone strong {
    display: block;
    font-size: 16px;
}
.tsearch-gone span {
    display: block;
    margin-top: 3px;
    font-size: 14px;
    line-height: 1.45;
    color: #6b717c;
    text-decoration: none;
}
/* в обновлённом поиске: сообщение стоит над заголовком «Найдите свой отдых» — у заголовка
   на стартовом экране большой отступ сверху (48px), под сообщением он лишний */
.tsearch--v2 .tsearch-gone {
    margin: 16px 0 0;
}
.tsearch--v2 .tsearch-gone + .ts2-intro {
    padding-top: 18px;
}
.tsearch-gone__link {
    flex: none;
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    font-weight: 600;
    white-space: nowrap;
    color: #fff;
    text-decoration: none;
    background: #f7931e;
    border-radius: 8px;
}
.tsearch-gone__link[hidden] {
    display: none;
}
.tsearch-gone__link:hover {
    color: #fff;
    background: #e07f0c;
}
.tsearch-gone__close {
    flex: none;
    width: 32px;
    height: 32px;
    padding: 0;
    font-size: 22px;
    line-height: 1;
    color: #6b717c;
    background: none;
    border: 0;
    cursor: pointer;
}
@media (max-width: 700px) {
    .tsearch-gone {
        flex-wrap: wrap;
    }
    .tsearch-gone > div {
        flex-basis: calc(100% - 46px);
    }
}

/* строка тура: поля, цена, «Подробнее» и крестик «убрать этот тур» */
.fav .sptour--public {
    grid-template-columns: minmax(0, 1fr) 118px auto auto;
}
@media (max-width: 900px) {
    .fav .sptour--public {
        grid-template-columns: minmax(0, 1fr) auto auto;
    }
}
.fav__tour-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #9aa0aa;
    background: none;
    border: 1px solid #e6e6e6;
    border-radius: 50%;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.fav__tour-remove:hover {
    color: #e52423;
    border-color: #e52423;
}
.fav__tour-remove:disabled {
    opacity: .5;
    cursor: progress;
}

/* ---------- плашка сравнения ---------- */

.favs-bar {
    position: fixed;
    left: 50%;
    bottom: 20px;
    /* скрипт переносит плашку в <body>: внутри страницы её перекрывал подвал сайта */
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 24px);
    padding: 10px 12px 10px 18px;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: #282828;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .28);
    transform: translateX(-50%);
}
.favs-bar[hidden] {
    display: none;
}
.favs-bar .spicks__btn:disabled {
    opacity: .5;
    cursor: default;
}
@media (max-width: 1050px) {
    /* над нижним меню телефона */
    .favs-bar {
        bottom: 78px;
    }
}

/* ---------- окно сравнения ---------- */

.favs-cmp {
    /* по центру окна: общие стили сайта обнуляют отступы и у <dialog> */
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(1100px, calc(100vw - 24px));
    max-height: calc(100vh - 40px);
    padding: 20px;
    box-sizing: border-box;
    color: #282828;
    background: #fff;
    border: 0;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
}
.favs-cmp::backdrop {
    background: rgba(0, 0, 0, .5);
}
.favs-cmp__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 20px;
}
.favs-cmp__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    color: #282828;
    background: #f3f4f6;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}
.favs-cmp__note {
    margin: 6px 0 14px;
    font-size: 13px;
    color: #6b717c;
}
.favs-cmp__scroll {
    overflow-x: auto;
}
/* ширину колонок при table-layout: fixed задаёт первая строка — колонка названий узкая */
.favs-cmp thead th:first-child {
    width: 150px;
}
.favs-cmp table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-size: 14px;
    line-height: 1.4;
}
.favs-cmp th,
.favs-cmp td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border: 1px solid #e6e8ec;
    overflow-wrap: anywhere;
}
.favs-cmp tbody th {
    width: 150px;
    font-weight: 600;
    color: #6b717c;
    background: #fafafa;
}
.favs-cmp thead th {
    font-weight: 700;
}
.favs-cmp thead img {
    display: block;
    width: 100%;
    max-width: 200px;
    aspect-ratio: 4 / 3;
    margin-bottom: 8px;
    object-fit: cover;
    border-radius: 8px;
}
/* строка, в которой отели различаются */
.favs-cmp tr.is-diff td {
    background: #fff6e5;
}
.favs-cmp td.is-unknown {
    color: #9aa0aa;
}
.favs-cmp__drop {
    margin-top: 6px;
    padding: 0;
    font: inherit;
    font-size: 13px;
    font-weight: 400;
    color: #6b717c;
    background: none;
    border: 0;
    cursor: pointer;
}
.favs-cmp__drop:hover {
    color: #e52423;
}
@media (max-width: 700px) {
    .favs-cmp {
        padding: 14px;
    }
    .favs-cmp thead th:first-child,
    .favs-cmp tbody th {
        width: 96px;
    }
    .favs-cmp th,
    .favs-cmp td {
        padding: 8px;
        font-size: 13px;
    }
}

/* ---------- «Поделиться избранным»: открытая ссылка (include/favorites/list) ---------- */
.favshare {
    margin: 4px 0 18px;
    padding: 16px 18px;
    border: 1px solid #f3c6c5;
    border-radius: 12px;
    background: #fff5f5;
}
.favshare__head { display: flex; gap: 12px; align-items: flex-start; color: #e52423; }
.favshare__head svg { flex: none; margin-top: 2px; }
.favshare__head strong { display: block; font-size: 17px; color: #1f2329; }
.favshare__head span { display: block; margin-top: 3px; font-size: 14px; line-height: 1.4; color: #555b66; }
.favshare__row { display: flex; gap: 8px; margin-top: 12px; }
.favshare__url {
    flex: 1; min-width: 0; height: 42px; padding: 0 12px;
    border: 1px solid #d9dce1; border-radius: 8px; background: #fff;
    font-size: 15px; color: #1f2329;
}
.favshare__row .favshare__copy {
    flex: none; display: inline-flex; align-items: center; justify-content: center;
    height: 42px; margin: 0; padding: 0 20px; border-radius: 8px;
    font-size: 15px; white-space: nowrap; box-sizing: border-box;
}
.favshare__apps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.favshare__app {
    display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px;
    border: 1px solid #d9dce1; border-radius: 19px; background: #fff;
    font-size: 14px; font-weight: 600; color: #1f2329; cursor: pointer; text-decoration: none;
    transition: filter .15s;
}
.favshare__app svg { flex: none; }
.favshare__app--wa { border-color: #25d366; background: #25d366; color: #fff; }
.favshare__app--tg { border-color: #229ed9; background: #229ed9; color: #fff; }
.favshare__app:hover { filter: brightness(.93); color: #fff; }
.favshare__app:not(.favshare__app--wa):not(.favshare__app--tg):hover { color: #1f2329; }
@media (max-width: 600px) {
    .favshare__row { flex-direction: column; }
    .favshare__copy { width: 100%; }
}

/* цена тура в избранном: когда сверена с туроператором и как изменилась (Favorites::refreshTour) */
.fav .sptour__price small {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.3;
    white-space: nowrap;
    color: #8a909a;
}
.fav .sptour__price .fav__price-diff.is-up {
    color: #e07f0c;
}
.fav .sptour__price .fav__price-diff.is-down {
    color: #1f9d55;
}
.fav .sptour__price .fav__price-at {
    /* класс-метка для поиска по коду; вид общий с остальными подписями под ценой */
}

/* ---------- обновить цену одного тура (стрелка у цены, favorites.js) ---------- */
.fav__price-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.fav__price-value {
    padding: 1px 6px;
    border-radius: 6px;
    transition: background-color .3s, color .3s;
}
.fav__refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 28px;
    height: 28px;
    padding: 0;
    color: #6b717c;
    background: #fff;
    border: 1px solid #e1e4e8;
    border-radius: 50%;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}
.fav__refresh:hover {
    color: #f7931e;
    border-color: #f7931e;
}
.fav__refresh.is-busy svg {
    animation: fav-spin .8s linear infinite;
}
@keyframes fav-spin {
    to { transform: rotate(360deg); }
}
/* цена после обновления: подешевел — зелёная, подорожал — красная, не изменилась — серая подложка */
.fav__price.is-down .fav__price-value {
    color: #157a42;
    background: #e3f5ea;
}
.fav__price.is-up .fav__price-value {
    color: #c0392b;
    background: #fde8e4;
}
.fav__price.is-same .fav__price-value {
    background: #eef0f3;
}
.fav__price.is-flash .fav__price-value {
    animation: fav-flash 1.2s ease-out;
}
@keyframes fav-flash {
    0% { transform: scale(1.12); }
    100% { transform: scale(1); }
}
.fav .sptour.is-gone .sptour__facts,
.fav .sptour.is-gone .fav__price-value {
    opacity: .5;
}
@media (prefers-reduced-motion: reduce) {
    .fav__refresh.is-busy svg,
    .fav__price.is-flash .fav__price-value {
        animation: none;
    }
}
