/**
 * Boojee Check-In Kiosk — Tablet-first CSS
 * Designed for 768px (portrait tablet) to 1280px (landscape kiosk).
 * Large touch targets (min 72px), high contrast, dark premium palette.
 */

:root {
  --bg:       #050506;
  --panel:    #0e0d12;
  --panel2:   #13121a;
  --gold:     #c9a84c;
  --gold-lt:  #e8c97a;
  --cream:    #f2ece0;
  --muted:    #938d85;
  --muted-lt: #a9a095;
  --border:   rgba(255,255,255,.08);
  --border2:  rgba(255,255,255,.13);
  --green:    #4caf7d;
  --red:      #e05555;
  --amber:    #e8a03a;

  /* Touch target minimum */
  --touch-min: 72px;
}

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

html, body {
  height: 100%;
  overflow: hidden; /* kiosk — no scroll */
}

body {
  background: var(--bg);
  color: var(--cream);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 18px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation; /* prevent double-tap zoom */
  user-select: none;
}

/* ── Screen container ─────────────────────────────────────────────────────── */
.kiosk-shell {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.screen {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
  text-align: center;
  position: absolute;
  inset: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen[hidden] { display: none !important; }

/* ── Header/logo strip ────────────────────────────────────────────────────── */
.kiosk-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: rgba(5,5,6,.92);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  z-index: 100;
}

.kiosk-logo {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: .04em;
}

.kiosk-logo span { color: var(--cream); font-weight: 300; }

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.kiosk-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--touch-min);
  min-width: 220px;
  padding: 0 40px;
  border-radius: 16px;
  font-family: inherit;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .03em;
  cursor: pointer;
  border: none;
  outline: none;
  transition: all .2s;
  text-decoration: none;
}

.kiosk-btn--primary {
  background: var(--gold);
  color: #050506;
}
.kiosk-btn--primary:hover,
.kiosk-btn--primary:focus { background: var(--gold-lt); }
.kiosk-btn--primary:active { transform: scale(.97); }

.kiosk-btn--outline {
  background: transparent;
  border: 2px solid var(--border2);
  color: var(--muted-lt);
}
.kiosk-btn--outline:hover,
.kiosk-btn--outline:focus { border-color: var(--gold); color: var(--gold); }

.kiosk-btn--danger {
  background: transparent;
  border: 2px solid var(--red);
  color: var(--red);
}

.kiosk-btn:disabled {
  opacity: .45;
  cursor: not-allowed;
  transform: none;
}

/* ── Help button (fixed, every screen) ───────────────────────────────────── */
.help-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  min-height: 64px;
  min-width: 64px;
  padding: 0 24px;
  border-radius: 50px;
  background: var(--panel);
  border: 2px solid var(--amber);
  color: var(--amber);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .04em;
  cursor: pointer;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .2s;
}
.help-btn:hover { background: rgba(232,160,58,.14); }

/* ── Typography ───────────────────────────────────────────────────────────── */
.kiosk-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.kiosk-h1 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 20px;
}

.kiosk-h1 em { font-style: normal; color: var(--gold); }

.kiosk-h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 700;
  line-height: 1.15;
  color: var(--cream);
  margin-bottom: 16px;
}

.kiosk-body {
  font-size: 18px;
  color: var(--muted-lt);
  line-height: 1.7;
  max-width: 560px;
  margin: 0 auto 32px;
}

/* ── Pulse animation (for "scanning" indicator) ───────────────────────────── */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}

.pulse-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.8s infinite;
  margin-right: 8px;
  vertical-align: middle;
}

/* ── Welcome screen ───────────────────────────────────────────────────────── */
#screen-welcome {
  background: radial-gradient(
    ellipse 80% 60% at 50% 30%,
    rgba(201,168,76,.07) 0%,
    transparent 70%
  );
}

.welcome-icon {
  font-size: 80px;
  margin-bottom: 28px;
  line-height: 1;
}

/* ── Scanning screen ──────────────────────────────────────────────────────── */
.scan-area {
  width: 100%;
  max-width: 640px;
  margin: 0 auto 28px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--panel);
  border: 2px solid rgba(201,168,76,.3);
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#camera-video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}

.scan-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Corner brackets for scan targeting guide */
.scan-overlay::before,
.scan-overlay::after {
  content: '';
  position: absolute;
  width: 60px;
  height: 60px;
  border-color: var(--gold);
  border-style: solid;
  border-width: 0;
  opacity: .7;
}
.scan-overlay::before {
  top: 20px; left: 20px;
  border-top-width: 3px;
  border-left-width: 3px;
  border-radius: 4px 0 0 0;
}
.scan-overlay::after {
  bottom: 20px; right: 20px;
  border-bottom-width: 3px;
  border-right-width: 3px;
  border-radius: 0 0 4px 0;
}

