/* Accessibility Switcher Styles */
.aa-switcher {
    position: fixed;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Positionierung */
.aa-position-bottom-right {
    bottom: 20px;
    right: 20px;
}

.aa-position-bottom-left {
    bottom: 20px;
    left: 20px;
}

.aa-position-top-right {
    top: 20px;
    right: 20px;
}

.aa-position-top-left {
    top: 20px;
    left: 20px;
}

/* Toggle Button */
.aa-toggle-btn {
    background: #2c3e50;
    color: white;
    border: 2px solid #34495e;
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    min-width: 120px;
    justify-content: center;
}

.aa-toggle-btn:hover {
    background: #34495e;
    border-color: #4a5f7a;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.aa-toggle-btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.aa-toggle-btn:focus {
    outline: 3px solid #ffb900;
    outline-offset: 2px;
}

.aa-icon {
    font-size: 16px;
}

/* Panel */
.aa-panel {
    position: absolute;
    bottom: 60px;
    right: 0;
    width: 380px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    border: 1px solid #e0e0e0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

.aa-panel.aa-active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.aa-panel-header {
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.aa-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.aa-close-btn {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.aa-close-btn:hover {
    background: #f0f0f0;
    color: #333;
}

/* Panel Content */
.aa-panel-content {
    padding: 20px;
    max-height: calc(100vh - 180px);
    overflow-y: auto;
}

.aa-option {
    margin-bottom: 20px;
}

.aa-option:last-child {
    margin-bottom: 0;
}

/* Switch Styles */
.aa-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    margin-bottom: 8px;
}

.aa-switch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.aa-slider {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 24px;
    transition: 0.3s;
    flex-shrink: 0;
}

.aa-slider:before {
    content: "";
    position: absolute;
    height: 18px;
    width: 18px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.3s;
}

.aa-switch input:checked + .aa-slider {
    background: #0073aa;
}

.aa-switch input:checked + .aa-slider:before {
    transform: translateX(20px);
}

.aa-switch input:focus + .aa-slider {
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.3);
}

.aa-label {
    font-weight: 500;
    color: #333;
}

.aa-description {
    margin: 0;
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

/* Select Dropdown */
select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    margin-top: 8px;
}

/* Panel Footer */
.aa-panel-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.aa-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.aa-btn-primary {
    background: #0073aa;
    color: white;
}

.aa-btn-primary:hover {
    background: #005a87;
}

.aa-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.aa-btn-secondary:hover {
    background: #e0e0e0;
}

/* Privacy Notice */
.aa-privacy-notice {
    padding: 10px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 12px 12px;
}

.aa-privacy-notice p {
    margin: 0;
    color: #666;
    font-size: 9px;
    line-height: 1.2;
}

.aa-copyright {
    font-size: 9px;
    color: #999;
    margin-top: 3px;
}

/* Accessibility Modes */
body.aa-high-contrast {
    filter: contrast(150%) brightness(150%);
}

body.aa-high-contrast * {
    background-color: white !important;
    color: black !important;
    border-color: black !important;
}

body.aa-large-text {
    font-size: 150% !important;
}

body.aa-large-text * {
    font-size: inherit !important;
}

/* Accessibility Switcher Panel bei großer Schrift korrigieren */
body.aa-large-text .aa-panel {
    width: 450px !important;
    font-size: 14px !important;
}

body.aa-large-text .aa-panel * {
    font-size: 14px !important;
}

body.aa-large-text .aa-panel-footer {
    flex-direction: column !important;
    gap: 8px !important;
}

body.aa-large-text .aa-btn {
    width: 100% !important;
    font-size: 14px !important;
    padding: 10px !important;
}

body.aa-large-text .aa-panel-header h3 {
    font-size: 16px !important;
}

body.aa-large-text .aa-label {
    font-size: 14px !important;
}

body.aa-large-text .aa-description {
    font-size: 12px !important;
}

body.aa-stop-animations * {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
}

body.aa-keyboard-nav *:focus {
    outline: 3px solid #ffb900 !important;
    outline-offset: 2px !important;
}

body.aa-screen-reader {
    font-family: Arial, sans-serif !important;
    line-height: 1.6 !important;
}

body.aa-screen-reader * {
    font-family: inherit !important;
}

/* Colorblind Filters */
body.aa-protanopia {
    filter: url('#protanopia-filter');
}

body.aa-deuteranopia {
    filter: url('#deuteranopia-filter');
}

body.aa-tritanopia {
    filter: url('#tritanopia-filter');
}

/* Accessibility Switcher Panel von Farbfiltern ausschließen */
body.aa-protanopia .aa-switcher,
body.aa-deuteranopia .aa-switcher,
body.aa-tritanopia .aa-switcher {
    filter: none !important;
    position: fixed !important;
    z-index: 999999 !important;
}

/* Sicherstellen dass Panel-Scrolling immer funktioniert */
.aa-panel-content {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
}

/* Panel-Höhe bei Farbfiltern korrigieren */
body.aa-protanopia .aa-panel-content,
body.aa-deuteranopia .aa-panel-content,
body.aa-tritanopia .aa-panel-content {
    max-height: calc(100vh - 180px) !important;
    overflow-y: auto !important;
    position: relative;
    z-index: 1;
}

/* Sicherstellen, dass das Panel bei Farbfiltern korrekt positioniert bleibt */
body.aa-protanopia .aa-panel,
body.aa-deuteranopia .aa-panel,
body.aa-tritanopia .aa-panel {
    position: absolute !important;
    bottom: 60px !important;
    right: 0 !important;
}

/* Große Schrift Mobile Anpassungen */
@media (max-width: 768px) {
    body.aa-large-text .aa-panel {
        width: calc(100vw - 20px) !important;
        max-width: 380px !important;
        font-size: 13px !important;
    }
    
    body.aa-large-text .aa-panel * {
        font-size: 13px !important;
    }
    
    body.aa-large-text .aa-panel-header h3 {
        font-size: 15px !important;
    }
    
    body.aa-large-text .aa-label {
        font-size: 13px !important;
    }
    
    body.aa-large-text .aa-description {
        font-size: 11px !important;
    }
    
    /* Farbfilter Mobile Korrekturen */
    body.aa-protanopia .aa-panel-content,
    body.aa-deuteranopia .aa-panel-content,
    body.aa-tritanopia .aa-panel-content {
        max-height: calc(100vh - 180px) !important;
        overflow-y: auto !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .aa-toggle-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 100px;
        gap: 4px;
    }
    
    .aa-icon {
        font-size: 14px;
    }
    
    .aa-panel {
        width: calc(100vw - 40px);
        max-width: 340px;
        right: -10px;
        bottom: 55px;
    }
    
    .aa-position-bottom-left .aa-panel,
    .aa-position-top-left .aa-panel {
        left: -10px;
        right: auto;
    }
    
    .aa-panel-content {
        padding: 15px;
        max-height: 350px;
    }
    
    .aa-panel-header {
        padding: 15px;
    }
    
    .aa-panel-footer {
        padding: 15px;
        flex-direction: column;
        gap: 8px;
    }
    
    .aa-btn {
        width: 100%;
        padding: 12px;
    }
}

/* Tablet Responsive */
@media (min-width: 769px) and (max-width: 1024px) {
    .aa-panel {
        width: 350px;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .aa-panel {
        width: 420px;
    }
}
