/*
 * Explainerium Aesthetics - Frontend Booking Wizard
 *
 * Hand-written CSS. Scoped to .ea-booking to avoid collisions.
 * Mobile-first, with min breakpoints at 640px and 900px.
 */

/* ==========================================================================
   CSS Custom Properties (theme)
   ========================================================================== */

.ea-booking {
  --ea-bone-50:  #fdfcfa;
  --ea-bone-100: #faf8f4;
  --ea-bone-200: #f3efe7;
  --ea-bone-300: #e8e1d3;
  --ea-bone-400: #d4c9b4;
  --ea-bone-500: #b8ab91;
  --ea-bone-600: #8a7e69;
  --ea-bone-700: #5e5443;
  --ea-bone-800: #3c3527;
  --ea-bone-900: #1f1b12;

  --ea-gold-100: #faf0dc;
  --ea-gold-300: #e6c079;
  --ea-gold-400: #d4a574;
  --ea-gold-500: #b8843f;
  --ea-gold-600: #96682e;

  --ea-red-50:  #fef2f2;
  --ea-red-500: #dc2626;
  --ea-red-600: #b91c1c;

  --ea-green-50:  #ecfdf5;
  --ea-green-500: #10b981;
  --ea-green-600: #059669;

  --ea-radius:   10px;
  --ea-radius-sm: 6px;
  --ea-radius-lg: 14px;

  --ea-shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --ea-shadow:    0 2px 8px rgba(0,0,0,0.06);
  --ea-shadow-lg: 0 10px 30px rgba(0,0,0,0.08);

  --ea-transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
               'Helvetica Neue', sans-serif;
  color: var(--ea-bone-900);
  background: var(--ea-bone-50);
  line-height: 1.5;
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 16px;
  box-sizing: border-box;
}

.ea-booking *,
.ea-booking *::before,
.ea-booking *::after {
  box-sizing: border-box;
}

.ea-booking-theme-dark {
  background: var(--ea-bone-900);
  color: var(--ea-bone-100);
}

/* ==========================================================================
   Loading / initial
   ========================================================================== */

.ea-booking-noscript {
  padding: 32px;
  background: var(--ea-bone-100);
  border: 1px solid var(--ea-bone-300);
  border-radius: var(--ea-radius);
  text-align: center;
  color: var(--ea-bone-700);
}

.ea-booking-loading {
  padding: 48px 24px;
  text-align: center;
}

.ea-booking-skeleton {
  width: 100%;
  max-width: 500px;
  height: 160px;
  margin: 0 auto;
  background: linear-gradient(90deg, var(--ea-bone-100), var(--ea-bone-200), var(--ea-bone-100));
  background-size: 200% 100%;
  animation: ea-pulse 1.6s ease-in-out infinite;
  border-radius: var(--ea-radius);
}

@keyframes ea-pulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ea-loading-inline {
  padding: 32px 16px;
  text-align: center;
  color: var(--ea-bone-600);
  font-size: 14px;
}

/* ==========================================================================
   Typography
   ========================================================================== */

.ea-heading {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 0 0 8px 0;
  color: var(--ea-bone-900);
}

@media (min-width: 640px) {
  .ea-heading { font-size: 34px; }
}

.ea-sub-heading {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  font-weight: 500;
  margin: 28px 0 14px 0;
  color: var(--ea-bone-900);
}

.ea-lead {
  font-size: 15px;
  color: var(--ea-bone-600);
  margin: 0 0 28px 0;
  line-height: 1.6;
}

.ea-muted {
  font-size: 13px;
  color: var(--ea-bone-600);
  margin: 16px 0;
}

.ea-optional {
  color: var(--ea-bone-500);
  font-weight: 400;
}

/* ==========================================================================
   Progress bar
   ========================================================================== */

.ea-progress {
  margin-bottom: 32px;
}

.ea-progress-bar {
  height: 3px;
  background: var(--ea-bone-200);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 12px;
}

