/*
 * Aasa Külalistemaja — what the theme adds to the design's style.css.
 *
 * style.css is the design's file as delivered and stays untouched, so a new
 * design delivery can replace it. This file holds only what running the
 * design as page-builder sections needs on top of it: the headings kept at
 * the page outline's level, the controls the design drew as links, the
 * cookie banner and core's accessibility panel in the design's colours, and
 * the accessibility floor.
 *
 * Served as-is; there is no build step.
 */

/* Visible focus everywhere, on top of whatever the browser does (WCAG 2.4.7):
   the design's red on its light bands, white on its dark ones. */
:focus-visible {
    outline: 3px solid var(--aasa-red);
    outline-offset: 2px;
}

.footer :focus-visible,
.hero :focus-visible,
.page-hero :focus-visible,
.cta :focus-visible,
.stats :focus-visible,
.site-nav:not(.scrolled) .nav-link:focus-visible,
.site-nav:not(.scrolled) .tool-btn:focus-visible {
    outline-color: #fff;
}

body.nav-light .site-nav .nav-link:focus-visible,
body.nav-light .site-nav .tool-btn:focus-visible {
    outline-color: var(--aasa-red);
}

/* style.css hides every .reveal until theme.js shows it; without the script
   (head.php marks html.js) a section would never appear. */
html:not(.js) .reveal {
    opacity: 1;
    transform: none;
}

/* The editors' margins scale with the design's section padding, which
   shrinks with the screen (clamp(5rem, 9vw, 8rem)). */
@media (max-width: 991.98px) {
    :root {
        --pc-section-scale: .75;
    }
}

/* Core's accessibility toggle paints its icon in Bootstrap's blue; the
   design's takes the bar's colour, white over a photo and ink on the light
   bar. Core's high-contrast yellow still wins (it is !important). */
.site-nav #accessibility-toggle i {
    color: inherit;
}

/* A dropdown's toggle is a <button>, not the design's <a>. */
.site-nav button.nav-link {
    background: none;
    border: 0;
}

/* The current page, styled from the attribute that announces it, so the cue
   on screen and the one a screen reader hears cannot drift (WCAG 1.4.1). */
.site-nav .nav-link[aria-current="page"] {
    font-weight: 700;
}

.site-nav .nav-link[aria-current="page"]::after {
    transform: scaleX(1);
}

.mobile-menu .nav-link[aria-current="page"] {
    color: var(--aasa-red);
}

/* The footer's column headings are <h2> for the page's outline, styled as
   the design's <h4>. */
.footer .footer-heading {
    font-family: var(--font-body);
    font-size: .78rem;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #fff;
    font-weight: 700;
    margin-bottom: 1.3rem;
}

.footer-brand img {
    width: auto;
}

/* A room page's small headings are <h2> under the room's <h1>, styled as
   the design's .h5 and .h4; Bootstrap's .h5 sets weight 500. */
.room-text ~ .h5,
.booking-inline .h4,
.col-lg-7 > .h5 {
    font-weight: 600;
}

/* A contact card's value that is not a link reads as a link's would. */
.contact-cards strong {
    color: var(--aasa-ink);
    font-weight: 600;
}

/* The contact form's answer from core, rounded as the form's fields are. */
.contact-form .contact-status {
    border-radius: 12px;
}

/* The booking forms' message for missing dates (the design only marked the
   fields red). */
.booking-bar [data-booking-error].d-block {
    font-size: .85rem;
}

/* Core's cookie banner in the design's colours: the red buttons on the
   page's warm white, the design's font and pill buttons. consent.css declares its
   palette on #silktide-wrapper and loads after this file, so `html` in front
   of the id wins the specificity tie. Silktide's --focus is its focus ring;
   it stays. */
html #silktide-wrapper {
    --fontFamily: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --primaryColor: #b6232d;
    --backgroundColor: #fffdf9;
    --textColor: #22261f;
    --backdropBackgroundColor: rgba(28, 28, 28, .45);
    --cookieIconColor: #fff;
    --cookieIconBackgroundColor: #b6232d;
    --boxShadow: 0 20px 50px -20px rgba(0, 0, 0, .28);
}

html #silktide-wrapper .st-button {
    border-radius: 999px;
    font-weight: 600;
}

html #silktide-wrapper #silktide-banner .st-button:focus,
html #silktide-wrapper #silktide-modal .st-button:focus {
    border-radius: 999px;
}

html #silktide-wrapper #silktide-banner,
html #silktide-wrapper #silktide-modal {
    border-radius: 18px;
}

/* In core's high-contrast mode the banner goes black and yellow with the page. */
html body.a11y-contrast-high #silktide-wrapper {
    --primaryColor: #ff0;
    --backgroundColor: #000;
    --textColor: #ff0;
    --cookieIconColor: #000;
    --cookieIconBackgroundColor: #ff0;
}

html body.a11y-contrast-high #silktide-wrapper #silktide-banner,
html body.a11y-contrast-high #silktide-wrapper #silktide-modal {
    border: 1px solid #ff0;
}

/* Core's high-contrast mode (accessibility panel) turns every word yellow
   and the page black, but leaves the design's own surfaces — cards, pills,
   bands, the menu bar — light or coloured under the yellow words. They go
   black with a yellow edge, and the photos' veils darken. */
body.a11y-contrast-high :is(
    .site-nav.scrolled, .mobile-menu, .dropdown-menu, .booking-bar, .section-cream, .service-card, .room-card, .room-house,
    .info-card, .value-card, .price-card, .contact-cards li, .contact-form, .notice, .fact-row li, .amenities i,
    .review, .avatar, .badge-rating, .room-rating, .room-rating .score, .filter-pills, .filter-pills button.active,
    .free-badge, .stats, .awards span, .footer, .cta, .hero, .page-hero, .form-control, .form-select
) {
    background: #000 !important;
    border: 1px solid #ff0 !important;
    color: #ff0 !important;
}

body.a11y-contrast-high .hero-overlay,
body.a11y-contrast-high .cta::before,
body.a11y-contrast-high .service-card::after {
    background: rgba(0, 0, 0, .85) !important;
}

/* Core's list of yellow words leaves out <small>, the design's grey notes. */
body.a11y-contrast-high small {
    color: #ff0 !important;
}

body.a11y-contrast-high .burger span {
    background: #ff0 !important;
}
