/* Booking layout picker preview + public page chrome for saved layouts. */

#theme-preview.theme-preview-shell {
  background: var(--color-paper, #f7f4ef);
  color: var(--color-ink, #2c2a26);
  border: 1px solid var(--color-border, #ddd8cf);
  border-radius: var(--radius-card, 0.25rem);
  padding: 1rem;
  box-shadow: var(--shadow-card, none);
  font-family: var(--font-body, Figtree, system-ui, sans-serif);
}

#theme-preview button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.theme-preset-card {
  padding: 0.7rem 1.15rem 0.75rem 0.75rem;
}

.theme-preset-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-bottom: 0.7rem;
}

.theme-preset-swatch {
  width: 1.05rem;
  height: 1.05rem;
  border: 1px solid rgba(0, 0, 0, 0.14);
  flex: none;
}

.theme-preset-name {
  display: block;
  padding-right: 0.35rem;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.3;
}

#theme-preview[data-scheme-dark] .form-input,
#theme-preview[data-scheme-dark] .form-select {
  color-scheme: dark;
}

#theme-preview[data-scheme-dark] .slot-btn-booked {
  opacity: 1;
  color: var(--color-ink-muted);
  background-color: var(--color-surface);
  border-color: var(--color-border);
}

#theme-preview .tl-card,
#theme-preview .tl-summary,
#theme-preview .tl-acc-sec,
#theme-preview .tl-bubble,
#theme-preview .tl-month-day,
#theme-preview .tl-app {
  border-radius: var(--radius-card, 0.25rem);
}

#theme-preview .tl-classic-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 720px) {
  #theme-preview .tl-classic-grid {
    grid-template-columns: minmax(0, 1fr) 14rem;
    align-items: start;
  }
}

#theme-preview .tl-card,
#theme-preview .tl-summary {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  padding: 0.9rem;
}

#theme-preview .tl-summary {
  color: var(--color-charcoal);
}

#theme-preview .tl-studio {
  display: grid;
  min-height: 22rem;
}

@media (min-width: 720px) {
  #theme-preview .tl-studio {
    grid-template-columns: 13.5rem minmax(0, 1fr);
  }
}

#theme-preview .tl-studio-side {
  background: var(--color-olive);
  color: var(--color-on-primary, #fff);
  padding: 1.1rem;
  border-radius: var(--radius-card, 0.25rem) 0 0 var(--radius-card, 0.25rem);
}

#theme-preview .tl-studio-main {
  background: var(--color-surface);
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-left: 0;
}

#theme-preview .tl-progress {
  height: 0.25rem;
  background: var(--color-border);
  border-radius: 999px;
  overflow: hidden;
}

#theme-preview .tl-progress > span {
  display: block;
  height: 100%;
  background: var(--color-olive);
}

#theme-preview .tl-cal {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 900px) {
  #theme-preview .tl-cal {
    grid-template-columns: 14rem minmax(0, 1fr) 11rem;
    align-items: start;
  }
}

#theme-preview .tl-month-head,
#theme-preview .tl-month {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.2rem;
  text-align: center;
}

#theme-preview .tl-month-head {
  font-size: 0.7rem;
  color: var(--color-ink-muted);
}

#theme-preview .tl-month-day {
  aspect-ratio: 1;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-ink-muted);
  font-size: 0.8rem;
}

#theme-preview .tl-month-day.has-slots {
  color: var(--color-charcoal);
  background: var(--color-surface);
  border-color: var(--color-border);
}

#theme-preview .tl-month-day.is-selected {
  background: var(--color-olive);
  color: var(--color-on-primary, #fff);
  border-color: var(--color-olive);
}

#theme-preview .tl-month-day:disabled {
  opacity: 0.35;
}

#theme-preview .tl-acc {
  display: grid;
  gap: 0.45rem;
}

#theme-preview .tl-acc-sec {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  overflow: hidden;
}

#theme-preview .tl-acc-sec.is-locked {
  opacity: 0.55;
}

