/* styles.css - Styling for the accessibility widget */
.gdacc-accessibility-button {
    position: fixed;
    bottom: 10px;
    right: 10px;
    z-index: 9999;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
    background: none;
    z-index: 11000;
    color: #000 !important;
}

    .gdacc-accessibility-button:hover {        
        transform: scale(1.05);
    }

.gdacc-accessibility-button span {
    position: absolute;
    bottom: 0;
    left: 0;
    font-size: 10px;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 20px;
    width: 55px;
    margin: 0 auto;
    color: #000 !important;
}

.gdacc-accessibility-panel {
    position: fixed;
    bottom: 90px;
    right: 20px;
    z-index: 9999;
    background-color: #eeeeee;
    border: 1px solid #ccc;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    max-width: 380px; /* Wider to accommodate two columns */
    width: 100%;
    overflow-y: auto;
    max-height: 85vh;
}

.gdacc-accessibility-panel.gdacc-oversized-panel {
    height: 87vh;
    bottom: 0;
    right: 0;
    max-height: 100vh;
}

.gdacc-accessibility-button.active-large-panel {
    right: 390px;
}

.gdacc-accessibility-panel-header {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    /*text-align: center !important;*/
    color: #333;
    margin-top: 2px;
}

.gdacc-accessibility-button-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns */
    gap: 10px; /* Space between buttons */
}

.gdacc-accessibility-module-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 10px;
    background-color: #fff;
    border: 2px solid #fff;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    transition: all 0.3s ease-out;
}

.gdacc-accessibility-module-button:hover,
.gdacc-accessibility-module-button:active,
.gdacc-accessibility-module-button:focus {
    border: 2px solid #358cbf;
    outline: none;
}

/* Active module button */
.gdacc-accessibility-module-button.active {
    background-color: #ceedff;
    border: 2px solid #358cbf;
}

.gdacc-accessibility-module-icon {
    font-size: 24px;
    margin-bottom: 5px;
}

.gdacc-accessibility-module-icon img {
    max-width: 30px;
    height: 30px;
}

.gdacc-accessibility-module-text {
    font-size: 13px;
    font-weight: 700;
}

.gdacc-accessibility-reset-button {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 15px;
    background-color: #000000;
    color: #fff !important;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, transform 0.2s;
}

.gdacc-contrast .gdacc-accessibility-reset-button,
.gdacc-contrast .gdacc-accessibility-reset-button:hover,
.gdacc-contrast .gdacc-accessibility-reset-button:focus {
    background-color: #fff;
    color: #000 !important;
}

    .gdacc-accessibility-reset-button:hover {
        background-color: #c82333;
        transform: scale(1.03);
    }

    .gdacc-accessibility-reset-button:active {
        background-color: #bd2130;
    }

/* TTS Highlight Style */
.gdacc-tts-highlight {
    background-color: rgba(0, 123, 255, 0.2) !important;
    border: 2px solid #007bff !important;
    border-radius: 4px !important;
    padding: 2px !important;
    transition: background-color 0.3s ease;
}

/* Link Highlight Style */
.gdacc-link-highlight {
    background-color: rgba(255, 255, 0, 0.3) !important;
    border: 2px solid #ffcc00 !important;
    border-radius: 4px !important;
    padding: 2px 4px !important;
    font-weight: bold !important;
    text-decoration: underline !important;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    color: #000 !important;
}

.gdacc-link-highlight svg path {
    fill: #000;
}

body.gdacc-contrast-dark .gdacc-link-highlight {
    color: #fff !important;
}

body.gdacc-contrast-dark .gdacc-link-highlight svg path {
    fill: #fff;
}

/* High Contrast Style */
body.gdacc-high-contrast {
    background-color: black !important;
    color: yellow !important;
}

    body.gdacc-high-contrast a {
        color: yellow !important;
    }

    body.gdacc-high-contrast *:not(.gdacc-accessibility-panel *) {
        border-color: yellow !important;
    }

/* Hidden Image Style */
.gdacc-hidden-image {
    display: none !important;
}

.gdacc-accessibility-panel .gdacc-hidden-image {
    display: inline-block !important;
}

/* Left-side positioning */
.gdacc-position-left.gdacc-accessibility-button,
.gdacc-position-left.gdacc-accessibility-panel {
    right: auto;
    left: 10px;
}

.gdacc-position-left.active-large-panel {
    left: 390px;
}

.gdacc-accessibility-panel.gdacc-oversized-panel.gdacc-position-left {
    left: 30px;
}

.gdacc-accessibility-panel,
.gdacc-accessibility-button {
    filter: none !important;
}

/* Panel header */
.gdacc-accessibility-panel h1 {
    font-size: 16px;
    margin: 0 0 10px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Position toggle icon */
.gdacc-position-toggle {
    position: relative;
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
    border-radius: 4px;
    float: right;
    border: 2px solid transparent;
    line-height: 18px;
    top: 2px;
}

    .gdacc-position-toggle:hover,
    .gdacc-position-toggle:active,
    .gdacc-position-toggle:focus {
        border: 2px solid #358cbf;
        outline: none;
    }

/* Reading mask overlay */
.gdacc-reading-mask {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000; /* Below widget elements */
  pointer-events: none; /* Allow interaction with content below */
}

/* Tooltip (ensure above reading mask) */
.gdacc-tooltip {
    z-index: 11000; /* Above reading mask */
}


h1, h2, h3, h4, h5, h6, p, div {
    letter-spacing: inherit !important;
    text-align: inherit !important;
}

a {
    letter-spacing: inherit !important;
}

.gdacc-accessibility-panel .gdacc-module-steps span,
.gdacc-accessibility-button .gdacc-module-steps span {
    filter: none !important;
}

/* ---------- Multi-state step indicator ---------- */
.gdacc-module-steps {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-top: 6px;
}
.gdacc-module-steps span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #ccc;           /* inactive */
    transition: background 0.2s;
}
.gdacc-module-steps span.active {
    background: #358cbf;        /* active step – same blue as focus/active border */
}

/* Responsive design */
@media (max-width: 600px) {

    .gdacc-accessibility-panel {
        max-width: 210px;
        padding: 10px;
    }

    .gdacc-accessibility-button.active-large-panel {
        right: 260px;
    }

    .gdacc-position-toggle {
        display: none;
    }

    .gdacc-accessibility-button-container {
        grid-template-columns: 1fr; /* Single column on small screens */
        gap: 8px;
    }

    .gdacc-accessibility-module-button {
        padding: 8px;
    }

    .gdacc-accessibility-module-icon {
        font-size: 20px;
    }

    .gdacc-accessibility-module-text {
        font-size: 12px;
    }

    .gdacc-accessibility-reset-button {
        padding: 10px;
        font-size: 14px;
    }

    .gdacc-accessibility-panel-header {
        font-size: 16px;
        margin-bottom: 8px;
    }
}


 @media screen and (max-width: 575px) {
    .gdacc-accessibility-button {
        bottom: 10px; 
    }

    .gdacc-position-left.gdacc-accessibility-button {
        left: 10px;
    }

    .gdacc-accessibility-button.active-large-panel {
        right: 270px;
    }

    .gdacc-position-left.gdacc-accessibility-button.active-large-panel {
        right: auto;
        left: 270px;
    }

 }

 @media screen and (max-width: 375px) {
    .gdacc-accessibility-panel-header {
        font-size: 14px;
    }

    .gdacc-accessibility-panel {
        max-width: 180px;
    }

    .gdacc-accessibility-button.active-large-panel {
        right: 240px;
    }
 }