/* Kids Mode chrome: nav badge, lock control, and the PIN dialogs (.km- prefix).
   Loaded globally (App.razor / index.html) because the badge lives in the nav shell.
   Dark theme via body.dark-mode, matching the repo convention. */

/* ---- Nav badge ---- */
.km-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    background: #ffd166;
    color: #4a3200;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    user-select: none;
}

.km-badge .bi {
    font-size: 0.85rem;
}

body.dark-mode .km-badge {
    background: #b8860b;
    color: #fff8e7;
}

/* ---- Lock (exit) button ---- */
.km-lock-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font-size: 1.1rem;
}

.km-lock-btn:hover,
.km-lock-btn:focus-visible {
    background: rgba(0, 0, 0, 0.08);
}

body.dark-mode .km-lock-btn:hover,
body.dark-mode .km-lock-btn:focus-visible {
    background: rgba(255, 255, 255, 0.12);
}

/* Bottom-nav variant renders like a nav item, not an icon circle. */
.km-lock-bottom {
    width: auto;
    height: auto;
    border-radius: 0;
    flex-direction: column;
    gap: 0.15rem;
    font-size: inherit;
    background: transparent !important;
}

/* ---- Dialog overlay (plain HTML+CSS house pattern; no Radzen) ---- */
.km-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 18, 30, 0.55);
}

.km-dialog {
    width: 100%;
    max-width: 380px;
    border-radius: 16px;
    background: #ffffff;
    color: #1c2333;
    box-shadow: 0 18px 48px rgba(10, 14, 28, 0.35);
    padding: 1.5rem 1.5rem 1.25rem;
}

body.dark-mode .km-dialog {
    background: #1d2233;
    color: #eef1fa;
}

.km-dialog-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 0.35rem;
    font-size: 1.15rem;
    font-weight: 700;
}

.km-dialog-text {
    margin: 0 0 1rem;
    font-size: 0.9rem;
    opacity: 0.85;
}

.km-field {
    margin-bottom: 0.85rem;
}

.km-field label {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    opacity: 0.8;
}

.km-pin-input,
.km-password-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    border: 1px solid rgba(28, 35, 51, 0.25);
    border-radius: 10px;
    font-size: 1.05rem;
    background: inherit;
    color: inherit;
}

.km-pin-input {
    letter-spacing: 0.6em;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

body.dark-mode .km-pin-input,
body.dark-mode .km-password-input {
    border-color: rgba(238, 241, 250, 0.25);
}

.km-error {
    margin: 0 0 0.75rem;
    font-size: 0.85rem;
    color: #c0392b;
}

body.dark-mode .km-error {
    color: #ff8b7a;
}

.km-switch-link {
    display: inline-block;
    margin-bottom: 0.9rem;
    border: none;
    background: none;
    padding: 0;
    font-size: 0.82rem;
    text-decoration: underline;
    color: inherit;
    opacity: 0.75;
    cursor: pointer;
}

.km-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.6rem;
}

.km-btn {
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
}

.km-btn-primary {
    background: #4f46e5;
    color: #ffffff;
}

.km-btn-primary:disabled {
    opacity: 0.55;
    cursor: default;
}

.km-btn-secondary {
    background: rgba(28, 35, 51, 0.08);
    color: inherit;
}

body.dark-mode .km-btn-secondary {
    background: rgba(238, 241, 250, 0.12);
}

/* ---- Settings card bits (ProfileSettings Kids Mode section) ---- */
.km-settings-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.km-settings-hint {
    margin: 0.5rem 0 0;
    font-size: 0.8rem;
    opacity: 0.7;
}
