/**
 * MoreVision Accessibility Widget Styles
 * @version 1.0.0
 */

/* Override Elementor Kit Styles - Highest Priority */
/* .elementor-kit-1288 .mv-a11y-widget,
.elementor-kit-1288 .mv-a11y-widget *,
body.elementor-kit-1288 .mv-a11y-widget,
body.elementor-kit-1288 .mv-a11y-widget *,
[class*="elementor-kit-"] .mv-a11y-widget,
[class*="elementor-kit-"] .mv-a11y-widget * {
    all: revert !important;
} */

/* Widget Container */
.mv-a11y-widget {
    position: fixed !important;
    z-index: 999999 !important;
}

/* Widget Button */
.mv-a11y-button {
    width: var(--mv-a11y-icon-size, 48px) !important;
    height: var(--mv-a11y-icon-size, 48px) !important;
    border-radius: 50% !important;
    background: var(--mv-a11y-primary, #1863DC) !important;
    background-color: var(--mv-a11y-primary, #1863DC) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease-in-out !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    text-transform: none !important;
    line-height: 1 !important;
}

.mv-a11y-button:hover {
    transform: scale(1.1) !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2) !important;
    background: var(--mv-a11y-primary, #1863DC) !important;
    background-color: var(--mv-a11y-primary, #1863DC) !important;
    transition: all 0.3s ease-in-out !important;
}

.mv-a11y-button:focus {
    outline: 3px solid var(--mv-a11y-primary, #1863DC) !important;
    outline-offset: 2px !important;
    background: var(--mv-a11y-primary, #1863DC) !important;
    background-color: var(--mv-a11y-primary, #1863DC) !important;
    transition: all 0.3s ease-in-out !important;
}

.mv-a11y-button svg {
    width: 24px !important;
    height: 24px !important;
}

/* Widget Panel */
.mv-a11y-panel {
    position: fixed;
    width: 360px;
    max-width: calc(100vw - 40px);
    background: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;

    height: 100vh;
    max-height: none;
    bottom: 0;
    border-radius: 0;
}

/* Panel positioning based on button location */
.mv-a11y-widget[data-position*="right"] .mv-a11y-panel {
    right: 0px;
    left: auto;
}

.mv-a11y-widget[data-position*="left"] .mv-a11y-panel {
    left: 0px;
    right: auto;
}

.mv-a11y-panel.open {
    opacity: 1;
    transform: translateY(0);
}

/* Panel Header */
.mv-a11y-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: var(--mv-a11y-primary, #1863DC);
    color: white;
}

.mv-a11y-panel-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white !important;
}

.mv-a11y-close {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    color: white !important;
    cursor: pointer !important;
    padding: 4px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    transition: background 0.2s ease !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    text-transform: none !important;
    line-height: 1 !important;
}

.mv-a11y-close:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.mv-a11y-close:focus {
    outline: 2px solid white !important;
    outline-offset: 2px !important;
}

/* Panel Content */
.mv-a11y-panel-content {
    padding: 20px;
    max-height: calc(100vh - 216px);
    overflow-y: auto;
}

/* Section */
.mv-a11y-section {
    margin-bottom: 32px;
}

.mv-a11y-section:last-child {
    margin-bottom: 0;
}

.mv-a11y-section-title {
    margin: 0 0 16px 0;
    font-size: 15px;
    font-weight: 600;
    color: #666;
    text-transform: none;
    letter-spacing: 0;
}

/* Card Grid */
.mv-a11y-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Card */
.mv-a11y-card {
    background: white !important;
    background-color: white !important;
    border: 2px solid #e8e8e8 !important;
    color: var(--mv-a11y-primary, #1863DC) !important;
    border-radius: 12px !important;
    padding: 16px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 8px !important;
    min-height: 100px !important;
    justify-content: center !important;
    font-family: inherit !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    text-transform: none !important;
    line-height: 1.5 !important;
}

.mv-a11y-card:hover {
    border-color: var(--mv-a11y-primary, #1863DC) !important;
    background: #f8f9ff !important;
    color: var(--mv-a11y-primary, #1863DC) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(24, 99, 220, 0.1) !important;
}


.mv-a11y-card:focus {
    border: 2px solid #e8e8e8 !important;
    outline: none !important;
    background: white !important;
    background-color: white !important;
    color: var(--mv-a11y-primary, #1863DC) !important;
}

.mv-a11y-card.active {
    background: var(--mv-a11y-primary, #1863DC) !important;
    background-color: var(--mv-a11y-primary, #1863DC) !important;
    color: white !important;
    border-color: var(--mv-a11y-primary, #1863DC) !important;
}


/* Card Icon */
.mv-a11y-icon {
    width: 32px !important;
    height: 32px !important;
    color: #333 !important;
    direction: ltr !important;
}

.mv-a11y-card.active .mv-a11y-icon {
    color: white !important;
}

/* Card Label */
.mv-a11y-card-label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.3;
    color: inherit;
}

/* Wide Card (Font Size) */
.mv-a11y-card-wide {
    grid-column: span 2;
    flex-direction: row;
    justify-content: space-between;
    padding: 16px 20px;
    min-height: auto;
    flex-direction: column;
}

.mv-a11y-card-wide .mv-a11y-card-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 16px;
    flex-direction: column;
}

.mv-a11y-card-wide .mv-a11y-card-label {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    text-align: start;
    direction:ltr;
}

.mv-a11y-card-wide .mv-a11y-icon {
    flex-shrink: 0;
}

/* Controls */
.mv-a11y-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mv-a11y-control-group {
    margin-bottom: 12px;
}

.mv-a11y-control-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
}

/* Font Size Controls */
.mv-a11y-font-size-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mv-a11y-font-btn {
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    background: var(--mv-a11y-primary, #1863DC) !important;
    background-color: var(--mv-a11y-primary, #1863DC) !important;
    color: white !important;
    border: none !important;
    cursor: pointer !important;
    font-size: 20px !important;
    font-weight: bold !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    padding: 0 !important;
    font-family: inherit !important;
    text-transform: none !important;
    line-height: 1 !important;
}

.mv-a11y-font-btn:hover {
    transform: scale(1.1) !important;
    background: #1450b8 !important;
    background-color: #1450b8 !important;
}

.mv-a11y-font-btn:focus {
    outline: 2px solid var(--mv-a11y-primary, #1863DC) !important;
    outline-offset: 2px !important;
}

.mv-a11y-font-size-value {
    min-width: 60px;
    text-align: center;
    font-weight: 600;
    color: #333;
    font-size: 15px;
    padding: 6px 12px;
    background: #f5f5f5;
    border-radius: 8px;
}

/* Buttons */
.mv-a11y-btn,
.mv-a11y-toggle {
    padding: 12px 16px !important;
    border: 1px solid #e0e0e0 !important;
    background: white !important;
    background-color: white !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    color: #333 !important;
    transition: all 0.2s ease !important;
    text-align: start !important;
    width: 100% !important;
    font-family: inherit !important;
    font-weight: normal !important;
    text-transform: none !important;
    line-height: 1.5 !important;
}

/* RTL text alignment */
.mv-a11y-panel[dir="rtl"] .mv-a11y-btn,
.mv-a11y-panel[dir="rtl"] .mv-a11y-toggle {
    text-align: right;
}

/* LTR text alignment */
.mv-a11y-panel[dir="ltr"] .mv-a11y-btn,
.mv-a11y-panel[dir="ltr"] .mv-a11y-toggle {
    text-align: left;
}

.mv-a11y-btn:hover,
.mv-a11y-toggle:hover {
    background: #e1e1e1 !important;
    background-color: #e1e1e1 !important;
    color: #333 !important;
    border-color: var(--mv-a11y-primary, #1863DC) !important;
}

.mv-a11y-btn:focus,
.mv-a11y-toggle:focus {
    outline: 2px solid var(--mv-a11y-primary, #1863DC) !important;
    outline-offset: 2px !important;
    background: #e1e1e1 !important;
    background-color: #e1e1e1 !important;
    color: #333 !important;
}

.mv-a11y-toggle.active {
    background: var(--mv-a11y-primary, #1863DC) !important;
    background-color: var(--mv-a11y-primary, #1863DC) !important;
    color: white !important;
    border-color: var(--mv-a11y-primary, #1863DC) !important;
}

.mv-a11y-btn {
    width: auto !important;
    min-width: 50px !important;
}

/* Panel Footer */
.mv-a11y-panel-footer {
    padding: 16px 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.mv-a11y-reset {
    width: 100% !important;
    padding: 12px !important;
    background: #f5f5f5 !important;
    background-color: #f5f5f5 !important;
    border: 1px solid #e0e0e0 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #666 !important;
    transition: all 0.2s ease !important;
    font-family: inherit !important;
    text-transform: none !important;
    line-height: 1.5 !important;
}

.mv-a11y-reset:hover {
    background: #e0e0e0 !important;
    background-color: #e0e0e0 !important;
    color: #333 !important;
}

.mv-a11y-reset:focus {
    outline: 2px solid var(--mv-a11y-primary, #1863DC) !important;
    outline-offset: 2px !important;
    background: #e0e0e0 !important;
    background-color: #e0e0e0 !important;
    color: #333 !important;
}

/* Statement Link */
.mv-a11y-statement-link {
    display: block;
    padding: 12px 16px;
    background: #f5f5f5;
    border-radius: 8px;
    color: var(--mv-a11y-primary, #1863DC);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s ease;
}

.mv-a11y-statement-link:hover {
    background: #e0e0e0;
}

/* Accessibility Features */

/* Font Size - Apply to ALL elements */
html[data-mv-font-size] *:not(.mv-a11y-widget):not(.mv-a11y-widget *) {
    font-size: inherit !important;
}

html[data-mv-font-size] body {
    transition: font-size 0.3s ease;
}

/* Font Size */
html.mv-a11y-font-size-plus1 { font-size: 110% !important; }
html.mv-a11y-font-size-plus2 { font-size: 120% !important; }
html.mv-a11y-font-size-plus3 { font-size: 130% !important; }
html.mv-a11y-font-size-minus1 { font-size: 90% !important; }
html.mv-a11y-font-size-minus2 { font-size: 80% !important; }
html.mv-a11y-font-size-minus3 { font-size: 70% !important; }

/* Highlight Text */
html.mv-a11y-highlight-text h1,
html.mv-a11y-highlight-text h2,
html.mv-a11y-highlight-text h3,
html.mv-a11y-highlight-text h4,
html.mv-a11y-highlight-text h5,
html.mv-a11y-highlight-text h6 {
    background: #ffeb3b !important;
    padding: 4px 8px !important;
    border-radius: 4px !important;
}

/* Highlight Links */
html.mv-a11y-highlight-links a {
    background: #ffeb3b !important;
    padding: 2px 4px !important;
    border-radius: 2px !important;
    text-decoration: underline !important;
}

/* Dyslexic Font */
html.mv-a11y-dyslexic-font,
html.mv-a11y-dyslexic-font * {
    font-family: 'OpenDyslexic', Arial, sans-serif !important;
}

/* Letter Spacing */
html.mv-a11y-letter-spacing * {
    letter-spacing: 0.12em !important;
}

/* Line Height */
html.mv-a11y-line-height * {
    line-height: 2 !important;
}

/* Font Weight */
html.mv-a11y-font-weight * {
    font-weight: 600 !important;
}

/* Align Left */
html.mv-a11y-align-left * {
    text-align: left !important;
}

/* Dark Contrast */
html.mv-a11y-dark-contrast {
    background: #000 !important;
    filter: invert(1) hue-rotate(180deg);
}

html.mv-a11y-dark-contrast img,
html.mv-a11y-dark-contrast video {
    filter: invert(1) hue-rotate(180deg);
}

/* Light Contrast */
html.mv-a11y-light-contrast {
    background: #fff !important;
}

html.mv-a11y-light-contrast * {
    background: #fff !important;
    color: #000 !important;
}

/* High Contrast */
html.mv-a11y-high-contrast {
    filter: contrast(2);
}

/* High Saturation */
html.mv-a11y-high-saturation {
    filter: saturate(2);
}

/* Low Saturation */
html.mv-a11y-light-saturation {
    filter: saturate(0.5);
}

/* Monochrome */
html.mv-a11y-monochrome {
    filter: grayscale(1);
}

/* Sepia */
html.mv-a11y-sepia {
    filter: sepia(1);
}

/* Yellow-Black Mode */
html.mv-a11y-yellow-black {
    background: #000 !important;
}

html.mv-a11y-yellow-black * {
    background: #000 !important;
    color: #ff0 !important;
    border-color: #ff0 !important;
}

/* Invert Colors */
html.mv-a11y-invert-colors {
    filter: invert(1) hue-rotate(180deg);
}

html.mv-a11y-invert-colors img,
html.mv-a11y-invert-colors video {
    filter: invert(1) hue-rotate(180deg);
}

/* Reading Mode */
html.mv-a11y-reading-mode header,
html.mv-a11y-reading-mode nav,
html.mv-a11y-reading-mode aside,
html.mv-a11y-reading-mode footer,
html.mv-a11y-reading-mode .sidebar,
html.mv-a11y-reading-mode .widget,
html.mv-a11y-reading-mode .advertisement {
    display: none !important;
}

html.mv-a11y-reading-mode main,
html.mv-a11y-reading-mode article,
html.mv-a11y-reading-mode .content {
    max-width: 800px !important;
    margin: 0 auto !important;
    padding: 40px 20px !important;
}

/* Image Alt Text Tooltip */
.mv-a11y-img-tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.95);
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    z-index: 999999;
    max-width: 350px;
    word-wrap: break-word;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    line-height: 1.4;
}

html.mv-a11y-image-alt img[alt] {
    cursor: help;
    outline: 2px solid transparent;
    transition: outline 0.2s ease;
}

html.mv-a11y-image-alt img[alt]:hover {
    outline-color: var(--mv-a11y-primary, #1863DC);
}

/* Page Zoom */
html.mv-a11y-page-zoom {
    zoom: 1.5;
}

/* Keyboard Navigation */
html.mv-a11y-keyboard-nav *:focus {
    outline: 3px solid #ff0 !important;
    outline-offset: 2px !important;
}

html.mv-a11y-keyboard-nav a:focus,
html.mv-a11y-keyboard-nav button:focus,
html.mv-a11y-keyboard-nav input:focus,
html.mv-a11y-keyboard-nav select:focus,
html.mv-a11y-keyboard-nav textarea:focus {
    box-shadow: 0 0 0 3px rgba(255, 255, 0, 0.5) !important;
}

/* Statement Modal */
#mv-a11y-statement-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999999;
    align-items: center;
    justify-content: center;
}

.mv-statement-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.mv-statement-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 1;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mv-statement-close {
    position: absolute !important;
    top: 15px !important;
    left: 15px !important;
    background: #f0f0f0 !important;
    background-color: #f0f0f0 !important;
    border: none !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50% !important;
    font-size: 24px !important;
    line-height: 1 !important;
    cursor: pointer !important;
    color: #333 !important;
    transition: all 0.2s ease !important;
    z-index: 2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    font-family: inherit !important;
    font-weight: normal !important;
    text-transform: none !important;
}

.mv-statement-close:hover {
    background: #1863DC !important;
    background-color: #1863DC !important;
    color: white !important;
    transform: rotate(90deg) !important;
}

.mv-statement-body {
    padding: 60px 40px 40px;
    overflow-y: auto;
    max-height: 90vh;
    direction: rtl;
    text-align: right;
}

.mv-statement-body h2 {
    font-size: 26px;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #1863DC;
    border-bottom: 2px solid #1863DC;
    padding-bottom: 10px;
}

.mv-statement-body h2:first-child {
    margin-top: 0;
}

.mv-statement-body h3 {
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 12px;
    color: #333;
}

.mv-statement-body p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #444;
}

.mv-statement-body ul {
    margin: 15px 0;
    padding-right: 25px;
}

.mv-statement-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.mv-coordinator-box {
    background: #f8f9ff;
    padding: 20px;
    border-radius: 8px;
    border-right: 4px solid #1863DC;
    margin-top: 20px;
}

.mv-coordinator-box p {
    margin-bottom: 8px;
}

.mv-coordinator-box strong {
    color: #1863DC;
}

@media (max-width: 768px) {
    .mv-statement-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .mv-statement-body {
        padding: 50px 20px 20px;
    }
    
    .mv-statement-body h2 {
        font-size: 22px;
    }
    
    .mv-statement-body h3 {
        font-size: 18px;
    }
}

/* Black Cursor */
html.mv-a11y-black-cursor,
html.mv-a11y-black-cursor * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="40" height="40" viewBox="0 0 40 40"><path fill="black" stroke="white" stroke-width="3" d="M3 3 L3 32 L12 24 L17 34 L22 32 L17 22 L27 22 Z"/></svg>') 3 3, auto !important;
}

/* Reading Guide */
.mv-a11y-reading-guide-line {
    position: fixed;
    left: 0;
    width: 100%;
    height: 3px;
    background: rgba(255, 0, 0, 0.5);
    pointer-events: none;
    z-index: 999998;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.3);
}

/* Stop Animations */
html.mv-a11y-stop-animations *,
html.mv-a11y-stop-animations *::before,
html.mv-a11y-stop-animations *::after {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
    transition-duration: 0s !important;
}

/* Big Cursor */
html.mv-a11y-big-cursor,
html.mv-a11y-big-cursor * {
    cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 32 32"><path fill="black" stroke="white" stroke-width="2" d="M2 2 L2 28 L10 20 L14 28 L18 26 L14 18 L22 18 Z"/></svg>') 2 2, auto !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mv-a11y-panel {
        bottom: 70px;
        width: auto;
        max-width: none;
        top: 0;
        bottom: 0;
        max-height: 100vh;
        border-radius: 0;
    }
    
    /* Mobile: Panel positioning based on button location */
    .mv-a11y-widget[data-position*="right"] .mv-a11y-panel {
        right: 0px;
        left: 0px;
    }
    
    .mv-a11y-widget[data-position*="left"] .mv-a11y-panel {
        left: 0px;
        right: 0px;
    }
    
    .mv-a11y-panel-content {
        max-height: calc(100vh - 216px);
    }
    
    /* Mobile: 2-column card grid */
    .mv-a11y-card-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .mv-a11y-card {
        min-height: 90px;
        padding: 12px;
    }
    
    .mv-a11y-card-wide {
        grid-column: span 2;
        flex-direction: column;
        gap: 12px;
    }
    
    .mv-a11y-card-wide .mv-a11y-card-content {
        flex-direction: column;
        gap: 12px;
    }
    
    .mv-a11y-font-size-controls {
        width: 100%;
        justify-content: center;
    }
}

/* Scrollbar Styling */
.mv-a11y-panel-content::-webkit-scrollbar {
    width: 8px;
}

.mv-a11y-panel-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.mv-a11y-panel-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.mv-a11y-panel-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Print Styles */
@media print {
    .mv-a11y-widget,
    .mv-a11y-button,
    .mv-a11y-panel,
    .mv-a11y-reading-guide-line {
        display: none !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .mv-a11y-button {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .mv-a11y-button,
    .mv-a11y-panel,
    .mv-a11y-btn,
    .mv-a11y-toggle,
    .mv-a11y-close,
    .mv-a11y-reset {
        transition: none !important;
    }
}
