/* Hotel Royal accessibility fixes. Loads after the theme's all.css. Finding IDs refer to docs/findings.md. */

/* Visually hidden text that screen readers still read */
.hr-a11y-vh {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* M1: skip link, hidden until focused */
.hr-a11y-skip {
    position: absolute;
    left: 16px;
    top: -200px;
    z-index: 100000;
    padding: 12px 20px;
    background: #000;
    color: #fff;
    font-size: 16px;
    text-decoration: underline;
    border: 2px solid #C9A86A;
}
.hr-a11y-skip:focus {
    top: 16px;
}
main[tabindex="-1"]:focus {
    outline: none !important;
    box-shadow: none !important;
}

/*
 * H2: one focus ring for the whole site. The theme sets outline:none on
 * buttons and fields. A gold ring outside a black ring reads on black,
 * cream and photos alike.
 */
:focus-visible {
    outline: 3px solid #C9A86A !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 2px #000 !important;
}
/* Inside clipped containers (carousels, Instagram tiles) draw the ring inside the element */
.owl-stage-outer :focus-visible,
.inta-main1 a:focus-visible,
.footer-map a:focus-visible {
    outline-offset: -5px !important;
    box-shadow: inset 0 0 0 2px #000 !important;
}

/* C2: the menu control is now a <button>; keep the theme's look */
button.hamburger {
    background: none;
    border: 0;
    padding: 8px 0;
    margin: 0;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
/* C2: the closed mobile menu leaves the Tab order instead of sitting off screen */
.mobile-menu:not(.active) {
    visibility: hidden;
    transition: transform 0.8s, visibility 0s linear 0.8s;
}
.mobile-menu.active {
    visibility: visible;
    transition: transform 0.8s, visibility 0s;
}

/* C1: feature triggers are buttons (popups) or a link (location) inside the original list items */
.hr-a11y-feature {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 4px 0;
    background: none;
    border: 0;
    color: inherit;
    font: inherit;
    text-transform: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}
.hr-a11y-feature:hover span:first-of-type {
    text-decoration: underline;
}

/* C1: native dialogs replace the click-only popups */
dialog.hr-a11y-dialog {
    width: min(700px, 95vw);
    max-width: 95vw;
    max-height: 90vh;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    overflow: visible;
}
dialog.hr-a11y-dialog::backdrop {
    background: rgba(0, 0, 0, 0.7);
}
dialog.hr-a11y-dialog .popup-content {
    width: 100%;
    max-width: none;
    height: auto;
    max-height: 90vh;
}
.hr-a11y-close {
    position: absolute;
    top: 6px;
    right: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    background: none;
    border: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

/* H3: pause and play controls */
.hr-a11y-motion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 14px;
    border: 2px solid #C9A86A;
    border-radius: 22px;
    background: rgba(0, 0, 0, 0.75);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
}
.hr-a11y-motion svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    flex: none;
}
.hr-a11y-motion--overlay {
    position: absolute;
    right: 20px;
    bottom: 20px;
    z-index: 20;
}
.hr-a11y-motion--bar {
    margin: 12px 0;
}
/* On phones the home hero's Book button sits at the bottom, so the hero pause moves to the top right, under the header */
@media (max-width: 767px) {
    .banner-section .hr-a11y-motion--overlay {
        top: 76px;
        right: 12px;
        bottom: auto;
    }
}
.banner-section,
.olympics-hero,
.carousel-field {
    position: relative;
}
.hr-a11y-motion-row {
    display: flex;
    justify-content: flex-end;
    padding: 0 20px;
}

/* M3: links inside running text are underlined, not told apart by colour alone */
.simple-content a,
.popup-content a,
.faq-answer-content a,
.home-about-sub2 p a,
.room-style-sub1 p a,
.central-main-1 p a {
    text-decoration: underline !important;
    text-underline-offset: 0.15em;
}
.simple-content a:hover,
.simple-content a:focus {
    text-decoration-thickness: 2px !important;
}

/* M4: contrast. Values checked in results/contrast-pairs-after.tsv */
p.review-author span {
    opacity: 0.7;
}
.olympics-page .value-props .section-label,
.olympics-page .faq-section .section-label,
.olympics-page .hw-step-label {
    color: #7A6230;
}
.olympics-page .olympics-packages .section-label {
    color: #56664F;
}
.olympics-page .room-standard-price span {
    color: #6A6A6A;
}
.olympics-page .room-standard-btn {
    color: #56664F;
    border-color: #56664F;
    font-size: 11px;
}
.olympics-page .room-standard:hover .room-standard-btn {
    color: #fff;
    background: #56664F;
}
.olympics-page .tier-note,
.olympics-page .tier-rooms-header,
.olympics-page .tier-price-note {
    color: rgba(248, 244, 237, 0.65);
}
.olympics-page .tier-row.bronze .tier-cta-btn {
    background: linear-gradient(135deg, #A66628 0%, #8A5420 100%);
}

/* M8: sections grow with their text at 200% zoom and on narrow screens instead of clipping it */
section.stay-central {
    height: auto;
    min-height: 789px;
}
section.award-win {
    height: auto;
    min-height: 410px;
}
@media (max-width: 701px) {
    section.award-win {
        min-height: 250px;
    }
}

/* L3: the Olympics countdown shows days only, so nothing on the page ticks every second */
.olympics-page #olympics-countdown .countdown-item ~ .countdown-item,
.olympics-page #olympics-countdown .countdown-separator {
    display: none;
}

/* L1: headings re-levelled by the HTML filter keep the look of the tags they replace */
.footer-contact h2,
.footer-links h2,
.footer-newsletter h2 {
    color: #FFF;
    font-family: "Microsoft Sans Serif";
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-transform: uppercase;
    padding-bottom: 20px;
}
.central-main-1 h3 {
    color: #FFF;
    font-family: "Microsoft Sans Serif";
    font-size: 18px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    text-transform: uppercase;
    padding-bottom: 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #ffffff82;
}
@media (max-width: 701px) {
    .central-main-1 h3 {
        padding-bottom: 15px;
        margin-bottom: 15px;
    }
}

/* H3: honour the system "Reduce motion" setting. The marquee keeps its own timing; a11y.js stops it. */
@media (prefers-reduced-motion: reduce) {
    *:not(.swiper-wrapper),
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0s !important;
        scroll-behavior: auto !important;
    }
}
