/* Gentle Journey - Customer Companion Booking Portal CSS Style */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --primary: hsl(43, 93%, 55%); /* Gentle Journey Gold */
  --primary-hover: hsl(43, 93%, 45%);
  --primary-light: hsl(43, 100%, 96%);
  
  --secondary: hsl(142, 69%, 29%); /* Companion Forest Green */
  --secondary-light: hsl(142, 50%, 95%);
  
  --dark-slate: hsl(215, 28%, 17%);
  --slate-gray: hsl(215, 15%, 50%);
  --light-slate: hsl(210, 40%, 96%);
  --border-color: hsl(214, 32%, 90%);
  
  --white: #ffffff;
  --black: #090d16;
  
  --success: hsl(142, 69%, 29%);
  --warning: hsl(38, 92%, 50%);
  --danger: hsl(0, 84%, 60%);
  --info: hsl(199, 89%, 48%);
  
  /* Styling constants */
  --font-main: 'Plus Jakarta Sans', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.02), 0 1px 2px rgba(0,0,0,0.03);
  --shadow-md: 0 10px 20px -5px rgba(0,0,0,0.04), 0 4px 6px -2px rgba(0,0,0,0.02);
  --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.06), 0 10px 10px -5px rgba(0,0,0,0.02);
  --shadow-simulator: 0 30px 60px -15px rgba(15, 23, 42, 0.3);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base resets */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body.mobile-app-wrapper {
  font-family: var(--font-main);
  background-color: hsl(210, 30%, 96%);
  color: var(--dark-slate);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

button, input, textarea, select {
  font-family: inherit;
}

/* Phone Simulator frame */
.phone-simulator {
  width: 480px;
  height: 900px;
  border-radius: 40px;
  border: 12px solid #2d3748;
  background: var(--white);
  box-shadow: var(--shadow-simulator);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Simulated notch */
.phone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 150px;
  height: 25px;
  background: #2d3748;
  border-bottom-left-radius: 18px;
  border-bottom-right-radius: 18px;
  z-index: 1000;
}

/* Screen container */
.phone-screen {
  flex-grow: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: hsl(210, 30%, 98%);
  padding-top: 15px;
}

/* App screen panels */
.app-screen {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out;
  transform: translateY(10px);
  z-index: 1;
}

.app-screen.active {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
  z-index: 10;
}

/* Scrollable screen body */
.screen-body {
  flex-grow: 1;
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.screen-body.scrollable {
  overflow-y: auto;
  padding-bottom: 85px;
}

/* Screen Header layout */
.screen-header {
  padding: 24px 20px 12px 20px;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
}

.screen-header h2 {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dark-slate);
}

.screen-header p {
  font-size: 0.8rem;
  color: var(--slate-gray);
  margin-top: 2px;
}

/* Custom Splash / Onboarding screen */
#screen-splash {
  background: linear-gradient(135deg, hsl(215, 28%, 20%) 0%, hsl(215, 35%, 11%) 100%);
  color: var(--white);
}

.splash-content {
  margin: auto;
  text-align: center;
  padding: 30px;
}

.splash-logo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  border: 3px solid var(--primary);
  box-shadow: 0 10px 25px rgba(245, 194, 66, 0.4);
  margin-bottom: 24px;
}

.splash-title {
  font-family: var(--font-heading);
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.splash-subtitle {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 2px;
  margin-bottom: 20px;
}

.splash-desc {
  font-size: 0.88rem;
  line-height: 1.5;
  color: hsl(214, 20%, 75%);
  margin-bottom: 40px;
  max-width: 320px;
  margin-left: auto;
  margin-right: auto;
}

.splash-actions {
  width: 100%;
  display: flex;
  flex-direction: column;
}

/* Bottom App Navigation Bar */
.app-navigation {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 68px;
  background: var(--white);
  border-top: 1px solid var(--border-color);
  display: flex;
  z-index: 100;
  padding-bottom: 5px;
}

.nav-tab {
  flex: 1;
  border: none;
  background: transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--slate-gray);
  transition: var(--transition);
}

.nav-tab:hover {
  color: var(--dark-slate);
}

.nav-tab.active {
  color: var(--secondary);
}

.tab-icon {
  font-size: 1.35rem;
  margin-bottom: 2px;
  transition: var(--transition);
}

.nav-tab.active .tab-icon {
  transform: translateY(-2px);
}

.tab-label {
  font-size: 0.68rem;
  font-weight: 600;
}

