/* ── Possible Gym – Self-Service Kiosk ─────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F7F5F2;
    color: #1A1A1A;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
}

/* ── Layout ────────────────────────────────────────────────────────────────── */

#kiosk-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 40px 32px;
    transition: opacity 0.3s ease;
}

.kiosk-scanner-input {
    position: fixed;
    left: -9999px;
    top: 0;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* ── Screens ───────────────────────────────────────────────────────────────── */

.kiosk-screen {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 680px;
    text-align: center;
    animation: fadeIn 0.3s ease;
}

.kiosk-screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ── Idle screen ───────────────────────────────────────────────────────────── */

.kiosk-logo {
    display: block;
    height: 36px;
    width: auto;
    margin-bottom: 48px;
}

.kiosk-idle-icon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, #E8560A 0%, #c44508 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 36px;
    box-shadow: 0 12px 40px rgba(232, 86, 10, 0.35);
    animation: pulse 2.8s ease-in-out infinite;
}

.kiosk-idle-icon i {
    font-size: 52px;
    color: #fff;
}

@keyframes pulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 12px 40px rgba(232, 86, 10, 0.35); }
    50%       { transform: scale(1.05); box-shadow: 0 16px 52px rgba(232, 86, 10, 0.50); }
}

.kiosk-idle-title {
    font-size: 34px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.2;
}

.kiosk-idle-sub {
    font-size: 18px;
    color: #5A5A5A;
    margin: 0;
}

/* ── Welcome screen ─────────────────────────────────────────────────────────── */

.kiosk-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #E8560A;
    margin-bottom: 20px;
}

.kiosk-welcome-name {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px;
}

.kiosk-welcome-sub {
    font-size: 17px;
    color: #5A5A5A;
    margin: 0 0 36px;
}

/* ── Member header (shown on options + confirm screens) ─────────────────────── */

.kiosk-member-header {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    margin-bottom: 28px;
}

.kiosk-header-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #E8560A;
    flex-shrink: 0;
}

.kiosk-header-name {
    font-size: 22px;
    font-weight: 700;
    color: #1A1A1A;
}

/* ── Booking detail ──────────────────────────────────────────────────────────── */

.kiosk-booking-list {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.kiosk-booking-row {
    background: #fff;
    border: 1px solid rgba(26, 26, 26, 0.10);
    border-radius: 14px;
    padding: 18px 24px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
}

.kiosk-booking-resource {
    font-size: 16px;
    font-weight: 600;
    color: #1A1A1A;
    flex: 1;
}

.kiosk-booking-time {
    font-size: 15px;
    color: #E8560A;
    font-weight: 600;
    white-space: nowrap;
}

.kiosk-booking-state {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 3px 8px;
    border-radius: 6px;
    white-space: nowrap;
}

.kiosk-state-confirmed { background: rgba(45, 138, 78, 0.12); color: #2D8A4E; }
.kiosk-state-paid      { background: rgba(45, 138, 78, 0.12); color: #2D8A4E; }
.kiosk-state-draft     { background: rgba(184, 122, 13, 0.12); color: #B87A0D; }

.kiosk-booking-empty {
    font-size: 16px;
    color: #5A5A5A;
    margin: 24px 0;
}

/* ── Options grid ───────────────────────────────────────────────────────────── */

.kiosk-options-title {
    font-size: 22px;
    font-weight: 600;
    margin: 0 0 28px;
}

.kiosk-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 18px;
    width: 100%;
}

.kiosk-tile {
    background: #fff;
    border: 1px solid rgba(26, 26, 26, 0.10);
    border-radius: 20px;
    padding: 28px 20px;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.kiosk-tile:active {
    transform: scale(0.96);
    box-shadow: 0 2px 10px rgba(26, 26, 26, 0.08);
}

.kiosk-tile:hover {
    box-shadow: 0 8px 28px rgba(26, 26, 26, 0.10);
    transform: translateY(-2px);
}

.kiosk-tile-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.kiosk-tile-icon i {
    font-size: 28px;
    color: #fff;
}

.kiosk-tile-label {
    font-size: 15px;
    font-weight: 600;
    color: #1A1A1A;
    margin-bottom: 4px;
}

.kiosk-tile-sub {
    font-size: 12px;
    color: #5A5A5A;
    line-height: 1.4;
}

.kiosk-tile-full {
    opacity: 0.55;
    cursor: not-allowed;
}

.kiosk-tile-full:hover,
.kiosk-tile-full:active {
    transform: none;
    box-shadow: none;
}

.kiosk-capacity-badge {
    display: inline-block;
    margin-top: 8px;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(45, 138, 78, 0.12);
    color: #2D8A4E;
    font-size: 11px;
    font-weight: 600;
}

.kiosk-capacity-badge.kiosk-capacity-full {
    background: rgba(192, 57, 43, 0.10);
    color: #C0392B;
}

/* ── Confirmation screen ────────────────────────────────────────────────────── */

.kiosk-confirm-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.kiosk-confirm-icon i {
    font-size: 36px;
    color: #fff;
}

.kiosk-confirm-title {
    font-size: 26px;
    font-weight: 700;
    margin: 0 0 8px;
}

.kiosk-confirm-sub {
    font-size: 16px;
    color: #5A5A5A;
    margin: 0 0 36px;
}

/* ── Result screen ──────────────────────────────────────────────────────────── */

.kiosk-result-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
}

.kiosk-result-icon i {
    font-size: 48px;
    color: #fff;
}

.kiosk-result-icon.success { background: #2D8A4E; }
.kiosk-result-icon.error   { background: #C0392B; }

.kiosk-result-title {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 10px;
}

.kiosk-result-sub {
    font-size: 16px;
    color: #5A5A5A;
    margin: 0 0 20px;
}

.kiosk-reset-bar {
    width: 240px;
    height: 4px;
    background: rgba(26, 26, 26, 0.10);
    border-radius: 2px;
    margin: 0 auto;
    overflow: hidden;
}

.kiosk-reset-bar-inner {
    height: 100%;
    background: #E8560A;
    width: 100%;
    transform-origin: left;
    transition: transform linear;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */

.kiosk-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 32px;
    border: none;
    border-radius: 14px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.12s, opacity 0.12s;
}

.kiosk-btn:active { transform: scale(0.97); opacity: 0.85; }

.kiosk-btn-primary { background: #E8560A; color: #fff; }
.kiosk-btn-ghost   { background: transparent; color: #5A5A5A; font-size: 15px; padding: 10px 20px; }

.kiosk-btn-row {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Progress bar (idle timer) ───────────────────────────────────────────────── */

.kiosk-idle-timer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(26, 26, 26, 0.10);
}

.kiosk-idle-timer-inner {
    height: 100%;
    background: #E8560A;
    width: 0;
    transition: width linear;
}
