/* Screen reader utilities & hidden skip-to-content link */
.visually-hidden,
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-to-content {
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 10001;
    padding: 13px 28px;
    background: var(--ui-primary, #0066b1);
    color: #ffffff !important;
    font-family: var(--font-base, sans-serif);
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    border: 2px solid #ffffff;
    border-radius: 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
    transform: translateY(-220%);
    opacity: 0;
    pointer-events: none;
    transition: transform 160ms ease, opacity 160ms ease;
}

.skip-to-content:focus,
.skip-to-content:focus-visible {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    outline: 2px solid var(--focus-ring-color, #9ecaff) !important;
    outline-offset: 2px !important;
}

main[tabindex="-1"]:focus {
    outline: none;
}

.nav-brand-logo {
    display: inline-flex;
    align-items: center;
}

/* Keep auto-hidden navbar reachable via Tab/Shift+Tab so focusin reveals it */
.main-nav[data-hidden="true"] .nav-bar {
    visibility: visible;
    opacity: 0;
}

/* ==========================================================================
   WCAG Accessibility Modes (active when attributes are set on <html>)
   ========================================================================== */

/* 1. Font Scaling */
html[data-wcag-font="md"] {
    font-size: 115%;
}

html[data-wcag-font="lg"] {
    font-size: 130%;
}

html[data-wcag-font="xl"] {
    font-size: 145%;
}

html[data-wcag-font] .btn:not(.wcag-widget *) {
    font-size: 1rem;
}

html[data-wcag-font] .btn-sm:not(.wcag-widget *) {
    font-size: 0.875rem;
}

/* 2. Contrast Modes */
/* High Contrast Dark (Yellow / White on Black - WCAG AAA) */
html[data-wcag-contrast="high-dark"] {
    --page-background: #000000 !important;
    --color-000: #000000 !important;
    --color-black: #000000 !important;
    --color-dark: #000000 !important;
    --color-light: #111111 !important;
    --color-white: #ffff00 !important;
    --color-text: #ffff00 !important;
    --color-muted: #ffffff !important;
    --color-brand: #00ffff !important;
    --color-brand-m1: #00ffff !important;
    --focus-ring-color: #00ffff !important;
    --focus-ring-width: 3px !important;
}

html[data-wcag-contrast="high-dark"] body,
html[data-wcag-contrast="high-dark"] main,
html[data-wcag-contrast="high-dark"] section:not(.wcag-widget *),
html[data-wcag-contrast="high-dark"] article,
html[data-wcag-contrast="high-dark"] header,
html[data-wcag-contrast="high-dark"] footer,
html[data-wcag-contrast="high-dark"] .main-nav,
html[data-wcag-contrast="high-dark"] .nav-bar,
html[data-wcag-contrast="high-dark"] .nav-panel,
html[data-wcag-contrast="high-dark"] .menu-submenu,
html[data-wcag-contrast="high-dark"] .site-footer,
html[data-wcag-contrast="high-dark"] .footer-signup,
html[data-wcag-contrast="high-dark"] .event-card,
html[data-wcag-contrast="high-dark"] .cookie-banner,
html[data-wcag-contrast="high-dark"] .booking-bar,
html[data-wcag-contrast="high-dark"] .modal-panel,
html[data-wcag-contrast="high-dark"] dialog[open] {
    background: #000000 !important;
    background-image: none !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
}

html[data-wcag-contrast="high-dark"] :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, label, legend, summary, th, td, span, small, strong, em):not(.wcag-widget *) {
    color: #ffff00 !important;
}

html[data-wcag-contrast="high-dark"] a:not(.wcag-widget *):not(.skip-to-content) {
    color: #00ffff !important;
    text-decoration: underline !important;
}

html[data-wcag-contrast="high-dark"] :is(button, .btn, input, select, textarea):not(.wcag-widget *) {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border: 2px solid #ffff00 !important;
}

html[data-wcag-contrast="high-dark"] :is(button, .btn):not(.wcag-widget *):hover,
html[data-wcag-contrast="high-dark"] :is(button, .btn):not(.wcag-widget *):focus-visible {
    background-color: #ffff00 !important;
    color: #000000 !important;
}

html[data-wcag-contrast="high-dark"] :is(button, .btn):not(.wcag-widget *):hover *,
html[data-wcag-contrast="high-dark"] :is(button, .btn):not(.wcag-widget *):focus-visible * {
    color: #000000 !important;
}

/* High Contrast Light (Black on White - WCAG AAA) */
html[data-wcag-contrast="high-light"] {
    --page-background: #ffffff !important;
    --color-000: #ffffff !important;
    --color-black: #ffffff !important;
    --color-dark: #f5f5f5 !important;
    --color-light: #ffffff !important;
    --color-white: #000000 !important;
    --color-text: #000000 !important;
    --color-muted: #1a1a1a !important;
    --color-brand: #0000b8 !important;
    --color-brand-m1: #0000b8 !important;
    --focus-ring-color: #0000b8 !important;
    --focus-ring-width: 3px !important;
}

html[data-wcag-contrast="high-light"] body,
html[data-wcag-contrast="high-light"] main,
html[data-wcag-contrast="high-light"] section:not(.wcag-widget *),
html[data-wcag-contrast="high-light"] article,
html[data-wcag-contrast="high-light"] header,
html[data-wcag-contrast="high-light"] footer,
html[data-wcag-contrast="high-light"] .main-nav,
html[data-wcag-contrast="high-light"] .nav-bar,
html[data-wcag-contrast="high-light"] .nav-panel,
html[data-wcag-contrast="high-light"] .menu-submenu,
html[data-wcag-contrast="high-light"] .site-footer,
html[data-wcag-contrast="high-light"] .footer-signup,
html[data-wcag-contrast="high-light"] .event-card,
html[data-wcag-contrast="high-light"] .cookie-banner,
html[data-wcag-contrast="high-light"] .booking-bar,
html[data-wcag-contrast="high-light"] .modal-panel,
html[data-wcag-contrast="high-light"] dialog[open] {
    background: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

html[data-wcag-contrast="high-light"] :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, label, legend, summary, th, td, span, small, strong, em):not(.wcag-widget *) {
    color: #000000 !important;
}

html[data-wcag-contrast="high-light"] a:not(.wcag-widget *):not(.skip-to-content) {
    color: #0000b8 !important;
    text-decoration: underline !important;
}

html[data-wcag-contrast="high-light"] :is(button, .btn, input, select, textarea):not(.wcag-widget *) {
    background-color: #ffffff !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

html[data-wcag-contrast="high-light"] :is(button, .btn):not(.wcag-widget *):hover,
html[data-wcag-contrast="high-light"] :is(button, .btn):not(.wcag-widget *):focus-visible {
    background-color: #000000 !important;
    color: #ffffff !important;
}

html[data-wcag-contrast="high-light"] :is(button, .btn):not(.wcag-widget *):hover *,
html[data-wcag-contrast="high-light"] :is(button, .btn):not(.wcag-widget *):focus-visible * {
    color: #ffffff !important;
}

/* High-light: dark header chrome — logo and top-level menu stay light on dark. */
html[data-wcag-contrast="high-light"] .main-nav,
html[data-wcag-contrast="high-light"] .main-nav .nav-bar,
html[data-wcag-contrast="high-light"] .main-nav .nav-panel,
html[data-wcag-contrast="high-light"] .main-nav .menu-submenu {
    background: #000000 !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

html[data-wcag-contrast="high-light"] .main-nav :is(
    a,
    summary,
    span,
    button,
    .menu-link,
    .cart-link,
    .nav-language
):not(.wcag-widget *) {
    color: #ffffff !important;
}

html[data-wcag-contrast="high-light"] .main-nav .menu-link[aria-current='page'],
html[data-wcag-contrast="high-light"] .main-nav .menu-link[data-active],
html[data-wcag-contrast="high-light"] .main-nav summary.menu-link[data-active],
html[data-wcag-contrast="high-light"] .main-nav .cart-count {
    color: #ffffff !important;
}

html[data-wcag-contrast="high-light"] .main-nav a:not(.cart-link):hover,
html[data-wcag-contrast="high-light"] .main-nav summary.menu-link:hover {
    color: rgba(255, 255, 255, 0.75) !important;
}

/* High-light: hero sits on photo/video — keep intended white copy readable. */
html[data-wcag-contrast="high-light"] .hero .hero-content.text-white,
html[data-wcag-contrast="high-light"] .hero .hero-content.text-white :is(
    h1, h2, h3, h4, h5, h6, p, li, dt, dd, label, legend, summary,
    th, td, span, small, strong, em
):not(.wcag-widget *) {
    color: #ffffff !important;
}

html[data-wcag-contrast="high-light"] .hero .hero-content.text-white a:not(.btn):not(.wcag-widget *) {
    color: #ffffff !important;
}

/* Dark surfaces: do not force the global high-light white control fill. */
html[data-wcag-contrast="high-light"] .hero :is(button, .btn):not(.wcag-widget *),
html[data-wcag-contrast="high-light"] .main-nav :is(button, .btn, .nav-toggle):not(.wcag-widget *) {
    background-color: transparent !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

html[data-wcag-contrast="high-light"] .hero :is(button, .btn):not(.wcag-widget *):hover,
html[data-wcag-contrast="high-light"] .hero :is(button, .btn):not(.wcag-widget *):focus-visible,
html[data-wcag-contrast="high-light"] .main-nav :is(button, .btn, .nav-toggle):not(.wcag-widget *):hover,
html[data-wcag-contrast="high-light"] .main-nav :is(button, .btn, .nav-toggle):not(.wcag-widget *):focus-visible {
    background-color: #ffffff !important;
    color: #000000 !important;
    border-color: #ffffff !important;
}

html[data-wcag-contrast="high-light"] .hero :is(button, .btn):not(.wcag-widget *):hover *,
html[data-wcag-contrast="high-light"] .hero :is(button, .btn):not(.wcag-widget *):focus-visible *,
html[data-wcag-contrast="high-light"] .main-nav :is(button, .btn, .nav-toggle):not(.wcag-widget *):hover *,
html[data-wcag-contrast="high-light"] .main-nav :is(button, .btn, .nav-toggle):not(.wcag-widget *):focus-visible * {
    color: #000000 !important;
}

/* Dark artwork by default; high-light swaps in the light-background file. */
.partner-logo--on-light {
    display: none;
}

html[data-wcag-contrast="high-light"] .container.bg-black:has(.footer-partners) {
    background-color: #ffffff !important;
    color: #000000 !important;
}

html[data-wcag-contrast="high-light"] .footer-partners .title {
    color: #000000 !important;
}

html[data-wcag-contrast="high-light"] .partners .block_1 {
    border-right-color: #000000 !important;
}

html[data-wcag-contrast="high-light"] .partner-logo--on-dark {
    display: none !important;
}

html[data-wcag-contrast="high-light"] .partner-logo--on-light {
    display: block !important;
}

/* Grayscale overlay without breaking position:fixed elements */
.wcag-grayscale-layer {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9990;
    pointer-events: none;
    -webkit-backdrop-filter: grayscale(100%);
    backdrop-filter: grayscale(100%);
}

html[data-wcag-contrast="grayscale"] .wcag-grayscale-layer {
    display: block;
}

/* 3. Framed Links (Zaznaczenie wszelkich linków w ramkach — ostre narożniki spójne ze stroną) */
html[data-wcag-links="1"] a[href]:not(.wcag-widget *):not(.skip-to-content) {
    outline: 2px solid #ffdd00 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.92) !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    border-radius: 0 !important;
}

html[data-wcag-contrast="high-light"][data-wcag-links="1"] a[href]:not(.wcag-widget *):not(.skip-to-content) {
    outline: 3px solid #d00000 !important;
    outline-offset: 2px !important;
    box-shadow: 0 0 0 5px #ffffff !important;
}

/* 4. Reading Mask Following Cursor (Maska podążająca za kursorem) */
.wcag-reading-mask {
    position: fixed;
    inset: 0;
    z-index: 9994;
    pointer-events: none;
    --wcag-mask-y: 50vh;
    --wcag-mask-height: 120px;
}

.wcag-reading-mask[hidden] {
    display: none !important;
}

.wcag-reading-mask__top,
.wcag-reading-mask__bottom {
    position: fixed;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.72);
    pointer-events: none;
}

.wcag-reading-mask__top {
    top: 0;
    height: max(0px, calc(var(--wcag-mask-y) - (var(--wcag-mask-height) / 2)));
    border-bottom: 2px solid #0066b1;
}

.wcag-reading-mask__bottom {
    top: min(100vh, calc(var(--wcag-mask-y) + (var(--wcag-mask-height) / 2)));
    bottom: 0;
    border-top: 2px solid #0066b1;
}

/* 5. Custom Large Cursor (Duży kontrastowy kursor) */
html[data-wcag-cursor="1"],
html[data-wcag-cursor="1"] * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M5 3L5 39L14.5 29.5L21.5 44L27.5 41L20.5 26.5L34 26.5Z' fill='%23ffffff' stroke='%23000000' stroke-width='3.2' stroke-linejoin='round'/%3E%3C/svg%3E") 5 3, auto !important;
}

html[data-wcag-cursor="1"] :is(a[href], button, summary, [role="button"], label[for], select, input[type="checkbox"], input[type="radio"], input[type="submit"], input[type="button"]) {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M16 4a4 4 0 0 1 4 4v11h2a4 4 0 0 1 4 3.2A4 4 0 0 1 31.8 25a4 4 0 0 1 5.2 3.8V35c0 6.1-4.9 11-11 11H18c-4.5 0-8.4-2.6-10.2-6.7L4.3 31a4 4 0 0 1 2.1-5.2 4 4 0 0 1 5.1 1.9L12 29V8a4 4 0 0 1 4-4Z' fill='%23ffdd00' stroke='%23000000' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") 16 4, pointer !important;
}

html[data-wcag-cursor="1"] :is(a[href], button, summary, [role="button"], label[for]) * {
    cursor: inherit !important;
}

html[data-wcag-cursor="1"] :is(input[type="text"], input[type="email"], input[type="tel"], input[type="search"], input[type="password"], input[type="number"], input[type="url"], textarea) {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M16 8h16M24 8v32M16 40h16' fill='none' stroke='%23000000' stroke-width='6' stroke-linecap='round'/%3E%3Cpath d='M16 8h16M24 8v32M16 40h16' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") 24 24, text !important;
}

/* ==========================================================================
   WCAG Floating Widget — AREA M Sharp Design System (border-radius: 0)
   ========================================================================== */
.wcag-widget {
    position: fixed;
    left: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    z-index: 9998;
    font-family: var(--font-base, sans-serif);
    font-size: 14px;
    line-height: 1.4;
    color: #ffffff;
}

@media (max-width: 1279.98px) {
    html:has(.booking-bar:not([hidden])) .wcag-widget {
        bottom: calc(var(--booking-bar-height, 0px) + 12px);
    }
}

.wcag-widget,
.wcag-widget * {
    box-sizing: border-box;
    border-radius: 0;
}

.wcag-trigger {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 0;
    background: rgb(var(--ui-rgb-black, 38 38 38));
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.wcag-trigger:hover,
.wcag-trigger[aria-expanded="true"] {
    background: var(--ui-primary, #0066b1);
    border-color: var(--ui-primary, #0066b1);
    color: #ffffff;
}

.wcag-trigger:focus-visible {
    outline: 2px solid var(--focus-ring-color, #9ecaff) !important;
    outline-offset: 2px !important;
}

.wcag-trigger[data-has-active="true"]::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #0066b1 0 33.33%, #003d78 33.33% 66.66%, #e22718 66.66% 100%);
}

.wcag-trigger svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}

.wcag-panel {
    position: absolute;
    left: 0;
    bottom: calc(100% + 10px);
    width: min(352px, calc(100vw - 40px));
    max-height: min(580px, calc(100dvh - 100px));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 20px;
    background: rgb(var(--ui-rgb-black, 38 38 38));
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-top: 3px solid var(--ui-primary, #0066b1);
    border-radius: 0;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.55);
}

.wcag-panel::before {
    content: "";
    position: absolute;
    top: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066b1 0 33.33%, #003d78 33.33% 66.66%, #e22718 66.66% 100%);
}

.wcag-panel[hidden] {
    display: none !important;
}

.wcag-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.wcag-panel__title {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #ffffff;
}

.wcag-panel__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.wcag-panel__close:hover {
    background: var(--ui-primary, #0066b1);
    border-color: var(--ui-primary, #0066b1);
}

.wcag-panel__close:focus-visible,
.wcag-btn:focus-visible,
.wcag-toggle:focus-visible,
.wcag-reset:focus-visible {
    outline: 2px solid var(--focus-ring-color, #9ecaff) !important;
    outline-offset: 2px !important;
}

.wcag-group {
    margin-bottom: 16px;
}

.wcag-group__label {
    display: block;
    margin: 0 0 8px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #c4c4c4;
}

.wcag-font-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

.wcag-contrast-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
}

.wcag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.wcag-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

.wcag-btn[aria-pressed="true"] {
    background: var(--ui-primary, #0066b1);
    border-color: #ffffff;
    color: #ffffff;
}

.wcag-toggles {
    display: grid;
    gap: 6px;
}

.wcag-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-height: 42px;
    padding: 8px 12px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.wcag-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
}

.wcag-toggle[aria-pressed="true"] {
    background: var(--ui-primary, #0066b1);
    border-color: #ffffff;
    color: #ffffff;
}

.wcag-toggle__indicator {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 18px;
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 0;
    background: rgba(0, 0, 0, 0.35);
    flex-shrink: 0;
    position: relative;
}

.wcag-toggle__indicator::after {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 0;
    background: #ffffff;
    transform: translateX(-7px);
    transition: transform 140ms ease;
}

.wcag-toggle[aria-pressed="true"] .wcag-toggle__indicator {
    background: #ffffff;
    border-color: #ffffff;
}

.wcag-toggle[aria-pressed="true"] .wcag-toggle__indicator::after {
    background: var(--ui-primary, #0066b1);
    transform: translateX(7px);
}

.wcag-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    margin-top: 4px;
    padding: 10px 16px;
    border: 2px solid #ffffff;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.wcag-reset:hover {
    background: var(--ui-primary, #0066b1);
    border-color: var(--ui-primary, #0066b1);
    color: #ffffff;
}
