/* ============================================================
   Shri Mahakaleshwar Temple Ujjain — Self-Service Kiosk UI
   Theme matched with official Mahakaleshwar Temple Platform
   ============================================================ */

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

:root {
  --primary: #d84b06;         /* Traditional Mahakal Saffron */
  --primary-hover: #b33d04;
  --primary-light: #fff2eb;
  --secondary: #e5a93b;       /* Temple Gold */
  --secondary-light: #fef3c7;
  --dark: #1e1510;            /* Deep Terracotta / Dark Maroon */
  --dark-gray: #3a2e2b;
  --light: #fffbf8;           /* Soft Cream Background */
  --white: #ffffff;
  --gray-light: #f3ece8;
  --gray-medium: #dccbc4;
  --success: #2e7d32;
  --success-light: #e8f5e9;
  --font-serif: 'Noto Sans Devanagari', 'Inter', system-ui, -apple-system, sans-serif;
  --font-sans: 'Noto Sans Devanagari', 'Inter', system-ui, -apple-system, sans-serif;
  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 8px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

html, body {
  font-family: var(--font-sans);
  background: var(--light);
  color: var(--dark);
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  overflow: hidden !important;
  position: fixed;
  display: flex;
  flex-direction: column;
}

/* ============================================================
   KIOSK FULL-WIDTH HORIZONTAL TABLET VIEWPORT
   ============================================================ */

.kiosk-device-casing {
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  min-height: 100vh;
  max-height: 100vh;
  background: var(--light);
  border-radius: 0;
  border: none;
  padding: 0;
  margin: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

/* Hide artificial camera notch on full-bleed tablet */
.kiosk-casing-top {
  display: none;
}

.kiosk-camera-notch {
  display: none;
}

.kiosk-screen-viewport {
  flex: 1;
  width: 100%;
  height: 100%;
  min-height: 0;
  background: var(--light);
  border-radius: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: none;
}

/* ============================================================
   TEMPLE HEADER
   ============================================================ */

.kiosk-header {
  background: linear-gradient(135deg, #7a1a03 0%, #b33d04 45%, #d84b06 100%);
  color: #fff;
  padding: 10px 24px;
  box-shadow: 0 4px 16px rgba(122, 26, 3, 0.25);
  position: relative;
  z-index: 20;
  flex-shrink: 0;
}

.kiosk-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.temple-logo-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #fff;
  border-radius: 50%;
  padding: 2px;
  border: 2px solid var(--secondary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.temple-title h1 {
  font-family: var(--font-serif);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: #fff;
  line-height: 1.15;
}

.temple-title p {
  font-size: 0.76rem;
  color: var(--secondary-light);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  padding: 3px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.lang-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  font-size: 0.88rem;
  padding: 6px 16px;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.lang-btn.active {
  background: linear-gradient(135deg, #e5a93b, #d97706);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ============================================================
   MAIN KIOSK CONTENT (ZERO SCROLL FIT)
   ============================================================ */

.kiosk-main {
  flex: 1;
  min-height: 0;
  padding: 12px 20px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.screen-card {
  background: #fff;
  border-radius: var(--radius-md);
  border: 1px solid rgba(216, 75, 6, 0.15);
  box-shadow: 0 6px 24px -6px rgba(58, 46, 43, 0.06);
  padding: 16px 22px;
  display: none;
  flex: 1;
  min-height: 0;
  height: 100%;
  flex-direction: column;
  overflow: hidden !important;
  animation: fadeIn 0.25s ease forwards;
}

.screen-card.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Step Header */
.step-header {
  text-align: center;
  margin-bottom: 12px;
  flex-shrink: 0;
}

.step-eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--primary);
  background: var(--primary-light);
  border: 1px solid #ffd8c7;
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 6px;
}

.step-title {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1.15;
}

.step-sub {
  font-size: 1.05rem;
  font-weight: 500;
  color: #5a524e;
  margin-top: 4px;
}

/* Welcome Screen (Page 1 — Big & Bold for Horizontal Tablet) */
.welcome-hero {
  text-align: center;
  padding: 12px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  gap: 4px;
}

.welcome-logo-badge {
  width: 220px;
  height: 220px;
  max-height: 32vh;
  object-fit: contain;
  margin-bottom: 12px;
  filter: drop-shadow(0 12px 28px rgba(216, 75, 6, 0.35));
}

.welcome-title {
  font-family: var(--font-serif);
  font-size: 2.85rem;
  font-weight: 900;
  color: #1e1510;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin-top: 6px;
}

.welcome-subtitle {
  font-size: 1.25rem;
  font-weight: 500;
  color: #4b423e;
  margin-top: 6px;
  max-width: 650px;
  line-height: 1.35;
}

.kiosk-btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 520px;
  padding: 22px 48px;
  font-size: 1.6rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #d84b06 0%, #b33d04 60%, #7a1a03 100%);
  border: none;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 12px 32px rgba(216, 75, 6, 0.45), inset 0 2px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.2s ease;
  margin-top: 20px;
}

.kiosk-btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(216, 75, 6, 0.55);
}

.kiosk-btn-hero:active {
  transform: translateY(1px);
}

/* Number Selector Grid (Horizontal Tablet: 8 in one clean row) */
.number-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 14px;
  max-width: 1040px;
  margin: 30px auto;
  width: 100%;
}

.number-card {
  height: 140px;
  background: #fff;
  border: 2.5px solid var(--gray-medium);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

.number-card .num {
  font-size: 2.8rem;
  font-weight: 900;
  color: var(--dark);
  line-height: 1.1;
  margin-bottom: 4px;
}

.number-card .lbl {
  font-size: 0.95rem;
  font-weight: 700;
  color: #6b7280;
}

.number-card.selected {
  border-color: var(--primary);
  border-width: 3px;
  background: linear-gradient(135deg, #fff2eb, #ffe4d6);
  box-shadow: 0 10px 28px rgba(216, 75, 6, 0.35);
  transform: scale(1.05);
}

.number-card.selected .num {
  color: var(--primary);
}

/* Input Fields */
.touch-input {
  width: 100%;
  height: 68px;
  padding: 0 22px;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--dark);
  background: #faf7f5;
  border: 2.5px solid #dccbc4;
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.touch-input:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 5px rgba(216, 75, 6, 0.18);
}

/* Date Selection Grid */
.date-selector-container {
  margin-bottom: 12px;
  flex-shrink: 0;
}

.date-section-heading {
  font-size: 1.12rem;
  font-weight: 800;
  color: #7a1a03;
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.date-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
  margin-bottom: 8px;
}

.date-card {
  background: #fff;
  border: 2px solid #fed7aa;
  border-radius: var(--radius-md);
  padding: 10px 4px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  user-select: none;
}

.date-card:hover {
  border-color: #f97316;
  transform: translateY(-1px);
}

.date-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #fff2eb 0%, #ffe4d6 100%);
  box-shadow: 0 6px 18px rgba(216, 75, 6, 0.25);
  transform: scale(1.03);
}

.date-tag {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  color: #7a1a03;
  letter-spacing: 0.03em;
  margin-bottom: 2px;
}

.date-num {
  font-size: 1.85rem;
  font-weight: 900;
  color: #1e1510;
  line-height: 1.1;
}

.date-card.selected .date-num {
  color: var(--primary);
}

.date-month {
  font-size: 0.82rem;
  font-weight: 700;
  color: #6b7280;
}

/* Slots Grid (Horizontal Tablet: 2 rows of 3 columns) */
.slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 8px;
  flex-shrink: 0;
}

.slot-card {
  border: 2px solid #fed7aa;
  background: #fff;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slot-card.selected {
  border-color: var(--primary);
  background: linear-gradient(135deg, #fff2eb 0%, #ffe4d6 100%);
  box-shadow: 0 8px 22px rgba(216, 75, 6, 0.25);
  transform: translateY(-2px);
}

.slot-time {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
}

.slot-badge {
  font-size: 0.82rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  width: fit-content;
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.slot-wait {
  font-size: 0.88rem;
  font-weight: 700;
  color: #b45309;
}

/* Nav Actions */
.nav-actions {
  display: flex;
  gap: 14px;
  margin-top: auto;
  padding-top: 10px;
  flex-shrink: 0;
}

.btn-back {
  flex: 1;
  max-width: 160px;
  height: 56px;
  border: 2px solid #dccbc4;
  background: #fff;
  color: var(--dark);
  font-size: 1.15rem;
  font-weight: 800;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-back:hover {
  background: #f3ece8;
}

.btn-next {
  flex: 2;
  height: 56px;
  background: linear-gradient(135deg, #d84b06, #b33d04);
  color: #fff;
  border: none;
  font-size: 1.35rem;
  font-weight: 800;
  border-radius: 100px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(216, 75, 6, 0.4);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(216, 75, 6, 0.45);
}

.btn-confirm {
  background: linear-gradient(135deg, #2e7d32, #1b5e20) !important;
  box-shadow: 0 6px 18px rgba(46, 125, 50, 0.35) !important;
}

/* Summary Box (Horizontal Tablet: 2 Column Grid) */
.summary-box {
  background: #fffbf8;
  border: 2px dashed #e5a93b;
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin-bottom: 10px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px 28px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f3ece8;
}

.summary-row:last-child {
  border-bottom: 1px solid #f3ece8;
}

.summary-key {
  font-size: 1.05rem;
  color: #7a1a03;
  font-weight: 700;
}

.summary-val {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--dark);
  text-align: right;
}

.summary-val.highlight {
  color: var(--primary);
  font-size: 1.35rem;
  font-weight: 900;
}

/* ============================================================
   OFFICIAL DARSHAN PASS & THERMAL TICKET DESIGN
   ============================================================ */

/* ============================================================
   OFFICIAL DARSHAN PASS & THERMAL TICKET DESIGN (COMPACT FIT)
   ============================================================ */

.ticket-preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.darshan-pass-card {
  width: 100%;
  max-width: 320px;
  background: #ffffff;
  border: 1px dashed #9ca3af;
  border-radius: 4px;
  padding: 12px 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18);
  color: #111827;
  position: relative;
  box-sizing: border-box;
}

/* Top receipt tear effect */
.darshan-pass-card::before {
  content: '';
  position: absolute;
  top: -3px;
  left: 0;
  right: 0;
  height: 3px;
  background: repeating-linear-gradient(90deg, #d1d5db, #d1d5db 4px, transparent 4px, transparent 8px);
}

/* Pass Header */
.pass-header {
  text-align: center;
  border-bottom: 1.5px dashed #fed7aa;
  padding-bottom: 4px;
  margin-bottom: 4px;
}

.pass-emblem-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 3px;
}

.pass-emblem-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  border-radius: 50%;
  border: 1.5px solid #e5a93b;
  padding: 1.5px;
  background: #fff;
}

.pass-temple-heading h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 900;
  color: #7a1a03;
  line-height: 1.1;
}

.pass-temple-heading p {
  font-size: 0.68rem;
  font-weight: 700;
  color: #b45309;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pass-badge-type {
  display: inline-block;
  background: linear-gradient(135deg, #d84b06, #b33d04);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 12px;
  border-radius: 100px;
  letter-spacing: 0.04em;
  margin-top: 3px;
  box-shadow: 0 1px 4px rgba(216, 75, 6, 0.2);
}

/* Token Box */
.pass-token-box {
  background: linear-gradient(135deg, #fff2eb 0%, #fef3c7 100%);
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 4px 12px;
  text-align: center;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.token-label-side {
  text-align: left;
}

.token-label-side span {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  color: #7a1a03;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.token-number-large {
  font-size: 1.55rem;
  font-weight: 900;
  font-family: var(--font-serif);
  color: #d84b06;
  letter-spacing: 1px;
  line-height: 1;
}

.token-status-pill {
  background: #e8f5e9;
  border: 1px solid #81c784;
  color: #2e7d32;
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 100px;
  display: inline-block;
}

/* Details Table */
.pass-details-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.pass-details-table tr {
  border-bottom: 1px solid #f3ece8;
}

.pass-details-table tr:last-child {
  border-bottom: 1.5px dashed #fed7aa;
}

.pass-details-table td {
  padding: 2px 2px;
  vertical-align: middle;
}

.pass-td-key {
  color: #7a1a03;
  font-weight: 700;
  font-size: 0.76rem;
  width: 44%;
}

.pass-td-val {
  color: #1e1510;
  font-weight: 800;
  text-align: right;
  font-size: 0.82rem;
  word-break: break-word;
}

.pass-td-val.val-highlight {
  color: #7a1a03;
  font-size: 0.95rem;
  font-weight: 900;
  text-transform: capitalize;
}

/* QR Code Section */
.pass-qr-section {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #faf7f5;
  border: 1px solid #eedfd8;
  border-radius: 8px;
  padding: 4px 10px;
  margin-bottom: 4px;
}

.pass-qr-img {
  width: 58px;
  height: 58px;
  object-fit: contain;
  background: #fff;
  border: 1.5px solid #d84b06;
  border-radius: 6px;
  padding: 2px;
}

.pass-qr-meta {
  text-align: left;
  flex: 1;
}

.pass-qr-meta p {
  font-size: 0.7rem;
  font-weight: 700;
  color: #1e1510;
  line-height: 1.25;
}

.pass-qr-gate-badge {
  display: inline-block;
  background: #2e7d32;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 3px;
}

/* Pass Footer */
.pass-footer-notes {
  text-align: center;
  border-top: 1px solid #f3ece8;
  padding-top: 4px;
}

.pass-footer-notes p {
  font-size: 0.68rem;
  color: #7a1a03;
  font-weight: 700;
  line-height: 1.2;
}

.pass-footer-notes small {
  display: block;
  font-size: 0.6rem;
  color: #8b7367;
  margin-top: 1px;
}

/* ============================================================
   CLEAN & BEAUTIFUL PRINT STYLESHEET (A4, LETTER & THERMAL)
   ============================================================ */

@media print {
  @page {
    size: auto;
    margin: 2mm;
  }

  *, *::before, *::after {
    box-shadow: none !important;
    text-shadow: none !important;
  }

  html, body {
    background: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    display: block !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* Reset outer tablet casing for print so children render cleanly */
  .kiosk-device-casing {
    display: block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    max-width: 100% !important;
    min-height: auto !important;
  }

  .kiosk-screen-viewport,
  .kiosk-main {
    display: block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
    overflow: visible !important;
  }

  /* Hide tablet chrome, status bar, header, footer, navigation buttons & non-active screens */
  .kiosk-casing-top,
  .kiosk-header,
  .kiosk-screen-footer,
  .nav-actions,
  .step-header,
  .reset-timer-msg,
  #screen-welcome,
  #screen-devotees,
  #screen-name,
  #screen-slot,
  #screen-confirm {
    display: none !important;
  }

  /* Ensure ticket screen and preview container are visible and centered */
  #screen-ticket {
    display: block !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
  }

  .ticket-preview-container {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  /* Centered Official Darshan Pass Card optimized for 80mm thermal rolls */
  .darshan-pass-card {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin: 2mm auto !important;
    width: 72mm !important;
    max-width: 100% !important;
    border: 1.5px solid #d84b06 !important;
    border-radius: 8px !important;
    padding: 6px 8px !important;
    background: #ffffff !important;
    box-sizing: border-box !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .pass-token-box {
    background: #fff2eb !important;
    border: 1px solid #fed7aa !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .pass-badge-type {
    background: #d84b06 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .pass-qr-gate-badge {
    background: #2e7d32 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

/* ============================================================
   3-SECOND KIOSK DISPENSER PRINTING ANIMATION OVERLAY
   ============================================================ */

.printing-dispenser-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(18, 12, 10, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayFadeIn 0.25s ease-out forwards;
}

@keyframes overlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.dispenser-content-card {
  width: 100%;
  max-width: 440px;
  background: #ffffff;
  border-radius: 24px;
  padding: 22px 20px 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.15);
  border: 3px solid #d84b06;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  overflow: hidden;
  position: relative;
}

.dispenser-status-header {
  margin-bottom: 12px;
  width: 100%;
}

.dispenser-led-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #e8f5e9;
  border: 1.5px solid #81c784;
  padding: 6px 16px;
  border-radius: 100px;
  color: #1b5e20;
  font-weight: 800;
  font-size: 1.05rem;
}

.blinking-led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00e676;
  box-shadow: 0 0 10px #00e676, 0 0 20px #00e676;
  animation: ledPulse 0.5s infinite alternate;
}

@keyframes ledPulse {
  from { opacity: 0.4; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1.15); }
}

.dispenser-subtext {
  font-size: 0.85rem;
  color: #5a524e;
  font-weight: 600;
  margin-top: 6px;
}

/* Machine Dispenser Frame */
.dispenser-machine-frame {
  width: 100%;
  max-width: 340px;
  height: 240px;
  background: linear-gradient(180deg, #18110e 0%, #291c17 100%);
  border-radius: 16px;
  border: 3px solid #3e2e27;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: inset 0 6px 18px rgba(0, 0, 0, 0.7);
  margin-bottom: 14px;
}

.dispenser-slot-mouth {
  width: 82%;
  height: 12px;
  background: #0d0907;
  border-radius: 6px;
  margin-top: 12px;
  position: relative;
  box-shadow: inset 0 3px 6px #000, 0 1px 0 rgba(255, 255, 255, 0.12);
  z-index: 10;
}

.dispenser-laser-light {
  position: absolute;
  bottom: -2px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: #00e676;
  box-shadow: 0 0 10px #00e676, 0 0 20px #00e676;
}

.dispenser-paper-stream {
  width: 80%;
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  justify-content: center;
}

/* The Mini Ticket Slip Dispensing Downwards */
.dispenser-ticket-slip {
  width: 100%;
  background: #ffffff;
  border-radius: 0 0 8px 8px;
  padding: 10px 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
  border: 1px solid #dccbc4;
  border-top: 2px dashed #b33d04;
  text-align: left;
  transform: translateY(-90%);
  animation: feedPaperDownwards 2.8s cubic-bezier(0.2, 0.7, 0.25, 1) forwards;
}

@keyframes feedPaperDownwards {
  0% {
    transform: translateY(-88%);
    opacity: 0.85;
  }
  30% {
    transform: translateY(-45%);
    opacity: 1;
  }
  70% {
    transform: translateY(-10%);
    opacity: 1;
  }
  100% {
    transform: translateY(0%);
    opacity: 1;
  }
}

.slip-header {
  text-align: center;
  border-bottom: 1px dashed #d84b06;
  padding-bottom: 4px;
  margin-bottom: 6px;
}

.slip-om {
  display: block;
  font-size: 0.65rem;
  font-weight: 800;
  color: #d84b06;
}

.slip-title {
  font-size: 0.72rem;
  font-weight: 900;
  color: #1e1510;
  letter-spacing: 0.02em;
}

.slip-token-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff2eb;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 6px;
  border: 1px solid #fed7aa;
}

.slip-token-label {
  font-size: 0.65rem;
  font-weight: 800;
  color: #7a1a03;
}

.slip-token-val {
  font-size: 1.1rem;
  font-weight: 900;
  color: #d84b06;
}

.slip-details {
  font-size: 0.66rem;
  line-height: 1.35;
  color: #1e1510;
  margin-bottom: 6px;
}

.slip-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2px;
}

.slip-k {
  color: #6b7280;
  font-weight: 600;
}

.slip-v {
  font-weight: 800;
  color: #1e1510;
}

.slip-gate {
  color: #2e7d32 !important;
}

.slip-qr-box {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #faf7f5;
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #eedfd8;
}

.slip-qr-img {
  width: 34px;
  height: 34px;
  background: #fff;
  border-radius: 4px;
  padding: 1px;
}

.slip-qr-note {
  font-size: 0.6rem;
  font-weight: 700;
  color: #7a1a03;
}

.dispenser-tray-indicator {
  background: #231915;
  width: 100%;
  padding: 6px 0;
  color: #ffb74d;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  border-top: 1px solid #4a3832;
  z-index: 10;
}

/* 3-Second Timer & Progress Bar */
.dispenser-timer-section {
  width: 100%;
}

.dispenser-progress-track {
  width: 100%;
  height: 6px;
  background: #f3ece8;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 8px;
}

.dispenser-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #d84b06, #2e7d32);
  width: 0%;
  border-radius: 6px;
  animation: fillDispenserBar 3s linear forwards;
}

@keyframes fillDispenserBar {
  0% { width: 0%; }
  100% { width: 100%; }
}

.dispenser-timer-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: #4b423e;
}

.dispenser-timer-label strong {
  color: #d84b06;
  font-size: 1.05rem;
  font-weight: 900;
}

/* Kiosk Screen Footer */
.kiosk-screen-footer {
  text-align: center;
  padding: 10px;
  font-size: 0.75rem;
  color: #8b7367;
  border-top: 1px solid #f3ece8;
  background: #fff;
}

/* ============================================================
   MOBILE RESPONSIVENESS (SMARTPHONES & PORTRAIT TABLETS)
   Preserves zero-scroll for landscape kiosk tablets while
   providing a fluid, touch-friendly layout on mobile phones.
   ============================================================ */

@media (max-width: 768px), (orientation: portrait) and (max-width: 900px) {
  html, body {
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    position: static !important;
    -webkit-overflow-scrolling: touch !important;
    display: block !important;
  }

  .kiosk-device-casing {
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow-y: visible !important;
    display: block !important;
  }

  .kiosk-screen-viewport {
    width: 100% !important;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow-y: visible !important;
    display: flex !important;
    flex-direction: column !important;
  }

  .kiosk-header {
    padding: 8px 12px !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 50 !important;
  }

  .temple-brand {
    gap: 8px !important;
  }

  .temple-logo-img {
    width: 38px !important;
    height: 38px !important;
  }

  .temple-title h1 {
    font-size: 1rem !important;
    line-height: 1.2 !important;
  }

  .temple-title p {
    font-size: 0.7rem !important;
  }

  .lang-btn {
    padding: 5px 10px !important;
    font-size: 0.78rem !important;
    min-width: auto !important;
  }

  .kiosk-main {
    flex: 1 !important;
    width: 100% !important;
    height: auto !important;
    min-height: calc(100vh - 65px) !important;
    max-height: none !important;
    overflow-y: visible !important;
    padding: 12px 10px 24px !important;
  }

  .screen-card {
    width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow-y: visible !important;
    padding-bottom: 16px !important;
  }

  /* Welcome Screen */
  .welcome-hero {
    padding: 20px 8px !important;
    gap: 6px !important;
  }

  .welcome-logo-badge {
    width: 120px !important;
    height: 120px !important;
    max-height: 25vh !important;
    margin-bottom: 8px !important;
  }

  .welcome-title {
    font-size: 1.75rem !important;
    line-height: 1.2 !important;
  }

  .welcome-subtitle {
    font-size: 0.95rem !important;
    line-height: 1.35 !important;
  }

  .kiosk-btn-hero {
    width: 100% !important;
    max-width: 100% !important;
    padding: 16px 24px !important;
    font-size: 1.25rem !important;
    border-radius: 40px !important;
    margin-top: 16px !important;
  }

  /* Step Header */
  .step-header {
    margin-bottom: 12px !important;
  }

  .step-eyebrow {
    font-size: 0.75rem !important;
    padding: 3px 10px !important;
    margin-bottom: 4px !important;
  }

  .step-title {
    font-size: 1.35rem !important;
    line-height: 1.25 !important;
  }

  .step-sub {
    font-size: 0.85rem !important;
    margin-top: 2px !important;
  }

  /* Step 1: Dates & Slots */
  .date-selector-container {
    margin-bottom: 10px !important;
  }

  .date-section-heading {
    font-size: 0.92rem !important;
    margin-bottom: 6px !important;
  }

  .date-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

  .date-card {
    min-height: 60px !important;
    padding: 6px 4px !important;
  }

  .date-card .date-tag {
    font-size: 0.65rem !important;
  }

  .date-card .date-num {
    font-size: 1.2rem !important;
  }

  .date-card .date-month {
    font-size: 0.7rem !important;
  }

  .slots-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .slot-card {
    padding: 8px 10px !important;
    min-height: 72px !important;
  }

  .slot-time {
    font-size: 0.82rem !important;
  }

  .slot-wait-badge {
    font-size: 0.68rem !important;
    padding: 2px 6px !important;
  }

  .slot-seats {
    font-size: 0.7rem !important;
  }

  /* Step 2: Devotees Selector */
  .number-grid {
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 10px !important;
    margin: 16px auto !important;
    max-width: 100% !important;
  }

  .number-card {
    height: 80px !important;
  }

  .number-card .num {
    font-size: 2rem !important;
  }

  .number-card .lbl {
    font-size: 0.75rem !important;
  }

  /* Step 3: Name & Mobile Form */
  .form-container {
    max-width: 100% !important;
    padding: 0 4px !important;
  }

  .form-group {
    margin-bottom: 14px !important;
  }

  .form-label {
    font-size: 0.98rem !important;
    margin-bottom: 6px !important;
  }

  .touch-input {
    height: 50px !important;
    font-size: 1.05rem !important;
    padding: 0 14px !important;
  }

  /* Step 4: Booking Summary Box (Mobile Responsive 1-Column Card) */
  #screen-confirm .step-header {
    margin-bottom: 12px !important;
  }

  .summary-box {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    padding: 12px 14px !important;
    border-radius: 14px !important;
    border: 1.5px dashed #e5a93b !important;
    background: #fffdfb !important;
    box-shadow: 0 4px 12px rgba(216, 75, 6, 0.05) !important;
    margin-bottom: 14px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .summary-row {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    padding: 9px 0 !important;
    border-bottom: 1px solid #f3ece8 !important;
    gap: 10px !important;
  }

  .summary-row:last-child {
    border-bottom: none !important;
    padding-bottom: 2px !important;
  }

  .summary-key {
    font-size: 0.88rem !important;
    color: #7a1a03 !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    flex-shrink: 0 !important;
  }

  .summary-val {
    font-size: 1rem !important;
    font-weight: 800 !important;
    color: var(--dark) !important;
    text-align: right !important;
    word-break: break-word !important;
  }

  .summary-val.highlight {
    font-size: 1.08rem !important;
    color: var(--primary) !important;
  }

  #sum-gate {
    font-size: 0.92rem !important;
    line-height: 1.3 !important;
  }

  #screen-confirm .nav-actions {
    display: flex !important;
    flex-direction: column-reverse !important;
    gap: 10px !important;
    width: 100% !important;
    margin-top: 14px !important;
  }

  #screen-confirm .btn-confirm {
    width: 100% !important;
    min-height: 52px !important;
    padding: 14px 16px !important;
    font-size: 1.15rem !important;
    font-weight: 800 !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  #screen-confirm .btn-back {
    width: 100% !important;
    min-height: 44px !important;
    font-size: 1rem !important;
    border-radius: 10px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  /* Navigation Buttons */
  .nav-actions {
    margin-top: 14px !important;
    gap: 10px !important;
  }

  .btn-back, .btn-next, .btn-confirm {
    padding: 12px 18px !important;
    font-size: 1.02rem !important;
    min-height: 48px !important;
  }

  /* Step 5: Ticket Pass Card & Actions */
  .ticket-preview-container {
    width: 100% !important;
    padding: 0 !important;
  }

  .darshan-pass-card {
    width: 100% !important;
    max-width: 360px !important;
    margin: 0 auto !important;
    padding: 10px 12px !important;
  }

  #screen-ticket .nav-actions {
    flex-direction: column !important;
    max-width: 360px !important;
    margin: 12px auto 0 !important;
    gap: 8px !important;
  }

  #screen-ticket .nav-actions button {
    width: 100% !important;
    flex: none !important;
    padding: 12px 16px !important;
  }

  .kiosk-screen-footer {
    padding: 8px !important;
    font-size: 0.7rem !important;
  }
}
