/* ==========================================
   Accessibility Styles - נגישות
   ========================================== */

/* Accessibility Button */
.accessibility-btn {
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 9998;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(26, 54, 93, 0.4);
    transition: all 0.3s ease;
}

.accessibility-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(26, 54, 93, 0.5);
}

.accessibility-btn:focus {
    outline: 3px solid var(--color-secondary);
    outline-offset: 3px;
}

html[dir="ltr"] .accessibility-btn {
    right: auto;
    left: 20px;
}

/* Accessibility Menu Panel */
.accessibility-menu {
    position: fixed;
    bottom: 170px;
    right: 20px;
    z-index: 9999;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.2);
    width: 320px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.accessibility-menu.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

html[dir="ltr"] .accessibility-menu {
    right: auto;
    left: 20px;
}

.accessibility-menu-header {
    padding: 20px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: white;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.accessibility-menu-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: white;
    display: flex;
    align-items: center;
    gap: 10px;
}

.accessibility-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.accessibility-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.accessibility-menu-body {
    padding: 15px;
}

.accessibility-section {
    margin-bottom: 15px;
}

.accessibility-section-title {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-light);
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--color-border);
}

.accessibility-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.accessibility-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 8px;
    background: var(--color-bg);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    color: var(--color-text);
    text-align: center;
}

.accessibility-option:hover {
    background: var(--color-bg-warm);
    border-color: var(--color-secondary);
}

.accessibility-option.active {
    background: rgba(201, 162, 39, 0.15);
    border-color: var(--color-secondary);
}

.accessibility-option i {
    font-size: 1.3rem;
    color: var(--color-primary);
}

.accessibility-option.active i {
    color: var(--color-secondary);
}

.accessibility-slider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--color-bg);
    border-radius: 12px;
}

.accessibility-slider label {
    font-size: 0.85rem;
    color: var(--color-text);
    flex: 1;
}

.accessibility-slider input[type="range"] {
    flex: 2;
    accent-color: var(--color-secondary);
    height: 6px;
}

.accessibility-reset {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 15px;
}

.accessibility-reset:hover {
    background: linear-gradient(135deg, #b91c1c, #991b1b);
    transform: translateY(-2px);
}

/* Accessibility Active States */
body.high-contrast {
    filter: contrast(1.4);
}

body.high-contrast * {
    border-color: #000 !important;
}

body.grayscale {
    filter: grayscale(1);
}

body.invert-colors {
    filter: invert(1) hue-rotate(180deg);
}

body.large-cursor * {
    cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2l12 11.2-5.8.5 3.3 7.3-2.2 1-3.2-7.4L7 18.5V2'/%3E%3C/svg%3E") 0 0, auto !important;
}

body.highlight-links a {
    background-color: yellow !important;
    color: #000 !important;
    padding: 2px 4px;
    text-decoration: underline !important;
}

body.highlight-links a:hover {
    background-color: #ffd700 !important;
}

body.readable-font * {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.5px !important;
}

body.line-height-increased * {
    line-height: 2 !important;
}

body.letter-spacing-increased * {
    letter-spacing: 2px !important;
    word-spacing: 4px !important;
}

body.pause-animations *,
body.pause-animations *::before,
body.pause-animations *::after {
    animation: none !important;
    transition: none !important;
}

body.reading-guide::after {
    content: '';
    position: fixed;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, 
        transparent 0%, 
        rgba(255, 255, 0, 0.1) 30%, 
        rgba(255, 255, 0, 0.1) 70%, 
        transparent 100%);
    pointer-events: none;
    z-index: 99999;
    top: 50%;
    transform: translateY(-50%);
}

/* Font Size Adjustments */
body.font-size-1 { font-size: 90%; }
body.font-size-2 { font-size: 100%; }
body.font-size-3 { font-size: 110%; }
body.font-size-4 { font-size: 120%; }
body.font-size-5 { font-size: 130%; }

/* Mobile Responsive */
@media (max-width: 768px) {
    .accessibility-btn {
        bottom: 85px;
        right: 15px;
        width: 50px;
        height: 50px;
        font-size: 1.3rem;
    }

    html[dir="ltr"] .accessibility-btn {
        right: auto;
        left: 15px;
    }

    .accessibility-menu {
        bottom: 145px;
        right: 10px;
        left: 10px;
        width: calc(100% - 20px);
        max-height: 60vh;
    }

    html[dir="ltr"] .accessibility-menu {
        right: 10px;
        left: 10px;
    }
}

/* Cookie Consent Banner */
.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #1a365d 0%, #0f2341 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -5px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.cookie-consent.active {
    transform: translateY(0);
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .cookie-consent-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.cookie-consent-content {
    flex: 1;
}

.cookie-consent-content h4 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: white;
}

.cookie-consent-content h4 i {
    color: var(--color-secondary);
}

.cookie-consent-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    opacity: 0.9;
}

.cookie-consent-content a {
    color: var(--color-secondary);
    text-decoration: underline;
}

.cookie-consent-content a:hover {
    color: var(--color-secondary-light);
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, var(--color-secondary), var(--color-accent));
    color: white;
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.4);
}

.cookie-btn-reject {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cookie-btn-settings {
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    padding: 12px 16px;
}

.cookie-btn-settings:hover {
    color: white;
}

@media (max-width: 768px) {
    .cookie-consent {
        padding: 15px;
    }

    .cookie-consent-buttons {
        flex-wrap: wrap;
    }

    .cookie-btn {
        flex: 1;
        justify-content: center;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    .cookie-btn-settings {
        flex-basis: 100%;
    }
}

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-primary);
    color: white;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    z-index: 100001;
    transition: top 0.3s ease;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    top: 0;
}
