/* ============================================================
   MULTI-STEP FORM STYLING — Chiron
   ============================================================ */

/* ── Progress Indicator ────────────────────────────────── */
.step-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 32px;
  padding: 0 20px;
}

.step-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.08);
  color: var(--ink-700);
  font-size: 14px;
  font-weight: 600;
  position: relative;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.step-dot.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 12px rgba(20, 184, 166, 0.30);
}

.step-dot.done {
  background: var(--green);
  color: #fff;
}

.step-line {
  flex: 1;
  height: 2px;
  background: rgba(15, 23, 42, 0.08);
  position: relative;
  margin: 0 8px;
  min-width: 20px;
}

.step-line.done {
  background: var(--green);
}

.step-line.active {
  background: var(--blue);
}

/* Hide step labels on mobile */
.step-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--ink-500);
  margin-top: 8px;
  text-align: center;
  letter-spacing: 0.05em;
}

@media (max-width: 640px) {
  .step-label { display: none; }
  .step-progress { gap: 4px; }
  .step-dot { width: 36px; height: 36px; font-size: 13px; }
  .step-line { margin: 0 4px; min-width: 12px; }
}

/* ── Step Panels ───────────────────────────────────────── */
.step-panel {
  display: none;
  animation: fadeIn 0.3s ease-in-out;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ── Step Title ────────────────────────────────────────── */
.step-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-900);
  margin: 0 0 8px;
  line-height: 1.2;
}

.step-subtitle {
  font-size: 14px;
  color: var(--ink-500);
  margin: 0 0 24px;
  line-height: 1.5;
}

/* ── Step Navigation ───────────────────────────────────── */
.step-nav {
  display: flex;
  gap: 12px;
  margin-top: 32px;
  justify-content: space-between;
}

.step-nav.step-1 .btn-back {
  display: none;
}

.step-nav.step-1 {
  justify-content: flex-end;
}

.step-nav.step-1 .btn-next {
  flex: 0 0 auto;
  width: 100%;
}

.btn-back,
.btn-next,
.btn-submit {
  padding: 12px 24px;
  border-radius: 12px;
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  user-select: none;
}

.btn-back {
  flex: 0 1 120px;
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink-900);
}

.btn-back:hover {
  background: rgba(15, 23, 42, 0.12);
}

.btn-back:active {
  transform: scale(0.98);
}

.btn-next,
.btn-submit {
  flex: 1;
  background: var(--blue);
  color: #fff;
}

.btn-next:hover,
.btn-submit:hover {
  background: #0d9488;
}

.btn-next:active,
.btn-submit:active {
  transform: scale(0.98);
}

/* ── Form Errors ───────────────────────────────────────── */
.field-error {
  display: none;
  font-size: 12px;
  color: #dc2626;
  margin-top: 6px;
  font-weight: 500;
}

.field-error.show {
  display: block;
}

.p-input.error,
.p-textarea.error,
.uk-select.error {
  border-color: #dc2626 !important;
  background: rgba(220, 38, 38, 0.04);
}

.p-input.error:focus,
.p-textarea.error:focus,
.uk-select.error:focus {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
}

/* ── Review Section ────────────────────────────────────– */
.review-section {
  margin-bottom: 24px;
  padding: 18px;
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.03);
  border: 1px solid var(--line);
}

.review-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-500);
  margin: 0 0 14px;
}

.review-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  font-size: 14px;
  line-height: 1.5;
}

.review-item:not(:last-child) {
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.review-label {
  color: var(--ink-500);
  font-weight: 500;
}

.review-value {
  color: var(--ink-900);
  font-weight: 600;
  word-break: break-word;
  max-width: 50%;
  text-align: right;
}

/* ── Responsive ────────────────────────────────────────– */
@media (max-width: 640px) {
  .step-nav {
    flex-direction: column;
    gap: 10px;
  }

  .btn-back,
  .btn-next,
  .btn-submit {
    width: 100%;
    flex: unset;
  }

  .step-nav.step-1 .btn-back {
    display: none;
  }

  .review-item {
    flex-direction: column;
  }

  .review-value {
    max-width: 100%;
    text-align: left;
    margin-top: 4px;
  }
}

/* ── Loading State ─────────────────────────────────────– */
.btn-next:disabled,
.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-next.loading::after,
.btn-submit.loading::after {
  content: '';
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  margin-left: 8px;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Flatpickr Date Picker Customization ────────────── */
.flatpickr-calendar {
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.15);
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.flatpickr-innerContainer {
  padding: 8px 0;
}

.flatpickr-months {
  padding: 12px 0;
}

.flatpickr-month {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-900);
}

.flatpickr-prev-month,
.flatpickr-next-month {
  color: var(--blue);
  fill: var(--blue);
  transition: opacity 0.15s ease;
  width: 28px;
  height: 28px;
  padding: 4px;
  border-radius: 8px;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
  opacity: 0.7;
  background: var(--blue-bg);
}

.flatpickr-weekdays {
  background: transparent;
  padding: 8px 0;
}

.flatpickr-weekday {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.flatpickr-days {
  padding: 4px 0;
}

.flatpickr-day {
  font-size: 13px;
  color: var(--ink-900);
  border-radius: 8px;
  margin: 2px;
  transition: all 0.15s ease;
}

.flatpickr-day:hover:not(.disabled) {
  background: var(--blue-bg);
  color: var(--blue);
  border-radius: 8px;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
  font-weight: 600;
}

.flatpickr-day.inRange {
  background: var(--blue-bg);
  color: var(--blue);
}

.flatpickr-day.disabled,
.flatpickr-day.prevMonthDay,
.flatpickr-day.nextMonthDay {
  color: rgba(15, 23, 42, 0.3);
}

.flatpickr-day.today {
  border-color: var(--blue);
  font-weight: 600;
}

.flatpickr-day.today.selected {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.numInputWrapper {
  flex: 1 1 auto;
}

.numInputWrapper input {
  border-radius: 8px !important;
  border: 1px solid rgba(15, 23, 42, 0.1) !important;
  font-size: 13px;
  padding: 6px 8px;
  font-weight: 500;
}

.numInputWrapper input:focus {
  border-color: var(--blue) !important;
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.1) !important;
}

.numInputWrapper span.arrowUp,
.numInputWrapper span.arrowDown {
  border-color: var(--blue);
}

.numInputWrapper span.arrowUp:after,
.numInputWrapper span.arrowDown:after {
  border-color: var(--blue);
}

.flatpickr-time {
  background: rgba(15, 23, 42, 0.02);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  padding: 8px 12px;
}

.flatpickr-time input[type="number"] {
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  padding: 4px 6px;
  font-size: 12px;
}

.flatpickr-time input[type="number"]:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(20, 184, 166, 0.1);
}

.flatpickr-am-pm {
  background: transparent;
  color: var(--ink-700);
  font-weight: 600;
  border-radius: 6px;
  padding: 4px 8px;
}

.flatpickr-am-pm:hover {
  background: var(--blue-bg);
  color: var(--blue);
}
