/* ============================================ */
/* CORE GYM KIOSK SYSTEM                        */
/* Hourly-inspired Warm 2026 Design             */
/* Version: 5.0                                 */
/* ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ============================================ */
/* CSS VARIABLES - Warm Dark Theme              */
/* ============================================ */

:root {
  --kiosk-bg: #0a0908;
  --kiosk-bg-gradient: linear-gradient(180deg, #0a0908 0%, #1a1612 100%);
  --kiosk-surface: rgba(255, 255, 255, 0.04);
  --kiosk-surface-hover: rgba(255, 255, 255, 0.08);
  --kiosk-text: #E8DCC4;
  --kiosk-text-secondary: rgba(232, 220, 196, 0.5);
  --kiosk-text-muted: rgba(232, 220, 196, 0.35);
  --kiosk-accent: #E8DCC4;
  --kiosk-success: #C4E8D4;
  --kiosk-warning: #E8B89D;
  --kiosk-error: #E8B89D;
  --kiosk-border: rgba(255, 255, 255, 0.06);
  --kiosk-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  --kiosk-radius: 24px;
  --kiosk-radius-lg: 32px;
  --kiosk-radius-pill: 100px;
  --kiosk-transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --kiosk-transition-slow: all 1.5s ease;
}

/* ============================================ */
/* RESET & BASE                                 */
/* ============================================ */

/* Base styles - only lock overflow in fullscreen */
html, body {
  margin: 0;
  padding: 0;
  background: var(--kiosk-bg);
}

:fullscreen html,
:fullscreen body {
  overflow: hidden;
}

* {
  box-sizing: border-box;
}

/* Hide Zoezi UI elements - ONLY on live domains, not on admin/editor */
/* Admin URL: coregymclub.zoezi.se/homepage/* keeps UI visible */

/* ============================================ */
/* KIOSK CONTAINER                              */
/* Only applies fullscreen lock when:           */
/* - .kiosk-active class is present, OR         */
/* - Body has .kiosk-mode class, OR             */
/* - In actual fullscreen mode                  */
/* ============================================ */

.kiosk-app,
.kiosk-screen,
.kiosk-fullscreen-container {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--kiosk-bg-gradient);
  color: var(--kiosk-text);
  transition: var(--kiosk-transition-slow);
}

/* FULLSCREEN LOCK - ONLY when user clicks fullscreen button */
/* Never locks by default - safe for editing */
:fullscreen .kiosk-app,
:fullscreen .kiosk-screen,
:fullscreen .kiosk-fullscreen-container {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 2147483647 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
}

/* DEFAULT - Normal flow, no locking */
.kiosk-app,
.kiosk-screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  z-index: 1;
}

/* ============================================ */
/* TOP BAR                                      */
/* ============================================ */

.top-bar {
  position: absolute;
  top: 48px;
  left: 48px;
  right: 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 20;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.clock {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.5px;
  opacity: 0.6;
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transition: var(--kiosk-transition);
}

.status-dot.online {
  background: var(--kiosk-accent);
  box-shadow: 0 0 12px var(--kiosk-accent);
}

.location-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0.4;
}

.back-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--kiosk-surface);
  color: var(--kiosk-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--kiosk-transition);
}

.back-btn:hover {
  background: var(--kiosk-surface-hover);
}

.back-btn svg {
  width: 20px;
  height: 20px;
}

/* ============================================ */
/* STATS PILL                                   */
/* ============================================ */

.stats-pill,
.glass-pill {
  background: var(--kiosk-surface);
  backdrop-filter: blur(40px);
  border-radius: var(--kiosk-radius-pill);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  gap: 28px;
  border: 1px solid var(--kiosk-border);
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sf-icon {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  opacity: 0.5;
}

.stat-val {
  font-size: 16px;
  font-weight: 600;
  min-width: 20px;
  text-align: center;
}

.stat-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.1);
}

/* ============================================ */
/* CENTER STAGE                                 */
/* ============================================ */

.kiosk-main,
.center-stage {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ============================================ */
/* IDLE STATE                                   */
/* ============================================ */

.state-idle {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Welcome Phrases */
.welcome-phrases,
.phrase-wrapper {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 64px;
}

.phrase-text,
.hero-phrase {
  text-align: center;
  font-size: clamp(48px, 10vw, 140px);
  font-weight: 800;
  margin: 0;
  letter-spacing: -0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--kiosk-text);
}

.checkin-label,
.hint-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.4;
}

/* ============================================ */
/* ACTION AREA                                  */
/* ============================================ */

.action-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* QR Code */
.qr-container,
.qr-small {
  background: #fff;
  padding: 16px;
  border-radius: var(--kiosk-radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  box-shadow: var(--kiosk-shadow);
  transition: transform 0.4s cubic-bezier(0.2, 1, 0.3, 1);
}

.qr-container:hover {
  transform: scale(1.02);
}

.qr-box {
  width: 120px;
  height: 120px;
}

.qr-box img,
.qr-small img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 4px;
}

.qr-label {
  color: #000;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sub-action {
  font-size: 12px;
  opacity: 0.3;
  font-weight: 500;
  letter-spacing: 1px;
  margin-top: 16px;
}