/* Dashboard Greeting Header */
.dashboard-header {
  background: linear-gradient(135deg, var(--secondary) 0%, hsl(142, 80%, 20%) 100%);
  color: var(--white);
  padding: 30px 24px 20px 24px;
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-md);
}

.client-greeting {
  display: flex;
  flex-direction: column;
}

.greeting-time {
  font-size: 0.85rem;
  opacity: 0.8;
}

.greeting-name {
  font-family: var(--font-heading);
  font-size: 1.45rem;
  font-weight: 700;
}

.client-avatar-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--dark-slate);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.05rem;
  border: 2px solid var(--white);
  box-shadow: var(--shadow-sm);
}

/* Promo booking card */
.promo-card {
  background: linear-gradient(135deg, var(--primary-light) 0%, hsl(43, 100%, 91%) 100%);
  border: 1px solid var(--primary);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-top: 15px;
  box-shadow: var(--shadow-sm);
}

.promo-card h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-slate);
  margin-bottom: 4px;
}

.promo-card p {
  font-size: 0.78rem;
  color: var(--slate-gray);
  line-height: 1.4;
}

.section-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--dark-slate);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* =====================
   QUICK OUTING CARDS
   ===================== */
.quick-outing-card {
  background: white;
  border: 1px solid var(--border-color);
  padding: 12px;
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.quick-outing-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary);
}

.quick-outing-icon {
  font-size: 1.8rem;
}

.quick-outing-label {
  font-size: 0.78rem;
  color: var(--dark-slate);
}

.quick-outing-badge {
  font-size: 0.62rem;
  color: var(--secondary);
  font-weight: 700;
  background: var(--secondary-light);
  padding: 2px 6px;
  border-radius: 10px;
}

/* =====================
   TRIP TABS
   ===================== */
.trip-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  background: var(--light-slate);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.trip-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 7px 4px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--slate-gray);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
}

.trip-tab.active {
  background: white;
  color: var(--secondary);
  box-shadow: var(--shadow-sm);
}

/* Client Dashboard Bookings timeline list */
.dashboard-trips-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.client-trip-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  cursor: pointer;
}

.client-trip-card:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-md);
}

.trip-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.trip-card-time {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--secondary);
}

.trip-card-badge {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
}

.trip-card-badge.upcoming { background: hsl(200, 100%, 95%); color: hsl(200, 100%, 35%); }
.trip-card-badge.en-route { background: hsl(199, 89%, 95%); color: hsl(199, 89%, 35%); }
.trip-card-badge.in-transit { background: hsl(38, 92%, 95%); color: hsl(38, 92%, 35%); }
.trip-card-badge.support { background: var(--secondary-light); color: var(--secondary); }
.trip-card-badge.completed { background: var(--secondary-light); color: var(--secondary); }
.trip-card-badge.cancelled { background: hsl(0, 100%, 96%); color: var(--danger); }
.trip-card-badge.past { background: var(--light-slate); color: var(--slate-gray); }

.trip-card-route {
  font-size: 0.78rem;
  color: var(--slate-gray);
  line-height: 1.4;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trip-card-route strong {
  color: var(--dark-slate);
}

.trip-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  padding-top: 10px;
  font-size: 0.8rem;
}

.trip-driver-summary {
  display: flex;
  align-items: center;
  gap: 6px;
}

.trip-driver-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border-color);
}

.trip-driver-name {
  font-weight: 600;
  color: var(--dark-slate);
}

.trip-card-price {
  font-weight: 700;
  color: var(--dark-slate);
}

.trip-cancel-btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 7px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  background: hsl(0, 84%, 98%);
  border: 1px solid hsl(0, 84%, 88%);
  border-radius: var(--radius-sm);
  color: var(--danger);
  cursor: pointer;
  transition: var(--transition);
  font-family: var(--font-main);
}

.trip-cancel-btn:hover {
  background: hsl(0, 84%, 94%);
}

/* =====================
   ESTIMATE BOX
   ===================== */
.estimate-box {
  background: hsl(43, 100%, 97%);
  border: 1.5px dashed var(--primary);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: center;
  margin: 10px 0;
}

.estimate-title {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dark-slate);
  text-transform: uppercase;
}

.estimate-price {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--secondary);
  margin: 4px 0;
}

.estimate-breakdown {
  font-size: 0.76rem;
  color: var(--slate-gray);
  font-weight: 600;
}

