/**
 * DEÜ Erişilebilirlik Modülü - Stil Dosyası
 */

/* Floating Button */
.deu-a11y-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: var(--deu-a11y-icon-size, 56px);
    height: var(--deu-a11y-icon-size, 56px);
    background: var(--deu-a11y-primary, #1e3fae);
    color: var(--deu-a11y-icon-color, #ffffff);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.deu-a11y-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.deu-a11y-btn svg {
    width: 28px;
    height: 28px;
}

/* Hide on mobile if configured */
.deu-a11y-btn.hide-mobile {
    display: flex;
}

@media (max-width: 768px) {
    .deu-a11y-btn.hide-mobile {
        display: none !important;
    }
}

/* Panel Overlay */
#deu-accessibility-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#deu-accessibility-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Panel */
.deu-a11y-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    overflow-y: auto;
    transition: right 0.3s ease;
}

.deu-a11y-panel.active {
    right: 0;
}

@media (max-width: 768px) {
    .deu-a11y-panel {
        width: 100%;
        right: -100%;
    }
}

/* Panel Header */
.deu-a11y-header {
    background: var(--deu-a11y-primary, #1e3fae);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.deu-a11y-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.deu-a11y-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.deu-a11y-close:hover {
    transform: rotate(90deg);
}

/* Panel Content */
.deu-a11y-content {
    padding: 20px;
}

/* Reset Button */
.deu-a11y-reset {
    width: 100%;
    padding: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 20px;
    transition: background 0.2s ease;
}

.deu-a11y-reset:hover {
    background: #c82333;
}

/* Section */
.deu-a11y-section {
    margin-bottom: 30px;
}

.deu-a11y-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
}

/* Control */
.deu-a11y-control {
    margin-bottom: 20px;
}

.deu-a11y-control label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #555;
}

