/* Выбор города и календарь (js/yg-pickers.js) — в фирменных цветах (tokens.css): морской синий, солнечный акцент.
   ПК — поповер под полем; телефон — шторка (город — во весь экран, чтобы список не прятался за клавиатурой). */

/* ---------- Поле-триггер ---------- */
.ygp-field { cursor: pointer; }
.ygp-field input[readonly] { cursor: pointer; caret-color: transparent; -webkit-user-select: none; user-select: none; }
.ygp-field input[readonly]::placeholder { color: var(--yg-muted); font-weight: 600; }
.ygp-trigger { display: block; width: 100%; min-height: 24px; padding: 0; border: 0; background: none; text-align: left; font: 700 16px/1.4 var(--yg-font-body); color: var(--yg-ink); cursor: pointer; }
.ygp-trigger.is-empty { color: var(--yg-muted); font-weight: 600; }
.ygp-trigger:focus { outline: none; }
/* Вся карточка поля кликабельна: триггер растянут на неё */
.ygp-field .ygp-trigger::after { content: ""; position: absolute; inset: 0; }
.ygp-field:has([aria-expanded="true"]) { box-shadow: inset 0 0 0 2px var(--yg-sea); background: var(--yg-sky-soft); }

/* ---------- Панель ---------- */
.ygp { position: fixed; left: 0; top: 0; z-index: 2000; width: min(380px, calc(100vw - 32px)); font-family: var(--yg-font-body); color: var(--yg-ink); text-transform: none; letter-spacing: 0; cursor: default; }
.ygp--date { width: 340px; }
.ygp__scrim { display: none; }
.ygp__box { display: flex; flex-direction: column; max-height: min(520px, 70vh); border-radius: 22px; background: #fff; box-shadow: 0 24px 60px -18px rgba(11, 46, 69, .45), 0 0 0 1px rgba(11, 46, 69, .06);
    opacity: 0; transform: translateY(-6px) scale(.98); transform-origin: top left; transition: opacity .16s ease, transform .2s var(--yg-ease); }
.ygp.is-open .ygp__box { opacity: 1; transform: none; }
.ygp__grab, .ygp__head { display: none; }
.ygp__body { overflow-y: auto; overscroll-behavior: contain; padding: 12px; }

/* ---------- Город ---------- */
.ygp-search { position: sticky; top: -12px; z-index: 1; display: flex; align-items: center; gap: 10px; margin: -12px -12px 6px; padding: 12px 14px; background: #fff; border-bottom: 1px solid var(--yg-border); }
.ygp-search svg { flex: none; width: 20px; height: 20px; fill: none; stroke: var(--yg-sea); stroke-width: 2; stroke-linecap: round; }
.ygp-search input { flex: 1; min-width: 0; height: 40px; padding: 0; border: 0; background: none; font: 600 16px var(--yg-font-body); color: var(--yg-ink); outline: none; -webkit-appearance: none; appearance: none; }
.ygp-search input:focus, .ygp-search input:focus-visible { outline: none; box-shadow: none; border: 0; }
.ygp-search:focus-within { box-shadow: inset 0 -2px 0 var(--yg-sea); }
.ygp-search input::placeholder { color: var(--yg-muted); font-weight: 500; }
.ygp-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.ygp-list { list-style: none; margin: 0; padding: 0; }
.ygp-cap { padding: 12px 10px 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--yg-muted); }
.ygp-opt { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 14px; cursor: pointer; transition: background-color .12s; }
.ygp-opt.is-active { background: var(--yg-sky-soft); }
.ygp-opt[aria-selected="true"] b { color: var(--yg-sea-dark); }
.ygp-opt__ico { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 12px; background: var(--yg-sky); color: var(--yg-sea); }
.ygp-opt__ico svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ygp-opt b { display: block; font-size: 16px; font-weight: 700; line-height: 1.25; }
.ygp-opt small { display: block; font-size: 13px; color: var(--yg-muted); line-height: 1.3; }
.ygp-opt mark { padding: 0 1px; border-radius: 4px; background: rgba(255, 193, 35, .45); color: inherit; }
.ygp-empty { padding: 18px 10px; font-size: 15px; line-height: 1.45; color: var(--yg-ink-soft); }

