:root {
  --brand-primary: #0f766e;
  --brand-accent: #f97316;
}

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'DM Sans', sans-serif;
  background:
    radial-gradient(circle at 100% 0%, rgba(15, 118, 110, 0.12), transparent 36%),
    radial-gradient(circle at 0% 100%, rgba(249, 115, 22, 0.1), transparent 38%),
    linear-gradient(180deg, #f0fdfa 0%, #f8fafc 100%);
}

.display-font {
  font-family: 'Sora', sans-serif;
  letter-spacing: -0.02em;
}

#booking-feedback {
  min-height: 24px;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 220ms ease, transform 220ms ease;
}
#booking-feedback.feedback-show {
  opacity: 1;
  transform: translateY(0);
}
#booking-feedback.feedback-error {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #be123c;
  animation: feedbackShake 240ms ease-out;
}
#booking-feedback.feedback-success {
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

input[type="date"] {
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.25rem;
  padding-right: 2.75rem;
}

input[type="date"]::-webkit-date-and-time-value {
  text-align: left;
}

input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: 0.78;
  margin: 0;
}

input[type="date"]:out-of-range {
  opacity: 0.6;
  cursor: not-allowed;
  border-color: rgb(244 63 94); /* rose-500 */
  background-color: rgb(254 242 242); /* rose-50 */
}

input[type="date"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background-color: rgb(241 245 249); /* slate-100 */
}

@keyframes feedbackShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-2px); }
  75% { transform: translateX(2px); }
}

.booking-field {
  box-sizing: border-box;
  display: block;
  margin-top: 0.5rem;
  width: 100%;
  min-height: 52px;
  border-radius: 1rem;
  border: 1px solid rgb(203 213 225);
  background: #fff;
  padding: 0.875rem 0.95rem;
  font-size: 16px;
  line-height: 1.25rem;
  color: rgb(15 23 42);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.55);
}

.booking-field:focus {
  border-color: rgba(13, 148, 136, 0.55);
  box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
  background: #fff;
}

.booking-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: rgb(51 65 85);
  line-height: 1.2;
}

.booking-section-card {
  border-radius: 1.15rem;
  border: 1px solid rgb(226 232 240);
  background: #f8fafc;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.booking-field.is-error {
  border-color: #cbd5e1; /* Soft blue-grey border */
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.08); /* Brand teal accent shadow */
}

/* Premium flatpickr calendar customization */
.flatpickr-calendar {
  border-radius: 16px !important;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
  border: 1px solid #cbd5e1 !important;
  font-family: 'DM Sans', sans-serif !important;
  background: #ffffff !important;
}

.flatpickr-day.selected, 
.flatpickr-day.selected:focus, 
.flatpickr-day.selected:hover {
  background: #0f766e !important;
  border-color: #0f766e !important;
  color: #ffffff !important;
}

.flatpickr-day.flatpickr-disabled, 
.flatpickr-day.flatpickr-disabled:hover {
  cursor: not-allowed !important;
  opacity: 0.45 !important;
  background: #f1f5f9 !important;
  color: #94a3b8 !important;
  border-color: transparent !important;
  pointer-events: auto !important; /* Keep pointer events so cursor displays */
}

.flatpickr-day:not(.flatpickr-disabled):hover {
  background: #f0fdfa !important;
  border-color: #f0fdfa !important;
  color: #0f766e !important;
}

/* Style validation helper messages as premium speech bubbles */
.speech-bubble-error:not(.hidden),
#booking-date-error:not(.hidden),
#time-slot-error:not(.hidden),
#guest-name-error:not(.hidden),
#guest-phone-error:not(.hidden),
#guest-city-error:not(.hidden),
#guest-pincode-error:not(.hidden),
#guest-address-error:not(.hidden),
#service-type-error:not(.hidden),
#booking-vehicle-error:not(.hidden),
#member-location-card-error:not(.hidden),
#member-location-feedback.speech-bubble-error:not(.hidden) {
  position: relative;
  display: inline-block;
  margin-top: 10px;
  background-color: #f8f9fa; /* Softer neutral background */
  border: 1px solid #cbd5e1; /* Soft blue-grey border */
  color: #334155 !important; /* Dark grey text */
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  animation: fadeInBubble 250ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Speech bubble tail pointing up */
.speech-bubble-error:not(.hidden)::before,
#booking-date-error:not(.hidden)::before,
#time-slot-error:not(.hidden)::before,
#guest-name-error:not(.hidden)::before,
#guest-phone-error:not(.hidden)::before,
#guest-city-error:not(.hidden)::before,
#guest-pincode-error:not(.hidden)::before,
#guest-address-error:not(.hidden)::before,
#service-type-error:not(.hidden)::before,
#booking-vehicle-error:not(.hidden)::before,
#member-location-card-error:not(.hidden)::before,
#member-location-feedback.speech-bubble-error:not(.hidden)::before {
  content: '';
  position: absolute;
  top: -6px; /* Position triangle on top */
  left: 20px; /* Offset to the left */
  width: 10px;
  height: 10px;
  background-color: #f8f9fa;
  border-left: 1px solid #cbd5e1;
  border-top: 1px solid #cbd5e1;
  transform: rotate(45deg);
}

