﻿/*@import url("https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");
    */


 /*In case you need to change the background color, make sure to also update ThemeColors.cs's PrimaryDarkBgColor accordingly.*/

/* Brand identity 2026-09: Montserrat (titles, buttons, nav, labels) + Open Sans (text) +
   JetBrains Mono (identifiers), all self-hosted. Their @font-face rules are in App.razor's <head>,
   not @import-ed here: an @import is fetched only after this file and holds the first paint for
   another round trip.
   JetBrains Mono: --cx-mono has always NAMED it first, but the file was never shipped, so every
   mono identifier silently rendered in the Consolas fallback. Four static weights
   (400/500/600/700) — the variable release only ships as uncompressed TTF, and per-weight woff2
   loads on demand. */


/*
   Color tokens live in tokens.css (loaded BEFORE this file) — the single source of
   truth for --bit-clr-* overrides and the --app-* scales, currently carrying the
   legacy palette values verbatim. Keep color tokens OUT of app.css. A future dark mode
   belongs in identity.css (a second set of --id-* values), not here.
*/

html {
     /* Root = 16px (browser default). Was 18px — an app-wide bump made long ago to
        compensate small checkbox text; that inflated every rem-based size by 12.5%
        and desynced legacy pages from the px-based design system. The checkbox got
        its own proper sizing instead (Checkbox.razor.css). Do NOT re-inflate here —
        per-view adjustments belong in the views, ideally via the --app-font-* scale. */
     font-size: 16px;
}

:root,
:root[bit-theme="light"] {
    font-family: var(--cx-font);
    font-feature-settings: 'liga' 1, 'calt' 1; /* fix for Chrome */

}

:root {
    --app-inset-top: env(safe-area-inset-top);
    --app-inset-left: env(safe-area-inset-left);
    --app-inset-right: env(safe-area-inset-right);
    --app-inset-bottom: env(safe-area-inset-bottom);
    /*-- --app-width-vw: calc(100vw - var(--app-inset-left) - var(--app-inset-right));*/
    --app-height-vh: calc(100vh - var(--app-inset-top) - var(--app-inset-bottom));
    --app-width-per: calc(100% - var(--app-inset-left) - var(--app-inset-right));
    --app-height-per: calc(100% - var(--app-inset-top) - var(--app-inset-bottom));
    --app-width: calc(var(--win-width) - var(--app-inset-left) - var(--app-inset-right));
    --app-height: calc(var(--win-height) - var(--app-inset-top) - var(--app-inset-bottom));
    --app-header-height: 56px; /* design handoff: white shell header */ 
    /*-- --app-inset-inline-start: var(--app-inset-left);*/
    --app-inset-inline-end: var(--app-inset-right);

    --c-gray-900: #000000;
    --c-gray-800: #1f1f1f;
    --c-gray-700: #2e2e2e;
    --c-gray-600: #313131;
    --c-gray-500: #969593;
    --c-gray-400: #a6a6a6;
    --c-gray-300: #bdbbb7;
    --c-gray-200: #f1f1f1;
    --c-gray-100: #ffffff;
    --c-green-500: #45ffbc;
    --c-olive-500: #e3ffa8;
    --c-white: var(--c-gray-100);
    --c-text-primary: var(--c-gray-100);
    --c-text-secondary: var(--c-gray-200);
    --c-text-tertiary: var(--c-gray-500);

    --mix-color: white;
}

* {
    box-sizing: border-box;
    /*font-family: "Segoe UI";*/
    font-family: var(--cx-font);
    -webkit-text-size-adjust: none;
    -webkit-font-smoothing: antialiased;
    -webkit-tap-highlight-color: transparent;
}

*,
*:before,
*:after {
    box-sizing: border-box;
}

*,
*:before,
*:after {
    box-sizing: border-box;
}

html, body, #app-container {
    margin: 0;
    padding: 0;
    height: 100%;
    /*
    width: 100%;
    overflow: auto;
    scroll-behavior: smooth;
    */
}

body {
    background-color: var(--bit-clr-bg-sec);
    color: var(--bit-clr-fg-pri);
    line-height: 1.5;
    min-height: 100vh;
    font-family: var(--cx-font);
    /*
    background-color: var(--c-gray-900);
    color: var(--c-text-primary);
    padding-top: 3vw;
    padding-bottom: 3vw;
    */
    display: flex;
    justify-content: center;
}

img {
    display: block;
    max-width: 100%;
}

button,
select,
input,
textarea {
    font: inherit;
}

a {
    color: inherit;
}


img {
    display: block;
    max-width: 100%;
}

h1, h2, h3, h4, h5 {
    margin: 0;
}

p {
    margin: 0;
}

.max-width {
    width: min(25rem, 100%);
}