/* ── Input fields ─────────────────────────────────────────────────────────── */
.kiosk-field-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
  max-width: 480px;
  margin: 0 auto 24px;
}

.kiosk-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  text-align: left;
}

.kiosk-input {
  width: 100%;
  min-height: 64px;
  padding: 0 20px;
  background: var(--panel);
  border: 2px solid var(--border2);
  border-radius: 12px;
  color: var(--cream);
  font-family: inherit;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: .08em;
  outline: none;
  transition: border-color .2s;
  text-transform: uppercase;
}
.kiosk-input:focus { border-color: var(--gold); }
.kiosk-input::placeholder { color: var(--muted); text-transform: none; font-size: 16px; letter-spacing: normal; }

.kiosk-divider {
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  margin: 4px 0;
}

.kiosk-error {
  color: var(--red);
  font-size: 14px;
  font-weight: 600;
  min-height: 20px;
  margin-top: -8px;
  text-align: left;
}

/* ── Booking summary card ─────────────────────────────────────────────────── */
.booking-card {
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 28px 32px;
  max-width: 520px;
  width: 100%;
  margin: 0 auto 32px;
  text-align: left;
}

.booking-card__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}
.booking-card__row:last-child { border-bottom: none; }

.booking-card__label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.booking-card__value {
  font-size: 17px;
  font-weight: 600;
  color: var(--cream);
  text-align: right;
}

.booking-card__value--gold { color: var(--gold); }

/* ── Status indicator ─────────────────────────────────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 20px;
  border-radius: 40px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.status-badge--green { background: rgba(76,175,125,.12); border: 1px solid rgba(76,175,125,.3); color: var(--green); }
.status-badge--amber { background: rgba(232,160,58,.12); border: 1px solid rgba(232,160,58,.3); color: var(--amber); }
.status-badge--red   { background: rgba(224,85,85,.12);  border: 1px solid rgba(224,85,85,.3);  color: var(--red); }

/* ── Agent message overlay ────────────────────────────────────────────────── */
.agent-msg-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,5,6,.88);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 300;
  padding: 40px;
  text-align: center;
}
.agent-msg-overlay[hidden] { display: none !important; }

.agent-msg-box {
  background: var(--panel2);
  border: 2px solid var(--gold);
  border-radius: 24px;
  padding: 40px 48px;
  max-width: 600px;
  width: 100%;
}

.agent-msg-icon { font-size: 52px; margin-bottom: 16px; }

.agent-msg-text {
  font-size: 20px;
  line-height: 1.6;
  color: var(--cream);
  margin-bottom: 28px;
}

/* ── Printing spinner ─────────────────────────────────────────────────────── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.print-spinner {
  width: 64px;
  height: 64px;
  border: 4px solid var(--border2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto 24px;
}

/* ── CSS Print template (hidden on screen, visible on print) ──────────────── */
@media screen {
  .print-only { display: none !important; }
}

@media print {
  /* Hide kiosk UI */
  .kiosk-header, .kiosk-shell, .help-btn,
  .agent-msg-overlay { display: none !important; }

  /* Show the slip */
  .print-only { display: block !important; }

  .print-slip {
    font-family: 'Courier New', monospace;
    font-size: 12pt;
    color: #000;
    background: #fff;
    padding: 20px;
    width: 3.15in; /* ~80mm receipt width */
    line-height: 1.6;
  }

  .print-slip__header {
    text-align: center;
    font-size: 14pt;
    font-weight: bold;
    margin-bottom: 8pt;
    border-bottom: 1px solid #000;
    padding-bottom: 6pt;
  }

  .print-slip__subheader {
    text-align: center;
    font-size: 10pt;
    margin-bottom: 12pt;
  }

  .print-slip__row {
    display: flex;
    justify-content: space-between;
    font-size: 10pt;
    margin-bottom: 3pt;
  }

  .print-slip__row--bold { font-weight: bold; }

  .print-slip__divider {
    border-top: 1px dashed #000;
    margin: 8pt 0;
  }

  .print-slip__footer {
    text-align: center;
    font-size: 9pt;
    margin-top: 12pt;
    border-top: 1px solid #000;
    padding-top: 8pt;
  }
}

/* ── Responsive adjustments (768px tablet portrait) ──────────────────────── */
@media (max-width: 820px) {
  .kiosk-h1 { font-size: 36px; }
  .kiosk-h2 { font-size: 28px; }
  .kiosk-body { font-size: 16px; }
  .screen { padding: 56px 20px 20px; }
  .booking-card { padding: 20px 20px; }
  .kiosk-btn { min-width: 180px; font-size: 16px; min-height: 60px; }
}
