/* ════════════════════════════════════════════════════════════════
   GYMFLOW KIOSK — Full-screen check-in page styles
   Loaded ONLY on the page that uses [gymflow_kiosk] shortcode
   ════════════════════════════════════════════════════════════════ */

/* Hide WP admin bar + any theme chrome so we get a true kiosk */
#wpadminbar,
.site-header,
.site-footer,
.wp-site-blocks > header,
.wp-site-blocks > footer,
header.wp-block-template-part,
footer.wp-block-template-part { display: none !important; }

body,
html {
    margin: 0; padding: 0;
    background: #0a0b0f;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    height: 100%;
}

.entry-content,
.wp-block-post-content,
.page-content,
main,
article,
.site-main { padding: 0 !important; margin: 0 !important; }

/* ── MAIN WRAP ── */
#gfk-wrap,
#gft-wrap {
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 30%, #1a1f35 0%, #0a0b0f 70%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Subtle animated background glow */
#gfk-wrap::before,
#gft-wrap::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(249,115,22,0.08) 0%, transparent 70%);
    top: -100px; left: 50%;
    transform: translateX(-50%);
    animation: gfk-pulse 4s ease-in-out infinite;
    pointer-events: none;
}
@keyframes gfk-pulse {
    0%, 100% { transform: translateX(-50%) scale(1);   opacity: 1; }
    50%       { transform: translateX(-50%) scale(1.15); opacity: 0.6; }
}

/* ── SCREENS ── */
.gfk-screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    opacity: 0;
    transform: scale(0.96);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s ease;
    text-align: center;
}
.gfk-screen--active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

/* ── IDLE SCREEN ── */
.gfk-logo {
    font-size: 56px;
    margin-bottom: 12px;
    filter: drop-shadow(0 0 24px rgba(249,115,22,0.5));
}