.modal {
    width: var(--app-width);
    height: var(--app-height);
    top: var(--app-inset-top);
    left: var(--app-inset-left);
    right: var(--app-inset-right);
    bottom: var(--app-inset-bottom);
}

/* DEFAULT GRID TABLE FORMAT */

.grid {
    border: 1px solid var(--bit-clr-brd-dis);
    border-radius: 0.5rem;
}

    .grid .grid-container {
        overflow: auto;
    }

    .grid .flag {
        vertical-align: middle;
    }

    .grid table {
        width: 100%;
        border-spacing: 0;
    }

    .grid tr {
        height: 42px;
    }

    .grid th {
        padding: .5rem;
        display: table-cell;
        vertical-align: inherit;
        border-bottom: 1px solid;
        background-color: var(--bit-clr-bg-sec);
        border-bottom-color: var(--bit-clr-brd-dis);
    }

    .grid .col-options-button {
        cursor: pointer;
        background-image: none;
    }

        .grid .col-options-button:before {
            top: 2px;
            color: #7A7A7C;
            content: "\E721";
            position: relative;
            font-style: normal;
            font-weight: normal;
            display: inline-block;
            font-family: 'Fabric MDL2';
        }

    .grid .col-width-draghandle {
        width: 3px;
        cursor: col-resize;
    }

        .grid .col-width-draghandle:active {
            background: unset;
        }

        .grid .col-width-draghandle:after {
            left: 3px;
            border-left: unset;
        }

        .grid .col-width-draghandle:hover {
            background: unset;
        }

    .grid .column--large {
        width: 220px;
    }

    .grid th:not(.col-sort-asc):not(.col-sort-desc) .sort-indicator:before {
        top: -2px;
        color: #7A7A7C;
        content: "\21C5";
        position: relative;
        font-style: normal;
        font-weight: normal;
        display: inline-block;
        font-family: 'Fabric MDL2';
    }

    .grid tr:nth-child(even) {
        background: var(--bit-clr-bg-pri);
    }

    .grid tr:nth-child(odd) {
        background: var(--bit-clr-bg-pri);
    }

    .grid tr:last-child > td {
        border-bottom: none;
    }

    .grid td {
        overflow: hidden;
        white-space: nowrap;
        padding: 0.25rem 0.5rem;
        text-overflow: ellipsis;
        border-bottom: 1px solid var(--bit-clr-brd-dis);
    }

    .grid .sort-indicator {
        margin-left: auto;
    }

    .grid .col-width-draghandle:after {
        border-left: unset;
    }

    .grid .col-header-content {
        padding-right: 0px;
    }

    .grid .bitdatagrid .col-title {
        font-weight: 500;
    }

    .grid .bitdatagrid-paginator {
        margin-top: 0;
        padding: 0.5rem;
        border-top: 1px solid var(--bit-clr-bg-dis);
    }

        .grid .bitdatagrid-paginator .pagination-text {
            padding-top: 3px;
        }

        .grid .bitdatagrid-paginator nav button {
            border-radius: 0.25rem;
        }

            .grid .bitdatagrid-paginator nav button:before {
                vertical-align: middle;
            }

/* END - DEFAULT GRID TABLE FORMAT */

/* TABLE */

table {
    min-width: 100%;
    border-collapse: collapse;
}

.table-header-cell {
    padding: 0.75rem 1.5rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}


th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 500;
    color: var(--bit-clr-fg-sec);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--bit-clr-bg-sec);
    border-bottom: 1px solid var(--bit-clr-brd-sec);
    white-space: nowrap;
    cursor: pointer;
    font-size: 0.7rem;
}

.sort-header {
    display: flex;
    align-items: center;
}

.sort-icon {
    margin-left: 4px;
    display: inline-flex;
}

td {
    padding: 12px 16px;
    color: var(--bit-clr-fg-pri);
    border-bottom: 1px solid var(--bit-clr-brd-sec);
    white-space: nowrap;
    font-size: 0.68rem;
}

tr:hover {
    background-color: #f9fafb;
}

/* END TABLE*/

h1:focus {
    outline: none;
}

.card {
    background-color: var(--bit-clr-bg-pri);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--bit-clr-brd-pri);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.content-card {
    background-color: var(--bit-clr-bg-pri);
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
}

/* Useful container class for page content */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
}

/* Native buttons draw no border unless a class gives them one. Keyboard users still need to see
   where they are, so focus shows a ring unless the button's own class draws one. */
button {
    border: none;
    outline: none;
}

button:focus-visible {
    outline: var(--cx-ring-w) solid var(--cx-pri);
    outline-offset: 2px;
}


.validation-message {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    color: var(--cx-red);
    line-height: 1.4;
}

