/*
 * ЮГИД — «Цены и расписание» (/price): поиск по датам, цене и длительности. Основа — home.css (hero, поля, карточки).
 */

/* ---------- Hero с поиском ---------- */
.yg-sch-hero { padding: 16px 0 0; font-family: var(--yg-font-body); }
.yg-sch-hero__inner {
    position: relative; overflow: hidden; isolation: isolate; padding: 36px 48px 32px; border-radius: var(--yg-radius-lg); color: #fff;
    background:
        radial-gradient(60% 80% at 100% 0%, rgba(255, 193, 35, .18), transparent 60%),
        radial-gradient(70% 90% at 0% 100%, rgba(3, 105, 161, .6), transparent 65%),
        var(--yg-ink);
}
.yg-sch-hero h1 { margin: 0 0 10px; font-family: var(--yg-font-head); font-weight: 700; font-size: clamp(30px, 4vw, 52px); line-height: 1.05; letter-spacing: -.02em; color: #fff; }
.yg-sch-hero h1 span { color: var(--yg-sun); }
.yg-sch-hero__lead { max-width: 620px; margin: 0 0 24px; font-size: 17px; color: rgba(255, 255, 255, .84); }

.yg-cat-crumbs { margin-bottom: 24px; font-size: 14px; font-weight: 600; }
.yg-cat-crumbs ol { display: flex; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.yg-cat-crumbs li { color: rgba(255, 255, 255, .7); }
.yg-cat-crumbs li + li::before { content: '/'; margin: 0 10px; color: rgba(255, 255, 255, .4); }
.yg-cat-crumbs a { color: #fff; text-decoration: none; }
.yg-cat-crumbs a:hover { color: var(--yg-sun); }

.yg-sch-form { padding: 8px; border-radius: 24px; background: #fff; color: var(--yg-ink); box-shadow: var(--yg-shadow-lg); }
.yg-sch-form__main { display: grid; grid-template-columns: 1.4fr 1fr 1.1fr 1fr auto; gap: 8px; }
.yg-sch-form__main .yg-btn { min-height: 60px; border-radius: 16px; padding: 0 32px; }
.yg-sch-form .yg-field input::placeholder { color: #94A3B8; font-weight: 500; }
.yg-sch-form__more { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding: 12px 16px 8px; border-top: 1px solid var(--yg-border); margin-top: 8px; }
.yg-sch-mini { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-size: 14px; font-weight: 700; color: var(--yg-ink-soft); }
.yg-sch-mini input { width: 120px; min-height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--yg-border); background: var(--yg-sky-soft); font: 600 15px var(--yg-font-body); color: var(--yg-ink); }
.yg-sch-mini input:focus { outline: none; border-color: var(--yg-sea); box-shadow: 0 0 0 3px rgba(3, 105, 161, .15); }
.yg-sch-dur { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; padding: 0; border: 0; }
.yg-sch-dur legend { float: left; margin: 0 4px 0 0; padding: 0; width: auto; font-size: 14px; font-weight: 700; color: var(--yg-ink-soft); }
.yg-sch-dur label { position: relative; margin: 0; cursor: pointer; }
.yg-sch-dur input { position: absolute; opacity: 0; pointer-events: none; }
.yg-sch-dur span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; font-size: 14px; font-weight: 700; color: var(--yg-ink-soft); box-shadow: inset 0 0 0 1px var(--yg-border); transition: background-color .2s, color .2s; }
.yg-sch-dur label:hover span { color: var(--yg-sea); }
.yg-sch-dur input:checked + span { background: var(--yg-ink); color: #fff; box-shadow: none; }
.yg-sch-dur input:focus-visible + span { outline: 3px solid var(--yg-sun-dark); outline-offset: 2px; }

/* ---------- Панель результатов ---------- */
.yg-sch-bar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.yg-sch-count { margin: 0; font-family: var(--yg-font-head); font-weight: 600; font-size: clamp(22px, 2.4vw, 30px); }
.yg-sch-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.yg-sch-chips a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--yg-sky); color: var(--yg-ink); font-size: 14px; font-weight: 700; text-decoration: none; }
.yg-sch-chips a svg { width: 14px; height: 14px; }
.yg-sch-chips a:hover { background: #FEE2E2; color: #991B1B; }
.yg-sch-chips .yg-sch-chips__reset { background: none; color: var(--yg-sea); }
.yg-sch-chips .yg-sch-chips__reset:hover { background: none; color: var(--yg-sea-dark); text-decoration: underline; }
a.yg-tab { display: inline-flex; align-items: center; text-decoration: none; }
.yg-tab[aria-current="true"] { background: var(--yg-ink); color: #fff; box-shadow: none; }

/* ---------- Строки расписания ---------- */
.yg-sch-list { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.yg-sch-item {
    display: grid; grid-template-columns: 260px minmax(0, 1fr) 200px; gap: 24px; align-items: stretch; padding: 14px;
    border-radius: var(--yg-radius); background: #fff; box-shadow: var(--yg-shadow); transition: box-shadow .3s var(--yg-ease);
}
.yg-sch-item:hover { box-shadow: var(--yg-shadow-lg); }
.yg-sch-item__pic { position: relative; display: block; min-height: 180px; border-radius: 16px; overflow: hidden; background: var(--yg-sky); }
.yg-sch-item__pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--yg-ease); }
.yg-sch-item:hover .yg-sch-item__pic img { transform: scale(1.05); }
.yg-sch-item__pic .yg-chip { position: absolute; left: 10px; top: 10px; }
.yg-sch-item__body { display: flex; flex-direction: column; gap: 8px; padding: 6px 0; min-width: 0; }
.yg-sch-item__cat { font-size: 13px; font-weight: 700; color: var(--yg-muted); }
.yg-sch-item__cat a { color: var(--yg-sea); text-decoration: none; }
.yg-sch-item__cat a:hover { text-decoration: underline; }
.yg-sch-item__title { margin: 0; font-size: 19px; font-weight: 800; line-height: 1.3; }
.yg-sch-item__title a { color: var(--yg-ink); text-decoration: none; }
.yg-sch-item__title a:hover { color: var(--yg-sea); }
.yg-sch-item__text { margin: 0; font-size: 15px; line-height: 1.5; color: var(--yg-ink-soft); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.yg-sch-days { display: flex; flex-wrap: wrap; gap: 8px; margin: auto 0 0; padding: 6px 0 0; list-style: none; }
.yg-sch-days li { display: grid; gap: 1px; padding: 8px 12px; border-radius: 12px; background: var(--yg-sky-soft); box-shadow: inset 0 0 0 1px var(--yg-border); font-size: 13px; line-height: 1.3; }
.yg-sch-days b { font-size: 14px; }
.yg-sch-days span { color: var(--yg-ink-soft); font-weight: 600; }
.yg-sch-days li.is-match { background: #FFF7DB; box-shadow: inset 0 0 0 2px var(--yg-sun); }
.yg-sch-days__more { background: none !important; box-shadow: none !important; align-content: center; }
.yg-sch-days__more a { color: var(--yg-sea); font-weight: 700; text-decoration: none; }
.yg-sch-nodates { margin: auto 0 0; font-size: 14px; color: var(--yg-muted); }

.yg-sch-item__side { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; padding: 6px 8px 6px 20px; border-left: 1px solid var(--yg-border); text-align: right; }
.yg-sch-item__side .yg-price { justify-content: flex-end; }
.yg-sch-item__side .yg-price__now { font-size: 24px; }
.yg-sch-item__per { font-size: 13px; color: var(--yg-muted); margin-bottom: 12px; }
.yg-sch-item__side .yg-btn { min-height: 46px; padding: 0 20px; font-size: 15px; width: 100%; }

.yg-sch-empty { display: grid; justify-items: center; gap: 8px; padding: 56px 24px; border-radius: var(--yg-radius); border: 2px dashed var(--yg-border); background: #fff; text-align: center; }
.yg-sch-empty__icon { width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; background: var(--yg-sky); color: var(--yg-sea); }
.yg-sch-empty__icon svg { width: 28px; height: 28px; }
.yg-sch-empty b { font-size: 18px; }
.yg-sch-empty p { max-width: 460px; margin: 0 0 8px; color: var(--yg-muted); }

.yg-cat-pages { display: flex; justify-content: center; margin-top: 32px; }
.yg-cat-pages .page-link { color: var(--yg-ink); border-color: var(--yg-border); min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.yg-cat-pages .active > .page-link { background: var(--yg-ink); border-color: var(--yg-ink); color: #fff; }

/* ---------- Адаптив ---------- */
@media (max-width: 1199.98px) {
    .yg-sch-form__main { grid-template-columns: 1fr 1fr; }
    .yg-sch-form__main .yg-sch-q { grid-column: 1 / -1; }
    .yg-sch-form__main .yg-btn { grid-column: 1 / -1; }
    .yg-sch-item { grid-template-columns: 220px minmax(0, 1fr); }
    .yg-sch-item__side { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; border-left: 0; border-top: 1px solid var(--yg-border); padding: 12px 4px 2px; text-align: left; }
    .yg-sch-item__per { margin: 0 auto 0 8px; }
    .yg-sch-item__side .yg-btn { width: auto; }
}
@media (max-width: 767.98px) {
    .yg-sch-hero { padding-top: 8px; }
    .yg-sch-hero__inner { padding: 24px 16px 16px; border-radius: 24px; }
    .yg-sch-hero__lead { font-size: 15px; }
    .yg-sch-form__main { grid-template-columns: 1fr; }
    .yg-sch-form__more { padding: 12px 8px 4px; }
    .yg-sch-item { grid-template-columns: 1fr; gap: 12px; padding: 10px; }
    .yg-sch-item__pic { min-height: 0; aspect-ratio: 16 / 9; }
    .yg-sch-item__body { padding: 0 6px; }
    .yg-sch-item__side .yg-btn { width: 100%; }
    .yg-sch-item__per { margin: 0 auto 0 8px; }
    .yg-sch-bar .yg-tabs { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 12px 4px; scrollbar-width: none; }
    .yg-sch-bar .yg-tab { flex: none; }
}

/* Доп. фильтры: на телефоне свёрнуты */
.yg-sch-more > summary { display: none; }
@media (max-width: 767.98px) {
    .yg-sch-more { margin-top: 8px; border-top: 1px solid var(--yg-border); }
    .yg-sch-more > summary { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 12px; list-style: none; cursor: pointer; font-weight: 700; font-size: 15px; color: var(--yg-sea); }
    .yg-sch-more > summary::-webkit-details-marker { display: none; }
    .yg-sch-more > summary::after { content: '▾'; margin-left: auto; transition: transform .2s; }
    .yg-sch-more[open] > summary::after { transform: rotate(180deg); }
    .yg-sch-more .yg-sch-form__more { border-top: 0; margin-top: 0; padding-top: 0; }
}
.yg-sch-more__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--yg-sun-dark); }

/* ---------- Лента «Когда едем» ---------- */
.yg-sch-results { padding-top: 32px; }
.yg-sch-when { margin-bottom: 28px; padding: 18px 20px 14px; border-radius: 24px; background: #fff; box-shadow: var(--yg-shadow); }
.yg-sch-when__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.yg-sch-when__head > b { font: 600 18px var(--yg-font-head); color: var(--yg-ink); }
.yg-sch-when__other { margin: 0; }
.yg-sch-when__other label { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; margin: 0; padding: 0 12px; border-radius: 999px; cursor: pointer;
    font-size: 14px; font-weight: 700; color: var(--yg-sea); box-shadow: inset 0 0 0 1px var(--yg-border); transition: box-shadow .2s; }
.yg-sch-when__other label:hover { box-shadow: inset 0 0 0 1px var(--yg-sea); }
.yg-sch-when__other svg { width: 16px; height: 16px; }
/* Поле даты прозрачно поверх подписи — открывается системный календарь */
.yg-sch-when__other input { position: absolute; inset: 0; width: 100%; opacity: 0; cursor: pointer; }
.yg-sch-when__other input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.yg-sch-when__days { display: flex; gap: 8px; margin: 0 -20px; padding: 2px 20px 6px; overflow-x: auto; scroll-snap-type: x proximity; scroll-padding: 0 20px; scrollbar-width: none; }
.yg-sch-when__days::-webkit-scrollbar { display: none; }
.yg-sch-day { flex: 1 0 62px; max-width: 92px; display: grid; justify-items: center; gap: 1px; padding: 8px 0 6px; border-radius: 16px; scroll-snap-align: start; text-decoration: none;
    color: var(--yg-ink); box-shadow: inset 0 0 0 1px var(--yg-border); transition: background-color .15s, box-shadow .15s, transform .15s; }
.yg-sch-day:hover { color: var(--yg-ink); box-shadow: inset 0 0 0 1px var(--yg-sea); transform: translateY(-1px); }
.yg-sch-day small { font-size: 11px; font-weight: 700; color: var(--yg-muted); text-transform: lowercase; }
.yg-sch-day b { font: 600 20px/1.2 var(--yg-font-head); }
.yg-sch-day em { margin-top: 4px; min-width: 28px; padding: 1px 6px; border-radius: 999px; background: var(--yg-sky); color: var(--yg-sea-dark); font-size: 11px; font-weight: 800; font-style: normal; text-align: center; }
.yg-sch-day.is-weekend small:first-child { color: var(--yg-coral); }
.yg-sch-day.is-empty { opacity: .5; }
.yg-sch-day.is-empty em { background: none; }
.yg-sch-day--any { flex-basis: 70px; align-content: center; }
.yg-sch-day--any b { font-size: 16px; }
.yg-sch-day[aria-current] { background: var(--yg-ink); box-shadow: none; color: #fff; opacity: 1; }
.yg-sch-day[aria-current] small { color: rgba(255, 255, 255, .7); }
.yg-sch-day[aria-current] small:first-child { color: var(--yg-sun); }
.yg-sch-day[aria-current] em { background: var(--yg-sun); color: var(--yg-ink); }
.yg-sch-day:focus-visible { outline: 3px solid var(--yg-sun-dark); outline-offset: 2px; }

/* ---------- Карточка: метки, город, рейтинг ---------- */
.yg-sch-item__rate, .yg-sch-item__sale { position: absolute; top: 10px; padding: 4px 9px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.yg-sch-item__rate { right: 10px; background: rgba(255, 255, 255, .94); color: var(--yg-ink); }
.yg-sch-item__rate span { color: var(--yg-sun-dark); }
.yg-sch-item__sale { left: 10px; background: var(--yg-coral); color: #fff; }
.yg-sch-item__cat { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.yg-sch-item__cat .yg-sch-item__city { display: inline-flex; align-items: center; gap: 4px; color: var(--yg-ink-soft); }
.yg-sch-item__city svg { width: 14px; height: 14px; color: var(--yg-sea); }
.yg-sch-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 14px; color: var(--yg-muted); }
.yg-sch-item__meta > span { display: inline-flex; align-items: center; gap: 5px; }
.yg-sch-item__meta svg { width: 15px; height: 15px; }
.yg-sch-tag { padding: 3px 9px 3px 7px; border-radius: 8px; background: var(--yg-sky-soft); color: var(--yg-ink-soft); font-size: 12px; font-weight: 800; box-shadow: inset 0 0 0 1px var(--yg-border); }
.yg-sch-tag svg { width: 13px !important; height: 13px !important; color: var(--yg-sea); }
.yg-sch-tag--online { background: #DCFCE7; color: #166534; box-shadow: none; }
.yg-sch-tag--online svg { color: #16A34A; }

.yg-sch-days li { padding: 0; background: none; box-shadow: none; }
.yg-sch-days li > a { display: grid; gap: 1px; padding: 8px 12px; border-radius: 12px; background: var(--yg-sky-soft); box-shadow: inset 0 0 0 1px var(--yg-border); color: var(--yg-ink); text-decoration: none; transition: box-shadow .15s, background-color .15s; }
.yg-sch-days li > a:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--yg-sea); color: var(--yg-ink); }
.yg-sch-days li > a.is-today b { color: var(--yg-coral); }
.yg-sch-days__more > a { background: none !important; box-shadow: none !important; padding: 8px 4px !important; color: var(--yg-sea) !important; font-weight: 700; align-content: center; }

.yg-sch-match { align-self: flex-start; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: auto; padding: 10px 12px; border-radius: 14px; background: #FFF7DB; box-shadow: inset 0 0 0 1px #FDE68A; }
.yg-sch-match b { margin-right: 4px; font-size: 14px; }
.yg-sch-match a { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 10px; background: #fff; color: var(--yg-ink); font-weight: 800; font-size: 14px;
    font-variant-numeric: tabular-nums; text-decoration: none; box-shadow: inset 0 0 0 1px #FDE68A; transition: background-color .15s; }
.yg-sch-match a:hover { background: var(--yg-ink); color: #fff; }

.yg-sch-empty__days { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 8px; }
.yg-sch-empty__days a { padding: 8px 14px; border-radius: 999px; background: var(--yg-sky); color: var(--yg-sea-dark); font-weight: 700; text-decoration: none; }
.yg-sch-empty__days a:hover { background: var(--yg-ink); color: #fff; }

.yg-sch-form__main { grid-template-columns: 1.5fr 1fr 1.1fr auto; }

@media (max-width: 1199.98px) {
    .yg-sch-form__main { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 767.98px) {
    .yg-sch-form__main { grid-template-columns: 1fr; }
    .yg-sch-results { padding-top: 20px; }
    .yg-sch-when { padding: 14px 14px 10px; margin-bottom: 20px; border-radius: 20px; }
    .yg-sch-when__days { margin: 0 -14px; padding: 2px 14px 6px; scroll-padding: 0 14px; }
    .yg-sch-when__other span { display: none; }
    .yg-sch-when__other label { width: 36px; padding: 0; justify-content: center; }
    .yg-sch-day { flex: 0 0 58px; }
    .yg-sch-days { flex-wrap: nowrap; overflow-x: auto; margin: 0 -6px; padding: 6px 6px 2px; scrollbar-width: none; }
    .yg-sch-days::-webkit-scrollbar { display: none; }
    .yg-sch-days li { flex: none; }
}
