/* Explain: Styles for the accessibility widget, including controls and assist modes. */
/* Accessibility: skip link, focus visibility, floating widget and assist modes */

/* Skip to main content */
.skip-to-content {
    position: fixed;
    top: -140px;
    right: 0.75rem;
    z-index: 200;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    padding: 0.85rem 1.4rem;
    font-weight: 700;
    transition: top 200ms ease;
}

.skip-to-content:focus {
    top: 0.75rem;
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Clear keyboard focus indicator */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 2px;
}

/* Floating accessibility button */
.a11y-toggle {
    position: fixed;
    right: 1.25rem;
    bottom: 6rem;
    z-index: 55;
    display: inline-flex;
    width: 3.4rem;
    height: 3.4rem;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 1.6rem;
    box-shadow: 0 12px 30px rgba(31, 46, 35, 0.3);
    transition: transform 200ms ease, background 200ms ease;
}

.a11y-toggle:hover {
    background: var(--sage-dark);
    transform: scale(1.06);
}

/* Accessibility panel */
.a11y-panel {
    position: fixed;
    right: 1.25rem;
    bottom: 10rem;
    z-index: 56;
    width: min(21rem, calc(100vw - 2.5rem));
    max-height: min(72vh, 34rem);
    overflow-y: auto;
    border: 1px solid var(--glass-border);
    border-radius: 1.75rem;
    background: var(--background-color);
    box-shadow: 0 26px 70px rgba(31, 46, 35, 0.28);
    padding: 1.25rem;
}

.a11y-panel[hidden] {
    display: none;
}

.a11y-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.a11y-panel-title {
    color: var(--text-color);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
}

.a11y-close {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    background: var(--surface-color);
    color: var(--text-color);
    font-size: 1rem;
}

.a11y-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.65rem;
}

.a11y-action {
    display: flex;
    min-height: 3rem;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--glass-border);
    border-radius: 1.1rem;
    background: var(--surface-color);
    color: var(--text-color);
    padding: 0.7rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    text-align: start;
    transition: border-color 200ms ease, background 200ms ease;
}

.a11y-action:hover {
    border-color: var(--accent-color);
}

.a11y-action[aria-pressed="true"] {
    border-color: var(--accent-color);
    background: var(--sage-soft);
}

.a11y-action i {
    color: var(--accent-color);
    font-size: 1rem;
}

.a11y-action-full {
    grid-column: 1 / -1;
    justify-content: center;
}

@media (min-width: 768px) {
    .a11y-toggle {
        right: 2rem;
        bottom: 2rem;
    }

    .a11y-panel {
        right: 2rem;
        bottom: 6rem;
    }
}

/* ---- Assist modes ---- */

/* Text size */
html.a11y-font-up-1 { font-size: 112.5%; }
html.a11y-font-up-2 { font-size: 125%; }
html.a11y-font-up-3 { font-size: 137.5%; }
html.a11y-font-down-1 { font-size: 93.75%; }

/* Highlight links */
html.a11y-links a {
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
    text-underline-offset: 3px !important;
    outline: 2px solid var(--accent-color);
    outline-offset: 1px;
}

/* Readable font (keep icon fonts intact) */
html.a11y-readable body,
html.a11y-readable body *:not(i) {
    font-family: Arial, Tahoma, "Helvetica Neue", sans-serif !important;
}

/* Grayscale */
html.a11y-grayscale .site-header,
html.a11y-grayscale main,
html.a11y-grayscale footer,
html.a11y-grayscale .mobile-book-bar,
html.a11y-grayscale a[href^="https://wa.me"] {
    filter: grayscale(1);
}

/* High contrast dark theme */
html.a11y-contrast {
    --background-color: #050505;
    --surface-color: #131313;
    --footer-bg: #050505;
    --text-color: #ffffff;
    --text-muted: #e8e8e8;
    --primary-color: #ffe600;
    --primary-hover: #fff59a;
    --accent-color: #ffe600;
    --button-color: #ffe600;
    --sage-dark: #ffe600;
    --sage-soft: rgba(255, 230, 0, 0.22);
    --terracotta-soft: rgba(255, 230, 0, 0.22);
    --glass-bg: rgba(0, 0, 0, 0.78);
    --glass-border: rgba(255, 230, 0, 0.75);
    --border-color: rgba(255, 255, 255, 0.32);
    --nav-bg: rgba(0, 0, 0, 0.92);
    --field-bg: #1d1d1d;
    --logo-subtitle-color: #ffe600;
    --shadow-soft: 0 22px 70px rgba(0, 0, 0, 0.7);
    --shadow-button: 0 16px 36px rgba(255, 230, 0, 0.25);
}

html.a11y-contrast body {
    background: #050505;
}

html.a11y-contrast .site-header {
    background: rgba(0, 0, 0, 0.94) !important;
}

html.a11y-contrast .hero-split,
html.a11y-contrast .contact-section {
    background: var(--background-color) !important;
}

html.a11y-contrast .glass-panel,
html.a11y-contrast .quiet-detail,
html.a11y-contrast .amenity-row,
html.a11y-contrast .contact-note {
    background: var(--surface-color) !important;
}

html.a11y-contrast .mobile-book-bar {
    background: rgba(0, 0, 0, 0.92) !important;
}

html.a11y-contrast [class*="bg-[var(--button-color)]"] {
    color: #000000 !important;
}

html.a11y-contrast .section-kicker {
    color: #ffe600;
}