/**
 * ====================================
 * קובץ: css/accessibility.css
 * ====================================
 * תיאור: עיצוב סרגל נגישות צף
 * כולל: כפתור פתיחה, פאנל, כפתורי פעולות
 */

/* ===== מחלקות עזר ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ===== קונטיינר ראשי ===== */
.accessibility-bar {
    position: fixed;
    top: 20%;
    left: 0;
    z-index: 9999;
    font-family: Arial, sans-serif;
}

/* ===== כפתור פתיחה/סגירה ===== */
.accessibility-toggle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 15px 20px;
    border-radius: 0 10px 10px 0;
    cursor: pointer;
    box-shadow: 3px 3px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    min-width: 60px;
}

.accessibility-toggle:hover {
    transform: translateX(5px);
    box-shadow: 5px 5px 20px rgba(102, 126, 234, 0.5);
}

.accessibility-toggle:focus {
    outline: 3px solid #ffd700;
    outline-offset: 3px;
}

.toggle-icon {
    font-size: 24px;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.toggle-text {
    font-size: 15px;
}

/* ===== פאנל ===== */
.accessibility-panel {
    position: absolute;
    top: 0;
    left: 100%;
    background: white;
    border-radius: 0 15px 15px 0;
    box-shadow: 5px 5px 30px rgba(0, 0, 0, 0.3);
    width: 350px;
    max-height: 80vh;
    overflow-y: auto;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(-20px);
    pointer-events: none;
}

.accessibility-panel:not([hidden]) {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

/* ===== כותרת פאנל ===== */
.panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 0 15px 0 0;
}

.panel-title {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
}

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

.panel-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.panel-close:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* ===== תוכן פאנל ===== */
.panel-content {
    padding: 20px;
}

/* ===== קבוצות ===== */
.accessibility-group {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e0e0e0;
}

.accessibility-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.group-title {
    color: #667eea;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding-right: 10px;
    border-right: 3px solid #667eea;
}

.group-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== כפתורי פעולות ===== */
.accessibility-btn {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-align: right;
}

.accessibility-btn:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    transform: translateX(-5px);
    box-shadow: 3px 3px 10px rgba(102, 126, 234, 0.3);
}

.accessibility-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

.accessibility-btn:active {
    transform: translateX(-5px) scale(0.98);
}

.accessibility-btn[aria-pressed="true"] {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-icon {
    font-size: 20px;
    display: inline-block;
    flex-shrink: 0;
}

.btn-text {
    flex: 1;
    text-align: right;
}

/* ===== כפתור איפוס ===== */
.reset-btn {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
    color: white;
    border-color: #ff6b6b;
    font-weight: 700;
}

.reset-btn:hover {
    background: linear-gradient(135deg, #ee5a6f 0%, #c92a2a 100%);
    border-color: #c92a2a;
}

/* ===== תחתית פאנל ===== */
.panel-footer {
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    border-radius: 0 0 15px 0;
}

.accessibility-statement-link {
    color: #667eea;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
}

.accessibility-statement-link:hover {
    color: #764ba2;
    transform: translateY(-2px);
}

.accessibility-statement-link:focus {
    outline: 2px solid #667eea;
    outline-offset: 3px;
    border-radius: 3px;
}

/* ===== מצבי נגישות פעילים ===== */

/* גופן מוגדל */
body.font-size-large {
    font-size: 120%;
}

body.font-size-larger {
    font-size: 140%;
}

body.font-size-largest {
    font-size: 160%;
}

/* ניגודיות גבוהה */
body.high-contrast {
    background: white !important;
    color: black !important;
}

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

body.high-contrast a {
    color: blue !important;
    text-decoration: underline !important;
}

body.high-contrast .btn,
body.high-contrast button {
    background: black !important;
    color: white !important;
    border: 2px solid black !important;
}

/* צבעים הפוכים */
body.inverted-colors {
    filter: invert(1) hue-rotate(180deg);
}

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

/* הדגשת קישורים */
body.highlight-links a {
    background: yellow !important;
    color: black !important;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: bold !important;
}

/* הדגשת כותרות */
body.highlight-headings h1,
body.highlight-headings h2,
body.highlight-headings h3,
body.highlight-headings h4,
body.highlight-headings h5,
body.highlight-headings h6 {
    background: #ffffcc !important;
    color: #000 !important;
    padding: 5px 10px;
    border-right: 5px solid #ff9800 !important;
}

/* גופן קריא */
body.readable-font,
body.readable-font * {
    font-family: Arial, 'Comic Sans MS', sans-serif !important;
}

/* ריווח שורות מוגדל */
body.large-line-height,
body.large-line-height * {
    line-height: 2 !important;
}

/* ===== התאמות למובייל ===== */

/* טאבלטים */
@media screen and (max-width: 768px) {
    .accessibility-bar {
        top: 10%;
    }

    .accessibility-panel {
        width: 320px;
    }

    .accessibility-toggle {
        padding: 12px 15px;
    }

    .toggle-text {
        display: none;
    }

    .panel-content {
        padding: 15px;
    }

    .accessibility-btn {
        font-size: 13px;
        padding: 10px 12px;
    }
}

/* מובייל קטן */
@media screen and (max-width: 480px) {
    .accessibility-bar {
        top: 5%;
    }

    .accessibility-toggle {
        padding: 10px 12px;
        min-width: 50px;
    }

    .toggle-icon {
        font-size: 20px;
    }

    .accessibility-panel {
        width: 280px;
        max-height: 70vh;
    }

    .panel-header {
        padding: 15px;
    }

    .panel-title {
        font-size: 18px;
    }

    .panel-content {
        padding: 12px;
    }

    .group-title {
        font-size: 14px;
    }

    .accessibility-btn {
        font-size: 12px;
        padding: 10px;
        gap: 8px;
    }

    .btn-icon {
        font-size: 18px;
    }

    .panel-footer {
        padding: 12px 15px;
    }

    .accessibility-statement-link {
        font-size: 13px;
    }
}

/* מובייל ממש קטן */
@media screen and (max-width: 360px) {
    .accessibility-panel {
        width: calc(100vw - 80px);
        max-width: 260px;
    }
}

/* ===== הדפסה ===== */
@media print {
    .accessibility-bar {
        display: none !important;
    }

    body.high-contrast,
    body.inverted-colors,
    body.highlight-links,
    body.highlight-headings {
        filter: none !important;
    }
}

/* ===== נגישות מתקדמת ===== */

/* הפחתת תנועה */
@media (prefers-reduced-motion: reduce) {
    .accessibility-toggle,
    .accessibility-panel,
    .accessibility-btn,
    .panel-close {
        transition: none !important;
        animation: none !important;
    }

    .toggle-icon {
        animation: none !important;
    }

    .accessibility-btn:hover,
    .panel-close:hover {
        transform: none !important;
    }
}

/* ===== scrollbar מותאם ===== */
.accessibility-panel::-webkit-scrollbar {
    width: 8px;
}

.accessibility-panel::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 15px 15px 0;
}

.accessibility-panel::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

.accessibility-panel::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/**
 * ====================================
 * סוף קובץ: css/accessibility.css
 * ====================================
 */
