/* tvkeyboard.css — styling for the D-pad on-screen keyboard.
 * Only rendered when html.msx-mode is set (TV / MSX runtime). The whole
 * widget is injected by tvkeyboard.js which no-ops off-TV, so these rules
 * never affect phone/desktop. */

html.msx-mode .login-container {
    /* widen the card so the keyboard fits cleanly under the form */
    width: min(760px, 94vw);
    max-width: 94vw;
}

.tv-keyboard {
    margin-top: 16px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(8, 11, 22, 0.72);
    border: 1px solid rgba(155, 169, 206, 0.18);
    user-select: none;
}

.tvk-row {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 6px;
}
.tvk-row:last-child { margin-bottom: 0; }

.tvk-cell {
    flex: 1 1 0;
    min-width: 0;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.10);
    color: #e8e8f0;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, transform 0.08s;
}

.tvk-key { text-transform: none; }
.tvk-wide { flex: 2 1 0; }
.tvk-chip {
    height: 38px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: rgba(255, 255, 255, 0.045);
    color: #9ba6bf;
}
.tvk-lang { flex: 0 0 64px; }
.tvk-submit {
    background: linear-gradient(135deg, rgba(74, 158, 255, 0.30), rgba(167, 139, 250, 0.22));
    border-color: rgba(106, 180, 255, 0.45);
    color: #fff;
}

/* The currently D-pad-focused cell — bright ring so it's obvious on a TV. */
.tvk-cell.tvk-focus {
    background: linear-gradient(135deg, #4a9eff, #6c5ce7);
    border-color: #cfe4ff;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(238, 202, 123, 0.55), 0 6px 18px rgba(74, 158, 255, 0.40);
    transform: translateY(-1px);
}

/* Active field chip / language chip. */
.tvk-cell.tvk-active-field {
    background: rgba(74, 158, 255, 0.22);
    border-color: rgba(106, 180, 255, 0.55);
    color: #fff;
}

/* Show which input is currently being typed into. */
html.msx-mode .form-group input.tvk-input-active {
    border-color: var(--accent, #4a9eff);
    box-shadow: 0 0 0 3px rgba(74, 158, 255, 0.18);
}

/* On TV we hide the on-screen "Download app" block and the OS keyboard
 * cue — the on-screen keyboard replaces native text entry. */
html.msx-mode .login-download { display: none !important; }