.estimate-notice {
  font-size: 0.65rem;
  color: var(--slate-gray);
  line-height: 1.35;
  margin-top: 8px;
}

/* Interactive Map containers inside phone mockup */
.booking-map-container {
  width: 100%;
  height: 180px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  background: var(--light-slate);
  position: relative;
  overflow: hidden;
  z-index: 10;
  margin: 10px 0;
}

.map-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
  font-size: 0.78rem;
  color: var(--slate-gray);
  line-height: 1.4;
}

/* Form Styles */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dark-slate);
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--white);
  color: var(--dark-slate);
  font-size: 0.82rem;
  outline: none;
  transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(37, 99, 58, 0.15);
}

.form-textarea {
  resize: vertical;
}

/* Premium Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--secondary);
  color: var(--white);
  box-shadow: 0 4px 10px rgba(37, 99, 58, 0.25);
}

.btn-primary:hover {
  background: hsl(142, 69%, 24%);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--white);
  color: var(--dark-slate);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: var(--light-slate);
}

.full-width {
  width: 100%;
}

/* =====================
   WIZARD PROGRESS BAR
   ===================== */
.wizard-progress-bar {
  display: flex;
  align-items: center;
  padding: 14px 20px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--border-color);
  gap: 0;
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.wizard-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--border-color);
  color: var(--slate-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  transition: var(--transition);
}

.wizard-step.active .wizard-step-dot {
  background: var(--secondary);
  color: white;
  box-shadow: 0 0 0 3px var(--secondary-light);
}

.wizard-step.completed .wizard-step-dot {
  background: var(--secondary);
  color: white;
}

.wizard-step-label {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--slate-gray);
  white-space: nowrap;
}

.wizard-step.active .wizard-step-label {
  color: var(--secondary);
}

.wizard-step-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 6px;
  margin-bottom: 14px;
  transition: background 0.3s;
}

.wizard-step-line.completed {
  background: var(--secondary);
}

.wizard-panel {
  display: none;
}

.wizard-panel.active {
  display: block;
}

/* =====================
   WIZARD SUMMARY CARD
   ===================== */
.wizard-summary-card {
  background: var(--light-slate);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  font-size: 0.8rem;
  line-height: 1.6;
}

.wizard-summary-card .summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-color);
}

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

.wizard-summary-card .summary-label {
  color: var(--slate-gray);
  font-weight: 600;
  flex-shrink: 0;
}

.wizard-summary-card .summary-value {
  color: var(--dark-slate);
  font-weight: 700;
  text-align: right;
}

/* =====================
   BOOKING CONFIRMATION
   ===================== */
.confirm-check-circle {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--secondary);
  color: white;
  font-size: 2.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 0 0 12px var(--secondary-light), 0 8px 24px rgba(37, 99, 58, 0.3);
  animation: confirmPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

@keyframes confirmPop {
  0% { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.confirm-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--dark-slate);
  margin-bottom: 6px;
}

.confirm-subtitle {
  font-size: 0.82rem;
  color: var(--slate-gray);
  line-height: 1.5;
  margin-bottom: 20px;
  max-width: 260px;
  margin-left: auto;
  margin-right: auto;
}

.confirm-summary-card {
  background: var(--light-slate);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: left;
  width: 100%;
  font-size: 0.8rem;
}

.confirm-summary-card .csrow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-color);
}

.confirm-summary-card .csrow:last-child { border-bottom: none; }
.confirm-summary-card .csrow .cslabel { color: var(--slate-gray); font-weight: 600; min-width: 80px; }
.confirm-summary-card .csrow .csval { color: var(--dark-slate); font-weight: 700; }

/* =====================
   ETA BLOCK (Tracking)
   ===================== */
.eta-block {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, var(--secondary-light), hsl(142, 60%, 92%));
  border: 1.5px solid hsl(142, 50%, 75%);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
  animation: etaPulse 2.5s ease-in-out infinite;
}

@keyframes etaPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 58, 0.1); }
  50% { box-shadow: 0 0 0 6px rgba(37, 99, 58, 0); }
}

.eta-icon {
  font-size: 2rem;
  animation: etaDrive 1.5s ease-in-out infinite alternate;
}

@keyframes etaDrive {
  0% { transform: translateX(-3px); }
  100% { transform: translateX(3px); }
}

.eta-label {
  font-size: 0.72rem;
  color: var(--slate-gray);
  font-weight: 600;
}

