/**
 * Quorum · utilities: visually hidden text and the module-class visibility helpers of the
 * contract §2.9 (Module Class field: ts-hide-sm, ts-hide-md, ts-hide-lg).
 *
 * @copyright   Copyright (C) 2026 BulaSikku Technologies Private Limited. All rights reserved.
 * @license     GNU General Public License version 2 or later
 */

.ts-sr-only {
    position: absolute !important;
    inline-size: 1px !important;
    block-size: 1px !important;
    margin: -1px !important;
    padding: 0 !important;
    overflow: hidden !important;
    clip-path: inset(50%) !important;
    border: 0 !important;
    white-space: nowrap !important;
}

@media (width < 40rem) {
    .ts-hide-sm {
        display: none !important;
    }
}

@media (width < 48rem) {
    .ts-hide-md {
        display: none !important;
    }
}

@media (min-width: 64rem) {
    .ts-hide-lg {
        display: none !important;
    }
}

/* Forced colours (Windows High Contrast): states drawn with backgrounds or inset shadows are
   repainted by the system, so each keeps a system-colour cue (WCAG 1.4.1, 1.4.11). */
@media (forced-colors: active) {
    .ts-tools__scheme-button[aria-pressed="true"] {
        background-color: Highlight;
        color: HighlightText;
        forced-color-adjust: none;
    }

    .ts-header__nav .mod-menu > li:is(.current, .active) > a,
    .ts-home .ts-header .ts-brand {
        text-decoration: underline;
        text-decoration-thickness: 3px;
        text-underline-offset: 6px;
    }

    .q-bar,
    .q-segments__seg {
        border: 1px solid CanvasText;
    }

    .q-bar__fill,
    .q-segments__seg:is(.q-segments__seg--done, .q-segments__seg--current) {
        background-color: CanvasText;
        forced-color-adjust: none;
    }

    /* Gap-ruled boards draw their hairlines with the grid's background, which the system
       repaints: each cell keeps a 1px system outline (no layout change). */
    .q-board,
    .q-stat,
    .q-day,
    .ts-row[data-ts-row="hero"] > .ts-col {
        outline: 1px solid CanvasText;
    }

    /* Cards, rows, chips, tags and avatar discs set apart only by a fill keep a system edge too
       (the course cards, route rows and map, week chips, thread/agenda/leader rows, the reading
       numeral panel); the avatar outline follows the disc. */
    :is(.q-course, .q-course__panel, .q-route, .q-route__marker, .q-map, .q-chip, .q-tag, .q-thread,
        .q-agenda__item, .q-leader, .ts-postcard__media, .ts-avatar):not(:focus-visible) {
        outline: 1px solid CanvasText;
        outline-offset: -1px;
    }

    .q-day--events .q-day__num {
        text-decoration: underline;
        text-decoration-thickness: 3px;
        text-underline-offset: 4px;
    }
}
