﻿/* CookieYes icon is hidden via JS (shadow DOM style injection) */

.accessibility-widgets {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 500010;
}

.accessibility-main-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #173470;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(23, 52, 112, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 90px;
    z-index: 500012;
    right: 20px;
}

.accessibility-main-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(23, 52, 112, 0.5);
}

.accessibility-main-btn svg {
    width: 30px;
    height: 30px;
}

.access-sidebar-item {
    position: fixed;
    left: 0;
    top: calc(50% + (var(--sidebar-index, 0) * 50px));
    z-index: 500011;
    display: flex;
    align-items: center;
    width: 50px;
    height: 50px;
    background-color: #173470;
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    transition: width 0.35s ease, background-color 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.access-sidebar-item--first {
    border-top-right-radius: 10px;
}

.access-sidebar-item--last {
    border-bottom-right-radius: 10px;
}

.access-sidebar-item--only {
    border-radius: 0 10px 10px 0;
}

@media (hover: hover) {
    .access-sidebar-item:hover {
        width: 260px;
        background-color: #1e4493;
    }

    .access-sidebar-item:hover .access-sidebar-label {
        opacity: 1;
    }
}

.access-sidebar-item:focus-visible,
.access-sidebar-item.expanded {
    width: 260px;
    background-color: #1e4493;
}

.access-sidebar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 50px;
    width: 50px;
    height: 50px;
    flex-shrink: 0;
}

.access-sidebar-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.access-sidebar-label {
    padding-right: 16px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    opacity: 0;
    transition: opacity 0.25s ease 0.1s;
}

@media (hover: hover) {
    .access-sidebar-item:hover .access-sidebar-label {
        opacity: 1;
    }
}

.access-sidebar-item:focus-visible .access-sidebar-label,
.access-sidebar-item.expanded .access-sidebar-label {
    opacity: 1;
}

.accessibility-menu {
    position: fixed;
    bottom: 35px;
    right: -55px;
    width: 360px;
    height: 360px;
    background: var(--primary-color);
    border-radius: 50%;
    opacity: 0;
    visibility: hidden;
    transform: scale(0);
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
    z-index: 500015;
}

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

.menu-items {
    position:relative;
    width: 100%;
    max-width: 280px;
    height:100%;
}

.menu-item {
    position:absolute;
    align-items: center;
    padding: 14px 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    font-size: 20px;
    font-weight: 400;
}

.menu-item:hover {
    transform: translateX(-3px);
}

.menu-item svg {
    width: 85px;
    height: 85px;
    flex-shrink: 0;
    fill: white;
}
.menu-item:nth-child(1) {
    top: -8%;
    left: 0%;
}

.menu-item:nth-child(2) {
    top: 26%;
    left: -12%;
}

.menu-item:nth-child(3) {
    top: 60%;
    left: 4%;
}

.close-btn {
    position: absolute;
    bottom: 40px;
    right: 90px;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 500020;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.3);
}

.close-btn:hover {
    transform: translateX(-3px);
}

.close-btn::before,
.close-btn::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: white;
    border-radius: 1px;
}

.close-btn::before {
    transform: rotate(45deg);
}

.close-btn::after {
    transform: rotate(-45deg);
}

.chatbot {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #173470;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(23, 52, 112, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1001;
}

.chatbot:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(23, 52, 112, 0.4);
}

.chatbot svg {
    width: 60px;
    height: 60px;
}

