/* ── Pasek ── */
#wcag-toolbar *::before,
#wcag-toolbar *::after {
    content: none !important;
    display: none !important;
}

.wcag-toolbar {
    display: block;
    width: 100%;
    font-family: inherit;
}

.wcag-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    list-style: none;
    margin: 0;
    padding: 7px 12px;
    background: #fff;
    border-bottom: 0px solid #e5e7eb;
}

.wcag-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Separator między grupami */
.wcag-item + .wcag-item::before {
    content: '';
    display: inline-block;
    width: 1px;
    height: 20px;
    background: #d1d5db;
    margin-right: 2px;
}

.wcag-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #9ca3af;
    user-select: none;
}

/* ── Przyciski ── */
.wcag-btn-group {
    display: flex;
    align-items: center;
    gap: 2px;
}

.wcag-btn-group button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 20px;        /* pill – minimalistyczny */
    background: transparent;
    color: #374151;
    cursor: pointer;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
    transition: background .12s, color .12s, border-color .12s;
}

/* przyciski A- A A+ – tylko ikona bez tła */
.wcag-btn-group button[data-wcag^="font-"] {
    padding: 3px 8px;
    font-weight: 700;
    color: #4b5563;
}

.wcag-btn-group button:hover {
    background: #f3f4f6;
    color: #111;
}

.wcag-btn-group button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Aktywny przycisk kontrastu */
.wcag-btn-group button[aria-pressed="true"] {
    background: #2563eb;
    color: #fff;
    border-color: #2563eb;
}

.wcag-btn-group button[aria-pressed="true"]:hover {
    background: #1d4ed8;
}

/* ── Ikony kółko przy kontrastach ── */
.wcag-icon {
    display: inline-block;
    width: 13px;
    height: 13px;
    border-radius: 50%;
    border: 1.5px solid currentColor;
    flex-shrink: 0;
    vertical-align: middle;
}
.wcag-icon--default { background: linear-gradient(135deg, #fff 50%, #6b7280 50%); }
.wcag-icon--high    { background: #000; border-color: #f59e0b; }
.wcag-icon--bw      { background: linear-gradient(135deg, #fff 50%, #000 50%); }

/* Ikona aktywna – kolor biały */
[aria-pressed="true"] .wcag-icon--default { border-color: rgba(255,255,255,.7); }

/* ── Tryby kontrastu ── */
body.wcag-contrast-high {
    filter: invert(1) hue-rotate(180deg) !important;
}
body.wcag-contrast-high img,
body.wcag-contrast-high video,
body.wcag-contrast-high svg,
body.wcag-contrast-high iframe {
    filter: invert(1) hue-rotate(180deg) !important;
}

body.wcag-contrast-bw {
    filter: grayscale(100%) contrast(115%) !important;
}

/* ── Motyw ciemny ── */
.wcag-theme-dark .wcag-controls {
    background: #111827;
    border-color: #1f2937;
}
.wcag-theme-dark .wcag-label { color: #6b7280; }
.wcag-theme-dark .wcag-btn-group button { color: #d1d5db; }
.wcag-theme-dark .wcag-btn-group button:hover { background: #1f2937; color: #f9fafb; }

/* ── Skip link ── */
.wcag-skip-link {
    position: absolute; top: -999px; left: 0;
    background: #000; color: #fff;
    padding: 8px 16px; z-index: 99999; font-size: 1rem;
}
.wcag-skip-link:focus { top: 0; }