/* ---------- Календарь ---------- */
.ygp-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 2px 12px; }
.ygp-chip { min-height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--yg-sky-soft); box-shadow: inset 0 0 0 1px var(--yg-border); font: 700 14px var(--yg-font-body); color: var(--yg-ink); cursor: pointer; transition: background-color .15s, box-shadow .15s, color .15s; }
.ygp-chip:hover { box-shadow: inset 0 0 0 1px var(--yg-sea); }
.ygp-chip.is-on { background: var(--yg-ink); box-shadow: none; color: #fff; }
.ygp-cal__head { display: flex; align-items: center; justify-content: space-between; padding: 4px 0 8px; }
.ygp-cal__head b { font: 600 16px var(--yg-font-head); }
.ygp-cal__nav { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--yg-ink); cursor: pointer; }
.ygp-cal__nav:hover { background: var(--yg-sky-soft); }
.ygp-cal__nav:disabled { opacity: .3; cursor: default; background: none; }
.ygp-cal__nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ygp-cal__wd, .ygp-cal__days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ygp-cal__wd span { padding: 4px 0 6px; text-align: center; font-size: 12px; font-weight: 800; color: var(--yg-muted); }
.ygp-cal__wd .is-we { color: var(--yg-coral); }
.ygp-cal__days > span { display: grid; place-items: center; padding: 2px 0; }
.ygp-day { position: relative; width: 44px; max-width: 100%; aspect-ratio: 1; border: 0; border-radius: 50%; background: none; font: 600 16px var(--yg-font-body); color: var(--yg-ink); cursor: pointer; transition: background-color .12s, color .12s; }
.ygp-day.is-we { color: var(--yg-coral); }
.ygp-day:hover:not(:disabled) { background: var(--yg-sky); }
.ygp-day.is-today::after { content: ""; position: absolute; left: 50%; bottom: 6px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--yg-sea); }
.ygp-day.is-sel { background: var(--yg-sun); color: var(--yg-ink); font-weight: 800; box-shadow: 0 6px 14px -6px rgba(242, 169, 0, .8); }
.ygp-day.is-sel::after { background: var(--yg-ink); }
.ygp-day:disabled { color: rgba(11, 46, 69, .25); cursor: default; }
.ygp-day:focus-visible, .ygp-chip:focus-visible, .ygp-cal__nav:focus-visible, .ygp__x:focus-visible { outline: 3px solid var(--yg-sun-dark); outline-offset: 2px; }

/* ---------- Телефон: шторка ---------- */
html.ygp-lock, html.ygp-lock body { overflow: hidden; }
.ygp.is-sheet { position: fixed; inset: 0; top: 0; width: auto; z-index: 2000; }
.ygp.is-sheet .ygp__scrim { display: block; position: absolute; inset: 0; background: rgba(4, 18, 28, .5); opacity: 0; transition: opacity .2s ease; }
.ygp.is-sheet.is-open .ygp__scrim { opacity: 1; }
.ygp.is-sheet .ygp__box { position: absolute; left: 0; right: 0; bottom: 0; max-height: 88dvh; border-radius: 26px 26px 0 0; padding-bottom: env(safe-area-inset-bottom);
    opacity: 1; transform: translateY(100%); transition: transform .28s var(--yg-ease); }
.ygp.is-sheet.is-open .ygp__box { transform: none; }
.ygp.is-sheet .ygp__grab { display: block; width: 40px; height: 5px; margin: 8px auto 0; border-radius: 3px; background: rgba(11, 46, 69, .18); }
.ygp.is-sheet .ygp__head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 0 20px; }
.ygp.is-sheet .ygp__head b { font: 600 18px var(--yg-font-head); }
.ygp__x { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%; background: none; color: var(--yg-ink-soft); cursor: pointer; }
.ygp__x svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ygp.is-sheet .ygp__body { padding: 8px 16px 16px; }
.ygp.is-sheet .ygp-search { top: -8px; margin: -8px -16px 6px; padding: 10px 20px; }
.ygp.is-sheet .ygp-search input { height: 44px; }
/* Город — во весь экран: клавиатура не закрывает список */
.ygp--city.is-sheet .ygp__box { top: env(safe-area-inset-top); max-height: none; border-radius: 0; }
.ygp--city.is-sheet .ygp__grab { display: none; }
.ygp--date.is-sheet .ygp-day { width: min(48px, 100%); }

@media (prefers-reduced-motion: reduce) {
    .ygp__box, .ygp.is-sheet .ygp__box, .ygp.is-sheet .ygp__scrim, .ygp-opt, .ygp-chip, .ygp-day { transition: none; }
}
.ygp-trigger { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Общий фокус сайта (.yg-home … :focus-visible — жёлтый контур и тёмная тень) здесь лишний: поле подсвечивается само,
   у кнопок календаря — свой контур */
.yg-home .ygp-field input:focus-visible, .yg-home .ygp-field .ygp-trigger:focus-visible, .yg-home .ygp-search input:focus-visible { outline: none; box-shadow: none; }
.yg-home .ygp-field:has(:focus-visible) { box-shadow: inset 0 0 0 2px var(--yg-sea); }
.yg-home .ygp button:focus-visible { outline: 3px solid var(--yg-sun-dark); outline-offset: 2px; box-shadow: none; }
/* ПК: в узкой колонке героя три поля в ряд — чуть плотнее, чтобы «Любая дата» помещалась целиком */
@media (min-width: 768px) {
    .yg-ru__search .ygp-field { padding-left: 38px; padding-right: 8px; }
    .yg-ru__search .ygp-field > svg { left: 12px; }
    .yg-ru__search .yg-btn { padding-left: 18px; padding-right: 18px; }
}