.eta-value {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--secondary);
}

/* =====================
   TRACKING SCREEN
   ===================== */
.tracking-driver-card {
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.meet-driver-section {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meet-driver-bio {
  font-size: 0.78rem;
  color: var(--slate-gray);
  line-height: 1.45;
  font-style: italic;
}

.meet-driver-quals {
  font-size: 0.7rem;
  background: var(--secondary-light);
  color: var(--secondary);
  padding: 4px 8px;
  border-radius: 6px;
  font-weight: 700;
}

.meet-driver-vehicle {
  font-size: 0.72rem;
  color: var(--slate-gray);
  font-weight: 600;
}

.tracking-stages {
  display: flex;
  flex-direction: column;
  position: relative;
  gap: 20px;
}

.tracking-stages::before {
  content: '';
  position: absolute;
  top: 10px;
  left: 6px;
  bottom: 10px;
  width: 2px;
  background: #cbd5e1;
  z-index: 1;
}

.tracking-stage-item {
  display: flex;
  gap: 15px;
  z-index: 2;
  opacity: 0.5;
  transition: var(--transition);
}

.tracking-stage-item.active {
  opacity: 1;
}

.stage-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid #cbd5e1;
  margin-top: 3px;
  flex-shrink: 0;
  transition: var(--transition);
}

.tracking-stage-item.active .stage-dot {
  border-color: var(--secondary);
  background: var(--secondary);
  box-shadow: 0 0 0 3px var(--secondary-light);
}

.stage-info {
  display: flex;
  flex-direction: column;
}

.stage-title {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--dark-slate);
}

.stage-desc {
  font-size: 0.72rem;
  color: var(--slate-gray);
  margin-top: 1px;
}

/* =====================
   CANCEL MODAL
   ===================== */
.cancel-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(9, 13, 22, 0.7);
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: 28px;
}

.cancel-modal-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease-out;
}

@keyframes slideUp {
  0% { transform: translateY(20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

/* =====================
   TOAST NOTIFICATIONS
   ===================== */
.toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  min-width: 280px;
  max-width: 360px;
}

.toast {
  background: var(--dark-slate);
  color: white;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
  pointer-events: auto;
  font-family: var(--font-main);
}

.toast.toast-success { background: var(--secondary); }
.toast.toast-info { background: var(--info); }
.toast.toast-warning { background: var(--warning); color: var(--dark-slate); }
.toast.toast-error { background: var(--danger); }

.toast.toast-exit {
  animation: toastOut 0.3s ease-in forwards;
}

@keyframes toastIn {
  0% { transform: translateY(-20px); opacity: 0; }
  100% { transform: translateY(0); opacity: 1; }
}

@keyframes toastOut {
  0% { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(-20px); opacity: 0; }
}

/* =====================
   SAVED PLACES
   ===================== */
.saved-places-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.saved-place-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: hsl(43, 93%, 25%);
  cursor: pointer;
  transition: var(--transition);
}

.saved-place-chip:hover {
  background: var(--primary);
  color: var(--dark-slate);
}

/* =====================
   LOGIN HELP BOX
   ===================== */
.login-help-box {
  background: var(--light-slate);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.login-help-toggle {
  width: 100%;
  background: none;
  border: none;
  padding: 10px 14px;
  text-align: left;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--secondary);
  cursor: pointer;
  font-family: var(--font-main);
}

.login-help-content {
  padding: 0 14px 12px;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--slate-gray);
}

/* =====================
   PROFILE SECTION CARDS
   ===================== */
.profile-section-card {
  background: var(--light-slate);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
}

.profile-section-title {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--dark-slate);
  margin-bottom: 12px;
}

/* Accessibility font size toggle */
.font-size-toggle {
  display: flex;
  gap: 6px;
}

.font-size-btn {
  flex: 1;
  padding: 8px 6px;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-color);
  background: white;
  color: var(--dark-slate);
  transition: var(--transition);
  font-family: var(--font-main);
}

.font-size-btn.active {
  background: var(--secondary-light);
  border-color: var(--secondary);
  color: var(--secondary);
}

/* Help & Contact list */
.help-contact-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  background: white;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  transition: var(--transition);
}

.help-contact-item:hover {
  border-color: var(--secondary);
  box-shadow: var(--shadow-sm);
}

.help-contact-icon {
  font-size: 1.4rem;
  width: 30px;
  text-align: center;
}

/* FAQ modal styles */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