#theme-preview .tl-acc-head {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  text-align: left;
  background: transparent;
  color: var(--color-charcoal);
  font-weight: 600;
}

#theme-preview .tl-acc-body {
  padding: 0 0.9rem 0.9rem;
}

#theme-preview .tl-chat {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 36rem;
  margin: 0 auto;
  min-height: 18rem;
}

#theme-preview .tl-bubble {
  max-width: 85%;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-charcoal);
  text-align: left;
}

#theme-preview .tl-bubble-user {
  align-self: flex-end;
  background: var(--color-olive);
  color: var(--color-on-primary, #fff);
  border-color: transparent;
}

#theme-preview .tl-bubble-wide {
  max-width: 100%;
  align-self: stretch;
}

#theme-preview .tl-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

#theme-preview .tl-app {
  max-width: 26rem;
  margin: 0 auto;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 28rem;
}

#theme-preview .tl-app-top {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

#theme-preview .tl-app-body {
  padding: 1rem;
  flex: 1;
}

#theme-preview .tl-app-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-paper);
}

#theme-preview .tl-tiles {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.6rem;
}

#theme-preview .tl-tile {
  min-height: 7rem;
}

#theme-preview .tl-pills {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 0.3rem;
}

#theme-preview .bk-day-pill,
#theme-preview .bk-quick-reply {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-charcoal);
  border-radius: var(--radius-button, var(--radius-control, 0.25rem));
  padding: 0.35rem 0.55rem;
  font-size: 0.8rem;
}

#theme-preview .bk-day-pill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

#theme-preview .bk-day-pill.is-selected {
  background: var(--color-olive);
  color: var(--color-on-primary, #fff);
  border-color: var(--color-olive);
}

#theme-preview .bk-day-pill:disabled {
  opacity: 0.35;
}

/* Public booking page: same saved layout, existing wizard markup. */
@media (min-width: 900px) {
  html[data-booking-layout="studio"] #booking-app .booking-layout {
    grid-template-columns: minmax(14rem, 18rem) minmax(0, 1fr);
  }
}

html[data-booking-layout="studio"] #booking-app .booking-order-summary {
  order: -1;
  background: var(--color-olive);
  color: var(--color-on-primary, #fff);
  border-color: transparent;
}

html[data-booking-layout="studio"] #booking-app .booking-order-summary-title,
html[data-booking-layout="studio"] #booking-app .booking-order-summary-empty,
html[data-booking-layout="studio"] #booking-app .booking-order-line-label,
html[data-booking-layout="studio"] #booking-app .booking-order-line-value {
  color: inherit;
}

html[data-booking-layout="studio"] #booking-app .booking-order-summary .btn-ghost {
  color: var(--color-on-primary, #fff);
}

html[data-booking-layout="app"] #booking-app {
  max-width: 32.5rem;
}

html[data-booking-layout="app"] #booking-app #service-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

html[data-booking-layout="app"] #booking-app .booking-layout {
  grid-template-columns: minmax(0, 1fr);
}

html[data-booking-layout="app"] #booking-app .booking-order-summary {
  position: sticky;
  bottom: 0.75rem;
}

html[data-booking-layout="calendar"] #booking-app .booking-step-indicator {
  display: none;
}

html[data-booking-layout="calendar"] #booking-app .booking-day-strip {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

html[data-booking-layout="accordion"] #booking-app .booking-step-indicator {
  display: none;
}

html[data-booking-layout="accordion"] #booking-app .step-panel {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-card, var(--radius-control));
  padding: 1rem;
}

html[data-booking-layout="chat"] #booking-app {
  max-width: 40rem;
}

html[data-booking-layout="chat"] #booking-app .booking-layout {
  grid-template-columns: minmax(0, 1fr);
}

html[data-booking-layout="chat"] #booking-app #service-list,
html[data-booking-layout="chat"] #booking-app #employee-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

html[data-booking-layout="chat"] #booking-app .service-option {
  width: auto;
  border-radius: 9999px;
  padding: 0.55rem 0.9rem;
}