/* Reader hint */
.reader-hint {
  position: absolute;
  bottom: 80px;
  left: 80px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.3;
  font-size: 13px;
  font-weight: 500;
}

.reader-icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
}

/* QR hint area */
.qr-hint-area {
  position: absolute;
  bottom: 80px;
  right: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.qr-hint-text {
  font-size: 11px;
  opacity: 0.3;
  font-weight: 500;
}

.qr-hint-area .qr-small {
  padding: 8px;
  border-radius: 12px;
}

.qr-hint-area .qr-small img {
  width: 80px;
  height: 80px;
}

/* ============================================ */
/* SUCCESS STATE                                */
/* ============================================ */

.state-success {
  text-align: center;
  width: 100%;
}

.success-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid var(--kiosk-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 48px;
  color: var(--kiosk-accent);
  transition: var(--kiosk-transition);
}

.success-ring svg {
  width: 36px;
  height: 36px;
  stroke-width: 2.5;
}

.welcome-label {
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: 0.4;
  margin-bottom: 16px;
  font-weight: 600;
}

.member-name {
  font-size: clamp(32px, 7vw, 96px);
  font-weight: 800;
  margin: 0 0 48px;
  line-height: 1;
  max-width: 90%;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: -0.03em;
  color: var(--kiosk-text);
}

/* Badges */
.info-badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.badge {
  padding: 12px 24px;
  border-radius: var(--kiosk-radius-pill);
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.class-badge {
  background: var(--kiosk-surface-hover);
  border: 1px solid var(--kiosk-border);
}

.gym-badge {
  background: var(--kiosk-surface);
  border: 1px solid var(--kiosk-border);
}

.count-badge {
  background: var(--kiosk-accent);
  color: var(--kiosk-bg);
  font-weight: 700;
}

.count-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.count-since {
  font-size: 10px;
  opacity: 0.35;
  font-weight: 500;
  letter-spacing: 0.5px;
}

.sf-icon-sm {
  width: 16px;
  height: 16px;
  stroke-width: 2;
  margin-right: 2px;
}

/* ============================================ */
/* WARNING STATE                                */
/* ============================================ */

.state-warning {
  text-align: center;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.huge-warning {
  font-size: clamp(40px, 9vw, 120px);
  font-weight: 800;
  margin: 0 0 48px;
  line-height: 0.95;
  letter-spacing: -0.04em;
  text-transform: uppercase;
  color: var(--kiosk-warning);
}

.warning-content {
  background: var(--kiosk-surface);
  backdrop-filter: blur(40px);
  padding: 40px 48px;
  border-radius: var(--kiosk-radius-lg);
  max-width: 560px;
  border: 1px solid var(--kiosk-border);
}

.warning-sub {
  font-size: 20px;
  margin-bottom: 8px;
  font-weight: 600;
}

.warning-hint {
  font-size: 14px;
  opacity: 0.5;
  margin: 0;
  font-weight: 500;
}

/* ============================================ */
/* ERROR STATE                                  */
/* ============================================ */

.state-error {
  text-align: center;
}

.error-icon {
  font-size: 48px;
  margin-bottom: 24px;
  opacity: 0.8;
}

.state-error h2 {
  font-size: clamp(28px, 5vw, 48px);
  font-weight: 800;
  margin-bottom: 16px;
  color: var(--kiosk-error);
}

.error-msg {
  font-size: 16px;
  opacity: 0.6;
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.6;
}

/* ============================================ */
/* FULLSCREEN BUTTON                            */
/* ============================================ */

.fullscreen-btn {
  position: absolute;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  z-index: 100;
  transition: color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fullscreen-btn:hover {
  color: rgba(255, 255, 255, 0.4);
}

.fullscreen-btn svg {
  width: 24px;
  height: 24px;
}

/* ============================================ */
/* ANIMATIONS                                   */
/* ============================================ */

.fade-fast-enter-active,
.fade-fast-leave-active {
  transition: opacity 0.4s ease;
}

.fade-fast-enter,
.fade-fast-leave-to {
  opacity: 0;
}

.phrase-enter-active,
.phrase-leave-active,
.phrase-fade-enter-active,
.phrase-fade-leave-active {
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.phrase-enter,
.phrase-fade-enter {
  opacity: 0;
  transform: translateY(20px);
}

.phrase-leave-to,
.phrase-fade-leave-to {
  opacity: 0;
  transform: translateY(-20px);
}

/* ============================================ */
/* THEME VARIANTS                               */
/* ============================================ */

/* Sage theme */
[data-theme="sage"] {
  --kiosk-bg-gradient: linear-gradient(180deg, #080a08 0%, #121a14 100%);
  --kiosk-text: #C4E8D4;
  --kiosk-accent: #A8D4B8;
}

/* Dusk theme */
[data-theme="dusk"] {
  --kiosk-bg-gradient: linear-gradient(180deg, #0a0808 0%, #1a1218 100%);
  --kiosk-text: #E8D4DC;
  --kiosk-accent: #D4A8B8;
}
