/* Страница «Избранное» (/izbrannoe/, page-izbrannoe.php, inc/favorites.php), 15.11.2026.
   Макет: холст «Избранное и сравнение». Mobile-first, брейкпоинты сайта 600 / 900 / 1200.
   Подложки только белый и #f4f4f4. */

/* overflow-x: лента «Недавно смотрели» выходит за контейнер до краев окна, лишнее срезается. */
.favp { padding-bottom: 48px; color: #16140f; overflow-x: clip; }
.favp *, .favp *::before, .favp *::after { box-sizing: border-box; }
.favp a { color: inherit; text-decoration: none; }

.favp-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-top: 10px; }
.favp-h1 { margin: 0; font-size: 30px; line-height: 1.12; font-weight: 700; letter-spacing: -0.02em; }
.favp-count { font-size: 16px; color: #6b6f67; }
.favp-h2 { margin: 0 0 16px; font-size: 24px; line-height: 1.2; font-weight: 600; letter-spacing: -0.025em; }

/* Кнопки страницы */
.favp .favp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; margin: 0; padding: 0 20px; border: 1px solid #d9d9d9; border-radius: 12px; background: #fff; color: #16140f; font-size: 15px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer; }
.favp .favp-btn:hover { border-color: #16140f; background: #fff; color: #16140f; }
.favp .favp-btn--main { border-color: #E86B18; background: #E86B18; color: #16140f; }
.favp .favp-btn--main:hover { border-color: #cf5f14; background: #cf5f14; color: #16140f; }
.favp .favp-btn--dark { border-color: #16140f; background: #16140f; color: #fff; }
.favp .favp-btn--dark:hover { border-color: #000; background: #000; color: #fff; }
.favp .favp-btn[hidden] { display: none; }

/* Полоса над списком */
.favp-shared { display: grid; gap: 12px; margin-top: 18px; padding: 14px; border-radius: 16px; background: #f4f4f4; }
.favp-bar { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 18px; }
.favp-bar[hidden], .favp-shared[hidden], .favp-list[hidden], .favp-empty[hidden], .favp-recent[hidden], .favp-info[hidden], .favp-watch[hidden], .favp-watch__box[hidden] { display: none; }
.favp-shared__text { margin: 0; font-size: 15px; line-height: 1.45; color: #464a42; }
.favp-shared__btns { display: grid; gap: 10px; }
.favp-bar__btns { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.favp-bar__btns .favp-btn { padding: 0 8px; font-size: 14px; white-space: normal; text-align: center; }
.favp-bar__btns .favp-btn--main { grid-column: 1 / -1; }
.favp-bar__btns .favp-btn:only-child, .favp-bar__btns .favp-btn:nth-child(2):last-child { grid-column: auto; }

/* «Когда хотим ехать» */
.favp button.favp-when { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 52px; margin: 0; padding: 6px 12px 6px 14px; border: 1px solid #d9d9d9; border-radius: 12px; background: #fff; color: #16140f; text-align: left; cursor: pointer; }
.favp button.favp-when:hover { border-color: #16140f; background: #fff; color: #16140f; }
.favp-when svg { flex: none; }
.favp-when__t { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.favp-when__l { font-size: 12px; line-height: 1.3; color: #6b6f67; }
.favp-when__v { font-size: 16px; font-weight: 500; line-height: 1.3; color: #464a42; }
.favp-when.is-set .favp-when__v { font-weight: 600; color: #16140f; }
.favp-info { margin: 14px 0 0; font-size: 15px; line-height: 1.45; color: #464a42; }
.favp-info b { color: #16140f; font-weight: 600; }

/* Список и колонка «Следить за ценой и датами» */
.favp-lay { display: grid; gap: 24px; margin-top: 18px; }
.favp-lay .favp-list { margin-top: 0; }
.favp-watch { display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 16px; background: #f4f4f4; }
.favp-watch__h { margin: 0; font-size: 20px; font-weight: 600; line-height: 1.25; letter-spacing: 0; }
.favp-watch__box { display: flex; flex-direction: column; gap: 12px; }
.favp-watch__box form { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.favp-watch p { margin: 0; font-size: 14px; line-height: 1.45; color: #464a42; }
.favp-watch p b { color: #16140f; font-weight: 600; word-break: break-all; }
.favp-watch .favp-watch__fine { font-size: 12.5px; color: #5c5c5c; }
.favp-lbl { display: block; margin: 0 0 -6px; font-size: 13px; font-weight: 600; color: #464a42; }
.favp input.favp-inp { display: block; width: 100%; height: 48px; margin: 0; padding: 0 14px; border: 1px solid #cfcfcf; border-radius: 12px; background: #fff; color: #16140f; font: inherit; font-size: 16px; box-shadow: none; }
.favp input.favp-inp:focus { border-color: #E86B18; outline: 0; }
.favp-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.favp-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.4; color: #464a42; cursor: pointer; }
.favp-agree input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: #E86B18; }
.favp .favp-agree a { color: #16140f; text-decoration: underline; }
.favp-watch .favp-err { font-size: 13px; color: #c0392b; }
.favp-err:empty { display: none; }
.favp .favp-btn--wide { width: 100%; }
.favp .favp-btn--sm { min-height: 40px; padding: 0 14px; font-size: 14px; }

/* Список */
.favp-list { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }
.favp-loading { margin: 0; padding: 28px 0; font-size: 16px; color: #6b6f67; }

.favi { position: relative; display: grid; overflow: hidden; border: 1px solid #e5e5e5; border-radius: 16px; background: #fff; }
.favi__img { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #eee; }
.favi__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.favi__body { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 14px 14px 6px; }
.favi__title { margin: 0; font-size: 18px; font-weight: 600; line-height: 1.25; }
.favp .favi__title a:hover { color: #E86B18; }
.favi__meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: 15px; line-height: 1.4; color: #464a42; }
.favi__meta b { font-weight: 600; color: #16140f; }
.favi__star { color: #b47f00; }
.favi__dates { font-size: 15px; line-height: 1.4; }
.favi__dates > span:first-child { color: #6b6f67; }
/* Галочка «Сравнить» в строке тура */
.favp button.favi__ck { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: #16140f; font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer; }
.favp button.favi__ck:hover { background: none; color: #16140f; }
.favi__ck i { display: flex; flex: none; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1.5px solid #767676; border-radius: 6px; background: #fff; color: #16140f; }
.favi__ck i svg { display: none; }
.favi__ck.is-on i { border-color: #E86B18; background: #E86B18; }
.favi__ck.is-on i svg { display: block; }
.favi__more { display: inline-block; margin-left: 4px; padding: 3px 9px; border-radius: 999px; background: #f4f4f4; color: #5c5c5c; font-size: 13px; white-space: nowrap; }
.favi__side { display: flex; flex-direction: column; gap: 10px; padding: 6px 14px 14px; }
.favi__price { font-size: 24px; font-weight: 600; line-height: 1.2; }
.favi__price small { font-size: 14px; font-weight: 400; color: #6b6f67; }
.favi__price s { margin-left: 4px; font-size: 15px; font-weight: 400; color: #6b6f67; }
.favi__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.favi__btns > :only-child { grid-column: 1 / -1; }
.favp .favi__btn { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 12px; border: 1px solid #d9d9d9; border-radius: 12px; background: #fff; color: #16140f; font-size: 14px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.favp .favi__btn:hover { border-color: #16140f; }
.favp .favi__btn--main { border-color: #E86B18; background: #E86B18; }
.favp .favi__btn--main:hover { border-color: #cf5f14; background: #cf5f14; }

/* Цена на выбранную дату («Когда хотим ехать») */
.favi.is-when .favi__side > .favi__price { display: none; }
.favi__when .favi__price small { margin-right: 2px; }
.favi__when-note { margin-top: 2px; font-size: 13px; color: #6b6f67; }
.favi__when--no { font-size: 14px; line-height: 1.4; color: #464a42; }
.favi__when--no b { display: block; color: #16140f; font-weight: 600; }

/* Пометки «что изменилось» */
.favi__mark { align-self: flex-start; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; line-height: 1.3; }
.favi__mark--good { background: #e6f2e8; color: #1c5a30; }
.favi__mark--new { background: #16140f; color: #fff; }

/* Заметка туриста */
.favi__tools { display: flex; flex-wrap: wrap; align-items: center; gap: 0 18px; }
.favi__tools .favi__link { display: inline-flex; align-items: center; gap: 6px; }
.favi__memo { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: #f4f4f4; font-size: 14px; line-height: 1.4; overflow-wrap: anywhere; }
.favi__memo[hidden] { display: none; }
.favi__memo svg { flex: none; margin-top: 2px; color: #6b6f67; }
.favi__note-edit { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.favp .favi__note-edit textarea { display: block; width: 100%; min-height: 64px; margin: 0; padding: 10px 12px; border: 1px solid #cfcfcf; border-radius: 12px; background: #fff; color: #16140f; font: inherit; font-size: 16px; line-height: 1.4; resize: vertical; box-shadow: none; }
.favp .favi__note-edit textarea:focus { border-color: #E86B18; outline: 0; }
.favi__note-edit > div { display: flex; gap: 8px; }

/* Снятый тур */
.favi--off .favi__body { padding-bottom: 14px; }
.favi--off .favi__title { color: #464a42; }
.favi__chip { align-self: flex-start; padding: 4px 10px; border-radius: 999px; background: #ededed; color: #464a42; font-size: 13px; font-weight: 600; line-height: 1.3; }
.favi__note { margin: 0; font-size: 15px; line-height: 1.4; color: #6b6f67; }
.favp button.favi__link { align-self: flex-start; min-height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; color: #464a42; font-size: 14px; font-weight: 500; text-decoration: underline; text-decoration-color: #bdbdbd; text-underline-offset: 3px; cursor: pointer; }
.favp button.favi__link:hover { background: none; color: #16140f; }

/* Пустое избранное */
.favp-empty { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 18px; padding: 36px 16px; border-radius: 16px; background: #f4f4f4; text-align: center; }
.favp-empty__ic { display: flex; align-items: center; justify-content: center; width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #16140f; }
.favp-empty__h { margin: 4px 0 0; font-size: 22px; font-weight: 600; line-height: 1.2; }
.favp-empty__p { max-width: 520px; margin: 0; font-size: 15px; line-height: 1.5; color: #464a42; }
.favp-empty__hint { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; margin: 0 2px; border-radius: 50%; background: #fff; color: #16140f; vertical-align: middle; box-shadow: 0 1px 4px rgba(0, 0, 0, .2); }

/* Недавно смотрели: обычные карточки туров */
/* «Недавно смотрели»: лента .hm-ts со стрелками из home-2027.css, здесь только отступы. */
.favp-recent { margin-top: 40px; padding-bottom: 0; }
.favp-recent .hm-head { margin-bottom: 16px; }
.favp-recent .favp-h2 { margin: 0; }
.favp-recent .hm-sl[hidden] { display: none; }

/* Окна страницы: вид окна программы тура (assets/css/tour-pdf.css). Кнопки «Отправить подборку» в четыре колонки с подписью под значком */
.favs .tpdf__share .tpdf__btn { white-space: normal; text-align: center; line-height: 1.15; }
.favs [hidden] { display: none !important; }

/* Поля в окнах «Когда хотите ехать» и «Помогите выбрать» */
.favw, .favh { display: flex; flex-direction: column; gap: 12px; margin: 0; }
.favw__f { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.favw__f > span { font-size: 13px; font-weight: 600; color: #464a42; }
.favs .favw__f input, .favs .favw__f textarea { display: block; width: 100%; min-width: 0; height: 48px; margin: 0; padding: 0 14px; border: 1px solid #cfcfcf; border-radius: 12px; background: #fff; color: #16140f; font: inherit; font-size: 16px; line-height: 1.4; box-shadow: none; -webkit-appearance: none; appearance: none; }
.favs .favw__f textarea { height: 76px; padding: 12px 14px; resize: none; }
.favs .favw__f input:focus, .favs .favw__f textarea:focus { border-color: #E86B18; outline: 0; }
.favh__two { display: grid; gap: 12px; }
.favh .tpdf__label { margin: 4px 0 -4px; }
.favh__list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.favh__list li { margin: 0; padding: 0; list-style: none; }
.favs button.favi__ck { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; margin: 0; padding: 4px 0; border: 0; border-radius: 0; background: none; color: #16140f; font: inherit; font-size: 14px; font-weight: 400; line-height: 1.3; text-align: left; cursor: pointer; }
.favs button.favi__ck:hover { background: none; color: #16140f; }
.favs .favi__ck i { display: flex; flex: none; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1.5px solid #767676; border-radius: 6px; background: #fff; color: #16140f; }
.favs .favi__ck i svg { display: none; }
.favs .favi__ck.is-on i { border-color: #E86B18; background: #E86B18; }
.favs .favi__ck.is-on i svg { display: block; }
.favs .favi__ck span { flex: 1; min-width: 0; }
.favs .favi__ck b { flex: none; font-weight: 600; white-space: nowrap; }
.favh__gap { margin-top: 4px; }

@media (min-width: 600px) {
  .favp-shared__btns { display: flex; flex-wrap: wrap; }
  .favh__two { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .favp { padding-bottom: 64px; }
  .favp-h1 { font-size: 44px; }
  .favp-h2 { font-size: 30px; }
  .favp-bar { grid-template-columns: 300px minmax(0, 1fr); align-items: center; gap: 16px; margin-top: 22px; }
  .favp-bar__btns { display: flex; flex-wrap: wrap; justify-content: flex-end; }
  .favp-bar__btns .favp-btn { padding: 0 18px; font-size: 15px; white-space: nowrap; }
  .favp-lay { margin-top: 20px; }
  .favp-shared { grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 20px; margin-top: 22px; padding: 16px 16px 16px 20px; }
  .favp-list { margin-top: 22px; }
  .favi { grid-template-columns: 240px minmax(0, 1fr) 216px; }
  .favi__img { aspect-ratio: auto; min-height: 180px; }
  .favi > .fav-btn--card { left: 190px; right: auto; }
  .favi__body { padding: 18px 20px; }
  .favi__title { font-size: 20px; }
  .favi__side { justify-content: space-between; padding: 18px 18px 18px 0; }
  .favi__btns { grid-template-columns: 1fr; }
  .favi--off { grid-template-columns: minmax(0, 1fr); }
  .favp-empty { padding: 48px 20px; }
  .favp-recent { margin-top: 56px; }
  .favp-recent .hm-head { margin-bottom: 20px; }
}

@media (min-width: 1200px) {
  .favp-lay { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: 28px; }
  .favp-watch { position: sticky; top: 16px; }
  .favp-lay:has(.favp-watch[hidden]) { grid-template-columns: minmax(0, 1fr); }
}
