/* Доступность: видимый фокус, ссылка «Перейти к содержимому», контраст, меньше анимации.
   Подключается последним, чтобы перекрыть outline:none из других файлов. */

:root {
    /* Коралловый #ff6b6b на белом даёт контраст 2.8:1 (нужно 4.5:1 для текста).
       Для текста берём более тёмный оттенок, для иконок и рамок остаётся прежний. */
    --color-secondary-text: #c53030;
    --color-text-light: #6b6b6b;
    --focus-ring: #1d4ed8;
}

/* Видимый фокус при навигации с клавиатуры (мышью кольцо не появляется) */
a:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible,
summary:focus-visible,
[role="button"]:focus-visible,
[tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 3px solid var(--focus-ring) !important;
    outline-offset: 2px !important;
}

/* Ссылка для пропуска шапки: видна только при фокусе */
.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100000;
    padding: 12px 18px;
    background: #1a1a1a;
    color: #fff;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); }

/* Цель перехода по якорю не должна прятаться под фиксированной шапкой */
main[id] { scroll-margin-top: 80px; }
main:focus { outline: none; }

/* Мелкий серый текст подсказок: было #999 (2.9:1) */
.host-edit .form-group small { color: var(--color-text-light); }

/* Текст коралловым цветом: тёмный оттенок с нормальным контрастом */
.nav-link:hover,
.nav-simple .nav-link:hover,
.review-author,
.price-amount,
.contact-details a,
.location-card .coords,
.map-address,
.agreement-note a,
.admin-tab,
.admin-tab.active {
    color: var(--color-secondary-text);
}

/* Скрытый визуально, но читаемый программой текст */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Пользователи, которые отключили анимации в системе, их не получают */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}
