/* vision-widget.css - Стили для виджета слабовидящих */

/* Режимы для слабовидящих */
body.vision-mode {
    line-height: 1.6;
}

/* Увеличенный курсор */
body.big-cursor {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="27" viewBox="0 0 24 27"><polygon points="2,2 22,13 12,13 11,25 2,2" fill="black" stroke="white" stroke-width="2"/></svg>') 4 2, auto;
}

body.big-cursor a, body.big-cursor button, body.big-cursor .cursor-pointer {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="27" viewBox="0 0 24 27"><polygon points="2,2 22,13 12,13 11,25 2,2" fill="black" stroke="white" stroke-width="2"/></svg>') 4 2, pointer;
}

/* Выделение читаемого текста */
.speaking-highlight {
    background-color: #fef3c7 !important;
    transition: background 0.1s ease;
}

/* ВИДЖЕТ ДЛЯ СЛАБОВИДЯЩИХ - FIXED */
.vision-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.vision-toggle {
    width: 55px;
    height: 55px;
    background: linear-gradient(135deg, #1e3a8a, #3b82f6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s;
    border: 2px solid white;
}

.vision-toggle:hover {
    transform: scale(1.1);
    background: linear-gradient(135deg, #3b82f6, #1e3a8a);
}

.vision-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    background: white;
    border-radius: 16px;
    padding: 20px;
    width: 320px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    display: none;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #e2e8f0;
}

.vision-panel.active {
    display: flex;
}

.vision-section {
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 12px;
    margin-bottom: 8px;
}

.vision-section-title {
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.vision-btn {
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.vision-btn:hover {
    transform: translateX(5px);
}

.vision-btn i {
    width: 20px;
}

.vision-btn.font-plus, .vision-btn.font-minus {
    background: #e0e7ff;
    color: #1e3a8a;
}

.vision-btn.bw-mode {
    background: #fef3c7;
    color: #92400e;
}

.vision-btn.high-contrast {
    background: #d1fae5;
    color: #065f46;
}

.vision-btn.big-cursor-btn {
    background: #ede9fe;
    color: #5b21b6;
}

.vision-btn.speak-selection, .vision-btn.speak-page {
    background: #dbeafe;
    color: #1e40af;
}

.vision-btn.stop-speak {
    background: #fee2e2;
    color: #991b1b;
}

.vision-btn.reset {
    background: #f1f5f9;
    color: #334155;
}

.vision-select {
    width: 100%;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: white;
    font-size: 13px;
    font-weight: 500;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.speed-control input {
    flex: 1;
}

.speed-value {
    font-size: 12px;
    font-weight: 600;
    color: #1e3a8a;
    min-width: 45px;
}

/* Режимы для слабовидящих */
body.vision-mode.bw-mode {
    filter: grayscale(100%);
}

body.vision-mode.high-contrast {
    filter: contrast(150%) brightness(110%);
}

body.vision-mode.bw-mode.high-contrast {
    filter: grayscale(100%) contrast(150%) brightness(110%);
}

/* Увеличенный шрифт через классы */
body.font-size-1 { font-size: 14px; }
body.font-size-2 { font-size: 16px; }
body.font-size-3 { font-size: 18px; }
body.font-size-4 { font-size: 20px; }
body.font-size-5 { font-size: 22px; }
body.font-size-6 { font-size: 24px; }

body.font-size-2 .text-xs { font-size: 14px !important; }
body.font-size-2 .text-sm { font-size: 16px !important; }
body.font-size-2 .text-base { font-size: 18px !important; }
body.font-size-2 .text-lg { font-size: 20px !important; }
body.font-size-2 .text-xl { font-size: 22px !important; }
body.font-size-2 .text-2xl { font-size: 26px !important; }
body.font-size-2 .text-3xl { font-size: 30px !important; }
body.font-size-2 .text-4xl { font-size: 34px !important; }

body.font-size-3 .text-xs { font-size: 16px !important; }
body.font-size-3 .text-sm { font-size: 18px !important; }
body.font-size-3 .text-base { font-size: 20px !important; }
body.font-size-3 .text-lg { font-size: 22px !important; }
body.font-size-3 .text-xl { font-size: 24px !important; }
body.font-size-3 .text-2xl { font-size: 28px !important; }
body.font-size-3 .text-3xl { font-size: 32px !important; }
body.font-size-3 .text-4xl { font-size: 36px !important; }
body.font-size-3 .text-5xl { font-size: 42px !important; }

body.font-size-4 .text-xs { font-size: 18px !important; }
body.font-size-4 .text-sm { font-size: 20px !important; }
body.font-size-4 .text-base { font-size: 22px !important; }
body.font-size-4 .text-lg { font-size: 24px !important; }
body.font-size-4 .text-xl { font-size: 26px !important; }
body.font-size-4 .text-2xl { font-size: 30px !important; }
body.font-size-4 .text-3xl { font-size: 34px !important; }
body.font-size-4 .text-4xl { font-size: 38px !important; }
body.font-size-4 .text-5xl { font-size: 46px !important; }

body.font-size-5 .text-xs { font-size: 20px !important; }
body.font-size-5 .text-sm { font-size: 22px !important; }
body.font-size-5 .text-base { font-size: 24px !important; }
body.font-size-5 .text-lg { font-size: 26px !important; }
body.font-size-5 .text-xl { font-size: 28px !important; }
body.font-size-5 .text-2xl { font-size: 32px !important; }
body.font-size-5 .text-3xl { font-size: 36px !important; }
body.font-size-5 .text-4xl { font-size: 40px !important; }
body.font-size-5 .text-5xl { font-size: 50px !important; }

body.font-size-6 .text-xs { font-size: 22px !important; }
body.font-size-6 .text-sm { font-size: 24px !important; }
body.font-size-6 .text-base { font-size: 26px !important; }
body.font-size-6 .text-lg { font-size: 28px !important; }
body.font-size-6 .text-xl { font-size: 30px !important; }
body.font-size-6 .text-2xl { font-size: 34px !important; }
body.font-size-6 .text-3xl { font-size: 38px !important; }
body.font-size-6 .text-4xl { font-size: 42px !important; }
body.font-size-6 .text-5xl { font-size: 54px !important; }

@media (max-width: 768px) {
    .vision-widget {
        bottom: 15px;
        right: 15px;
    }
    .vision-toggle {
        width: 48px;
        height: 48px;
    }
    .vision-panel {
        width: 300px;
        right: 0;
        bottom: 60px;
    }
}