/* Accessibility widget + statement */

.a11y-widget {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9000;
    font-family: Assistant, Arial, sans-serif;
    direction: rtl;
}

.a11y-fab-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.a11y-fab {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 50%;
    background: #0f766e;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(15, 118, 110, 0.35);
    transition: background-color 0.2s, transform 0.2s;
}

.a11y-fab:hover,
.a11y-fab:focus-visible {
    background: #0d9488;
    outline: 3px solid #2dd4bf;
    outline-offset: 2px;
}

.a11y-fab[aria-expanded="true"] {
    background: #115e59;
}

.a11y-fab svg {
    width: 24px;
    height: 24px;
    display: block;
}

.a11y-minimize {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 20px;
    height: 20px;
    border: none;
    border-radius: 50%;
    background: #162032;
    color: #ffffff;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.a11y-minimize:hover,
.a11y-minimize:focus-visible {
    background: #0f172a;
    outline: 2px solid #2dd4bf;
}

.a11y-restore {
    border: none;
    background: #0f766e;
    color: #ffffff;
    font-size: 12px;
    font-weight: 700;
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    padding: 10px 6px;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(15, 118, 110, 0.3);
}

.a11y-restore:hover,
.a11y-restore:focus-visible {
    background: #0d9488;
    outline: 2px solid #2dd4bf;
}

.a11y-widget.is-minimized .a11y-fab-wrap,
.a11y-widget.is-minimized .a11y-panel {
    display: none;
}

.a11y-widget:not(.is-minimized) .a11y-restore {
    display: none;
}

.a11y-panel {
    position: absolute;
    left: 0;
    bottom: 56px;
    width: min(300px, calc(100vw - 32px));
    max-height: min(70vh, 480px);
    overflow-y: auto;
    background: #ffffff;
    color: #162032;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(15, 23, 42, 0.22);
    padding: 14px;
}

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

.a11y-panel-title {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 700;
}

.a11y-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.a11y-btn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #162032;
    border-radius: 8px;
    padding: 8px 6px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.a11y-btn:hover,
.a11y-btn:focus-visible {
    border-color: #0f766e;
    outline: 2px solid #2dd4bf;
    outline-offset: 1px;
}

.a11y-btn.is-active {
    background: #0f766e;
    border-color: #0f766e;
    color: #ffffff;
}

.a11y-btn-wide {
    grid-column: 1 / -1;
}

.a11y-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 12px 0;
}

.a11y-footer-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.9rem;
}

.a11y-footer-links a {
    color: #0f766e;
    font-weight: 700;
    text-decoration: underline;
}

.a11y-footer-links a:hover,
.a11y-footer-links a:focus-visible {
    color: #115e59;
}

/* Page-level tools */
html.a11y-text-sm {
    font-size: 90%;
}

html.a11y-text-lg {
    font-size: 118%;
}

html.a11y-text-xl {
    font-size: 136%;
}

html.a11y-contrast,
html.a11y-contrast body {
    background: #000000 !important;
    color: #ffffff !important;
}

html.a11y-contrast a {
    color: #ffff00 !important;
}

html.a11y-contrast .a11y-panel,
html.a11y-contrast .a11y-panel a {
    background: #000000;
    color: #ffffff;
}

html.a11y-links a {
    text-decoration: underline !important;
    text-underline-offset: 2px;
    outline: 2px solid #0f766e;
    outline-offset: 2px;
}

html.a11y-readable,
html.a11y-readable body,
html.a11y-readable button,
html.a11y-readable input,
html.a11y-readable textarea {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.04em;
    word-spacing: 0.08em;
    line-height: 1.7;
}

html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
}

.content-container:has(.a11y-statement) {
    align-items: flex-start;
    height: auto;
}

/* Statement page */
.a11y-statement {
    width: 100%;
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem 1.25rem 2.5rem;
    text-align: right;
    direction: rtl;
    line-height: 1.75;
    color: #162032;
}

.a11y-statement h3 {
    margin: 1.5rem 0 0.6rem;
    font-size: 1.15rem;
    color: #0f766e;
}

.a11y-statement p,
.a11y-statement li {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.a11y-statement ul {
    padding-right: 1.25rem;
    margin-bottom: 0.75rem;
}

.a11y-statement a {
    color: #0f766e;
    font-weight: 700;
}

.a11y-coordinator {
    background: #f0fdfa;
    border: 1px solid #99f6e4;
    border-radius: 12px;
    padding: 1rem 1.1rem;
    margin: 1rem 0;
}

.a11y-coordinator p {
    margin-bottom: 0.4rem;
}

.a11y-updated {
    color: #64748b;
    font-size: 0.9rem;
}

@media (max-width: 480px) {
    .a11y-widget {
        left: 10px;
        bottom: 10px;
    }
}
