/*
 * Доработки theme-2 для элементов, которых нет в макете: уведомление о cookie,
 * капча и ошибки форм, текущий город в списке, подсказки DaData, карта сайта. Используются токены и приёмы из styles.css.
 * Подключается последним, правила макета не переопределяет.
 */

/* Текущий город в диалоге выбора */
.city-list a[aria-current="page"] { color: var(--blue); font-weight: 650; }

/* Уведомление о cookie */
.cookie-notice { position: fixed; inset: auto 0 0; z-index: 1400; background: var(--navy); color: #fff; box-shadow: 0 -12px 40px #00152e30; }
.cookie-notice[hidden] { display: none; }
.cookie-notice-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 18px; }
.cookie-notice p { font-size: 14px; line-height: 1.6; color: #cee4f5; }
.cookie-notice a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.cookie-notice a:is(:hover, :focus-visible) { text-decoration-color: var(--orange); }
.cookie-notice .button { flex: 0 0 auto; min-height: 48px; padding: 12px 22px; background: #fff; color: var(--blue); }
.cookie-notice .button:hover { background: #eaf4ff; }
@media (max-width: 800px) {
  .cookie-notice-inner { flex-direction: column; align-items: stretch; gap: 14px; padding-block: 16px; }
  .cookie-notice .button { width: 100%; }
}

/* Капча и ошибки форм */
.smart-captcha-container:empty { display: none; }
.smart-captcha-container { min-height: 102px; }
.modal-form :is(input, select, textarea)[aria-invalid="true"] { border-color: #d64545; }
.contact-form :is(input, select, textarea)[aria-invalid="true"] { box-shadow: 0 0 0 2px #ffb4a8; }
.consent:has(input[aria-invalid="true"]) input { border-color: #d64545; }
.form-status.is-error { color: #c0392b; }
.contact-form .form-status.is-error { color: #ffd2c9; }
.form-status.is-success { color: var(--blue); }
.contact-form .form-status.is-success { color: #fff; }
form[aria-busy="true"] button[type="submit"] { opacity: .6; pointer-events: none; }

/*
 * Окно заказа карт (правки заказчика 14.10.2026, NEW-THEME/FIX_2026.10.14/order-form.css):
 * шесть полей в три ряда по два на любой ширине, окно 711 px, поля 50 px.
 * Стрелка списка из комплекта не нужна — тип карт оформлен выпадающим списком темы (dropdown.js).
 */
.order-dialog { width: min(711.04px, calc(100% - 32px)); overflow-y: auto; overscroll-behavior: contain; }
.order-dialog .modal-form { gap: 16px; }
.order-dialog .form-row { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: end; gap: 18px; }
.order-dialog .form-row > label { min-width: 0; }
.order-dialog .modal-form .form-row input,
.order-dialog .modal-form .form-row select:not(.pt-select-native),
.order-dialog .form-row .pt-select-trigger { height: 50px; padding: 10px 12px; }
@media (max-width: 540px) {
  .order-dialog { width: calc(100% - 24px); padding: 20px; }
  .order-dialog .form-row { gap: 12px; }
  .order-dialog .modal-form .form-row input,
  .order-dialog .form-row .pt-select-trigger { padding-left: 8px; font-size: 16px; }
  .order-dialog .form-row .pt-select-trigger { padding-right: 8px; gap: 6px; }
}
@media (max-width: 360px) {
  .order-dialog { width: calc(100% - 16px); padding: 16px 12px; }
  .order-dialog .form-row { gap: 10px; }
}

/*
 * Выпадающие списки (dropdown.js): select, поле города с подсказками и подсказки DaData — одна панель.
 * Поле — как текстовые поля формы, фокус и открытое состояние — синей рамкой (без оранжевой обводки).
 */
.pt-select, .pt-combobox { position: relative; width: 100%; min-width: 0; }
.pt-select > select.pt-select-native { position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; min-height: 0; margin: 0; padding: 0; border: 0; opacity: 0; pointer-events: none; }
.pt-select-trigger { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0; margin: 0; padding: 12px 14px; border: 1px solid #cfdae4; border-radius: 6px; background: #fff; color: var(--ink); font: inherit; font-size: var(--type-body); font-weight: var(--weight-body); line-height: 1.5; text-align: left; cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.pt-select-value { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pt-select.is-placeholder .pt-select-value { color: #7a8996; }
.pt-select-chevron { width: 18px; height: 18px; color: var(--blue); transition: transform .2s; }
.pt-select.is-open .pt-select-chevron { transform: rotate(180deg); }
.pt-select-trigger:hover { border-color: #9fb6c9; }
.pt-select-trigger:focus-visible, .pt-select.is-open .pt-select-trigger,
.pt-combobox input:focus-visible, .pt-combobox.is-open input { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px #0069b51f; }
.pt-select-trigger:disabled { color: #7a8996; cursor: default; }
.pt-select-trigger:disabled .pt-select-chevron { color: #9fb6c9; }
.pt-select-trigger[aria-invalid="true"] { border-color: #d64545; }
.requisites-grid .pt-select-trigger { min-height: 52px; padding: 13px 15px; border-color: #c9d4dd; color: var(--navy); }

/* Панель списка */
.requisites-form label:has([data-suggest]) { position: relative; }
.pt-dropdown, .pt-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 18px 48px #00152e24; max-height: 288px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #c9d4dd transparent; text-align: left; }
.pt-dropdown.is-above { top: auto; bottom: calc(100% + 6px); }
.pt-dropdown[hidden], .pt-suggest[hidden] { display: none; }
.pt-dropdown { animation: pt-dropdown-in .16s ease-out; }
.pt-dropdown.is-above { animation-name: pt-dropdown-in-above; }
@keyframes pt-dropdown-in { from { opacity: 0; transform: translateY(-4px); } }
@keyframes pt-dropdown-in-above { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .pt-dropdown { animation: none; } }
.pt-dropdown > li, .pt-suggest li { position: relative; padding: 10px 12px; border-radius: 6px; color: var(--ink); font-size: var(--type-body); font-weight: var(--weight-body); line-height: 1.45; letter-spacing: 0; white-space: normal; cursor: pointer; transition: background-color .12s, color .12s; }
.pt-dropdown > li.is-active, .pt-suggest li:hover, .pt-suggest li[aria-selected="true"] { background: var(--pale); }
.pt-dropdown > li[aria-selected="true"] { padding-right: 40px; color: var(--blue); font-weight: 600; }
.pt-dropdown > li[aria-selected="true"]::after { content: ""; position: absolute; right: 16px; top: 50%; width: 10px; height: 5px; margin-top: -5px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg); }
.pt-dropdown > li[aria-disabled="true"] { color: var(--muted); cursor: default; }
.pt-suggest li small { display: block; margin-top: 2px; font-size: 12px; color: var(--muted); }

/* Регион цен — список в виде ссылки с шевроном (как в макете), без оранжевой рамки фокуса */
.price-region:focus-within { outline: 0; }
.price-region:has(> select:focus-visible) { outline: 2px solid #0069b566; outline-offset: 5px; }
.price-region:has(.pt-select) > :is(.price-region-value, .icon) { display: none; }
.pt-select-inline { width: auto; }
.pt-select-inline .pt-select-trigger { width: auto; gap: 9px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; color: inherit; font-size: inherit; line-height: inherit; }
.pt-select-inline .pt-select-value { border-bottom: 2px solid #0069b54d; transition: border-color .2s; }
.pt-select-inline .pt-select-chevron { width: 16px; height: 16px; color: inherit; }
.pt-select-inline .pt-select-trigger:focus-visible { outline: 2px solid #0069b566; outline-offset: 5px; box-shadow: none; }
/* Наведение — оранжевый акцент макета, как у выбора города в шапке */
.price-region:hover .pt-select-value { border-bottom-color: var(--orange); }
.price-region:hover .pt-select-chevron { color: var(--orange); }
.pt-select-inline .pt-dropdown { right: auto; width: max-content; min-width: max(100%, 260px); max-width: min(440px, calc(100vw - 40px)); }

/* HTML-карта сайта */
.sitemap-section .container { display: grid; gap: 56px; }
.sitemap-group h2 { font-size: clamp(24px, 2.4vw, 32px); margin-bottom: 20px; }
.sitemap-group h2 a:hover { color: var(--blue); }
.sitemap-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.sitemap-list-columns { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 24px; }
.sitemap-list a { color: var(--ink); line-height: 1.5; transition: color .2s; }
.sitemap-list a:is(:hover, :focus-visible) { color: var(--blue); }
@media (max-width: 1020px) { .sitemap-list-columns { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 540px) { .sitemap-list-columns { grid-template-columns: 1fr 1fr; } }

/* Полный список АЗС на региональных страницах — внутренний скролл, как у общей главной (правки 09.10.2026) */
@media (min-width: 801px) {
  .regional-page:not(.home-page) .stations-section .station-layout-native { height: 540px; }
  .regional-page:not(.home-page) .stations-section .station-list { max-height: 540px; overflow-y: auto; }
  .regional-page:not(.home-page) .stations-section .station-list-top { position: sticky; top: 0; z-index: 2; }
}

/*
 * Шапки страниц (hero): верхняя ось — правила заказчика 12.10.2026 в конце styles.css
 * (крошки 28 + 21 + 28 px, на мобиле 24; на главной место крошек зарезервировано).
 * Здесь — только единый нижний отступ простых шапок (контакты, публикации, документы).
 */
:root { --hero-bottom: 56px; }
@media (max-width: 800px) { :root { --hero-bottom: 36px; } }
@media screen {
  .regional-page :is(.contacts-hero-grid, .editorial-hero-grid, .privacy-hero-grid) { padding-bottom: var(--hero-bottom); }
}
