/* MitWare device lock (mw-dl-*) — the PIN screen on a fleet tablet.
   Full-bleed overlay: while it is up, nothing underneath is reachable or even visible. */

.mw-dl-overlay {
    position: fixed;
    inset: 0;
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mud-palette-background, #1e1e2d);
    /* NOTE: Opaque on purpose — a translucent lock screen leaks whatever the last person was doing. */
    backdrop-filter: none;
}

.mw-dl-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    width: min(28rem, 90vw);
    padding: 2rem 1.75rem;
    border-radius: 1.25rem;
    background: var(--mud-palette-surface, #26263a);
    box-shadow: 0 1.5rem 3rem rgba(0, 0, 0, .45);
}

.mw-dl-brand {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: .02em;
    color: var(--mud-palette-primary, #7c6cf0);
}

.mw-dl-device {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--mud-palette-text-disabled, #8b8ba7);
}

.mw-dl-prompt {
    font-size: 1.15rem;
    font-weight: 500;
    text-align: center;
    color: var(--mud-palette-text-primary, #eceff4);
}

.mw-dl-search {
    width: 100%;
}

.mw-dl-pin-dots {
    display: flex;
    gap: .75rem;
    min-height: 1.25rem;
}

.mw-dl-pin-dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: 2px solid var(--mud-palette-text-disabled, #8b8ba7);
    transition: background-color .12s ease, border-color .12s ease;
}

.mw-dl-pin-dot-filled {
    background: var(--mud-palette-primary, #7c6cf0);
    border-color: var(--mud-palette-primary, #7c6cf0);
}

.mw-dl-error {
    font-size: .9rem;
    text-align: center;
    color: var(--mud-palette-error, #f5657f);
}

.mw-dl-keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: .75rem;
    width: 100%;
}

.mw-dl-key {
    /* NOTE: Deliberately large — this is typed with a thumb, in the dark, wearing gloves. */
    min-height: 3.75rem;
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary, #eceff4);
    background: var(--mud-palette-background-gray, #33334d);
    border: none;
    border-radius: .75rem;
    cursor: pointer;
    transition: background-color .1s ease, transform .05s ease;
}

.mw-dl-key:active:not(:disabled) {
    transform: scale(.96);
    background: var(--mud-palette-primary, #7c6cf0);
}

.mw-dl-key:disabled {
    opacity: .45;
    cursor: default;
}

.mw-dl-key-muted {
    font-size: .95rem;
    color: var(--mud-palette-text-secondary, #b6b6cc);
}

.mw-dl-submit {
    margin-top: .25rem;
}

/* Empty cell that keeps 0 and ← in the last keypad row aligned under 8 and 9. */
.mw-dl-key-spacer {
    visibility: hidden;
}

/* The "not you?" escape — deliberately quiet: a small text link, not a button, off to the side. */
.mw-dl-not-you {
    margin-top: .5rem;
    padding: .25rem .5rem;
    background: none;
    border: none;
    font-size: .8rem;
    color: var(--mud-palette-text-disabled, #8b8ba7);
    text-decoration: underline;
    cursor: pointer;
}

.mw-dl-not-you:hover {
    color: var(--mud-palette-text-secondary, #b6b6cc);
}

.mw-dl-pairing-code {
    /* NOTE: Read out loud across a room, or typed on a tablet from across a desk. */
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: .35em;
    font-variant-numeric: tabular-nums;
}

.mw-dl-revealed-pin {
    font-size: 1.5rem;
    letter-spacing: .25em;
    font-variant-numeric: tabular-nums;
}

.mw-dl-chosen-pin {
    max-width: 14rem;
}

/* NOTE: Roster + pending-codes on the admin page (/admin/device-lock) — this is the normal
   MudBlazor app surface, NOT the dark PIN overlay above. Colours come from the Mud palette so
   the roster follows the app's light/dark theme. */
.mw-dl-roster {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.mw-dl-device-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .25rem;
    border-bottom: 1px solid var(--mud-palette-divider, rgba(0, 0, 0, .1));
}

.mw-dl-device-row:last-child {
    border-bottom: none;
}

.mw-dl-device-icon {
    flex: 0 0 auto;
}

.mw-dl-device-main {
    flex: 1 1 auto;
    min-width: 0;
}

.mw-dl-device-label {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.mw-dl-online-dot {
    display: inline-block;
    width: .6rem;
    height: .6rem;
    border-radius: 50%;
    flex: 0 0 auto;
}

.mw-dl-online {
    background: var(--mud-palette-success, #2e7d32);
    box-shadow: 0 0 .35rem var(--mud-palette-success, #2e7d32);
}

.mw-dl-offline {
    background: var(--mud-palette-text-disabled, #9e9e9e);
}

.mw-dl-device-actions {
    flex: 0 0 auto;
    display: flex;
    gap: .1rem;
}

.mw-dl-roster-revoked {
    opacity: .55;
}

.mw-dl-rename-field {
    max-width: 18rem;
}

.mw-dl-pending-list {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.mw-dl-pending-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .4rem .5rem;
    border-radius: .4rem;
    border: 1px solid var(--mud-palette-divider, rgba(0, 0, 0, .1));
}

.mw-dl-pending-row-new {
    border-color: var(--mud-palette-info, #2196f3);
    background: var(--mud-palette-info-hover, rgba(33, 150, 243, .08));
}

.mw-dl-pending-main {
    flex: 1 1 auto;
    min-width: 0;
}

.mw-dl-pending-code {
    /* Smaller than the hero pairing code — it sits in a compact list row. */
    font-size: 1.4rem;
    letter-spacing: .25em;
    flex: 0 0 auto;
}
