/* =========================================================
   SI Booking Launcher - Front CSS (Shortcode Output Only)
   - Floating button is disabled by design.
   - Styles for inline booking list rendered by shortcode.
   ========================================================= */

/* Root container for the shortcode output */
.si-booking-embed {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================================================
   Theme variables (easy to adjust later)
   ========================================================= */
.si-booking-embed.si-stepper {
  --si-primary: #0a2540;
  --si-accent: #2563eb;
  --si-success: #16a34a;
  --si-muted: #cbd5e1;
  --si-error: #dc2626;
  --si-on-dark: #ffffff;
}

/* Header */
.si-booking-embed .si-embed-header {
  margin-bottom: 16px;
}

.si-booking-embed .si-embed-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.si-booking-embed .si-embed-subtext {
  margin: 8px 0 0;
  opacity: 0.8;
}

/* Tabs nav */
.si-booking-embed .si-modal-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  margin-bottom: 12px;
}

.si-booking-embed .si-modal-tabs::-webkit-scrollbar {
  height: 6px;
}

.si-booking-embed .si-tab-btn {
  border: 1px solid rgba(0, 0, 0, 0.15);
  background: #fff;
  border-radius: 999px;
  padding: 10px 14px;
  cursor: pointer;
  white-space: nowrap;
  font-size: 14px;
  line-height: 1;
}

.si-booking-embed.si-stepper .si-tab-btn.is-active {
  border-color: var(--si-primary);
  background: var(--si-primary);
  color: var(--si-on-dark);
}

/* Panels */
.si-booking-embed .si-embed-panels {
  padding: 0;
}

.si-booking-embed .si-tab-panel[hidden] {
  display: none;
}

/* Form wrapper (centered, allows wide forms) */
.si-booking-embed .si-form-wrap {
  width: 100%;
}

/* =========================================================
   Stepper UI
   ========================================================= */

.si-booking-embed.si-stepper {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 14px;
  padding: 18px 18px 14px;
  background: #fff;
}

.si-stepper-header {
  margin: 14px 0 14px;
}

.si-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.si-stepper .si-step-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid rgba(0,0,0,0.14);
  background: #fff;
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
}

.si-stepper .si-step-num {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  font-weight: 800;
}

.si-stepper .si-step-text {
  font-weight: 800;
}

.si-stepper .si-step.is-active .si-step-btn {
  border-color: var(--si-primary);
  background: var(--si-primary);
  color: var(--si-on-dark);
}

.si-stepper .si-step.is-active .si-step-num {
  background: rgba(255,255,255,0.18);
  color: var(--si-on-dark);
}

.si-stepper .si-step.is-done .si-step-btn {
  border-color: rgba(0,0,0,0.14);
  background: #fff;
  color: rgba(0,0,0,0.85);
}

.si-stepper .si-step.is-done .si-step-num {
  background: var(--si-success);
  color: var(--si-on-dark);
}

.si-stepper .si-step.has-error .si-step-btn {
  border-color: var(--si-error);
}

.si-stepper .si-step.has-error .si-step-num {
  background: var(--si-error);
  color: var(--si-on-dark);
}

.si-step-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(0,0,0,0.06);
  margin-top: 12px;
  overflow: hidden;
}

.si-step-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--si-accent);
  transition: width 0.25s ease;
}

/* Error banner */
.si-step-error {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(220, 38, 38, 0.08);
  border: 1px solid rgba(220, 38, 38, 0.35);
  color: #7f1d1d;
  font-weight: 800;
  font-size: 14px;
}

.si-stepper-body {
  padding-top: 6px;
}

.si-step-panel-inner {
  padding: 0;
}

.si-step-title {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.3;
}

.si-step-note {
  margin: 12px 0 0;
  opacity: 0.78;
  font-size: 13px;
}

.si-single-service-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.14);
  background: rgba(0,0,0,0.02);
  font-weight: 800;
  margin: 6px 0 2px;
}

/* Customer info grid */
.si-customer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.si-customer-grid .si-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.si-customer-grid .si-label {
  font-size: 12px;
  font-weight: 800;
  opacity: 0.85;
}

.si-customer-grid .si-input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,0.16);
  font-size: 15px;
}

/* Error highlight */
.si-field-error .si-input,
.si-input-error {
  border-color: var(--si-error) !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

/* Hide duplicated customer fields inside service forms (step 3) */
.si-hidden-customer-field {
  display: none !important;
}

/* Inline submit in step 4 */
.si-step-actions-inline {
  margin-top: 16px;
}

.si-submit-btn {
  border: none;
  border-radius: 12px;
  padding: 12px 18px;
  background: var(--si-primary);
  color: var(--si-on-dark);
  font-weight: 900;
  cursor: pointer;
}

.si-stepper-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(0,0,0,0.08);
}

.si-step-back,
.si-step-next {
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 900;
  cursor: pointer;
  border: 1px solid rgba(0,0,0,0.16);
  background: #fff;
}

.si-step-next {
  background: var(--si-primary);
  color: var(--si-on-dark);
  border-color: var(--si-primary);
}

.si-step-back:disabled,
.si-step-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Responsive tabs: wrap on smaller screens so buttons never get cut off */
@media (max-width: 768px) {
  .si-booking-embed .si-modal-tabs {
    flex-wrap: wrap;
    overflow-x: visible;
    gap: 10px;
    padding: 12px 0;
  }

  .si-booking-embed .si-tab-btn {
    flex: 1 1 160px;
    min-width: 140px;
    text-align: center;
    padding: 12px 16px;
    font-size: 15px;
  }

  .si-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .si-customer-grid {
    grid-template-columns: 1fr;
  }
}

/* Small screens: slightly smaller heading */
@media (max-width: 480px) {
  .si-booking-embed .si-embed-title {
    font-size: 22px;
  }
}
/* =========================================================
   Step 4 UX (Payment required / No payment)
   ========================================================= */

.si-step4-box {
  margin-top: 6px;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.10);
  background: rgba(0,0,0,0.02);
}

.si-step4-box[hidden] {
  display: none !important;
}

.si-step4-subtitle {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.25;
  font-weight: 900;
}

.si-step4-desc {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  opacity: 0.9;
}

.si-step4-pay {
  border-color: rgba(37, 99, 235, 0.35);
  background: rgba(37, 99, 235, 0.06);
}

.si-step4-nopay {
  border-color: rgba(10, 37, 64, 0.22);
  background: rgba(10, 37, 64, 0.04);
}

.si-stripe-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.12);
  background: #fff;
  font-weight: 900;
  font-size: 12px;
}

.si-submit-btn.is-payment {
  background: var(--si-accent);
}

.si-submit-btn.is-nopay {
  background: var(--si-primary);
}