.ea-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--ea-gold-400), var(--ea-gold-500));
  transition: width 400ms cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 2px;
}

.ea-progress-steps {
  display: none;
  justify-content: space-between;
  font-size: 11px;
  color: var(--ea-bone-500);
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

@media (min-width: 640px) {
  .ea-progress-steps { display: flex; }
}

.ea-progress-step-active { color: var(--ea-gold-600); }
.ea-progress-step-done { color: var(--ea-bone-700); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.ea-btn-primary,
.ea-btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: var(--ea-radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all var(--ea-transition);
  text-align: center;
  line-height: 1;
}

.ea-btn-primary {
  background: var(--ea-bone-900);
  color: var(--ea-bone-50);
  border-color: var(--ea-bone-900);
}

.ea-btn-primary:hover:not(:disabled) {
  background: var(--ea-bone-800);
  border-color: var(--ea-bone-800);
}

.ea-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ea-btn-secondary {
  background: transparent;
  color: var(--ea-bone-800);
  border-color: var(--ea-bone-300);
}

.ea-btn-secondary:hover,
.ea-btn-secondary:focus,
.ea-btn-secondary:active {
  background: var(--ea-bone-100) !important;
  border-color: var(--ea-bone-400) !important;
  color: var(--ea-bone-800) !important;
  text-decoration: none !important;
}

/* "Book another appointment" CTA after confirmation — extra protection from theme overrides */
.ea-btn-rebook {
  margin-top: 24px;
  display: inline-block;
  padding: 12px 28px;
  background: #fff !important;
  color: var(--ea-bone-800) !important;
  border: 1px solid var(--ea-bone-300) !important;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s, color 0.18s;
}
.ea-btn-rebook:hover,
.ea-btn-rebook:focus,
.ea-btn-rebook:active {
  background: var(--ea-bone-50) !important;
  color: var(--ea-bone-900) !important;
  border-color: var(--ea-gold-400) !important;
}

/* Prominent action-required notice (eye-catching gold-bordered card) */
.ea-notice {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 20px 22px;
  border-radius: 12px;
  margin: 28px 0 8px 0;
  text-align: left;
}

.ea-notice-icon {
  font-size: 24px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 2px;
}

.ea-notice-body { flex: 1; }

.ea-notice-title {
  margin: 0 0 6px 0;
  font-family: var(--ea-font-serif, Georgia, serif);
  font-size: 17px;
  font-weight: 500;
  color: var(--ea-bone-900);
  line-height: 1.3;
}

.ea-notice-text {
  margin: 0;
  font-size: 14px;
  color: var(--ea-bone-700);
  line-height: 1.6;
}

/* Action-required variant — gold accent for high attention */
.ea-notice-form {
  background: linear-gradient(135deg, #fdf6e8 0%, #fef9ed 100%);
  border: 1px solid var(--ea-gold-400, #d4a574);
  box-shadow: 0 2px 8px rgba(212, 165, 116, 0.12);
}
.ea-notice-form .ea-notice-title { color: #7a5c2a; }
.ea-notice-form .ea-notice-text  { color: #6b5230; }

/* Info variant — soft cream */
.ea-notice-info {
  background: var(--ea-bone-50);
  border: 1px solid var(--ea-bone-200);
}

.ea-btn-full {
  width: 100%;
  margin-top: 16px;
}

.ea-back {
  background: transparent;
  border: none;
  color: var(--ea-bone-600);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 0;
  margin-bottom: 8px;
  cursor: pointer;
  transition: color var(--ea-transition);
}

.ea-back:hover {
  color: var(--ea-bone-900);
}

/* ==========================================================================
   Filter chips
   ========================================================================== */

.ea-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 20px 0;
}

.ea-chip {
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--ea-bone-300);
  background: var(--ea-bone-50);
  color: var(--ea-bone-700);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--ea-transition);
  white-space: nowrap;
}

.ea-chip:hover {
  border-color: var(--ea-bone-500);
}

.ea-chip-active {
  background: var(--ea-bone-900);
  color: var(--ea-bone-50);
  border-color: var(--ea-bone-900);
}

/* ==========================================================================
   Treatment / practitioner cards
   ========================================================================== */

.ea-cards-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 24px 0;
}

.ea-card-treatment,
.ea-card-practitioner {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  background: var(--ea-bone-50);
  border: 1px solid var(--ea-bone-200);
  border-radius: var(--ea-radius);
  text-align: left;
  cursor: pointer;
  transition: all var(--ea-transition);
  font-family: inherit;
  box-shadow: var(--ea-shadow-sm);
}

.ea-card-treatment:hover,
.ea-card-practitioner:hover {
  border-color: var(--ea-gold-400);
  background: #fff;
  box-shadow: var(--ea-shadow);
  transform: translateY(-1px);
}

.ea-card-body {
  flex: 1;
  min-width: 0;
}

.ea-card-category {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ea-gold-600);
  margin-bottom: 4px;
}

.ea-card-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 4px 0;
  color: var(--ea-bone-900);
  line-height: 1.3;
}

