/* ==================================================
   BOOKA PUBLIC CUSTOMER BOOKING JOURNEY
   Mobile-First, RTL-Native, Merchant Branded
================================================== */

.booka-booking-page {
  position: relative;
  min-height: 100vh;
  background-color: var(--booka-bg, #f8fafc);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: scroll;
  padding: var(--booka-space-6, 1.5rem) var(--booka-space-4, 1rem);
  direction: rtl;
  font-family: var(--booka-font-family, 'Cairo', sans-serif);
  --booka-bg-overlay: rgba(255, 255, 255, 0.65);
}

.booka-booking-container {
  position: relative;
  z-index: 1;
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--booka-space-5, 1.25rem);
}

/* ================= Header & Merchant Identity ================= */
.booka-store-header {
  display: flex;
  align-items: center;
  gap: var(--booka-space-3, 0.75rem);
  padding: var(--booka-space-4, 1rem);
  background-color: var(--booka-surface, #ffffff);
  border: 1px solid var(--booka-border, #e2e8f0);
  border-radius: var(--booka-radius-lg, 0.75rem);
  box-shadow: var(--booka-shadow-sm, 0 1px 2px 0 rgba(15, 23, 42, 0.05));
}

.booka-store-logo {
  width: 48px;
  height: 48px;
  border-radius: var(--booka-radius-md, 0.5rem);
  object-fit: cover;
}

.booka-store-logo-fallback {
  width: 48px;
  height: 48px;
  border-radius: var(--booka-radius-md, 0.5rem);
  background-color: var(--tenant-primary-light, #eef2ff);
  color: var(--tenant-primary, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
}

.booka-store-info h1 {
  font-size: var(--booka-text-base, 1rem);
  font-weight: var(--booka-weight-bold, 700);
  color: var(--booka-text-primary, #0f172a);
  margin: 0;
}

.booka-store-info p {
  font-size: var(--booka-text-xs, 0.75rem);
  color: var(--booka-text-secondary, #475569);
  margin: 0;
}

/* ================= Progress Bar ================= */
.booka-progress-container {
  display: flex;
  flex-direction: column;
  gap: var(--booka-space-2, 0.5rem);
}

.booka-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--booka-text-xs, 0.75rem);
  font-weight: var(--booka-weight-semibold, 600);
  color: var(--booka-text-secondary, #475569);
}

.booka-progress-track {
  width: 100%;
  height: 6px;
  background-color: var(--booka-border, #e2e8f0);
  border-radius: var(--booka-radius-full, 9999px);
  overflow: hidden;
}

.booka-progress-fill {
  height: 100%;
  background-color: var(--tenant-primary, #4f46e5);
  border-radius: var(--booka-radius-full, 9999px);
  transition: width 0.3s ease;
}

/* ================= Service Cards ================= */
.booka-services-list {
  display: flex;
  flex-direction: column;
  gap: var(--booka-space-3, 0.75rem);
}

.booka-service-card {
  display: flex;
  flex-direction: column;
  background-color: var(--booka-surface, #ffffff);
  border: 1px solid var(--booka-border, #e2e8f0);
  border-radius: var(--booka-radius-lg, 0.75rem);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
}

.booka-service-card:hover, .booka-service-card:focus-visible {
  border-color: var(--tenant-primary, #4f46e5);
  box-shadow: 0 0 0 3px var(--booka-primary-muted, rgba(79, 70, 229, 0.15));
  text-decoration: none;
}

.booka-service-image-wrapper {
  width: 100%;
  height: 160px;
  overflow: hidden;
  position: relative;
  background-color: var(--booka-bg-subtle, #f1f5f9);
}

.booka-service-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.booka-service-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--booka-space-3, 0.75rem);
  padding: var(--booka-space-4, 1rem);
}

@media (max-width: 480px) {
  .booka-service-image-wrapper {
    height: 140px;
  }
}

.booka-service-info h2 {
  font-size: var(--booka-text-base, 1rem);
  font-weight: var(--booka-weight-bold, 700);
  color: var(--booka-text-primary, #0f172a);
  margin: 0 0 var(--booka-space-1, 0.25rem) 0;
}

.booka-service-meta {
  display: flex;
  align-items: center;
  gap: var(--booka-space-3, 0.75rem);
  font-size: var(--booka-text-xs, 0.75rem);
  color: var(--booka-text-secondary, #475569);
}

.booka-service-price {
  font-weight: var(--booka-weight-bold, 700);
  color: var(--tenant-primary, #4f46e5);
}

/* ================= Staff Selection ================= */
.booka-staff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--booka-space-3, 0.75rem);
}

.booka-staff-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--booka-space-4, 1rem);
  background-color: var(--booka-surface, #ffffff);
  border: 1px solid var(--booka-border, #e2e8f0);
  border-radius: var(--booka-radius-lg, 0.75rem);
  text-decoration: none;
  color: inherit;
  text-align: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.booka-staff-card:hover, .booka-staff-card:focus-visible {
  border-color: var(--tenant-primary, #4f46e5);
  box-shadow: 0 0 0 3px var(--booka-primary-muted, rgba(79, 70, 229, 0.15));
  text-decoration: none;
}

.booka-staff-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--tenant-primary-light, #eef2ff);
  color: var(--tenant-primary, #4f46e5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: var(--booka-space-2, 0.5rem);
}

.booka-staff-name {
  font-size: var(--booka-text-sm, 0.875rem);
  font-weight: var(--booka-weight-bold, 700);
  color: var(--booka-text-primary, #0f172a);
}

/* ================= Date & Time Grid ================= */
.booka-slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: var(--booka-space-2, 0.5rem);
}

.booka-slot-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 var(--booka-space-2, 0.5rem);
  background-color: var(--booka-surface, #ffffff);
  border: 1px solid var(--booka-border, #e2e8f0);
  border-radius: var(--booka-radius-md, 0.5rem);
  font-size: var(--booka-text-sm, 0.875rem);
  font-weight: var(--booka-weight-semibold, 600);
  color: var(--booka-text-primary, #0f172a);
  text-decoration: none;
  transition: all 0.15s ease;
}

.booka-slot-btn:hover, .booka-slot-btn:focus-visible {
  border-color: var(--tenant-primary, #4f46e5);
  color: var(--tenant-primary, #4f46e5);
  text-decoration: none;
}

.booka-slot-btn.selected {
  background-color: var(--tenant-primary, #4f46e5);
  border-color: var(--tenant-primary, #4f46e5);
  color: #ffffff;
}

/* ================= OTP Input ================= */
.booka-otp-container {
  max-width: 440px;
  margin: 0 auto;
  width: 100%;
}

.booka-otp-input-field {
  letter-spacing: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
}

/* ================= Available Date Cards (Booking Step 3) ================= */
.booka-available-dates-list {
  display: flex;
  flex-direction: column;
  gap: var(--booka-space-3, 0.875rem);
  width: 100%;
}

.booka-available-date-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem;
  background-color: var(--booka-surface, #ffffff);
  border: 1px solid var(--booka-border, #e2e8f0);
  border-radius: var(--booka-radius-lg, 0.75rem);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--booka-shadow-sm, 0 1px 2px 0 rgba(15, 23, 42, 0.05));
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  box-sizing: border-box;
  width: 100%;
}

.booka-available-date-card:hover,
.booka-available-date-card:focus-visible {
  border-color: var(--tenant-primary, #4f46e5);
  box-shadow: 0 0 0 3px var(--booka-primary-muted, rgba(79, 70, 229, 0.15));
  text-decoration: none;
}

.booka-available-date-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

.booka-available-date-title {
  font-size: var(--booka-text-base, 1rem);
  font-weight: var(--booka-weight-bold, 700);
  color: var(--booka-text-primary, #0f172a);
  margin: 0;
  line-height: 1.4;
}

.booka-available-date-status {
  font-size: var(--booka-text-xs, 0.8125rem);
  font-weight: var(--booka-weight-medium, 500);
  color: var(--booka-text-secondary, #475569);
  margin: 0;
  display: block;
}

.booka-available-date-action {
  display: flex;
  width: 100%;
  margin-top: 0.125rem;
}

.booka-available-date-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  height: 38px;
  padding: 0 1.125rem;
  border-radius: var(--booka-radius-md, 0.625rem);
  font-family: var(--booka-font-family, 'Cairo', sans-serif);
  font-size: var(--booka-text-xs, 0.8125rem);
  font-weight: var(--booka-weight-semibold, 600);
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  border: none;
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  transition: opacity 0.15s ease, transform 0.1s ease;
  width: auto;
  align-self: flex-start;
}

.booka-available-date-card:hover .booka-available-date-btn {
  opacity: 0.92;
}

@media (max-width: 480px) {
  .booka-available-dates-list {
    gap: 0.75rem;
  }

  .booka-available-date-card {
    padding: 0.875rem 1rem;
    gap: 0.625rem;
  }

  .booka-available-date-title {
    font-size: 0.9375rem;
  }

  .booka-available-date-status {
    font-size: 0.75rem;
  }

  .booka-available-date-btn {
    height: 36px;
    padding: 0 1rem;
    font-size: 0.75rem;
  }
}
