/* TransExpress demo - portrait touchscreen kiosk */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  background: #0d1b2a;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: #e9eef5;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
}

.kiosk-frame {
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  background: linear-gradient(160deg, #0d1b2a 0%, #1b263b 50%, #0d1b2a 100%);
  overflow: hidden;
}

.screen {
  display: none;
  flex-direction: column;
  flex: 1;
  padding: 32px 28px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.screen.active { display: flex; }

/* Brand header */
.brand {
  text-align: center;
  padding: 16px 0 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 28px;
}

.logo {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #ffd60a;
  text-shadow: 0 2px 12px rgba(255, 214, 10, 0.25);
}

.tagline {
  font-size: 18px;
  margin-top: 6px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.5px;
}

/* Form */
form { display: flex; flex-direction: column; gap: 24px; }

.field { display: flex; flex-direction: column; gap: 10px; }

label {
  font-size: 18px;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
}

select, input[type="date"], input[type="number"] {
  appearance: none;
  -webkit-appearance: none;
  background: #1f2d3f;
  color: #e9eef5;
  border: 2px solid #2c3e54;
  border-radius: 14px;
  padding: 18px 18px;
  font-size: 22px;
  font-weight: 500;
  width: 100%;
  outline: none;
}

select:focus, input:focus { border-color: #ffd60a; }

select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'><path fill='%23ffd60a' d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 52px;
}

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1f2d3f;
  border: 2px solid #2c3e54;
  border-radius: 14px;
  overflow: hidden;
}

.stepper output {
  flex: 1;
  text-align: center;
  font-size: 28px;
  font-weight: 700;
  color: #ffd60a;
}

.step-btn {
  background: #2c3e54;
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  border: none;
  width: 80px;
  height: 70px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.step-btn:active { background: #ffd60a; color: #0d1b2a; }

/* Ages grid */
.ages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.age-cell {
  display: flex;
  flex-direction: column;
  background: #1f2d3f;
  border: 2px solid #2c3e54;
  border-radius: 14px;
  padding: 12px 14px;
}

.age-cell label {
  font-size: 13px;
  color: rgba(255,255,255,0.65);
  margin-bottom: 6px;
}

.age-cell input {
  background: transparent;
  border: none;
  color: #ffd60a;
  font-size: 24px;
  font-weight: 700;
  padding: 0;
  width: 100%;
}

.age-cell input:focus { outline: none; }

/* Action buttons */
.actions {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  padding-bottom: 8px;
}

.btn {
  flex: 1;
  border: none;
  border-radius: 14px;
  padding: 22px 16px;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
  transition: transform 0.1s, box-shadow 0.15s;
  letter-spacing: 0.5px;
}

.btn:active { transform: scale(0.97); }

.btn-primary {
  background: #ffd60a;
  color: #0d1b2a;
  box-shadow: 0 6px 20px rgba(255, 214, 10, 0.3);
}

.btn-secondary {
  background: #2c3e54;
  color: #fff;
}

.footer-note {
  text-align: center;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-top: 24px;
}

/* Confirmation screen */
.confirm-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-bottom: 16px;
}

.check-mark {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #2ecc71;
  color: #fff;
  font-size: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  box-shadow: 0 8px 28px rgba(46, 204, 113, 0.4);
}

.confirm-body h2 {
  margin: 4px 0 0;
  font-size: 32px;
  color: #ffd60a;
}

.confirm-text {
  margin: 0;
  text-align: center;
  font-size: 17px;
  color: rgba(255,255,255,0.8);
  line-height: 1.4;
}

.qr-container {
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}

.qr-container canvas, .qr-container img { display: block; }

.ticket-summary {
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  padding: 16px 18px;
}

.ticket-summary .row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed rgba(255,255,255,0.08);
  font-size: 16px;
}

.ticket-summary .row:last-child { border-bottom: none; }

.ticket-summary .row span { color: rgba(255,255,255,0.6); }
.ticket-summary .row strong { color: #fff; font-weight: 600; }

.ticket-summary .row.total {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.15);
  border-bottom: none;
  font-size: 20px;
}

.ticket-summary .row.total strong { color: #ffd60a; font-size: 24px; }

.confirm-body .actions {
  width: 100%;
  margin-top: auto;
}

/* Toast */
.toast {
  position: fixed;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 14px 22px;
  border-radius: 12px;
  font-size: 16px;
  max-width: 80%;
  text-align: center;
  transition: bottom 0.3s ease;
  z-index: 1000;
  border: 1px solid rgba(255,255,255,0.1);
}

.toast.show { bottom: 32px; }
.toast.error { background: #b00020; }
.toast.warn { background: #d4751a; }

/* Tablet landscape fallback */
@media (orientation: landscape) and (min-width: 900px) {
  .screen { max-width: 600px; margin: 0 auto; }
}