/*
 * Wspólna warstwa dostępności platformy AR.
 * Zakres: WCAG 2.1, W3C/WAVE, OPZ 3.1.c pkt 1-10.
 */

html {
    font-size: 100%;
    text-size-adjust: 100%;
    -webkit-text-size-adjust: 100%;
}

body.wcag-opz-ready {
    overflow-wrap: anywhere;
}

.wcag-skip-link {
    position: fixed;
    z-index: 2147483647;
    top: 8px;
    left: 8px;
    padding: 12px 16px;
    border: 3px solid #fff;
    border-radius: 6px;
    background: #111827;
    color: #fff;
    font: 700 16px/1.25 Arial, sans-serif;
    box-shadow: 0 0 0 3px #005fcc;
    transform: translateY(-160%);
}

.wcag-skip-link:focus {
    color: #fff;
    transform: translateY(0);
}

.wcag-sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.platformHeaderLine {
  margin: 0.25rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
}

body.wcag-opz-ready :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #005fcc !important;
    outline-offset: 3px !important;
    box-shadow: 0 0 0 2px #fff !important;
}

body.wcag-opz-ready.high-contrast :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline-color: #ff0 !important;
    box-shadow: 0 0 0 2px #000 !important;
}

body.wcag-opz-ready :is(button, [role="button"], input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select) {
    min-height: 44px;
}

body.wcag-opz-ready textarea {
    min-height: 88px;
}

body.wcag-opz-ready :is(button, [role="button"], a[href], input, select, textarea, summary):disabled,
body.wcag-opz-ready [aria-disabled="true"] {
    cursor: not-allowed;
    opacity: .72;
}

body.wcag-opz-ready a:not([class*="button"]):not([class*="btn"]) {
    text-decoration-thickness: .11em;
    text-underline-offset: .15em;
}

.wcag-accessibility-footer {
    position: relative;
    z-index: 2;
    clear: both;
    margin: 20px auto 0;
    padding: 12px 16px;
    border-top: 1px solid #64748b;
    background: #f8fafc;
    color: #0f172a;
    font: 600 14px/1.5 Arial, sans-serif;
    text-align: center;
}

.wcag-accessibility-footer a {
    color: #0047a8;
}

.wcag-scene-alternative {
    margin: 14px 0;
    padding: 14px;
    border: 2px solid #315f89;
    border-radius: 10px;
    background: #f8fafc;
    color: #0f172a;
}

.wcag-scene-alternative h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
}

.wcag-scene-alternative ul {
    margin: 8px 0;
    padding-left: 24px;
}

.wcag-scene-alternative button {
    margin-top: 8px;
    padding: 10px 14px;
    border: 0;
    border-radius: 7px;
    background: #005fcc;
    color: #fff;
    font-weight: 700;
}

body.theme-dark .wcag-scene-alternative,
body.theme-dark .wcag-accessibility-footer {
    border-color: #93c5fd;
    background: #111827;
    color: #f8fafc;
}

body.theme-dark .wcag-accessibility-footer a {
    color: #bfdbfe;
}

@media (max-width: 640px) {
    body.wcag-opz-ready {
        min-width: 0 !important;
    }

    body.wcag-opz-ready :is(main, section, article, aside, nav, form, fieldset, table) {
        max-width: 100%;
    }

    body.wcag-opz-ready table {
        display: block;
        overflow-x: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto !important;
    }

    body.wcag-opz-ready *,
    body.wcag-opz-ready *::before,
    body.wcag-opz-ready *::after {
        scroll-behavior: auto !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
}

@media (forced-colors: active) {
    .wcag-skip-link,
    body.wcag-opz-ready :is(button, [role="button"], input, select, textarea) {
        border: 2px solid ButtonText !important;
        forced-color-adjust: auto;
    }
}

@media print {
    .wcag-skip-link,
    .wcag-accessibility-footer {
        display: none !important;
    }
}