@keyframes fadeInBubble {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

select.booking-field {
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #64748b 50%),
    linear-gradient(135deg, #64748b 50%, transparent 50%);
  background-position:
    calc(100% - 20px) calc(50% - 3px),
    calc(100% - 14px) calc(50% - 3px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.75rem;
}

textarea.booking-field {
  min-height: 112px;
  line-height: 1.45;
}

.booking-form-stack {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

@media (min-width: 1280px) {
  .booking-field {
    min-height: 58px;
    padding: 1rem 1.15rem;
    border-radius: 1.1rem;
  }

  .booking-label {
    font-size: 0.96rem;
  }

  .booking-section-card {
    border-radius: 1.35rem;
  }

  .booking-form-stack {
    gap: 1.5rem;
  }
}

/* Visually hidden but accessible pattern from web guidance */
.visually-hidden {
  position: absolute;
  clip-path: inset(50%);
  overflow: hidden;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  white-space: nowrap;
}

/* Step container transitions */
.step-container {
  transition: opacity 220ms ease, transform 220ms ease;
}
.step-container.hidden {
  display: none !important;
}

/* Premium interactive selection cards */
.service-card, .vehicle-card {
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease, background-color 180ms ease;
  cursor: pointer;
}
.service-card:hover:not(.is-disabled), .vehicle-card:hover:not(.is-disabled) {
  border-color: #0d9488;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.08);
  transform: translateY(-2px);
}
.service-card.is-selected, .vehicle-card.is-selected {
  border-color: #0f766e !important;
  background-color: #f0fdfa !important;
  box-shadow: 0 0 0 2px #0f766e !important;
}
.service-card.is-disabled, .vehicle-card.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

/* Time slot pills styling */
.slot-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 10px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  transition: all 180ms ease;
  cursor: pointer;
  min-height: 56px;
}
.slot-pill:hover:not(.is-disabled) {
  border-color: #0d9488;
  background-color: #f0fdfa;
  transform: scale(1.02);
}
.slot-pill.is-selected {
  border-color: #0f766e !important;
  background-color: #0f766e !important;
  color: #ffffff !important;
  box-shadow: 0 8px 16px rgba(15, 118, 110, 0.2);
}
.slot-pill.is-selected .slot-pill-time {
  color: #ffffff !important;
}
.slot-pill.is-selected .slot-pill-meta {
  color: #ccfbf1 !important;
}
.slot-pill.is-disabled {
  opacity: 0.4;
  background-color: #f1f5f9;
  color: #94a3b8;
  cursor: not-allowed;
  pointer-events: none;
}
.slot-pill.is-recommended:not(.is-selected):not(.is-disabled) {
  border-color: #10b981;
  background-color: #ecfdf5;
}
.slot-pill.is-recommended:not(.is-selected):not(.is-disabled) .slot-pill-meta {
  color: #047857;
}
.slot-pill.is-filling-fast:not(.is-selected):not(.is-disabled) {
  border-color: #f59e0b;
  background-color: #fffbeb;
}
.slot-pill.is-filling-fast:not(.is-selected):not(.is-disabled) .slot-pill-meta {
  color: #b45309;
}

.slot-pill-time {
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.slot-pill-meta {
  font-size: 9px;
  font-weight: 700;
  color: #64748b;
  margin-top: 2px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Payment cards and channel buttons embedded in step 3 */
.payment-card, .channel-btn {
  transition: all 180ms ease;
  cursor: pointer;
}
.payment-card:hover:not(.is-disabled), .channel-btn:hover:not(.is-disabled) {
  border-color: #0d9488;
  transform: translateY(-1px);
}
.payment-card.is-selected, .channel-btn.is-selected {
  border-color: #0f766e !important;
  background-color: #f0fdfa !important;
  box-shadow: 0 0 0 2px #0f766e !important;
}
.payment-card.is-disabled, .channel-btn.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
  background-color: #f1f5f9;
  border-color: #cbd5e1;
}

/* Animated Confetti Styles */
.success-confetti-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
  overflow: hidden;
}

.confetti-piece {
  position: absolute;
  top: -10px;
  width: 8px;
  height: 16px;
  opacity: 0.8;
  animation: confetti-fall 2.8s linear infinite;
}

.confetti-piece.c1 { left: 10%; background: #22d3ee; animation-delay: 0.1s; animation-duration: 2.2s; }
.confetti-piece.c2 { left: 25%; background: #10b981; animation-delay: 0.6s; animation-duration: 2.6s; }
.confetti-piece.c3 { left: 40%; background: #f59e0b; animation-delay: 0s; animation-duration: 2s; }
.confetti-piece.c4 { left: 55%; background: #ec4899; animation-delay: 0.4s; animation-duration: 2.8s; }
.confetti-piece.c5 { left: 70%; background: #3b82f6; animation-delay: 0.9s; animation-duration: 2.4s; }
.confetti-piece.c6 { left: 85%; background: #10b981; animation-delay: 0.2s; animation-duration: 2.1s; }
.confetti-piece.c7 { left: 18%; background: #f59e0b; animation-delay: 1.1s; animation-duration: 2.5s; }
.confetti-piece.c8 { left: 48%; background: #22d3ee; animation-delay: 0.7s; animation-duration: 2.7s; }
.confetti-piece.c9 { left: 65%; background: #ec4899; animation-delay: 1.3s; animation-duration: 2.3s; }
.confetti-piece.c10 { left: 92%; background: #3b82f6; animation-delay: 0.5s; animation-duration: 2.5s; }

@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(120vh) rotate(720deg);
    opacity: 0;
  }
}

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

.animate-fadeIn {
  animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

