/* ==========================================================================
   ACCESSIBILITY WIDGET UI
   ========================================================================== */

   .mixtape-a11y-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    font-family: Arial, Helvetica, sans-serif;
}

#mixtape-a11y-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease;
    padding: 0;
}

#mixtape-a11y-toggle:hover {
    transform: scale(1.1) rotate(-5deg);
}

#mixtape-a11y-modal {
    position: absolute;
    bottom: 80px;
    left: 0;
    width: 320px;
    padding: 20px;
    background: #ffffff;
    border: 3px solid #000;
    border-radius: 8px;
    box-shadow: 5px 5px 0px rgba(0,0,0,1);
}

.a11y-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px dashed #000;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.a11y-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #000;
    font-family: Arial, Helvetica, sans-serif;
}

#mixtape-a11y-close {
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    color: #000;
    margin-left: 15px;
    padding: 0 5px;
}

.a11y-control-group {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.a11y-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 5px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #000;
    cursor: pointer;
    font-family: inherit;
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
    transition: all 0.2s;
    color: #000;
}

.a11y-btn .icon {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.a11y-btn .label {
    font-size: 0.8rem;
    line-height: 1.2;
}

.a11y-btn:hover {
    background: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 2px 2px 0 #000;
}

.a11y-btn.active {
    background: #E23D23;
    color: #fff;
    border-color: #000;
    box-shadow: inset 3px 3px 0 rgba(0,0,0,0.2);
}

.a11y-text-scaler {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid #000;
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 4px;
    font-weight: bold;
    color: #000;
}

.scaler-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.scale-btn {
    background: #000;
    color: #fff;
    border: none;
    width: 30px;
    height: 30px;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    border-radius: 50%;
    line-height: 1;
}

.scale-btn:hover {
    background: #E23D23;
}

/* ==========================================================================
   GLOBAL ACCESSIBILITY OVERRIDES
   ========================================================================== */

/* 1. READABLE FONTS */
body.a11y-readable-fonts *:not(.mixtape-a11y-wrapper):not(.mixtape-a11y-wrapper *) {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

/* 2. SIMPLIFY GRAPHICS (Hide Visual Clutter) */
/* Nuke ALL Tape, Stickers, Scribbles, Dividers */
body.a11y-simplify-graphics .mixtape-sticker,
body.a11y-simplify-graphics .is-style-zine-sticker,
body.a11y-simplify-graphics .zine-auto-sticker,
body.a11y-simplify-graphics .mixtape-slapped-sticker,
body.a11y-simplify-graphics .mixtape-scribble,
body.a11y-simplify-graphics .zine-divider,
body.a11y-simplify-graphics .zine-divider-tape,
body.a11y-simplify-graphics [class*="zine-tape-"]::before,
body.a11y-simplify-graphics [class*="zine-tape-"]::after,
body.a11y-simplify-graphics .faq-block::before,
body.a11y-simplify-graphics .faq-block::after,
body.a11y-simplify-graphics .mixtape-pattern-bg::before,
body.a11y-simplify-graphics .mixtape-pattern-bg::after {
    display: none !important;
    background-image: none !important;
}

/* Nuke Zine Background Images entirely */
body.a11y-simplify-graphics .zine-paper-card,
body.a11y-simplify-graphics .zine-bg-accent,
body.a11y-simplify-graphics .zine-bg-dark,
body.a11y-simplify-graphics .zine-bg-black,
body.a11y-simplify-graphics .zine-bg-white,
body.a11y-simplify-graphics .zine-news-scrap,
body.a11y-simplify-graphics .mixtape-pattern-bg {
    background-image: none !important;
    background-color: #ffffff !important;
    color: #000000 !important;
    box-shadow: none !important;
    border: 1px solid #ccc !important;
    border-radius: 4px !important;
    transform: none !important;
    filter: none !important;
    mask-image: none !important;
    -webkit-mask-image: none !important;
}

body.a11y-simplify-graphics .zine-marker-header {
    background: none !important;
    color: #000 !important;
    padding: 0 !important;
    -webkit-mask-image: none !important;
    mask-image: none !important;
}

/* 3. HIGH CONTRAST */
body.a11y-high-contrast,
body.a11y-high-contrast header,
body.a11y-high-contrast [data-colibri-id],
body.a11y-high-contrast .h-section,
body.a11y-high-contrast .h-section-outer {
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffffff !important;
}

body.a11y-high-contrast *:not(.mixtape-a11y-wrapper):not(.mixtape-a11y-wrapper *) {
    color: #ffffff !important;
    text-shadow: none !important;
}

body.a11y-high-contrast .zine-paper-card,
body.a11y-high-contrast .mixtape-menu-section,
body.a11y-high-contrast .mixtape-menu-item {
    background-color: #000000 !important;
    border-color: #ffffff !important;
    box-shadow: none !important;
}

body.a11y-high-contrast a:not(.mixtape-a11y-wrapper *),
body.a11y-high-contrast a *:not(.mixtape-a11y-wrapper *) {
    color: #ffff00 !important;
    text-decoration: underline !important;
    text-decoration-thickness: 2px !important;
}

body.a11y-high-contrast img {
    filter: contrast(150%) !important;
}

/* 4. REDUCE MOTION */
body.a11y-reduce-motion *:not(.mixtape-a11y-wrapper):not(.mixtape-a11y-wrapper *),
body.a11y-reduce-motion *:not(.mixtape-a11y-wrapper):not(.mixtape-a11y-wrapper *)::before,
body.a11y-reduce-motion *:not(.mixtape-a11y-wrapper):not(.mixtape-a11y-wrapper *)::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
}

body.a11y-reduce-motion .mixtape-pattern-bg {
    background-attachment: scroll !important; /* Disable parallax */
}

/* 5. HIGHLIGHT LINKS */
body.a11y-highlight-links a:not(.mixtape-a11y-wrapper *),
body.a11y-highlight-links button:not(.mixtape-a11y-wrapper *) {
    background-color: yellow !important;
    color: black !important;
    outline: 3px solid #E23D23 !important;
    outline-offset: 2px !important;
    text-decoration: underline !important;
    font-weight: bold !important;
}

@media (max-width: 768px) {
    #mixtape-a11y-modal {
        width: calc(100vw - 40px);
        max-width: 320px;
        padding: 12px;
    }
    #mixtape-a11y-modal .a11y-modal-header {
        margin-bottom: 10px;
        padding-bottom: 5px;
    }
    #mixtape-a11y-modal .a11y-modal-header h3 {
        font-size: 1rem;
    }
    #mixtape-a11y-modal .a11y-btn {
        padding: 8px 4px;
    }
    #mixtape-a11y-modal .a11y-btn .icon {
        font-size: 1.2rem;
        margin-bottom: 3px;
    }
    #mixtape-a11y-modal .a11y-text-scaler {
        padding: 8px 10px;
        margin-top: 10px;
    }
    #mixtape-a11y-modal .scale-btn {
        width: 25px;
        height: 25px;
        font-size: 1rem;
    }
}
