/* =========================================================
   Village Care Audiology - Patient Check-In Kiosk Styles
   Optimized for iPad / iPadOS in Microsoft Intune Kiosk Mode
   ========================================================= */

:root {
  --primary-color: #8B182B;
  --primary-hover: #731222;
  --primary-light: #FBF2F3;
  --secondary-color: #C84B3B;
  --secondary-hover: #A83627;
  --secondary-light: #FDF4F3;
  --accent-color: #E26D5C;
  --success-color: #27ae60;
  --danger-color: #c0392b;
  --background-color: #fafbfc;
  --card-background: #ffffff;
  --text-main: #2b1f21;
  --text-muted: #6b585a;
  --border-color: #e5d7d8;
  --shadow-sm: 0 2px 4px rgba(139, 24, 43, 0.04);
  --shadow-md: 0 4px 14px rgba(139, 24, 43, 0.08);
  --shadow-lg: 0 8px 24px rgba(139, 24, 43, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --font-base: 18px;
  --font-title: 32px;
  --font-hero: 40px;
}

/* High Contrast Mode */
body.high-contrast {
  --primary-color: #5c0f1c;
  --primary-hover: #3d0711;
  --primary-light: #fad6dc;
  --secondary-color: #8a2a1d;
  --secondary-hover: #59160d;
  --background-color: #ffffff;
  --card-background: #ffffff;
  --text-main: #000000;
  --text-muted: #222222;
  --border-color: #000000;
  --shadow-md: 0 0 0 3px #000000;
}

/* Large Text Mode */
body.large-text {
  --font-base: 22px;
  --font-title: 38px;
  --font-hero: 48px;
}

/* Base Reset & Kiosk Hardening */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

/* Allow text input fields to accept typing */
input, textarea {
  user-select: text;
  -webkit-user-select: text;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  position: fixed;
  background-color: var(--background-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: var(--font-base);
  color: var(--text-main);
  line-height: 1.4;
}

.kiosk-container {
  display: flex;
  flex-direction: column;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  background: radial-gradient(circle at 50% 10%, #ffffff 0%, var(--background-color) 100%);
}

/* =========================================================
   HEADER
   ========================================================= */
.kiosk-header {
  height: 96px;
  background-color: #ffffff;
  border-bottom: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.clinic-brand {
  display: flex;
  align-items: center;
}

.clinic-brand-logo {
  height: 70px;
  width: auto;
  max-width: 320px;
  object-fit: contain;
  display: block;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.header-clock {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-main);
  background-color: var(--background-color);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  letter-spacing: 0.5px;
}

.a11y-controls {
  display: flex;
  gap: 10px;
}

.btn-pill {
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  color: var(--text-main);
  font-size: 15px;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.btn-pill:active {
  transform: scale(0.96);
  background-color: var(--primary-light);
  border-color: var(--primary-color);
}

/* =========================================================
   BODY / STEP WORKFLOW
   ========================================================= */
.kiosk-body {
  flex: 1;
  position: relative;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 32px 40px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.kiosk-step {
  display: none;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  animation: fadeIn 0.25s ease-out forwards;
}

.kiosk-step.active {
  display: flex;
  flex-direction: column;
}

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

/* =========================================================
   STEP 1: WELCOME SCREEN
   ========================================================= */
.welcome-hero {
  text-align: center;
  margin-bottom: 36px;
}

.welcome-badge {
  display: inline-block;
  background-color: var(--secondary-light);
  color: var(--secondary-color);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 12px;
  border: 1px solid rgba(11, 132, 132, 0.2);
}

.welcome-hero h2 {
  font-size: var(--font-hero);
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
  line-height: 1.2;
}

.instruction-text {
  font-size: calc(var(--font-base) * 1.1);
  color: var(--text-muted);
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 36px;
}

.choice-card {
  background-color: var(--card-background);
  border: 2px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  min-height: 290px;
  justify-content: center;
}

.choice-card:active {
  transform: scale(0.97);
}

.primary-choice {
  border-color: #eecad0;
  background: linear-gradient(180deg, #ffffff 0%, var(--primary-light) 100%);
}

.primary-choice:active {
  background: var(--primary-light);
  border-color: var(--primary-color);
}

.secondary-choice {
  border-color: #f5cfca;
  background: linear-gradient(180deg, #ffffff 0%, var(--secondary-light) 100%);
}

.secondary-choice:active {
  background: var(--secondary-light);
  border-color: var(--secondary-color);
}

.card-icon {
  margin-bottom: 20px;
}

.calendar-icon {
  color: var(--primary-color);
}

.walkin-icon {
  color: var(--secondary-color);
}

.card-content h3 {
  font-size: calc(var(--font-title) * 0.8);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 10px;
}

.card-content p {
  font-size: calc(var(--font-base) * 0.95);
  color: var(--text-muted);
  line-height: 1.35;
}

.card-arrow {
  margin-top: 18px;
  font-size: 28px;
  color: var(--primary-color);
  font-weight: bold;
}

.secondary-choice .card-arrow {
  color: var(--secondary-color);
}

.welcome-footer {
  text-align: center;
}

.privacy-notice {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
  color: #1b5e20;
  background-color: #eef7ee;
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid #c8e6c9;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

/* =========================================================
   STEP HEADERS & FORMS
   ========================================================= */
.step-header {
  position: relative;
  text-align: center;
  margin-bottom: 28px;
}

.btn-back {
  position: absolute;
  left: 0;
  top: 0;
  background-color: #ffffff;
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 18px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.btn-back:active {
  transform: scale(0.96);
  background-color: var(--primary-light);
}

.step-header h2 {
  font-size: var(--font-title);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 6px;
}

.step-subtitle {
  font-size: calc(var(--font-base) * 0.95);
  color: var(--text-muted);
}

.form-container {
  background-color: var(--card-background);
  border-radius: var(--radius-lg);
  padding: 32px 36px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

.form-group {
  margin-bottom: 22px;
}

.form-row {
  display: flex;
  gap: 20px;
}

.flex-1 {
  flex: 1;
}

label {
  display: block;
  font-size: calc(var(--font-base) * 0.9);
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.kiosk-input {
  width: 100%;
  height: 58px;
  padding: 0 18px;
  font-size: 20px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: #fbfcfd;
  color: var(--text-main);
  outline: none;
  transition: border-color 0.2s;
}

.kiosk-input:focus {
  border-color: var(--primary-color);
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(13, 92, 158, 0.15);
}

.dob-input-row {
  display: flex;
  gap: 12px;
}

.dob-display {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 2px;
  text-align: center;
  background-color: #edf2f7;
}

.btn-clear-dob {
  height: 58px;
  padding: 0 20px;
  background-color: #e2e8f0;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

.btn-clear-dob:active {
  background-color: #cbd5e1;
}

.helper-text {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--text-muted);
}

/* =========================================================
   ON-SCREEN TOUCH KEYPAD (For Date of Birth)
   ========================================================= */
.touch-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 440px;
  margin: 16px auto 24px auto;
}

.keypad-key {
  height: 60px;
  background-color: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.1s ease;
}

.keypad-key:active {
  transform: scale(0.95);
  background-color: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.special-key {
  font-size: 18px;
  background-color: #f1f5f9;
}

/* Reason for Visit Chips */
.reason-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.chip {
  padding: 12px 20px;
  border-radius: 25px;
  background-color: #f1f5f9;
  border: 2px solid var(--border-color);
  font-size: 16px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip:active {
  transform: scale(0.96);
}

.chip.active {
  background-color: var(--secondary-light);
  border-color: var(--secondary-color);
  color: var(--secondary-color);
  box-shadow: 0 0 0 2px rgba(11, 132, 132, 0.2);
}

/* Action Buttons */
.form-actions {
  margin-top: 24px;
}

.btn-submit {
  width: 100%;
  height: 66px;
  background-color: var(--primary-color);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
}

.btn-submit:active {
  transform: scale(0.98);
  background-color: var(--primary-hover);
}

/* =========================================================
   STEP 3: APPOINTMENT CONFIRMATION CARD
   ========================================================= */
.appointment-card {
  background-color: #ffffff;
  border: 2px solid #bad3f5;
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.card-status-badge {
  display: inline-block;
  background-color: #d1fae5;
  color: #065f46;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 14px;
}

.patient-greeting h3 {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 24px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}

.detail-box {
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
}

.detail-box.full-width {
  grid-column: 1 / -1;
}

.detail-label {
  display: block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.highlight-time {
  color: var(--primary-color);
  font-size: 24px;
}

.confirm-prompt p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 28px;
}

.confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.btn-checkin-confirm {
  width: 100%;
  height: 72px;
  background-color: var(--success-color);
  border: none;
  border-radius: var(--radius-md);
  color: #ffffff;
  font-size: 24px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 4px 14px rgba(39, 174, 96, 0.35);
  transition: all 0.2s ease;
}

.btn-checkin-confirm:active {
  transform: scale(0.98);
  background-color: #219653;
}

.btn-secondary-link {
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  padding: 10px;
}

.btn-secondary-link:active {
  color: var(--text-main);
}

/* =========================================================
   STEP 5: SUCCESS / CHECKED IN SCREEN
   ========================================================= */
.success-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 2px solid #a7f3d0;
}

.success-icon-wrap {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px auto;
}

.success-checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  stroke-width: 3;
  stroke: var(--success-color);
  stroke-miterlimit: 10;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 3;
  stroke-miterlimit: 10;
  stroke: var(--success-color);
  fill: #e8f8f0;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  transform-origin: 50% 50%;
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: stroke 0.4s cubic-bezier(0.65, 0, 0.45, 1) 0.5s forwards;
}

@keyframes stroke {
  100% { stroke-dashoffset: 0; }
}

.success-card h2 {
  font-size: 36px;
  font-weight: 800;
  color: #065f46;
  margin-bottom: 8px;
}

.success-patient-msg {
  font-size: 20px;
  color: var(--text-main);
  margin-bottom: 28px;
}

.waiting-instruction-box {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  margin-bottom: 32px;
}

.instruction-icon {
  font-size: 40px;
}

.instruction-details h4 {
  font-size: 18px;
  font-weight: 700;
  color: #14532d;
  margin-bottom: 4px;
}

.instruction-details p {
  font-size: 15px;
  color: #166534;
  line-height: 1.35;
}

.auto-reset-banner {
  background-color: var(--background-color);
  border-radius: var(--radius-sm);
  padding: 16px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.reset-progress-bar {
  width: 100%;
  height: 6px;
  background-color: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.reset-progress-fill {
  height: 100%;
  background-color: var(--primary-color);
  width: 100%;
  transition: width 1s linear;
}

.auto-reset-banner p {
  font-size: 14px;
  color: var(--text-muted);
}

/* =========================================================
   FOOTER
   ========================================================= */
.kiosk-footer {
  height: 54px;
  background-color: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  font-size: 14px;
  color: var(--text-muted);
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.live {
  background-color: var(--success-color);
  box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.2);
}

/* =========================================================
   MODALS (Inactivity & Alert)
   ========================================================= */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.2s ease-out;
}

.modal-backdrop.active {
  display: flex;
}

.modal-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  max-width: 480px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.modal-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.modal-card h3 {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 10px;
}

.modal-card p {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.4;
  margin-bottom: 24px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================================================
   MULTI-LOCATION STYLES
   ========================================================= */
.btn-location-pill {
  background-color: var(--secondary-light);
  border: 1.5px solid var(--secondary-color);
  color: var(--secondary-color);
  font-size: 15px;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s ease;
}

.btn-location-pill:active {
  transform: scale(0.96);
  background-color: #d0f0f0;
}

.loc-switch-hint {
  font-size: 12px;
  opacity: 0.7;
}

.location-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
  max-height: 280px;
  overflow-y: auto;
}

.location-item {
  background-color: #f8fafc;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
}

.location-item:active {
  transform: scale(0.98);
}

.location-item.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-light);
}

.loc-item-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-main);
  display: block;
}

.loc-item-sub {
  font-size: 13px;
  color: var(--text-muted);
  display: block;
  margin-top: 2px;
}

.loc-check {
  font-size: 20px;
  color: var(--primary-color);
  font-weight: bold;
}

/* =========================================================
   RED HELP BUTTON & ASSISTANCE SCREEN
   ========================================================= */
.btn-red-help {
  background-color: #d32f2f;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 6px;
  box-shadow: 0 2px 6px rgba(211, 47, 47, 0.25);
  transition: all 0.15s ease;
  vertical-align: middle;
}

.btn-red-help:active {
  transform: scale(0.94);
  background-color: #b71c1c;
}

.help-prompt-text {
  font-size: 14px;
  color: var(--text-muted);
}

.help-assistance-card {
  background-color: #ffffff;
  border-radius: var(--radius-lg);
  padding: 44px 36px;
  box-shadow: var(--shadow-lg);
  text-align: center;
  border: 2px solid #ffcdd2;
}

.help-pulsing-badge {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px auto;
  border-radius: 50%;
  background-color: #ffebee;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.4);
  animation: pulse-ring 1.8s infinite;
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(211, 47, 47, 0.5);
  }
  70% {
    box-shadow: 0 0 0 18px rgba(211, 47, 47, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(211, 47, 47, 0);
  }
}

.bell-icon {
  font-size: 42px;
}

.help-assistance-card h2 {
  font-size: 34px;
  font-weight: 800;
  color: #b71c1c;
  margin-bottom: 8px;
}

.help-assistance-sub {
  font-size: 19px;
  color: var(--text-main);
  margin-bottom: 28px;
}

.assistance-instruction-box {
  background-color: #fff8e1;
  border: 1px solid #ffe082;
  border-radius: var(--radius-md);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  text-align: left;
  margin-bottom: 32px;
}

.assistance-instruction-box .instruction-icon {
  font-size: 40px;
}

.assistance-instruction-box h4 {
  font-size: 18px;
  font-weight: 700;
  color: #b78103;
  margin-bottom: 4px;
}

.assistance-instruction-box p {
  font-size: 15px;
  color: #6d4c41;
  line-height: 1.35;
}