.ea-card-desc {
  font-size: 13px;
  color: var(--ea-bone-600);
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.ea-card-bio {
  font-size: 12px;
  color: var(--ea-bone-500);
  margin: 4px 0 0 0;
  line-height: 1.5;
}

.ea-card-meta {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--ea-bone-700);
  align-items: center;
}

.ea-meta-duration {
  color: var(--ea-bone-600);
}

.ea-meta-price {
  font-weight: 600;
  color: var(--ea-bone-900);
}

.ea-card-arrow {
  font-size: 18px;
  color: var(--ea-bone-400);
  flex-shrink: 0;
  transition: transform var(--ea-transition), color var(--ea-transition);
  padding-top: 4px;
}

.ea-card-treatment:hover .ea-card-arrow,
.ea-card-practitioner:hover .ea-card-arrow {
  transform: translateX(4px);
  color: var(--ea-gold-500);
}

.ea-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--ea-gold-400);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 18px;
  flex-shrink: 0;
  overflow: hidden;
}

.ea-avatar-any {
  background: var(--ea-bone-200);
  color: var(--ea-bone-700);
}

.ea-avatar-photo {
  background: transparent;
  padding: 0;
}
.ea-avatar-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ea-avatar-shape-circle    { border-radius: 50%; }
.ea-avatar-shape-rounded   { border-radius: 10px; }
.ea-avatar-shape-square    { border-radius: 0; }

.ea-card-any {
  border-style: dashed;
}

/* ==========================================================================
   Date & time picker
   ========================================================================== */

.ea-dates-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 12px 2px;
  margin: 0 -4px 20px -4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.ea-dates-scroll::-webkit-scrollbar {
  height: 4px;
}

.ea-dates-scroll::-webkit-scrollbar-thumb {
  background: var(--ea-bone-300);
  border-radius: 2px;
}

.ea-date-pill {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 62px;
  padding: 12px 10px;
  background: var(--ea-bone-50);
  border: 1px solid var(--ea-bone-200);
  border-radius: var(--ea-radius);
  font-family: inherit;
  cursor: pointer;
  transition: all var(--ea-transition);
}

.ea-date-pill:hover:not(:disabled) {
  border-color: var(--ea-gold-400);
  background: #fff;
}

.ea-date-pill:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.ea-date-pill-empty {
  background: var(--ea-bone-50);
  border-color: var(--ea-bone-200);
}
.ea-date-pill-empty:hover {
  background: var(--ea-bone-50) !important;
  border-color: var(--ea-bone-200) !important;
}

.ea-date-pill-active {
  background: var(--ea-bone-900);
  border-color: var(--ea-bone-900);
  color: var(--ea-bone-50);
}

.ea-date-pill-active .ea-date-pill-weekday,
.ea-date-pill-active .ea-date-pill-month {
  color: var(--ea-bone-300);
}

