/* Booking page: one calm column, mobile first, 44px+ touch targets. */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgb(255 255 255 / 0.94);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
  padding-top: env(safe-area-inset-top);
}

.topbar-inner {
  max-width: 600px;
  margin: 0 auto;
  min-height: 64px;
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.biz {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-width: 0;
}

.biz-logo,
.biz-badge {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  flex: none;
}

.biz-logo {
  object-fit: cover;
  background: var(--brand-soft);
}

.biz-badge {
  display: grid;
  place-items: center;
  background: var(--brand);
  color: var(--brand-ink);
  font-weight: 700;
  font-size: 1.1rem;
}

.biz-text {
  display: grid;
  min-width: 0;
}

.biz-name {
  font-weight: 700;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.biz-sub {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lang-toggle {
  flex: none;
}

.page {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.1rem 1rem calc(7.5rem + env(safe-area-inset-bottom));
  display: grid;
  gap: 1.1rem;
  outline: none;
}

/* Step heading ------------------------------------------------------------------ */

.step-head {
  display: grid;
  gap: 0.4rem;
}

.step-head h1:focus {
  outline: none;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.stepper-bar {
  display: flex;
  gap: 4px;
  width: 112px;
}

.stepper-bar span {
  height: 4px;
  flex: 1;
  border-radius: 2px;
  background: var(--border);
}

.stepper-bar span.on {
  background: var(--brand);
}

.back-link {
  justify-self: start;
  margin-inline-start: -0.5rem;
}

.section {
  display: grid;
  gap: 0.7rem;
}

.section-title {
  font-size: 1rem;
  font-weight: 700;
}

/* Services ------------------------------------------------------------------------- */

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.chip {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-height: 58px;
  padding: 0.55rem 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.chip-name {
  font-weight: 600;
}

.chip-meta {
  color: var(--muted);
  font-size: 0.85rem;
}

.chip[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.chip[aria-pressed="true"] .chip-meta {
  color: var(--brand-text);
}

/* Providers ------------------------------------------------------------------------- */

.options {
  display: grid;
  gap: 0.55rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
  min-height: 66px;
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  text-align: start;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.option[aria-pressed="true"] {
  border-color: var(--brand);
  background: var(--brand-softer);
  box-shadow: inset 0 0 0 1px var(--brand);
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex: none;
  background: var(--brand-soft);
  color: var(--brand-text);
  font-weight: 700;
}

.option-text {
  display: grid;
  flex: 1;
  min-width: 0;
}

.option-title {
  font-weight: 600;
}

.option-sub {
  color: var(--muted);
  font-size: 0.875rem;
}

.option-check {
  color: var(--brand-text);
  visibility: hidden;
}

.option[aria-pressed="true"] .option-check {
  visibility: visible;
}

/* Provider switch in the time picker (reschedule) */
.pills {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  margin: 0 -1rem;
  padding: 2px 1rem 4px;
  scrollbar-width: none;
}

.pills::-webkit-scrollbar {
  display: none;
}

.pill {
  flex: none;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 600;
  cursor: pointer;
}

.pill[aria-pressed="true"] {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-text);
}

/* Day strip --------------------------------------------------------------------------- */

.days {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  margin: 0 -1rem;
  padding: 2px 1rem 6px;
  scrollbar-width: none;
}

.days::-webkit-scrollbar {
  display: none;
}

.day {
  flex: none;
  scroll-snap-align: start;
  width: 78px;
  min-height: 86px;
  padding: 0.45rem 0.25rem;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 1px;
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.day-wd {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.day-date {
  font-weight: 700;
  white-space: nowrap;
}

.day-count {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--brand-text);
  white-space: nowrap;
}

.day[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.day[aria-pressed="true"] .day-wd,
.day[aria-pressed="true"] .day-count {
  color: var(--brand-ink);
}

.day:disabled {
  background: #eef0f3;
  border-color: var(--border);
  color: #8b93a1;
  cursor: default;
}

.day:disabled .day-wd,
.day:disabled .day-count {
  color: #8b93a1;
}

/* Times ------------------------------------------------------------------------------------ */

.times-group {
  display: grid;
  gap: 0.5rem;
}

.times-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
}

.times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(98px, 1fr));
  gap: 0.5rem;
}

.time {
  min-height: 48px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.time[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--brand-ink);
}

.empty {
  display: grid;
  justify-items: center;
  gap: 0.4rem;
  padding: 1.4rem 1rem;
  text-align: center;
  color: var(--muted);
}

.empty .icon {
  width: 28px;
  height: 28px;
}

/* Bottom summary bar ---------------------------------------------------------------------- */

.summary-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 20;
  background: var(--surface);
  border-top: 1px solid var(--border);
  box-shadow: 0 -6px 20px rgb(16 24 40 / 0.08);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
}

.summary-inner {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.summary-text {
  flex: 1;
  min-width: 0;
  display: grid;
  line-height: 1.3;
}

.summary-main {
  font-weight: 700;
}

.summary-sub {
  color: var(--muted);
  font-size: 0.875rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Appointment summary card ---------------------------------------------------------------- */

.appt {
  display: grid;
  gap: 0.65rem;
}

.appt-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.appt-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
}

.appt-row .icon {
  color: var(--brand-text);
  margin-top: 0.15em;
}

.appt-row strong {
  font-weight: 650;
}

.countdown {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  background: var(--brand-softer);
  color: var(--brand-text);
  font-weight: 600;
  font-size: 0.95rem;
}

.countdown [data-countdown] {
  font-variant-numeric: tabular-nums;
}

/* Details form ------------------------------------------------------------------------------ */

.form {
  display: grid;
  gap: 1rem;
}

/* The number reads left to right in both languages: +965 then 8 digits. */
.phone-group {
  display: flex;
  direction: ltr;
}

.phone-prefix {
  display: grid;
  place-items: center;
  padding: 0 0.85rem;
  border: 1px solid var(--border-strong);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: #f2f4f7;
  color: var(--muted);
  font-weight: 600;
}

.phone-group .input {
  border-radius: 0 10px 10px 0;
  letter-spacing: 0.04em;
}

[dir="rtl"] .phone-group .input {
  text-align: left;
}

.privacy {
  display: flex;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}

/* Booked ------------------------------------------------------------------------------------- */

.success-head {
  display: grid;
  justify-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0 0.2rem;
  text-align: center;
}

.tick {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--ok-soft);
  color: var(--ok);
}

.tick .icon {
  width: 36px;
  height: 36px;
}

.actions {
  display: grid;
  gap: 0.6rem;
}

.linkbox {
  display: flex;
  gap: 0.5rem;
}

.linkbox .input {
  direction: ltr;
  text-align: left;
  font-size: 0.9rem;
  color: var(--muted);
  min-width: 0;
}

.linkbox .btn {
  flex: none;
}

/* Manage ------------------------------------------------------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--brand-soft);
  color: var(--brand-text);
  white-space: nowrap;
}

.status-cancelled,
.status-no_show,
.status-expired,
.status-held {
  background: #f0f2f5;
  color: #475467;
}

.status-checked_in,
.status-completed {
  background: var(--ok-soft);
  color: var(--ok);
}

.details {
  display: grid;
  gap: 0.7rem;
  margin: 0;
}

.details > div {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.5rem;
}

.details dt {
  color: var(--muted);
  font-size: 0.9rem;
}

.details dd {
  margin: 0;
  font-weight: 600;
}

.panel {
  display: grid;
  gap: 0.8rem;
}

.button-row {
  display: grid;
  gap: 0.55rem;
}

@media (min-width: 480px) {
  .button-row {
    grid-template-columns: 1fr 1fr;
  }
}

/* Loading ------------------------------------------------------------------------------------ */

.skeleton-line {
  height: 1rem;
}

.sk-title {
  height: 1.7rem;
  width: 55%;
}

.sk-row {
  display: flex;
  gap: 0.55rem;
  overflow: hidden;
}

.sk-chip {
  height: 58px;
  width: 150px;
  border-radius: 14px;
  flex: none;
}

.sk-day {
  width: 78px;
  height: 86px;
  border-radius: 14px;
  flex: none;
}

.sk-time {
  height: 48px;
  border-radius: 12px;
}

.sk-option {
  height: 66px;
  border-radius: 14px;
}