.deu-a11y-control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.deu-a11y-btn-sm {
    width: 36px;
    height: 36px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.deu-a11y-btn-sm:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.deu-a11y-value {
    flex: 1;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Alignment Buttons */
.deu-a11y-align-group {
    display: flex;
    gap: 8px;
}

.deu-a11y-align-btn {
    flex: 1;
    padding: 10px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.deu-a11y-align-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.deu-a11y-align-btn.active {
    background: var(--deu-a11y-primary, #1e3fae);
    color: white;
    border-color: var(--deu-a11y-primary, #1e3fae);
}

/* Feature Cards */
.deu-a11y-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.deu-a11y-card {
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.deu-a11y-card:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.deu-a11y-card.active {
    background: var(--deu-a11y-primary, #1e3fae);
    color: white;
    border-color: var(--deu-a11y-primary, #1e3fae);
}

/* Applied Styles */
body.deu-invert-colors {
    filter: invert(1) hue-rotate(180deg);
}

body.deu-invert-colors img,
body.deu-invert-colors video {
    filter: invert(1) hue-rotate(180deg);
}

body.deu-high-contrast {
    filter: contrast(1.5);
}

body.deu-yellow-black {
    background: #000 !important;
    color: #ff0 !important;
}

body.deu-yellow-black * {
    background-color: #000 !important;
    color: #ff0 !important;
    border-color: #ff0 !important;
}

body.deu-monochrome {
    filter: grayscale(100%);
}

body.deu-saturation {
    filter: saturate(var(--deu-a11y-saturation, 100%));
}

body.deu-highlight-titles h1,
body.deu-highlight-titles h2,
body.deu-highlight-titles h3,
body.deu-highlight-titles h4,
body.deu-highlight-titles h5,
body.deu-highlight-titles h6 {
    background: #ffeb3b !important;
    padding: 5px !important;
    border-left: 4px solid #ffc107 !important;
}

body.deu-highlight-links a {
    background: #4caf50 !important;
    color: #fff !important;
    padding: 2px 4px !important;
    text-decoration: underline !important;
}

body.deu-readable-font,
body.deu-readable-font * {
    font-family: Arial, Helvetica, sans-serif !important;
}

body.deu-content-scaling {
    zoom: 1.2;
}

body.deu-focus-assist *:focus {
    outline: 3px solid #ff5722 !important;
    outline-offset: 2px !important;
}

/* Scrollbar */
.deu-a11y-panel::-webkit-scrollbar {
    width: 8px;
}

.deu-a11y-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.deu-a11y-panel::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.deu-a11y-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Accessibility improvements for WCAG compliance */
.deu-a11y-section h3 {
    display: flex;
    align-items: center;
    gap: 8px;
}

.deu-a11y-section h3 svg {
    flex-shrink: 0;
}

/* Ensure labels are properly associated with controls */
.deu-a11y-control label {
    display: flex;
    align-items: center;
    gap: 6px;
}

.deu-a11y-control label svg {
    flex-shrink: 0;
}

/* Improve visibility of value indicators */
.deu-a11y-value {
    min-width: 60px;
}

/* Reading Guide Overlay */
.deu-reading-guide-overlay {
    position: fixed;
    left: 0;
    right: 0;
    height: 60px;
    pointer-events: none;
    z-index: 9997;
    transition: top 0.05s ease-out;
}

.deu-reading-guide-overlay.blue {
    background: rgba(13, 110, 253, 0.3);
    border-top: 2px solid rgba(13, 110, 253, 0.8);
    border-bottom: 2px solid rgba(13, 110, 253, 0.8);
}

.deu-reading-guide-overlay.green {
    background: rgba(25, 135, 84, 0.3);
    border-top: 2px solid rgba(25, 135, 84, 0.8);
    border-bottom: 2px solid rgba(25, 135, 84, 0.8);
}

.deu-reading-guide-overlay.yellow {
    background: rgba(255, 193, 7, 0.4);
    border-top: 2px solid rgba(255, 193, 7, 0.9);
    border-bottom: 2px solid rgba(255, 193, 7, 0.9);
}

.deu-reading-guide-overlay.pink {
    background: rgba(214, 51, 132, 0.3);
    border-top: 2px solid rgba(214, 51, 132, 0.8);
    border-bottom: 2px solid rgba(214, 51, 132, 0.8);
}

/* Reading Guide Color Buttons */
.deu-a11y-reading-guide-colors {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.deu-a11y-reading-guide-color {
    width: 48px;
    height: 48px;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.deu-a11y-reading-guide-color svg {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.deu-a11y-reading-guide-color:hover {
    transform: scale(1.1);
    border-color: #adb5bd;
}

.deu-a11y-reading-guide-color.active {
    border-color: var(--deu-a11y-primary, #1e3fae);
    border-width: 3px;
}

.deu-a11y-reading-guide-color.active svg {
    opacity: 1;
}

/* Section Title Styling */
.deu-accessibility-section-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 15px 0;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tailwind Override - Hover Background Color */
.hover\:bg-gray-50:hover { color: cadetblue !important; }

/* Mobile Responsive - Flex Column Gap - CRITICAL OVERRIDE */
@media (max-width: 768px) {
    .flex.flex-col,
    .flex.flex-col.gap-0,
    .flex.flex-col.sm\:flex-row,
    div.flex.flex-col,
    section .flex.flex-col,
    body .flex.flex-col {
        gap: 10px !important;
    }
}

/* Force override for any flex-col with gap utility - HIGHEST PRIORITY */
@media (max-width: 768px) {
    [class*="flex"][class*="flex-col"],
    [class~="flex"][class~="flex-col"],
    .flex.flex-col[class*="gap"] {
        gap: 10px !important;
    }
}

/* Nuclear option - override everything */
@media (max-width: 768px) {
    body [class*="flex"][class*="flex-col"] {
        gap: 10px !important;
    }
}

/* Mobile Height Override for h-[600px] */
@media (max-width: 768px) {
    .h-\[600px\] {
        height: 500px !important;
    }
}