.ea-date-pill-weekday,
.ea-date-pill-month {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--ea-bone-500);
  font-weight: 500;
}

.ea-date-pill-day {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 22px;
  font-weight: 500;
  color: inherit;
  line-height: 1;
  margin: 2px 0;
}

.ea-times-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin: 0 0 24px 0;
}

.ea-time-pill {
  padding: 12px 10px;
  background: var(--ea-bone-50);
  border: 1px solid var(--ea-bone-200);
  border-radius: var(--ea-radius-sm);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ea-bone-800);
  cursor: pointer;
  transition: all var(--ea-transition);
  text-align: center;
}

.ea-time-pill:hover {
  border-color: var(--ea-gold-500);
  background: var(--ea-gold-100);
  color: var(--ea-bone-900);
}

/* ==========================================================================
   Forms
   ========================================================================== */

.ea-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ea-field-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

@media (min-width: 640px) {
  .ea-field-row {
    grid-template-columns: 1fr 1fr;
  }
}

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

.ea-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--ea-bone-800);
}

.ea-input,
.ea-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ea-bone-300);
  border-radius: var(--ea-radius-sm);
  background: #fff;
  color: var(--ea-bone-900);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.4;
  transition: all var(--ea-transition);
}

.ea-input:focus,
.ea-textarea:focus {
  outline: none;
  border-color: var(--ea-gold-400);
  box-shadow: 0 0 0 3px rgba(212, 165, 116, 0.2);
}

.ea-textarea {
  resize: vertical;
  min-height: 80px;
}

.ea-input-error {
  border-color: var(--ea-red-500);
}

.ea-input-error:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.ea-field-error {
  font-size: 12px;
  color: var(--ea-red-600);
  font-weight: 500;
}

.ea-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--ea-bone-700);
  cursor: pointer;
  padding: 8px 0;
  line-height: 1.4;
}

.ea-checkbox input {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--ea-bone-900);
  cursor: pointer;
}

/* ==========================================================================
   Review card
   ========================================================================== */

.ea-review-card {
  background: #fff;
  border: 1px solid var(--ea-bone-200);
  border-radius: var(--ea-radius);
  padding: 20px;
  margin-bottom: 20px;
  box-shadow: var(--ea-shadow-sm);
}

.ea-review-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  padding: 10px 0;
  align-items: start;
}

.ea-review-row + .ea-review-row:not(:first-child) {
  border-top: 1px solid var(--ea-bone-100);
}

.ea-review-label {
  font-size: 13px;
  color: var(--ea-bone-600);
  font-weight: 500;
}

.ea-review-value {
  font-size: 14px;
  color: var(--ea-bone-900);
  font-weight: 500;
}

.ea-review-sub {
  color: var(--ea-bone-500);
  font-weight: 400;
  margin-left: 6px;
}

.ea-review-divider {
  border: none;
  height: 1px;
  background: var(--ea-bone-200);
  margin: 8px 0;
}

/* ==========================================================================
   Success / alerts
   ========================================================================== */

.ea-success {
  text-align: center;
  padding: 24px 0;
}

.ea-success-check {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px auto;
  background: var(--ea-green-500);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  font-weight: 700;
  animation: ea-pop 400ms cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes ea-pop {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.ea-alert {
  padding: 12px 16px;
  border-radius: var(--ea-radius-sm);
  font-size: 14px;
  margin-bottom: 20px;
}

.ea-alert-error {
  background: var(--ea-red-50);
  color: var(--ea-red-600);
  border: 1px solid #fecaca;
}

.ea-empty,
.ea-empty-inline {
  text-align: center;
  padding: 32px 16px;
  color: var(--ea-bone-600);
  font-size: 14px;
}

.ea-empty-inline {
  padding: 16px;
}

/* ==========================================================================
   Transitions (Alpine x-transition)
   ========================================================================== */

.ea-booking [x-cloak] { display: none !important; }