.faq-q {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--dark-slate);
  margin-bottom: 4px;
}

.faq-a {
  font-size: 0.75rem;
  color: var(--slate-gray);
  line-height: 1.5;
}

/* Empty states */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 10px;
  text-align: center;
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px dashed var(--border-color);
}

.empty-state-icon {
  font-size: 2.2rem;
  margin-bottom: 8px;
}

.empty-state h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-slate);
  margin-bottom: 4px;
}

.empty-state p {
  font-size: 0.75rem;
  color: var(--slate-gray);
  max-width: 240px;
}

/* Responsive adjustment for mock frame on small viewports */
@media (max-width: 520px) {
  body.mobile-app-wrapper {
    padding: 0;
    background: transparent;
  }
  .phone-simulator {
    width: 100%;
    height: 100vh;
    border: none;
    border-radius: 0;
  }
  .phone-notch {
    display: none;
  }
  .phone-screen {
    padding-top: 0;
  }
}

/* Payment gateway micro-animations */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes scaleUp {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

/* Accessibility font sizing classes */
html {
  font-size: 16px;
  transition: font-size 0.2s ease-in-out;
}
html.font-sm { font-size: 14px; }
html.font-md { font-size: 16px; }
html.font-lg { font-size: 19px; }

/* =============================================
   TIPPING SYSTEM
   ============================================= */

/* Tip section on booking confirmation screen */
.tip-section {
  width: 100%;
  background: linear-gradient(135deg, hsl(43, 100%, 97%) 0%, hsl(38, 100%, 94%) 100%);
  border: 1.5px solid hsl(43, 80%, 82%);
  border-radius: var(--radius-md);
  padding: 18px 16px;
  margin-top: 20px;
  text-align: center;
}

.tip-section-header {
  margin-bottom: 14px;
}

.tip-section-icon {
  font-size: 1.6rem;
  display: block;
  margin-bottom: 6px;
}

.tip-section-title {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-slate);
  margin-bottom: 3px;
}

.tip-section-driver {
  font-size: 0.78rem;
  color: var(--slate-gray);
}

.tip-section-driver strong {
  color: hsl(43, 90%, 38%);
}

/* Preset amount chips */
.tip-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.tip-preset-btn {
  background: white;
  border: 1.5px solid hsl(43, 70%, 80%);
  border-radius: 10px;
  padding: 10px 4px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: hsl(43, 80%, 35%);
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.04);
}

.tip-preset-btn:hover {
  background: hsl(43, 100%, 90%);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(245, 158, 11, 0.2);
}

.tip-preset-btn.selected {
  background: var(--primary);
  border-color: var(--primary-hover);
  color: var(--dark-slate);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transform: translateY(-1px);
}

/* Custom amount input row */
.tip-custom-wrap {
  display: flex;
  align-items: center;
  background: white;
  border: 1.5px solid hsl(43, 70%, 80%);
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 14px;
  transition: border-color 0.2s;
}

.tip-custom-wrap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsl(43, 100%, 88%);
}

.tip-custom-prefix {
  padding: 10px 12px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: hsl(43, 80%, 40%);
  background: hsl(43, 100%, 94%);
  border-right: 1.5px solid hsl(43, 70%, 80%);
  user-select: none;
}

.tip-custom-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 10px 12px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--dark-slate);
  background: transparent;
}

.tip-custom-input::placeholder {
  color: hsl(215, 15%, 70%);
  font-weight: 400;
}

/* Send tip button */
.tip-send-btn {
  width: 100%;
  padding: 13px 16px;
  background: linear-gradient(135deg, var(--primary) 0%, hsl(38, 95%, 48%) 100%);
  border: none;
  border-radius: 12px;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dark-slate);
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
  letter-spacing: 0.01em;
}

.tip-send-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(245, 158, 11, 0.4);
}

.tip-send-btn:active:not(:disabled) {
  animation: tipBounce 0.3s ease;
}

.tip-send-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

@keyframes tipBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.94); }
  70%  { transform: scale(1.04); }
  100% { transform: scale(1); }
}

/* Skip tip link */
.tip-skip {
  display: block;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--slate-gray);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.15s;
}

.tip-skip:hover {
  color: var(--dark-slate);
}

/* Tip success state (shown after tip is sent) */
.tip-success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  animation: scaleUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tip-success-check {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--primary) 0%, hsl(38, 95%, 48%) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 16px rgba(245, 158, 11, 0.4);
}

