/* ============================================================
   QR DISPLAY PAGE STYLES
   Page-specific CSS for the QR display kiosk section.
   Use tokens from tokens.css and classes from components.css.
   ============================================================ */

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
}

.qr-kiosk {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    background: #0f0f0f;
    color: #ffffff;
    font-family: Inter, 'Segoe UI', sans-serif;
    padding: 2rem;
    box-sizing: border-box;
    position: relative;
}

.qr-error-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.85);
    margin: 0;
}

.qr-error-sub {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
    text-align: center;
}

.qr-loading,
.qr-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.qr-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.15);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.qr-retry-btn {
    margin-top: 0.5rem;
    padding: 0.6rem 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    background: transparent;
    color: #ffffff;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease;
}

.qr-retry-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.qr-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    max-width: 420px;
    width: 100%;
}

.qr-location-name {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
    font-weight: 700;
    text-align: center;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.qr-subtitle {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-weight: 500;
}

.qr-code-wrapper {
    background: #ffffff;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 0 60px rgba(255, 255, 255, 0.08);
}

.qr-canvas {
    display: block;
    line-height: 0;
}

.qr-countdown {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
    font-variant-numeric: tabular-nums;
    font-weight: 500;
}

.qr-progress-bar {
    width: 100%;
    max-width: 320px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.qr-progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
    transition: width 1s linear;
}

/* Manual lock button */
.qr-lock-btn {
    position: fixed;
    top: 1.25rem;
    right: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.15s ease;
}

.qr-lock-btn:hover {
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.8);
    border-color: rgba(255, 255, 255, 0.3);
}

/* PIN screen */
.qr-pin-screen {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.qr-pin-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    max-width: 360px;
    width: 100%;
}

.qr-pin-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.7);
}

.qr-pin-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.02em;
}

.qr-pin-subtitle {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    text-align: center;
    line-height: 1.5;
}

.qr-pin-error {
    font-size: 0.82rem;
    color: #f87171;
    margin: 0;
    text-align: center;
}

.qr-pin-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.07);
    color: #ffffff;
    font-size: 1.2rem;
    font-family: inherit;
    letter-spacing: 0.2em;
    text-align: center;
    outline: none;
    transition: border-color 0.15s ease;
}

.qr-pin-input:focus {
    border-color: rgba(255, 255, 255, 0.45);
}

.qr-pin-input::placeholder {
    letter-spacing: normal;
    color: rgba(255, 255, 255, 0.25);
    font-size: 0.9rem;
}

.qr-pin-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: none;
    background: #ffffff;
    color: #0f0f0f;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

.qr-pin-btn:hover:not(:disabled) {
    opacity: 0.88;
}

.qr-pin-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ── Names on the kiosk (run 29): who just checked in, for about 5 seconds ── */
.qr-names {
    position: fixed;
    left: 50%;
    bottom: 2rem;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    pointer-events: none;
}

.qr-name-line {
    padding: 0.75rem 1.5rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.95);
    color: #111827;
    font-size: 1.35rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
