/* Project-specific tweaks layered on top of the NLNG design system.
   Keep this file small — shared tokens/components live in nlng-design-system.css. */

html { position: relative; min-height: 100%; }

/* Focus visibility for keyboard users (WCAG 2.2 – 2.4.7 / 2.4.11). */
:focus-visible { outline: 2px solid var(--nlng-navy); outline-offset: 2px; }

/* Validation styling to match the brand. */
.field-validation-error { color: var(--danger); font-size: .82rem; }
.input-validation-error { border-color: var(--danger) !important; }
.validation-summary-errors ul { margin-bottom: 0; }

/* A validation summary with nothing to say must not draw a box.
   asp-validation-summary always emits its div — and an empty <ul><li></li></ul>
   inside it — so `:empty` never matches and the "alert alert-danger" styling
   renders as a solid red bar on a form that has no errors. The framework's own
   validation-summary-valid class is the reliable hook, and it is already the one
   the rule above is written against.

   Seven views reach for a "d-none-empty" class to get this behaviour and that
   class is defined nowhere, so it has never worked; the ones that look fine are
   the ones inside modals nobody opens on a clean form. */
.validation-summary-valid { display: none; }

/* ===== SPA boost — top loading bar (partial-navigation progress) ===== */
.pams-progress {
    position: fixed; top: 0; left: 0; height: 3px; width: 0;
    background: linear-gradient(90deg, var(--nlng-green), var(--nlng-lime), var(--nlng-sky));
    box-shadow: 0 0 8px rgba(21, 154, 67, .55);
    z-index: 2000; opacity: 0;
    transition: width .2s ease, opacity .25s ease;
}
.pams-progress.active { opacity: 1; }

/* Subtle "content is updating" affordance during a boosted swap. */
.app-content.pams-busy { opacity: .6; transition: opacity .15s ease; }

/* Draggable modals: disable free positioning on small screens (revert to centered/native). */
@media (max-width: 575.98px) {
    .modal-dialog { position: static !important; left: auto !important; top: auto !important; margin: .5rem auto !important; }
}
@media (prefers-reduced-motion: reduce) {
    .pams-progress { transition: opacity .01s; }
}

/* ===== Assessment review — requests visible before the stage that makes them decidable =====
   An Assessor sees a request as soon as the operator raises it, while SSI consent is still
   outstanding. The row has to read as "not yours to action yet" at a glance, so it is tinted and
   de-emphasised rather than merely missing its buttons. The left border carries the meaning for
   anyone who cannot distinguish the tint. */
tr.review-row-pending > td {
    background-color: rgba(255, 193, 7, .06);
    color: var(--bs-secondary-color, #6c757d);
}
tr.review-row-pending > td:first-child {
    box-shadow: inset 3px 0 0 0 rgba(255, 193, 7, .75);
}
tr.review-row-pending .fw-semibold { font-weight: 500 !important; }

@media (forced-colors: active) {
    tr.review-row-pending > td:first-child { box-shadow: none; border-left: 3px solid CanvasText; }
}