.tip-success-msg {
  font-family: var(--font-heading);
  font-size: 0.92rem;
  font-weight: 700;
  color: hsl(43, 80%, 32%);
}

.tip-success-sub {
  font-size: 0.74rem;
  color: var(--slate-gray);
}

/* ─── Tip Modal (post-trip, from history card) ─── */
.tip-modal-overlay {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(9, 13, 22, 0.6);
  backdrop-filter: blur(3px);
  z-index: 9998;
  align-items: flex-end;
  justify-content: center;
  border-radius: 28px;
}

.tip-modal-overlay.active {
  display: flex;
}

.tip-modal-box {
  background: white;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: 24px 20px 30px;
  width: 100%;
  animation: slideUpModal 0.3s cubic-bezier(0.34, 1.2, 0.64, 1);
}

@keyframes slideUpModal {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.tip-modal-handle {
  width: 40px;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  margin: 0 auto 18px;
}

.tip-modal-driver-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
}

.tip-modal-driver-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--primary);
  flex-shrink: 0;
}

.tip-modal-driver-avatar-initials {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary-light);
  border: 2px solid var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: hsl(43, 80%, 35%);
  flex-shrink: 0;
}

.tip-modal-driver-info h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  color: var(--dark-slate);
  margin-bottom: 2px;
}

.tip-modal-driver-info p {
  font-size: 0.75rem;
  color: var(--slate-gray);
}

.tip-modal-title {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark-slate);
  margin-bottom: 4px;
  text-align: center;
}

.tip-modal-subtitle {
  font-size: 0.78rem;
  color: var(--slate-gray);
  text-align: center;
  margin-bottom: 16px;
}

/* ─── "Tip Driver" button on trip cards ─── */
.trip-tip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 7px 14px;
  background: hsl(43, 100%, 95%);
  border: 1.5px solid hsl(43, 80%, 78%);
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 0.74rem;
  font-weight: 700;
  color: hsl(43, 80%, 35%);
  cursor: pointer;
  transition: all 0.18s ease;
  width: 100%;
  justify-content: center;
}

.trip-tip-btn:hover {
  background: hsl(43, 100%, 88%);
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(245, 158, 11, 0.2);
}

/* ─── "Tipped ✓" badge on trip cards ─── */
.tip-sent-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 10px;
  padding: 6px 14px;
  background: hsl(142, 50%, 95%);
  border: 1.5px solid hsl(142, 50%, 78%);
  border-radius: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--secondary);
  width: 100%;
  justify-content: center;
  pointer-events: none;
}

/* ── Dark Mode overrides ──────────────────────────────────────── */
[data-theme="dark"] body {
  background: hsl(220,28%,8%);
  color: hsl(220,20%,92%);
}
[data-theme="dark"] .card,
[data-theme="dark"] .booking-card,
[data-theme="dark"] .exp-card,
[data-theme="dark"] .memory-card,
[data-theme="dark"] .stat-card {
  background: hsl(220,22%,14%);
  border-color: hsl(220,18%,22%);
  color: hsl(220,20%,92%);
}
[data-theme="dark"] .app-screen {
  background: hsl(220,28%,8%);
}
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: hsl(220,22%,16%);
  border-color: hsl(220,18%,24%);
  color: hsl(220,20%,92%);
}
[data-theme="dark"] .trip-tab {
  background: hsl(220,22%,16%);
  color: hsl(220,12%,60%);
}
[data-theme="dark"] .trip-tab.active {
  background: hsl(142,50%,18%);
  color: hsl(142,60%,70%);
}
[data-theme="dark"] .bottom-nav {
  background: hsl(220,28%,10%);
  border-top-color: hsl(220,18%,18%);
}
[data-theme="dark"] .bottom-nav-item {
  color: hsl(220,12%,55%);
}
[data-theme="dark"] .bottom-nav-item.active {
  color: hsl(142,60%,60%);
}
[data-theme="dark"] .modal-overlay {
  background: rgba(5,12,20,.92);
}
[data-theme="dark"] .modal {
  background: hsl(220,25%,12%);
  border-color: hsl(220,18%,22%);
  color: hsl(220,20%,92%);
}
[data-theme="dark"] #gj-weather-card {
  filter: brightness(.85);
}

