/**
 * Dermico Accessibility Plugin Stylesheet (WCAG 2.1 AA Compliant)
 */

/* Accessibility Trigger Floating Button */
.accessibility-trigger-btn {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #0066cc;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 6px 20px rgba(0, 102, 204, 0.4);
    cursor: pointer;
    border: 2px solid #ffffff;
    z-index: 99999;
    transition: all 0.3s ease;
}

.accessibility-trigger-btn:hover,
.accessibility-trigger-btn:focus {
    transform: scale(1.12);
    outline: 3px solid #ffcc00;
}

/* Accessibility Modal Panel */
.accessibility-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100000;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.accessibility-modal-overlay.active {
    display: block;
    opacity: 1;
}

.accessibility-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 520px;
    max-height: 90vh;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    z-index: 100001;
    overflow-y: auto;
    direction: rtl;
    text-align: right;
    font-family: 'Assistant', sans-serif;
    display: none;
}

.accessibility-modal.active {
    display: block;
    animation: accModalPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes accModalPop {
    from {
        opacity: 0;
        transform: translate(-50%, -46%) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.acc-header {
    background: #0066cc;
    color: #ffffff;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 20px 20px 0 0;
}

.acc-header h3 {
    margin: 0;
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.acc-close-btn {
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 22px;
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.acc-close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.acc-body {
    padding: 25px;
}

.acc-intro {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.acc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
}

.acc-btn {
    background: #f5f7fa;
    border: 1px solid #dce2e6;
    border-radius: 12px;
    padding: 14px 12px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #333333;
    transition: all 0.2s ease;
}

.acc-btn i {
    font-size: 22px;
    color: #0066cc;
}

.acc-btn:hover,
.acc-btn:focus {
    background: #e6f0fa;
    border-color: #0066cc;
    outline: none;
}

.acc-btn.active {
    background: #0066cc;
    color: #ffffff;
    border-color: #0052a3;
}

.acc-btn.active i {
    color: #ffffff;
}

.acc-footer-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 18px;
    gap: 12px;
}

.acc-reset-btn {
    background: #f0f0f0;
    border: 1px solid #ccc;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.acc-reset-btn:hover {
    background: #e0e0e0;
}

.acc-statement-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: #0066cc;
    text-decoration: underline;
}

/* ==========================================================
   Accessibility State Modifiers Applied to <body> or <html>
   ========================================================== */

/* Font Size Increase */
body.acc-font-lg {
    font-size: 19px !important;
}
body.acc-font-lg h1 { font-size: 3.4rem !important; }
body.acc-font-lg h2 { font-size: 2.5rem !important; }
body.acc-font-lg h3 { font-size: 1.8rem !important; }
body.acc-font-lg p, body.acc-font-lg a, body.acc-font-lg li { font-size: 1.25rem !important; }

/* Font Size Decrease */
body.acc-font-sm {
    font-size: 14px !important;
}

/* Grayscale Mode */
body.acc-grayscale {
    filter: grayscale(100%) !important;
}

/* High Contrast Mode (Dark & High Saturation) */
body.acc-high-contrast {
    background: #000000 !important;
    color: #ffff00 !important;
}
body.acc-high-contrast * {
    background-color: #000000 !important;
    color: #ffff00 !important;
    border-color: #ffff00 !important;
    box-shadow: none !important;
}
body.acc-high-contrast a {
    color: #00ffff !important;
    text-decoration: underline !important;
}
body.acc-high-contrast img {
    filter: contrast(120%) brightness(90%) !important;
}

/* Invert Colors Mode */
body.acc-invert {
    filter: invert(100%) hue-rotate(180deg) !important;
    background-color: #000000 !important;
}
body.acc-invert img,
body.acc-invert video {
    filter: invert(100%) hue-rotate(180deg) !important;
}

/* Light / High-Contrast White Background */
body.acc-light-bg {
    background: #ffffff !important;
    color: #000000 !important;
}
body.acc-light-bg * {
    background-color: #ffffff !important;
    color: #000000 !important;
}

/* Highlight Links */
body.acc-highlight-links a {
    background-color: #ffff00 !important;
    color: #000000 !important;
    text-decoration: underline !important;
    font-weight: 700 !important;
    padding: 2px 4px !important;
    border-radius: 3px !important;
}

/* Readable System Font (Dyslexia & Clarity) */
body.acc-readable-font,
body.acc-readable-font * {
    font-family: Arial, Tahoma, sans-serif !important;
    letter-spacing: 0.03em !important;
}

/* Stop Animations */
body.acc-stop-animations,
body.acc-stop-animations * {
    animation: none !important;
    transition: none !important;
}

/* Big Cursor */
body.acc-big-cursor,
body.acc-big-cursor * {
    cursor: default !important;
}
body.acc-big-cursor a,
body.acc-big-cursor button {
    cursor: pointer !important;
}
