/* =====================================================================
   ux.css — the part of the interface-review fixes (docs/ux-review-1405-08.md) that
   the public pages and the panel share: skip link, language button, focus rings,
   the login form. The panel-only part is ux-panel.css. Loaded last, so it is final.
   Every block names the finding it answers (U-xx). Prefer fixing the
   rule where it lives; keep here only what has to win over a page style.
   ===================================================================== */

:root {
    /* The smallest comfortable size of a thing a finger presses (U-12). */
    --tap: 44px;
    /* The type scale (U-11): nothing that carries information is smaller than --fs-xs. */
    --fs-xs: .75rem;    /* 12px  captions, badges, meta */
    --fs-sm: .8125rem;  /* 13px  secondary text, table cells on a phone */
    --fs-md: .9375rem;  /* 15px  body */
}

/* ── U-18 · skip to the page ──────────────────────────────────────────── */
.skip-link {
    display: inline-flex;
    align-items: center;
    min-height: var(--tap);
    position: fixed;
    top: 8px;
    inset-inline-start: 8px;
    z-index: 3000;
    padding: .65rem 1rem;
    border-radius: 10px;
    background: #1b2a41;
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    transform: translateY(-200%);
    transition: transform .15s ease;
}
.skip-link:focus { transform: translateY(0); outline: 3px solid #a9c3f5; color: #fff; }

/* The page is focused by the skip link; it needs no ring of its own. */
main[tabindex="-1"]:focus { outline: none; }

/* ── U-16 · the language button ───────────────────────────────────────── */
.lang-btn {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    min-height: var(--tap);
    min-width: var(--tap);
    justify-content: center;
    padding: 6px 10px;
    border: 0;
    background: none;
    color: var(--ed-muted, #4a5b73);
    font-size: .9rem;
    font-weight: 700;
}
.lang-btn .fa-language { font-size: 1.15rem; }
.lang-btn .lang-code { font-size: var(--fs-xs); letter-spacing: .02em; }
.public-navbar .lang-btn { border: 1px solid var(--bs-border-color, #dee2e6); border-radius: 10px; min-height: 40px; }

/* ── U-05 · the focus is always visible on the controls of the top bar ── */
.btn-toggle:focus-visible,
.btn-icon:focus-visible,
.user-profile-btn:focus-visible,
.lang-btn:focus-visible,
.sidebar-close-btn:focus-visible,
.footer-link-btn:focus-visible,
.auth-input-toggle:focus-visible {
    outline: 3px solid #a9c3f5;
    outline-offset: 2px;
}

/* ── U-14 · a footer entry that is a button looks like its neighbours' links ── */
.footer-link-btn {
    border: 0;
    background: none;
    padding: 0;
    font: inherit;
    color: var(--ed-muted, #637289);
    cursor: pointer;
}
.footer-link-btn:hover { color: var(--primary-color, #3d6fd9); }
.footer-link-btn[hidden], .footer-help-sep[hidden] { display: none; }

.notification-footer .notification-markall {
    border: 0;
    background: none;
    font: inherit;
    font-weight: 600;
    font-size: .875rem;
    color: var(--primary-color, #3d6fd9);
    padding: .5rem 1rem;
    min-height: 40px;
    cursor: pointer;
}
.notification-footer .notification-markall:hover { color: var(--primary-dark, #2f5bbf); }

/* ── U-22 · login: show / hide the password, and the note when there is no SMS ── */
.auth-input-toggle {
    flex: 0 0 auto;
    width: var(--tap);
    border: 0;
    background: transparent;
    color: var(--pub-gray-400, #8e9bb0);
    cursor: pointer;
}
.auth-input-toggle:hover { color: var(--pub-primary, #2f5bbf); }
.auth-forgot-note { font-size: var(--fs-sm); line-height: 1.9; }

/* ── U-23 · a person who asked their system for less motion gets none ──────
   (only five of the style sheets said so). Bars still fill and panels still
   open; they just do it at once. */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
}

/* the version label in the footers is text too: not under 12px */
.version-badge { font-size: max(.7rem, 12px); }
