/* ============================================================
   port-overrides.css
   Server-rendered glue for the Claude Design port. Replaces the
   React interactivity with plain HTML/CSS so pages work without JS.
   Keep theme.css / auth.css PRISTINE (re-syncable from the design);
   put all port-specific adjustments here.
   ============================================================ */

/* RememberMe: a real <input type=checkbox> styled as the design's
   .checkbox .box. The MVC checkbox tag helper emits a hidden sibling
   input, so use the general-sibling combinator (~), not (+). */
.checkbox input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.checkbox .box svg { opacity: 0; transition: opacity .14s; }
.checkbox input[type="checkbox"]:checked ~ .box { background: var(--accent); border-color: transparent; }
.checkbox input[type="checkbox"]:checked ~ .box svg { opacity: 1; }
.checkbox input[type="checkbox"]:focus-visible ~ .box { box-shadow: 0 0 0 3px var(--accent-softer); }

/* Server-side validation messages (asp-validation-summary / -for) */
.auth-error { color: var(--red); font-size: 13px; line-height: 1.5; }
.auth-error ul { margin: 0; padding-left: 1.1em; }
.validation-summary-valid { display: none; }
.auth-field-error { color: var(--red); font-size: 12px; margin-top: 6px; display: block; }
.field-validation-valid { display: none; }

/* SSO button is a placeholder until external login is wired up */
.auth .btn[disabled] { opacity: .55; cursor: not-allowed; }

/* ---- Admin Console ----
   Segmented tab control. The design toggled these inline in React; here the
   active state is a class so the server can render the default tab and JS
   swaps it. Mirrors the JSX: active = surface-3 bg + primary text. */
.admin-tab { border: none; background: transparent; color: var(--text-3); }
.admin-tab:hover { color: var(--text-2); }
.admin-tab.active { background: var(--surface-3); color: var(--text); }

/* Buttons and row-menu items that are rendered as <a> (links) must not show
   the default anchor underline — e.g. "New firm"/"New tenant" and the
   Edit/Add row-menu options under /Root. */
a.btn, a.btn:hover, a.row-menu-item, a.row-menu-item:hover,
a.user-menu-item, a.user-menu-item:hover { text-decoration: none; }

/* The HTML `hidden` attribute must win even over class-based display rules
   (e.g. .empty-state { display:flex }, otherwise hidden empty-states leak
   through). Applies to admin/root tab panels, row menus and search states. */
[hidden] { display: none !important; }

/* ---- Table pagination (table-paginate.js) ----
   A footer rendered below paged tables: "Showing X–Y of Z" on the left,
   page controls on the right. Styling tracks the design's .btn/.badge tokens. */
.pager {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px var(--pad);
    border-top: 1px solid var(--border);
}
.pager:empty { display: none; }
.pager-info { font-size: 12.5px; color: var(--text-3); }
.pager-info b { color: var(--text-2); font-weight: 600; }
.pager-controls { display: flex; align-items: center; gap: 4px; }
.pager-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-2);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background .14s, color .14s, border-color .14s;
}
.pager-btn:hover:not(:disabled):not(.active) { background: var(--surface-2); color: var(--text); }
.pager-btn.active { background: var(--accent); border-color: transparent; color: #fff; cursor: default; }
.pager-btn:disabled { opacity: .45; cursor: not-allowed; }
.pager-gap { padding: 0 4px; color: var(--text-3); font-size: 12.5px; user-select: none; }

/* Rows-per-page selector label sits inline with the select in the filter bar. */
.pagesize-field { display: flex; align-items: center; gap: 7px; }
.pagesize-field > span { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
