/* ══════════════════════════════════════════════════════════════════════
   TimeClock — Custom Styles
   Touch-optimized for Chromebooks and touch screen displays
   ══════════════════════════════════════════════════════════════════════ */

/* ── Kiosk Mode ──────────────────────────────────────────────────── */
.kiosk-mode {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.kiosk-container {
    padding: 1rem;
    padding-top: 3.5rem;
    /* room for the top-right login button */
}

/* ── PIN Card ────────────────────────────────────────────────────── */
.pin-card {
    max-width: 380px;
    width: 100%;
    border-radius: 20px;
    border: none;
}

.pin-field {
    font-size: 2rem;
    letter-spacing: 0.5rem;
    height: 60px;
    border-radius: 12px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
}

.pin-field:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* ── Number Pad ──────────────────────────────────────────────────── */
.numpad {
    max-width: 320px;
}

.numpad-btn {
    font-size: 1.5rem;
    font-weight: 600;
    height: 70px;
    border-radius: 12px;
    border-width: 2px;
    transition: all 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.numpad-btn:active {
    transform: scale(0.95);
    background-color: #212529;
    color: white;
}

.numpad-action {
    font-size: 1.5rem;
    font-weight: 600;
    height: 70px;
    border-radius: 12px;
    border-width: 2px;
    transition: all 0.1s ease;
    -webkit-tap-highlight-color: transparent;
}

.numpad-action:active {
    transform: scale(0.95);
}

/* ── Status Alert ────────────────────────────────────────────────── */
.status-alert {
    max-width: 380px;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 500;
    border-radius: 12px;
}

/* ── Clock Display ───────────────────────────────────────────────── */
#live-clock {
    font-size: 3.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

#live-date {
    font-size: 1.2rem;
}

/* ── Admin Tables ────────────────────────────────────────────────── */
.table th {
    white-space: nowrap;
}

/* ── Cards ───────────────────────────────────────────────────────── */
.card {
    border-radius: 12px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
}

/* ── Touch-friendly buttons ──────────────────────────────────────── */
.btn-lg {
    padding: 0.75rem 1.5rem;
}

/* ── Responsive Adjustments ──────────────────────────────────────── */

/* Extra-small phones (≤ 375px) */
@media (max-width: 375px) {
    .kiosk-container {
        padding: 0.5rem;
        padding-top: 3rem;
    }

    #live-clock {
        font-size: 2rem;
    }

    #live-date {
        font-size: 0.95rem;
    }

    .pin-card {
        max-width: 100%;
        border-radius: 14px;
    }

    .pin-card .card-body {
        padding: 0.75rem !important;
    }

    .pin-card h2 {
        font-size: 1.15rem;
    }

    .pin-field {
        font-size: 1.4rem;
        height: 46px;
        letter-spacing: 0.3rem;
    }

    .numpad {
        max-width: 260px;
    }

    .numpad-btn,
    .numpad-action {
        height: 52px;
        font-size: 1.15rem;
        border-radius: 10px;
    }

    .status-alert {
        max-width: 100%;
        font-size: 0.95rem;
    }

    .employee-login-btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.65rem;
    }
}

/* Small phones (376px–576px) */
@media (min-width: 376px) and (max-width: 576px) {
    #live-clock {
        font-size: 2.5rem;
    }

    .pin-card {
        max-width: 340px;
    }

    .numpad-btn,
    .numpad-action {
        height: 60px;
        font-size: 1.3rem;
    }
}

/* Tablets / medium (577px–991px) — default styles already cover this */

/* Large screens (≥ 992px) */
@media (min-width: 992px) {
    .kiosk-container {
        padding-top: 2rem;
    }

    #live-clock {
        font-size: 5rem;
    }

    #live-date {
        font-size: 1.5rem;
    }

    .numpad-btn,
    .numpad-action {
        height: 80px;
        font-size: 1.8rem;
    }

    .pin-field {
        font-size: 2.5rem;
        height: 70px;
    }

    .pin-card {
        max-width: 440px;
    }

    .status-alert {
        max-width: 440px;
        font-size: 1.3rem;
    }

    .employee-login-btn {
        font-size: 0.95rem;
        padding: 0.4rem 1.25rem;
    }
}

/* Extra-large / kiosk displays (≥ 1400px) */
@media (min-width: 1400px) {
    #live-clock {
        font-size: 6rem;
    }

    #live-date {
        font-size: 1.75rem;
    }

    .pin-card {
        max-width: 500px;
    }

    .numpad {
        max-width: 400px;
    }

    .numpad-btn,
    .numpad-action {
        height: 90px;
        font-size: 2rem;
    }

    .pin-field {
        font-size: 2.8rem;
        height: 80px;
    }

    .status-alert {
        max-width: 500px;
        font-size: 1.4rem;
    }
}

/* Landscape phones — shrink vertical spacing */
@media (max-height: 500px) and (orientation: landscape) {
    .kiosk-container {
        padding-top: 2.5rem;
    }

    #live-clock {
        font-size: 2rem;
        margin-bottom: 0.25rem !important;
    }

    #live-date {
        font-size: 0.95rem;
        margin-bottom: 0.25rem !important;
    }

    .pin-card .card-body {
        padding: 0.5rem !important;
    }

    .pin-card h2 {
        font-size: 1rem;
        margin-bottom: 0.3rem !important;
    }

    .pin-field {
        height: 38px;
        font-size: 1.2rem;
        margin-bottom: 0.3rem !important;
    }

    .numpad-btn,
    .numpad-action {
        height: 44px;
        font-size: 1.1rem;
    }

    .numpad .row.g-2 {
        --bs-gutter-y: 0.15rem;
    }
}

/* ── Live Dashboard ──────────────────────────────────────────────── */
.pulse-badge {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.summary-card {
    border-radius: 16px;
    transition: transform 0.2s;
}

.summary-card:hover {
    transform: translateY(-2px);
}

.summary-card .display-3 {
    font-size: 3.5rem;
    line-height: 1.2;
}

/* ── Fullscreen kiosk hint ───────────────────────────────────────── */
.kiosk-mode:-webkit-full-screen {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}

/* ── Employee Login Button (Kiosk — top-right) ─────────────────── */
.employee-login-btn {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    opacity: 0.55;
    transition: opacity 0.2s;
    font-size: 0.85rem;
    border-radius: 20px;
    padding: 0.35rem 1rem;
    z-index: 10;
}

.employee-login-btn:hover,
.employee-login-btn:focus {
    opacity: 1;
}
