/* ======================================================
   CourtSide – Unified Apple-style CSS (FINAL)
   ====================================================== */

/* ================= RESET ================= */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

/* ================= BASE ================= */
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
  color: #111;
  background: #f6f6f7;
  font-size: 15px;
  line-height: 1.45;
}

/* ================= VARIABLES ================= */
:root {
  --border: rgba(0,0,0,0.08);
  --shadow-soft: 0 6px 18px rgba(0,0,0,0.06);
  --shadow: 0 16px 40px rgba(0,0,0,0.10);
  --shadow-press: 0 2px 10px rgba(0,0,0,0.10);
  --blue: #007aff;
}

/* ======================================================
   GLOBAL LAYOUT (APP PAGES)
   ====================================================== */

.page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 20px;
}

h1 {
  font-size: 34px;
  letter-spacing: -0.8px;
}

h2 {
  font-size: 22px;
  letter-spacing: -0.3px;
}

/* ================= CARDS ================= */
.card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--border);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: var(--shadow-soft);
}

/* ================= BUTTONS ================= */
.btn {
  display: inline-block;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #fff;
  color: #111;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.2px;
  box-shadow: var(--shadow-soft);
}

.btn:hover {
  background: rgba(0,0,0,0.03);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-press);
}

.btn.secondary {
  opacity: 0.85;
  font-weight: 600;
}

.btn-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ================= TEXT UTILS ================= */
.muted {
  font-size: 14px;
  opacity: 0.7;
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246,246,247,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft);
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
}

.brand-subtitle {
  font-size: 13px;
  opacity: 0.7;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

/* ======================================================
   AUTH / LOGIN (ISOLATED)
   ====================================================== */

body.auth-body {
  background:
    radial-gradient(
      600px 300px at 50% -120px,
      rgba(0,122,255,0.12),
      transparent
    ),
    #ffffff;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 88px 16px 32px;
}

.auth-wrap {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  text-align: center;
}

/* SPLASH */
.auth-splash {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 40px;
}

.auth-splash-logo {
  width: 200px;
  height: 200px;
  object-fit: contain;
  margin-bottom: 18px;
  filter: none;
}

.auth-splash-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin: 0;
}

.auth-splash-tagline {
  margin-top: 8px;
  font-size: 18px;
  color: #6e6e73;
}

/* LOGIN CARD */
.auth-card {
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
  text-align: left;
}

.auth-h1 {
  font-size: 18px;
  margin-bottom: 14px;
}

/* INPUTS */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  font-size: 16px;
  border-radius: 12px;
  border: 1px solid #d2d2d7;
  background: #fff;
}

.auth-input:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(0,122,255,0.15);
}

/* BUTTON */
.auth-btn {
  width: 100%;
  margin-top: 6px;
  padding: 14px;
  border-radius: 12px;
  font-size: 16px;
}

/* FOOTER */
.auth-footer {
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  color: #6e6e73;
}

/* ======================================================
   KIOSK SAFE (UNCHANGED)
   ====================================================== */

body.kiosk-body {
  margin: 0;
  padding: 0;
  background: #fff;
  font-size: 24px;
}

body.kiosk-body .card {
  box-shadow: none;
  border-radius: 0;
}

/* ======================================================
   MOBILE SCALE FIX (THIS WAS THE PROBLEM)
   ====================================================== */

@media (max-width: 720px){

  /* Base scale */
  body {
    font-size: 16px;
    line-height: 1.5;
    background: #ffffff;
  }

  .page {
    padding: 20px 16px;
  }

  h1 {
    font-size: 28px;
    letter-spacing: -0.6px;
  }

  h2 {
    font-size: 22px;
  }

  .card {
    padding: 20px;
    border-radius: 18px;
    box-shadow: none;
  }

  /* Tap targets */
  .btn,
  button,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .btn {
    padding: 14px 18px;
    font-size: 16px;
  }

  input,
  select,
  textarea {
    font-size: 16px;
    padding: 14px 16px;
  }

  .topbar-inner {
    padding: 14px 16px;
  }

  .brand-logo {
    width: 36px;
    height: 36px;
  }

  .brand-title {
    font-size: 16px;
  }

  .brand-subtitle {
    display: none;
  }

  body.auth-body {
    padding: 64px 16px 32px;
  }

  .auth-splash-logo {
    width: 170px;
    height: 170px;
  }

  .auth-splash-title {
    font-size: 24px;
  }

  .auth-card {
    padding: 20px;
    border-radius: 20px;
  }

}
/* ======================================================
   KIOSK HARD ISOLATION (DO NOT INHERIT APP STYLES)
   ====================================================== */

body.kiosk,
body.kiosk-body {
  background: #ffffff;
  margin: 0;
  padding: 40px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
}

/* Kill app layout constraints */
body.kiosk .page,
body.kiosk-body .page {
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Reset cards for kiosk only */
body.kiosk .card {
  max-width: none;
  margin: 24px 0;
  padding: 28px;
  border-radius: 22px;
  border: 2px solid rgba(0,0,0,0.08);
  box-shadow: none;
  font-size: 26px;
}

/* Kiosk headings */
body.kiosk h1 {
  font-size: 64px;
  letter-spacing: -1.4px;
  margin-bottom: 32px;
}

body.kiosk strong {
  font-size: 32px;
}

/* Booking status text */
body.kiosk {
  font-size: 26px;
}

/* Disable mobile scaling on kiosk */
@media (max-width: 900px) {
  body.kiosk,
  body.kiosk-body {
    padding: 40px;
  }

  body.kiosk h1 {
    font-size: 56px;
  }
}
/* ======================================================
   KIOSK OVERRIDE – HARD CONSTRAINED (FIXED)
   ====================================================== */

body.kiosk-body {
  margin: 0;
  padding: 0;
  height: 100vh;
  overflow: hidden;
}

.override-wrap {
  height: 100vh;
  max-height: 100vh;
  padding: 48px;
  box-sizing: border-box;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;

  text-align: center;
}

/* Club logo */
.club-logo-wrap img {
  max-height: 32vh;
  max-width: 70vw;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Optional logo */
.optional-logo-wrap img {
  max-height: 22vh;
  max-width: 50vw;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Text block */
.override-text {
  max-width: 1200px;
}

.override-headline {
  font-size: clamp(42px, 6vw, 96px);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -1.5px;
}

.override-subtext {
  margin-top: 16px;
  font-size: clamp(20px, 3vw, 40px);
  opacity: 0.85;
}
