/* Booking wizard */

.booking-wizard {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 20px;
  padding: 1.75rem 1.5rem 1.5rem;
  box-shadow: var(--shadow);
}

.wizard-progress {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  position: relative;
}

.wizard-progress::before {
  content: "";
  position: absolute;
  top: 18px;
  right: 12%;
  left: 12%;
  height: 2px;
  background: var(--color-line);
  z-index: 0;
}

.wizard-progress li {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .45rem;
  text-align: center;
  color: var(--color-muted);
  font-size: .82rem;
}

.wizard-progress__num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 2px solid var(--color-line);
  font-weight: 700;
  color: var(--color-muted);
  transition: .25s var(--ease);
}

.wizard-progress li.is-active .wizard-progress__num,
.wizard-progress li.is-done .wizard-progress__num {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.wizard-progress li.is-active .wizard-progress__label {
  color: var(--color-primary);
  font-weight: 600;
}

.wizard-panel h2 {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

/* Ensure HTML hidden attribute wins over .btn { display: inline-flex } */
[hidden],
.is-hidden {
  display: none !important;
}

.wizard-panel[hidden] { display: none !important; }

.service-picker--grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.service-option--card {
  cursor: pointer;
  margin: 0;
}

.service-option--card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.service-option__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .55rem;
  padding: 1.25rem 1rem;
  border: 1.5px solid var(--color-line);
  border-radius: 16px;
  background: #fff;
  min-height: 100%;
  transition: .25s var(--ease);
}

.service-option--card:hover .service-option__inner,
.service-option--card:has(input:checked) .service-option__inner {
  border-color: var(--color-primary);
  background: var(--color-soft);
  box-shadow: 0 10px 28px rgba(123, 97, 255, .12);
  transform: translateY(-3px);
}

.service-option__inner strong {
  font-size: .98rem;
  color: var(--color-text);
}

.service-option__inner small {
  color: var(--color-muted);
  line-height: 1.6;
  font-size: .82rem;
}

.datetime-layout {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1.5rem;
  align-items: start;
}

.time-panel h3 {
  font-size: 1rem;
  margin: 0 0 .85rem;
}

.jalali-calendar {
  max-width: none;
  border: 1px solid var(--color-line);
  border-radius: 16px;
  padding: 1rem;
  background: linear-gradient(180deg, #faf8ff, #fff);
}

.jalali-calendar__nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .85rem;
}

.jalali-calendar__nav button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--color-line);
  background: #fff;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--color-text);
}

.jalali-calendar__nav button:hover {
  background: var(--color-soft);
  border-color: var(--color-primary);
}

.cal-title { font-weight: 700; }

.jalali-calendar__weekdays,
.jalali-calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: .35rem;
  text-align: center;
}

.jalali-calendar__weekdays span {
  font-size: .8rem;
  color: var(--color-muted);
  padding: .35rem 0;
}

.jalali-calendar__days button {
  aspect-ratio: 1;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  font-size: .9rem;
  color: var(--color-text);
}

.jalali-calendar__days button:hover:not(:disabled) { background: var(--color-soft); }
.jalali-calendar__days button.is-available { background: rgba(123, 97, 255, .08); font-weight: 500; }
.jalali-calendar__days button.is-selected { background: var(--color-primary); color: #fff; }
.jalali-calendar__days button:disabled { opacity: .35; cursor: not-allowed; }
.jalali-calendar__days .empty { visibility: hidden; }

.time-slots {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
}

.time-slots .hint,
.time-slots .empty-slots {
  color: var(--color-muted);
  width: 100%;
}

.time-slot {
  border: 1.5px solid var(--color-line);
  background: #fff;
  border-radius: 999px;
  padding: .55rem 1rem;
  cursor: pointer;
  font-family: inherit;
  direction: ltr;
}

.time-slot:hover { border-color: var(--color-primary); }
.time-slot.is-selected {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-grid label {
  display: grid;
  gap: .35rem;
  font-size: .92rem;
}

.form-grid label.full { grid-column: 1 / -1; }

.form-grid input,
.form-grid textarea {
  width: 100%;
  border: 1.5px solid var(--color-line);
  border-radius: 12px;
  padding: .75rem .9rem;
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
}

.form-grid input:focus,
.form-grid textarea:focus {
  outline: 0;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(123, 97, 255, .14);
}

.booking-summary ul {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: .65rem;
}

.booking-summary li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: var(--color-soft);
  border-radius: 12px;
}

.booking-summary li span { color: var(--color-muted); }
.booking-summary--compact {
  margin-bottom: 1.25rem;
}
.booking-summary--compact ul {
  grid-template-columns: repeat(3, 1fr);
  display: grid;
  gap: .65rem;
}
.booking-summary--compact li {
  flex-direction: column;
  align-items: flex-start;
  gap: .25rem;
}
.booking-note { color: var(--color-muted); font-size: .92rem; }

.wizard-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-line);
}
.wizard-nav__actions {
  display: flex;
  gap: .75rem;
  margin-right: auto;
}

.wizard-nav.is-done { display: none; }

.btn--ghost-dark {
  background: transparent;
  color: var(--color-text);
  border: 1.5px solid var(--color-line);
}

.btn--ghost-dark:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.booking-feedback {
  margin-top: 1rem;
  min-height: 1.4em;
  font-weight: 500;
}

.booking-feedback.is-success { color: #0b6b3a; }
.booking-feedback.is-error { color: #9b1c1c; }

.booking-success__actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.tracking-code-box {
  margin: 1.25rem auto;
  max-width: 320px;
  padding: 1rem 1.25rem;
  border-radius: 14px;
  background: var(--color-soft);
  border: 1.5px dashed rgba(109, 74, 255, .35);
  text-align: center;
}
.tracking-code-box span {
  display: block;
  font-size: .85rem;
  color: var(--color-muted);
  margin-bottom: .35rem;
}
.tracking-code-box strong {
  font-size: 1.45rem;
  letter-spacing: .08em;
  color: var(--color-primary-dark);
  user-select: all;
}

.track-card {
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 20px;
  padding: 1.75rem;
  box-shadow: var(--shadow);
}
.track-form {
  display: grid;
  gap: 1rem;
}
.track-form label {
  display: grid;
  gap: .4rem;
}
.track-form input {
  width: 100%;
  border: 1.5px solid var(--color-line);
  border-radius: 12px;
  padding: .85rem 1rem;
  font-family: inherit;
  font-size: 1.1rem;
  letter-spacing: .06em;
  text-align: center;
}
.track-form input:focus {
  outline: 0;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(109, 74, 255, .14);
}
.track-result {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--color-line);
}
.track-result__status {
  text-align: center;
  margin-bottom: 1rem;
}
.track-result__status .df-status {
  font-size: 1rem;
  padding: .4rem 1rem;
}
.track-result__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .55rem;
}
.track-result__list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  background: var(--color-soft);
  border-radius: 12px;
}
.track-result__list span { color: var(--color-muted); }
.track-result__hint {
  margin: 1rem 0 0;
  color: var(--color-muted);
  text-align: center;
}
.track-help {
  margin: 1.5rem 0 0;
  text-align: center;
  color: var(--color-muted);
  font-size: .92rem;
}

@media (max-width: 900px) {
  .service-picker--grid { grid-template-columns: repeat(2, 1fr); }
  .datetime-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .service-picker--grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .wizard-progress__label { font-size: .7rem; }
  .wizard-progress::before { top: 16px; }
  .booking-wizard { padding: 1.15rem; }
  .wizard-nav { flex-direction: column-reverse; }
  .wizard-nav .btn:not([hidden]):not(.is-hidden) { width: 100%; }
}
