/* Accessibility helpers - added locally, not part of upstream NexusPHP.
   See LOCAL-NOTES.md in the install root. */

/* Text that should reach screen readers but not be painted on screen.
   Avoids display:none / visibility:hidden, which remove it from the
   accessibility tree entirely. */
.nexus-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Skip link: off-screen until it takes keyboard focus, then visible. */
.nexus-skip-link {
    position: absolute;
    left: -10000px;
    top: 0;
    z-index: 100000;
    padding: 10px 18px;
    background: #000;
    color: #fff;
    font-weight: bold;
    text-decoration: underline;
}

.nexus-skip-link:focus,
.nexus-skip-link:active {
    left: 0;
    outline: 3px solid #fc0;
}

/* The skip target is a <td>; it needs tabindex="-1" to accept focus, and we
   don't want a focus ring painted on the whole page area when it does. */
#outer:focus {
    outline: none;
}

/* Keyboard focus must stay visible everywhere. Some legacy themes remove it. */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus {
    outline: 2px solid #fc0;
    outline-offset: 1px;
}

/* FAQ accordion -----------------------------------------------------------
   The questions are real <button> elements inside <h3>, so they are reachable
   by Tab, operable with Enter and Space, announced with their expanded state,
   and jumpable by heading. These rules only strip the native button chrome so
   it still reads as a question in the page, never anything that removes it
   from the accessibility tree. */

.faq-entry {
    margin: 0 0 2px 0;
}

.faq-question {
    margin: 0;
    font-size: 1em;
    font-weight: normal;
}

.faq-toggle {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    margin: 0;
    padding: 7px 4px;
    font: inherit;
    font-weight: bold;
    color: inherit;
    cursor: pointer;
}

.faq-toggle:hover {
    text-decoration: underline;
}

/* Collapsed / expanded indicator. Decorative only - aria-expanded on the
   button is what actually conveys the state. */
.faq-marker::before {
    content: "\25B8\00A0";
}

.faq-toggle[aria-expanded="true"] .faq-marker::before {
    content: "\25BE\00A0";
}

.faq-answer {
    padding: 0 4px 14px 22px;
}

.faq-controls {
    margin: 0 0 12px 0;
}

.faq-controls .btn {
    margin-right: 6px;
}