@media (max-width: 768px) {
    .access-sidebar-item {
        width: 44px;
        height: 44px;
        top: calc(50% + (var(--sidebar-index, 0) * 44px));
    }

    .access-sidebar-icon {
        min-width: 44px;
        width: 44px;
        height: 44px;
    }

    .access-sidebar-icon img {
        width: 24px;
        height: 24px;
    }

    .access-sidebar-label {
        font-size: 13px;
    }

    .accessibility-widgets {
        bottom: 15px;
        right: 15px;
    }

    .accessibility-main-btn,
    .chatbot {
        width: 55px;
        height: 55px;
    }

    .accessibility-main-btn svg {
        width: 26px;
        height: 26px;
    }

    .chatbot, .accessibility-main-btn {
        right: 15px;
    }

    .chatbot svg {
        width: 50px;
        height: 50px;
    }

    .accessibility-menu {
        width: 280px;
        height: 280px;
        padding: 35px 25px;
        bottom: 30px;
        right: -40px;
    }

    .menu-items {
        max-width: 230px;
        height: 100%;
    }

    .menu-item {
        font-size: 17px;
        padding: 12px;
    }

    .menu-item svg {
        width: 65px;
        height: 65px;
    }

    .menu-item:nth-child(1) {
        top: -6%;
        left: 2%;
    }

    .menu-item:nth-child(2) {
        top: 25%;
        left: -10%;
    }

    .menu-item:nth-child(3) {
        top: 55%;
        left: 4%;
    }

    .close-btn {
        bottom: 30px;
        right: 55px;
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 480px) {
    .access-sidebar-item {
        width: 40px;
        height: 40px;
        top: calc(50% + (var(--sidebar-index, 0) * 40px));
    }

    .access-sidebar-icon {
        min-width: 40px;
        width: 40px;
        height: 40px;
    }

    .access-sidebar-icon img {
        width: 20px;
        height: 20px;
    }

    .access-sidebar-label {
        font-size: 12px;
        padding-right: 12px;
    }

    .accessibility-widgets {
        bottom: 10px;
        right: 10px;
    }

    .accessibility-main-btn,
    .chatbot {
        width: 50px;
        height: 50px;
    }

    .accessibility-main-btn svg {
        width: 22px;
        height: 22px;
    }

    .chatbot, .accessibility-main-btn {
        right: 10px;
    }
    .chatbot {
        bottom: 30px;
    }

    .chatbot svg {
        width: 45px;
        height: 45px;
    }

    .accessibility-menu {
        width: 280px;
        height: 280px;
        padding: 25px 20px;
        bottom: 50px;
        right: -40px;
    }

    .menu-items {
        max-width: 230px;
    }

    .menu-item {
        font-size: 15px;
        padding: 10px;
    }

    .menu-item svg {
        width: 60px;
        height: 60px;
    }

    .menu-item:nth-child(1) {
        top: -5%;
        left: 2%;
    }

    .menu-item:nth-child(2) {
        top: 25%;
        left: -8%;
    }

    .menu-item:nth-child(3) {
        top: 55%;
        left: 4%;
    }

    .close-btn {
        bottom: 25px;
        right: 55px;
        width: 28px;
        height: 28px;
    }

    .close-btn::before,
    .close-btn::after {
        width: 14px;
    }
}

/* TTS */
/* ===========================================
   FLOATING BUTTON
   =========================================== */

#tts-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #4675EF;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(70, 117, 239, 0.4);
    align-items: center;
    justify-content: center;
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 9999;
}

#tts-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 20px rgba(70, 117, 239, 0.5);
}

#tts-btn:focus-visible {
    outline: 3px solid #4675EF;
    outline-offset: 3px;
}

#tts-btn svg {
    width: 24px;
    height: 24px;
}

/* Hide on mobile/tablet */
@media (max-width: 1280px) {
    #tts-btn {
        display: none;
    }
}

/* ===========================================
   SELECTION POPUP
   =========================================== */

#tts-popup {
    position: fixed;
    background: #333;
    color: #fff;
    padding: 4px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(5px);
    transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}

#tts-popup.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

#tts-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 8px solid transparent;
    border-top-color: #333;
}

#tts-popup-btn {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    font-size: 14px;
    white-space: nowrap;
}

#tts-popup-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

#tts-popup-btn:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

#tts-popup-btn svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Hide on mobile/tablet */
@media (max-width: 1280px) {
    #tts-popup {
        display: none !important;
    }
}

/* ===========================================
   PLAYER CONTROLS
   =========================================== */

#tts-controls {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #333;
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s;
}

#tts-controls.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}

#tts-controls button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s;
}

#tts-controls button:hover {
    background: rgba(255, 255, 255, 0.15);
}

#tts-controls button:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

#tts-controls svg {
    width: 20px;
    height: 20px;
}

/* Play/Pause icon toggle */
#tts-toggle .icon-play {
    display: none;
}

/* ===========================================
   SPEED CONTROL
   =========================================== */

#tts-speed {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    font-size: 13px;
}

#tts-speed-slider {
    width: 60px;
    height: 4px;
    cursor: pointer;
    accent-color: #4675EF;
}

#tts-speed-val {
    min-width: 28px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.tts-highlight {
    background: #FEF3A0;
    border-radius: 2px;
}

/* ===========================================
   RTL SUPPORT (Arabic)
   =========================================== */


[dir="rtl"] #tts-speed,
html[lang="ar"] #tts-speed {
    padding-left: 0;
    padding-right: 12px;
    border-left: none;
    border-right: 1px solid rgba(255, 255, 255, 0.25);
}

/* ===========================================
   MOBILE ADJUSTMENTS
   =========================================== */

@media (max-width: 480px) {
    #tts-controls {
        padding: 8px 16px;
        gap: 8px;
        bottom: 16px;
    }

    #tts-controls button {
        padding: 8px;
    }

    #tts-speed-slider {
        width: 50px;
    }
}

/* ===========================================
   REDUCED MOTION
   =========================================== */

@media (prefers-reduced-motion: reduce) {
    #tts-btn,
    #tts-popup,
    #tts-controls,
    #tts-controls button {
        transition: none;
    }

    #tts-btn:hover {
        transform: none;
    }
}

/* ===========================================
   PRINT
   =========================================== */

@media print {
    #tts-btn,
    #tts-popup,
    #tts-controls {
        display: none !important;
    }
}