/* ══════════════════════════════════════════════════════════════
   MOBILE OPTIMISATION — Real phones go full-screen native
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 520px) {

  /* Body: full height, no padding */
  body.mobile-app-wrapper {
    padding: 0;
    background: var(--white);
    align-items: stretch;
    justify-content: stretch;
    min-height: 100vh;
    min-height: 100dvh;
  }

  /* Simulator frame becomes the full screen */
  .phone-simulator {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    border: none;
    box-shadow: none;
  }

  /* Hide decorative notch — real phone has its own */
  .phone-notch { display: none; }

  /* Use safe-area for notch phones (iPhone X+) */
  .phone-screen {
    padding-top: env(safe-area-inset-top, 12px);
  }

  /* Screen body — account for bottom nav + home indicator */
  .screen-body {
    padding: 14px 14px calc(env(safe-area-inset-bottom, 10px) + 68px);
  }

  /* ── Bottom nav — taller for thumbs ── */
  .bottom-nav {
    padding-bottom: env(safe-area-inset-bottom, 8px);
    min-height: 56px;
  }
  .bottom-nav-item {
    min-height: 52px;
    padding: 8px 4px 6px;
    font-size: 0.62rem;
  }

  /* ── Inputs — 16px prevents iOS auto-zoom ── */
  input[type="text"],
  input[type="tel"],
  input[type="email"],
  input[type="password"],
  input[type="datetime-local"],
  input[type="number"],
  select,
  textarea {
    font-size: 16px !important;
    padding: 13px 14px !important;
    min-height: 48px;
    border-radius: 12px !important;
  }

  /* ── Buttons — minimum 44px tap target ── */
  .btn, [class*="btn-"], .booking-next-btn, .booking-back-btn {
    min-height: 48px;
    font-size: 0.93rem;
    padding: 12px 18px;
    border-radius: 14px;
  }

  /* Primary CTA full width */
  .btn-primary, .booking-confirm-btn {
    width: 100%;
    justify-content: center;
  }

  /* ── Cards ── */
  .card, .booking-card {
    border-radius: 16px;
    padding: 14px;
  }

  /* ── Form rows — stack vertically ── */
  .form-row {
    flex-direction: column !important;
    gap: 10px;
  }

  /* ── Quick preset chips — 2-column grid ── */
  .quick-preset-btn {
    flex: 1 1 calc(50% - 6px);
    min-height: 46px;
    font-size: 0.78rem;
    padding: 10px 8px;
    justify-content: center;
    text-align: center;
  }

  /* ── Modals slide up from bottom ── */
  .modal-overlay {
    align-items: flex-end;
  }
  .modal {
    border-radius: 22px 22px 0 0 !important;
    max-height: 90dvh;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-bottom: env(safe-area-inset-bottom, 16px);
    overflow-y: auto;
  }

  /* ── Map containers ── */
  #map, .leaflet-container {
    border-radius: 14px !important;
    min-height: 220px;
  }

  /* ── SOS button — bigger and above nav ── */
  #sos-btn, .sos-button {
    width: 56px !important;
    height: 56px !important;
    font-size: 1.2rem !important;
    bottom: calc(env(safe-area-inset-bottom, 8px) + 66px) !important;
    right: 14px !important;
  }

  /* ── Toast — above bottom nav ── */
  #toast-container {
    bottom: calc(env(safe-area-inset-bottom, 8px) + 72px) !important;
    left: 12px !important;
    right: 12px !important;
    top: auto !important;
  }
  .toast {
    font-size: 0.86rem;
    padding: 11px 14px;
    border-radius: 14px;
  }

  /* ── PIN inputs — bigger ── */
  .pin-input {
    width: 54px !important;
    height: 58px !important;
    font-size: 1.4rem !important;
    border-radius: 14px !important;
  }

  /* ── Profile ── */
  .profile-avatar-wrap { margin-bottom: 12px; }

  /* ── Prevent any horizontal scrolling ── */
  .app-screen, .screen-body, .phone-screen {
    overflow-x: hidden;
  }
}

/* ── Tablets (521–768px): centred phone card ── */
@media (min-width: 521px) and (max-width: 768px) {
  body.mobile-app-wrapper { padding: 16px; }
  .phone-simulator {
    width: min(440px, 100%);
    height: min(860px, 94vh);
  }
}

/* ── Momentum scrolling throughout ── */
.screen-body, .modal, .app-screen {
  -webkit-overflow-scrolling: touch;
}

/* ── Focus rings ── */
input:focus-visible, select:focus-visible, button:focus-visible {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}