/** FORMS — the canonical shared-control anatomy (single source of truth).
    All shared inputs (TextField, NumberField, DateField, PhoneInput, Select's
    closed box) render `.form-input`; this block IS their skin. Page css may
    adjust (a width, a mono font) but must NOT re-declare this anatomy.
    Metrics live in the --cx-ctl-* tokens (courts-admin.css): 32px / 6px radius /
    9px pad / 13px, no resting shadow — a density variant re-scopes the tokens. */
.form-label {
    display: flex;
    align-items: baseline;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--cx-text);
    line-height: 1.3;
    margin-bottom: 6px;
}

.form-input {
    width: 100%;
    height: var(--cx-ctl-h);
    box-sizing: border-box;
    border: var(--cx-input-bw, 1px) solid var(--cx-input-border);
    border-radius: var(--cx-ctl-r);
    background: var(--cx-panel);
    box-shadow: var(--cx-input-edge, none);
    padding: 0 var(--cx-ctl-px);
    font-size: var(--cx-ctl-fs);
    font-family: inherit;
    color: var(--cx-text);
    transition: border-color .1s, box-shadow .1s, background .1s;
    appearance: none;
    outline: none;
}

    .form-input::placeholder {
        color: var(--cx-placeholder, var(--cx-subtle)); /* ink I3: placeholders are read */
    }

    .form-input:hover:not(:disabled):not(.disabled):not(:focus):not(.invalid) {
        border-color: var(--cx-input-border-strong);
    }

    /* :focus-visible: real text inputs always match it when focused; the Select
       closed box (a tabindex div) only rings on keyboard focus — intended. */
    .form-input:focus-visible {
        border-color: var(--cx-pri);
        box-shadow: var(--cx-input-edge, none), 0 0 0 var(--cx-ring-w) var(--cx-pri-ring);
    }

    .form-input.invalid {
        border-color: var(--cx-red);
        box-shadow: var(--cx-input-edge, none), 0 0 0 var(--cx-ring-w) var(--cx-red-ring);
    }

    /* .disabled = class-based twin for non-form elements (Select's closed box) */
    .form-input:disabled,
    .form-input.disabled {
        background: var(--cx-disabled-bg);
        border-color: var(--cx-disabled-border);
        color: var(--cx-faint);
        box-shadow: none;
        cursor: not-allowed;
    }

    /* code-like values: case numbers, amounts, zips */
    .form-input.mono {
        font-family: var(--cx-mono);
        font-size: calc(var(--cx-ctl-fs) - .5px);
        letter-spacing: .01em;
    }

/* multiline keeps the skin but grows */
textarea.form-input {
    height: auto;
    min-height: 60px;
    padding: 6px var(--cx-ctl-px);
    resize: vertical;
    line-height: 1.5;
}

span.required {
    color: var(--cx-red);
    padding-left: 2px;
}


.form-hint, .hint {
    display: block;
    margin-top: 4px;
    font-size: 11px;
    line-height: 1.4;
    color: var(--cx-subtle);
}

/* Radio input styles */
.radio-input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--bit-clr-pri);
    background-color: var(--bit-clr-bg-pri);
    border: 1px solid #d1d5db;
}

input[type="radio"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--bit-clr-pri);
    background-color: var(--bit-clr-bg-pri);
    border: 1px solid #d1d5db;
}


    input[type="radio"]:focus {
        outline: 2px solid var(--bit-clr-pri);
        outline-offset: 2px;
    }


/** MODAL X */
.close-button {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
}

.table-container {
    overflow-x: auto;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-row > * {
    flex: 1 0 300px;
}

.modal-normal-container {
    max-height: 90vh;
    overflow-y: auto;
    margin-bottom: 0;
    max-width: 90vw;
}

/* Pages can opt out of MainLayout's .main-content padding by adding `full-bleed`
   to their root element. Lives in global CSS (not MainLayout's scoped CSS) so the
   :has() argument can match the unscoped page descendant. */
.main-content:has(.full-bleed) {
    padding: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-content:has(.full-bleed) > .full-bleed {
    flex: 1 0 auto;
}

/* the chain above only fills when .app-content lays its child out as a column */
.app-content:has(.full-bleed) {
    display: flex;
    flex-direction: column;
}

/* ── Browser-side show/hide (window.clientToggles, js/shell.js) ────────────────
   Parts of a data-toggle group and data-menu panels are shown and hidden with the
   `hidden` attribute. The browser's own [hidden] rule loses to any component that
   sets display (.btn, flex menus), so it is made to win here. A part marked
   data-print still prints while closed: the printed page is the whole record. */
[hidden] {
    display: none !important;
}

@media print {
    [data-toggle-part][data-print][hidden] {
        display: block !important;
    }
}