.gfk-gym-name {
    font-size: clamp(28px, 5vw, 52px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 20px rgba(0,0,0,0.5);
}

.gfk-tagline {
    font-size: clamp(14px, 2vw, 18px);
    color: rgba(255,255,255,0.45);
    margin: 0 0 40px;
    font-weight: 400;
}

/* ── INPUT ── */
.gfk-input-wrap {
    display: flex;
    gap: 12px;
    width: 100%;
    max-width: 560px;
    margin-bottom: 16px;
}

.gfk-input {
    flex: 1;
    background: rgba(255,255,255,0.07);
    border: 2px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    color: #fff;
    font-size: clamp(18px, 3vw, 26px);
    font-weight: 600;
    padding: 18px 24px;
    outline: none;
    letter-spacing: 1px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    font-family: inherit;
    caret-color: #f97316;
}
.gfk-input::placeholder { color: rgba(255,255,255,0.25); font-weight: 400; font-size: 0.8em; }
.gfk-input:focus {
    border-color: #f97316;
    background: rgba(249,115,22,0.07);
    box-shadow: 0 0 0 4px rgba(249,115,22,0.15);
}

.gfk-btn {
    background: linear-gradient(135deg, #f97316, #ea580c);
    border: none;
    border-radius: 16px;
    color: #fff;
    font-size: clamp(14px, 2vw, 18px);
    font-weight: 800;
    padding: 18px 32px;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 24px rgba(249,115,22,0.4);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}
.gfk-btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(249,115,22,0.5); }
.gfk-btn:active { transform: translateY(0);    box-shadow: 0 2px 12px rgba(249,115,22,0.4); }
.gfk-btn.loading .gfk-btn-text   { opacity: 0; }
.gfk-btn.loading .gfk-btn-spinner { opacity: 1; }

.gfk-btn-spinner {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
}
.gfk-btn-spinner::after {
    content: '';
    width: 22px; height: 22px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: gfk-spin 0.65s linear infinite;
}
@keyframes gfk-spin { to { transform: rotate(360deg); } }

/* ── ERROR ── */
.gfk-error {
    min-height: 24px;
    font-size: clamp(14px, 1.8vw, 17px);
    color: #fca5a5;
    margin-bottom: 8px;
    font-weight: 500;
    transition: opacity 0.2s;
}
.gfk-error:empty { opacity: 0; }

/* ── HINT ── */
.gfk-hint {
    font-size: clamp(12px, 1.5vw, 14px);
    color: rgba(255,255,255,0.25);
    margin: 0 0 40px;
    max-width: 420px;
    line-height: 1.5;
}
.gfk-hint strong { color: rgba(255,255,255,0.4); }

/* ── CLOCK ── */
.gfk-time-wrap {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
}
.gfk-clock {
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    letter-spacing: 2px;
    font-variant-numeric: tabular-nums;
}
.gfk-date {
    font-size: clamp(12px, 1.6vw, 15px);
    color: rgba(255,255,255,0.3);
    margin-top: 4px;
    letter-spacing: 0.5px;
}

/* ── RESULT SCREEN ── */
.gfk-avatar {
    width: clamp(90px, 14vw, 130px);
    height: clamp(90px, 14vw, 130px);
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a5f, #1a2744);
    border: 3px solid rgba(255,255,255,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    overflow: hidden;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 800;
    color: #fff;
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
    position: relative;
    animation: gfk-pop 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.gfk-avatar img {
    width: 100%; height: 100%;
    object-fit: cover;
}
@keyframes gfk-pop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* Coloured ring: green = ok, orange = already, red = expired */
.gfk-avatar.ok       { border-color: #4ade80; box-shadow: 0 0 0 6px rgba(74,222,128,0.2), 0 8px 40px rgba(0,0,0,0.4); }
.gfk-avatar.already  { border-color: #fbbf24; box-shadow: 0 0 0 6px rgba(251,191,36,0.2),  0 8px 40px rgba(0,0,0,0.4); }
.gfk-avatar.expired  { border-color: #f87171; box-shadow: 0 0 0 6px rgba(248,113,113,0.2), 0 8px 40px rgba(0,0,0,0.4); }

.gfk-status-icon {
    font-size: clamp(28px, 4vw, 42px);
    margin-bottom: 10px;
    animation: gfk-pop 0.4s 0.1s cubic-bezier(0.34,1.56,0.64,1) both;
}

.gfk-welcome-msg {
    font-size: clamp(24px, 4.5vw, 46px);
    font-weight: 800;
    color: #fff;
    margin: 0 0 8px;
    letter-spacing: -1px;
    animation: gfk-fadein 0.4s 0.2s ease both;
}
@keyframes gfk-fadein {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

.gfk-checkin-time {
    font-size: clamp(14px, 2vw, 20px);
    color: rgba(255,255,255,0.5);
    margin: 0 0 20px;
    animation: gfk-fadein 0.4s 0.3s ease both;
}

.gfk-membership-badge {
    font-size: clamp(12px, 1.8vw, 16px);
    font-weight: 700;
    padding: 8px 20px;
    border-radius: 40px;
    margin-bottom: 32px;
    animation: gfk-fadein 0.4s 0.35s ease both;
}
.gfk-membership-badge.active  { background: rgba(74,222,128,0.15); color: #4ade80; border: 1px solid rgba(74,222,128,0.3); }
.gfk-membership-badge.expired { background: rgba(248,113,113,0.15); color: #f87171; border: 1px solid rgba(248,113,113,0.3); }

/* ── PROGRESS BAR (auto-reset countdown) ── */
.gfk-progress-wrap {
    width: 200px;
    height: 4px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    animation: gfk-fadein 0.4s 0.4s ease both;
}
.gfk-progress-bar {
    height: 100%;
    border-radius: 4px;
    width: 100%;
    transform-origin: left;
    animation: gfk-shrink 4s linear forwards;
}
.gfk-progress-bar.ok      { background: #4ade80; }
.gfk-progress-bar.already { background: #fbbf24; }
.gfk-progress-bar.expired { background: #f87171; }
@keyframes gfk-shrink {
    from { transform: scaleX(1); }
    to   { transform: scaleX(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 540px) {
    .gfk-input-wrap { flex-direction: column; }
    .gfk-btn { width: 100%; justify-content: center; }
}
