/**
 * EMWP Accessibility Widget & Modification Classes
 */

/* -----------------------------------------------
   Floating Button
   ----------------------------------------------- */
.emwp-a11y-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1565c0;
    color: #fff;
    border: none;
    cursor: pointer;
    font-size: 24px;
    line-height: 48px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    transition: background 0.2s, transform 0.2s;
    padding: 0;
}

.emwp-a11y-btn:hover,
.emwp-a11y-btn:focus {
    background: #0d47a1;
    transform: scale(1.1);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* -----------------------------------------------
   Panel
   ----------------------------------------------- */
.emwp-a11y-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    z-index: 999998;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    padding: 20px;
    width: 260px;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.emwp-a11y-panel[aria-hidden="false"] {
    display: block;
}

.emwp-a11y-panel-title {
    margin: 0 0 16px;
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

/* -----------------------------------------------
   Panel Toggle Buttons
   ----------------------------------------------- */
.emwp-a11y-option {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 6px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    text-align: left;
    transition: background 0.15s, border-color 0.15s;
}

.emwp-a11y-option:hover,
.emwp-a11y-option:focus {
    background: #e3f2fd;
    border-color: #1565c0;
    outline: none;
}

.emwp-a11y-option[aria-pressed="true"] {
    background: #1565c0;
    color: #fff;
    border-color: #1565c0;
}

.emwp-a11y-option-icon {
    margin-right: 10px;
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Reset button */
.emwp-a11y-reset {
    display: block;
    width: 100%;
    padding: 8px 12px;
    margin-top: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f5f5f5;
    color: #666;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
    transition: background 0.15s;
}

.emwp-a11y-reset:hover,
.emwp-a11y-reset:focus {
    background: #e0e0e0;
    outline: none;
}

/* -----------------------------------------------
   Accessibility Modification Classes
   Applied to <html> to override Elementor styles.
   ----------------------------------------------- */

/* Larger text — step 1 */
html.emwp-a11y-font-lg,
html.emwp-a11y-font-lg body,
html.emwp-a11y-font-lg p,
html.emwp-a11y-font-lg span,
html.emwp-a11y-font-lg li,
html.emwp-a11y-font-lg td,
html.emwp-a11y-font-lg th,
html.emwp-a11y-font-lg label,
html.emwp-a11y-font-lg input,
html.emwp-a11y-font-lg textarea,
html.emwp-a11y-font-lg select,
html.emwp-a11y-font-lg div,
html.emwp-a11y-font-lg a {
    font-size: 120% !important;
}

/* Larger text — step 2 */
html.emwp-a11y-font-xl,
html.emwp-a11y-font-xl body,
html.emwp-a11y-font-xl p,
html.emwp-a11y-font-xl span,
html.emwp-a11y-font-xl li,
html.emwp-a11y-font-xl td,
html.emwp-a11y-font-xl th,
html.emwp-a11y-font-xl label,
html.emwp-a11y-font-xl input,
html.emwp-a11y-font-xl textarea,
html.emwp-a11y-font-xl select,
html.emwp-a11y-font-xl div,
html.emwp-a11y-font-xl a {
    font-size: 140% !important;
}

/* High contrast */
html.emwp-a11y-contrast {
    filter: contrast(1.4) !important;
}

html.emwp-a11y-contrast body {
    background: #000 !important;
    color: #fff !important;
}

html.emwp-a11y-contrast a {
    color: #ff0 !important;
}

html.emwp-a11y-contrast img {
    filter: contrast(1.2) !important;
}

/* Grayscale */
html.emwp-a11y-grayscale {
    filter: grayscale(1) !important;
}

/* Highlight links */
html.emwp-a11y-links a {
    text-decoration: underline !important;
    outline: 2px solid currentColor !important;
    outline-offset: 2px !important;
}

/* -----------------------------------------------
   Responsive — Mobile
   ----------------------------------------------- */
@media (max-width: 600px) {
    .emwp-a11y-panel {
        right: 10px;
        bottom: 76px;
        width: calc(100vw - 20px);
        max-width: 300px;
    }

    .emwp-a11y-btn {
        bottom: 16px;
        right: 16px;
    }
}
