/**
 * WP Accessibility - Frontend Styles
 */

/* Accessibility Toolbar Container */
.wp-a11y-toolbar {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Toggle Button */
.wp-a11y-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #0073aa;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: all 0.3s ease;
}

.wp-a11y-toggle-btn:hover {
    background: #005a87;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: scale(1.1);
}

.wp-a11y-toggle-btn:focus {
    outline: 3px solid #4D90FE;
    outline-offset: 2px;
}

.wp-a11y-toggle-btn .dashicons {
    width: 32px;
    height: 32px;
    font-size: 32px;
}

/* Menu */
.wp-a11y-menu {
    position: absolute;
    bottom: 80px;
    right: 0;
    background: #fff;
    border: 2px solid #0073aa;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    min-width: 280px;
    max-width: 350px;
    overflow-y: auto;
    max-height: 70vh;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu Header */
.wp-a11y-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #ddd;
    background: #f5f5f5;
}

.wp-a11y-menu-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    font-weight: 600;
}

.wp-a11y-menu-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #333;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-a11y-menu-close:hover,
.wp-a11y-menu-close:focus {
    color: #0073aa;
}

/* Menu Content */
.wp-a11y-menu-content {
    padding: 15px;
}

/* Options */
.wp-a11y-option {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.wp-a11y-option:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.wp-a11y-option label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    margin: 0;
}

.wp-a11y-option input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
}

/* Text Size Controls */
.wp-a11y-text-size-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.wp-a11y-text-btn {
    flex: 1;
    padding: 8px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.wp-a11y-text-btn:hover {
    background: #e0e0e0;
    border-color: #0073aa;
}

.wp-a11y-text-btn:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

.wp-a11y-text-size-display {
    min-width: 45px;
    text-align: center;
    font-weight: 600;
    color: #0073aa;
}

/* Reset All Button */
.wp-a11y-reset-all {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    border-bottom: none;
}

.wp-a11y-reset-all .button {
    width: 100%;
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.wp-a11y-reset-all .button:hover {
    background: #c82333;
}

.wp-a11y-reset-all .button:focus {
    outline: 2px solid #4D90FE;
    outline-offset: 2px;
}

/* Menu Footer */
.wp-a11y-menu-footer {
    padding: 12px 15px;
    border-top: 1px solid #ddd;
    background: #f9f9f9;
    font-size: 12px;
    line-height: 1.6;
}

.wp-a11y-help-text {
    margin: 0;
    color: #666;
}

.wp-a11y-help-text strong {
    color: #333;
}

/* Skip Links */
.wp-a11y-skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
    border-radius: 4px;
}

.wp-a11y-skip-link:focus {
    top: 0;
}

/* Screen Reader Mode */
body.wp-a11y-screen-reader-mode {
    background: #fff !important;
    color: #000 !important;
}

body.wp-a11y-screen-reader-mode a {
    color: #0073aa !important;
}

body.wp-a11y-screen-reader-mode button {
    background: #f0f0f0 !important;
    color: #000 !important;
    border: 1px solid #999 !important;
}

/* High Contrast Mode */
body.wp-a11y-high-contrast {
    background: #000 !important;
    color: #ffff00 !important;
}

body.wp-a11y-high-contrast a {
    color: #00ffff !important;
    text-decoration: underline !important;
}

body.wp-a11y-high-contrast button,
body.wp-a11y-high-contrast input {
    background: #ffff00 !important;
    color: #000 !important;
    border: 2px solid #fff !important;
}

/* Dyslexia Font Mode */
body.wp-a11y-dyslexia-font,
body.wp-a11y-dyslexia-font * {
    font-family: "OpenDyslexic", sans-serif !important;
}

/* Grayscale Mode */
body.wp-a11y-grayscale {
    filter: grayscale(100%) !important;
}

/* Underline Links */
body.wp-a11y-underline-links a {
    text-decoration: underline !important;
}

/* Large Cursor */
body.wp-a11y-large-cursor,
body.wp-a11y-large-cursor * {
    cursor: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI0OCIgaGVpZ2h0PSI0OCI+PHBhdGggZD0iTTAgMGg0OHY0OEgweiIgZmlsbD0ibm9uZSIvPjxjaXJjbGUgY3g9IjI0IiBjeT0iMjQiIHI9IjIwIiBzdHJva2U9ImJsYWNrIiBmaWxsPSJub25lIiBzdHJva2Utd2lkdGg9IjIiLz48L3N2Zz4=") 24 24, auto !important;
}

/* Responsive */
@media (max-width: 768px) {
    .wp-a11y-toolbar {
        bottom: 10px;
        right: 10px;
    }

    .wp-a11y-toggle-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }

    .wp-a11y-menu {
        min-width: 250px;
        bottom: 70px;
    }
}

/* Print Styles */
@media print {
    .wp-a11y-toolbar,
    .wp-a11y-skip-link {
        display: none;
    }
}