/* =========================================
   MICCOLIS ACCESSIBILITY SUITE - MAIN CSS
   ========================================= */

/* --- 1. VARIABLES --- */
:root {
  --bg-primary: #ffffff;
  --bg-secondary: #f4f4f4;
  --bg-card: #ffffff;
  --text-primary: #333333;
  --text-secondary: #555555;
  --text-headings: #111111;
  --text-inverted: #ffffff;
  --brand-accent: #FF6633;
  --brand-success: #43963C;
  --border-primary: #cccccc;
}

/* --- 2. DARK MODE LOGIC (Applied to WordPress classes) --- */
body:has(#dark-mode-toggle:checked) {
  --bg-primary: #1e1e1e;
  --bg-secondary: #2c2c2c;
  --bg-card: #252525;
  --text-primary: #d1d1d1;
  --text-secondary: #aaaaaa;
  --text-headings: #f5f5f5;
  --text-inverted: #ffffff;
  --brand-accent: #ff7e54;
  --brand-success: #5cb85c;
  --border-primary: #444444;
}

/* Generic Dark Mode Application for WordPress */
body:has(#dark-mode-toggle:checked) {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
}

/* Header & Footer */
body:has(#dark-mode-toggle:checked) header,
body:has(#dark-mode-toggle:checked) .site-header,
body:has(#dark-mode-toggle:checked) footer,
body:has(#dark-mode-toggle:checked) .site-footer,
body:has(#dark-mode-toggle:checked) .footer-wrap {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}

/* Content Boxes / Widgets / Cards */
body:has(#dark-mode-toggle:checked) .widget,
body:has(#dark-mode-toggle:checked) .card,
body:has(#dark-mode-toggle:checked) .entry-content,
body:has(#dark-mode-toggle:checked) article {
    background-color: var(--bg-card) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-primary) !important;
}

/* Headings & Links */
body:has(#dark-mode-toggle:checked) h1, 
body:has(#dark-mode-toggle:checked) h2, 
body:has(#dark-mode-toggle:checked) h3,
body:has(#dark-mode-toggle:checked) h4,
body:has(#dark-mode-toggle:checked) h5,
body:has(#dark-mode-toggle:checked) h6 {
    color: var(--text-headings) !important;
}

body:has(#dark-mode-toggle:checked) a {
    color: var(--brand-accent) !important;
}

/* Inputs */
body:has(#dark-mode-toggle:checked) input,
body:has(#dark-mode-toggle:checked) textarea,
body:has(#dark-mode-toggle:checked) select {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-primary) !important;
}

/* Invert Logos in Dark Mode */
body:has(#dark-mode-toggle:checked) img.custom-logo,
body:has(#dark-mode-toggle:checked) .site-logo img,
body:has(#dark-mode-toggle:checked) .travelkit-navbar-brand img {
    filter: invert(1);
}


/* --- 3. FUNCTIONAL CLASSES (Toggled by JS) --- */

/* Readable Font */
body.access-readable-font * {
    font-family: Arial, Helvetica, sans-serif !important;
    letter-spacing: 0.5px !important;
}

/* Highlight Links */
body.access-highlight-links a {
    text-decoration: underline !important;
    background-color: #000 !important;
    color: #ff0 !important;
}

/* Monochrome */
body.access-monochrome {
    filter: grayscale(100%) !important;
}
body.access-monochrome .accessibility-widget {
    filter: grayscale(0%) !important; /* Keep widget visible */
}


/* --- 4. WIDGET UI STYLING (The Dock) --- */

.accessibility-widget {
    position: fixed !important;
    bottom: 20px !important;
    left: 20px !important;
    z-index: 999999 !important;
    font-family: sans-serif !important;
}

/* Hide Checkboxes */
.access-checkbox, #dark-mode-toggle, #toggle-vision, #toggle-font, #toggle-links, #toggle-mono {
    display: none !important;
}

/* Master Button */
.access-btn {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 50px !important;
    height: 50px !important;
    background-color: #0056b3 !important;
    border-radius: 50% !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3) !important;
    cursor: pointer !important;
    transition: transform 0.3s ease !important;
}
.access-btn:hover { transform: scale(1.1) !important; }
.access-btn svg { stroke: #fff !important; width: 30px; height: 30px; }

/* Menu Panel */
.access-panel {
    position: absolute !important;
    bottom: 70px !important;
    left: 0 !important;
    width: 300px !important;
    background-color: #fff !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3) !important;
    overflow: hidden !important;
    visibility: hidden !important;
    opacity: 0 !important;
    transform: translateY(20px) scale(0.95) !important;
    transition: all 0.3s ease !important;
}

/* Open State */
.access-checkbox:checked ~ .access-panel {
    visibility: visible !important;
    opacity: 1 !important;
    transform: translateY(0) scale(1) !important;
}

/* Header */
.access-header {
    background-color: #0056b3 !important;
    padding: 15px !important;
    color: #fff !important;
    text-align: center !important;
}
.header-buttons { display: flex; justify-content: space-between; margin-bottom: 10px; }
.header-btn { background: #fff; color: #0056b3; border:none; padding: 5px 10px; border-radius: 4px; cursor: pointer; font-size: 12px; font-weight: bold; }

/* Content List */
.access-content { padding: 10px !important; max-height: 60vh; overflow-y: auto; }
.access-option {
    display: flex !important;
    align-items: center !important;
    padding: 10px !important;
    border-bottom: 1px solid #eee !important;
}
.option-text { flex: 1; padding: 0 10px; }
.option-text strong { display: block; font-size: 14px; color: #333; }
.option-text p { margin: 0; font-size: 11px; color: #666; }
.option-icon { font-size: 18px; }

/* Toggle Switch UI */
.switch {
    position: relative; display: inline-block; width: 40px; height: 20px;
}
.slider {
    position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc; transition: .4s; border-radius: 34px;
}
.slider:before {
    position: absolute; content: ""; height: 16px; width: 16px; left: 2px; bottom: 2px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .slider { background-color: #0056b3; }
input:checked + .slider:before { transform: translateX(20px); }

/* Footer */
.access-footer { text-align: center; padding: 8px; font-size: 10px; color: #999; background: #f9f9f9; }