@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;700&display=swap");

:root {
  --brand: #6a42a1;
  --brand-soft: #a38aca;
  --brand-light: #f3ecff;
  --brand-accent: #df3d94;
  --text-main: #1f1b2d;
  --text-soft: #625d74;
  --border: #dddfe8;
  --surface: #ffffff;
  --surface-muted: #f6f4fb;
  --surface-input: #f4f3f8;
  --shadow-card: 0 30px 60px rgba(15, 9, 32, 0.2);
}

html {
  font-size: 16px;
}

body.iframe-body {
  margin: 0;
 background: transparent;
  color: var(--text-main);
  font-family: "Montserrat", "Segoe UI", sans-serif;
}

.iframe-shell {
  display: flex;
  justify-content: center;
}

.booking-widget {
  width: 100%;
}

.booking-card {
  position: relative;
  background: var(--surface);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 16px 16px 14px;
}

.booking-overlay {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  border-radius: inherit;
  background: rgba(255, 255, 255, 0.97);
}

.booking-overlay[hidden] {
  display: none !important;
}

.booking-overlay-panel {
  display: grid;
  justify-items: center;
  gap: 14px;
  text-align: center;
}

.booking-overlay-spinner {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid rgba(106, 66, 161, 0.14);
  border-top-color: var(--brand);
  animation: booking-spin 0.8s linear infinite;
}

.booking-overlay-copy {
  margin: 0;
  color: var(--text-main);
  font-size: 1rem;
  font-weight: 500;
}

.progress-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
}

.progress-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #d7d6dd;
  transition: all 0.25s ease;
}

.progress-dot.is-current {
  width: 24px;
  background: var(--brand);
}

.progress-dot.is-complete {
  background: var(--brand-accent);
}

.booking-step {
  display: none;
}

.booking-step.is-active {
  display: block;
}

.step-header {
  margin-bottom: 18px;
}

.step-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-icon {
  color: var(--brand);
  width: 20px;
  height: 20px;
  display: inline-flex;
  flex: 0 0 20px;
}

.step-icon svg {
  width: 20px;
  height: 20px;
}

.step-title {
  margin: 0;
  font-size: 1.9rem;
  line-height: 1.1;
  font-weight: 500;
}

.field-group {
  margin-bottom: 18px;
}

.field-label,
.input-label {
  display: block;
  color: #2f3348;
  font-size: 0.98rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.input-helper {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 0.82rem;
  line-height: 1.35;
}

.time-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.time-header-stack {
  display: block;
}

.time-header .field-label {
  margin-bottom: 0;
}

.option-list {
  display: grid;
  gap: 10px;
}

.option-list-compact {
  gap: 8px;
}

.option-card {
  width: 100%;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 14px;
  min-height: 44px;
  padding: 14px 16px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-main);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease;
}

.option-card strong,
.option-card small {
  display: block;
}

.option-card small {
  color: var(--text-soft);
  font-size: 0.86rem;
  margin-top: 2px;
}

.option-card.is-selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(106, 66, 161, 0.08);
}

.option-check {
  width: 18px;
  height: 18px;
  color: var(--brand);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.option-card.is-selected .option-check {
  opacity: 1;
}

.option-check svg {
  width: 18px;
  height: 18px;
}

.is-hidden {
  display: none;
}

.text-action {
  margin-top: 8px;
  background: none;
  border: 0;
  padding: 0;
  color: var(--brand-accent);
  font-size: 1rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.time-preference-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.time-preference-card {
  width: 100%;
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid var(--border);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 236, 255, 0.7));
  color: var(--text-main);
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.time-preference-card:hover {
  transform: translateY(-1px);
}

.time-preference-card.is-active {
  border-color: var(--brand);
  box-shadow: 0 12px 24px rgba(106, 66, 161, 0.12);
}

.time-preference-card.is-unavailable {
  opacity: 0.55;
}

.time-preference-card:disabled {
  cursor: not-allowed;
}

.time-preference-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand);
  border-radius: 14px;
  background: rgba(106, 66, 161, 0.08);
}

.time-preference-icon svg {
  width: 24px;
  height: 24px;
}

.time-preference-copy strong,
.time-preference-copy small {
  display: block;
}

.time-preference-copy strong {
  font-size: 1rem;
}

.time-preference-copy small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 0.84rem;
}

.time-filter {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  background: var(--surface-muted);
  border-radius: 999px;
}

.time-filter-button {
  min-width: 70px;
  min-height: 36px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-soft);
  font-size: 0.95rem;
  font-weight: 600;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.time-filter-button.is-active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 6px 18px rgba(15, 9, 32, 0.08);
}

.time-filter-button:disabled {
  opacity: 0.45;
}

.time-grid-panel {
  display: none;
}

.time-grid-panel.is-active {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.time-chip {
  min-height: 42px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--surface);
  color: var(--text-main);
  font-size: 1rem;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.time-chip.is-selected {
  border-color: var(--brand);
  background: rgba(106, 66, 161, 0.06);
}

[data-time-option]:disabled,
[data-branch-option]:disabled,
[data-day-option]:disabled {
  opacity: 0.55;
  cursor: wait;
}

[data-show-more-times][hidden] {
  display: none !important;
}

@keyframes booking-spin {
  to {
    transform: rotate(360deg);
  }
}

.booking-form .row {
  --bs-gutter-x: 0.75rem;
  --bs-gutter-y: 0.75rem;
}

.form-input {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  background: var(--surface-input);
  padding: 10px 14px;
  color: var(--text-main);
  font-size: 0.98rem;
}

.form-input::placeholder {
  color: #9c97ac;
}

.form-input:disabled {
  opacity: 0.68;
  cursor: not-allowed;
}

.form-input.is-readonly {
  background: #ebe8f2;
  color: var(--text-soft);
  cursor: not-allowed;
}

.form-input:focus {
  outline: 2px solid rgba(106, 66, 161, 0.2);
}

.form-input.is-invalid {
  outline: 2px solid rgba(223, 61, 148, 0.18);
}

.field-error {
  color: var(--brand-accent);
  display: block;
  font-size: 0.82rem;
  line-height: 1.3;
  margin-top: 6px;
  min-height: 1.1em;
}

.select-wrap {
  position: relative;
}

.form-select-input {
  appearance: none;
  padding-right: 42px;
}

.select-arrow {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 18px;
  height: 18px;
  color: #9c97ac;
  transform: translateY(-50%);
  pointer-events: none;
}

.select-arrow svg {
  width: 18px;
  height: 18px;
}

.privacy-note {
  background: #faf5ff;
  border-radius: 12px;
  color: #76708a;
  font-size: 0.88rem;
  line-height: 1.35;
  margin: 12px 0 0;
  padding: 10px 14px;
  text-align: center;
}

.consent-check {
  align-items: flex-start;
  color: var(--text-soft);
  display: flex;
  gap: 10px;
  font-size: 0.9rem;
  line-height: 1.35;
}

.consent-check input {
  accent-color: var(--brand);
  margin-top: 2px;
}

.step-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.step-actions.is-single {
  grid-template-columns: 1fr;
}

.action-button {
  min-height: 48px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

.action-button:hover {
  transform: translateY(-1px);
}

.action-button-primary {
  background: var(--brand);
  color: #fff;
}

.action-button-primary:disabled {
  background: var(--brand-soft);
  opacity: 0.8;
}

.action-button-secondary {
  background: #fff;
  color: var(--text-main);
  border-color: var(--border);
}

.action-button svg {
  width: 16px;
  height: 16px;
}

.confirmation-step {
  padding: 6px 8px 16px;
  text-align: center;
}

.confirmation-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  margin: 4px auto 18px;
  background: #e6dcff;
  color: var(--brand);
  display: flex;
  align-items: center;
  justify-content: center;
}

.confirmation-icon svg {
  width: 28px;
  height: 28px;
}

.confirmation-copy h2,
.confirmation-copy h3 {
  color: var(--brand);
  margin: 0;
  font-weight: 700;
}

.confirmation-copy h2 {
  font-size: 2rem;
  line-height: 1.08;
}

.confirmation-copy h3 {
  font-size: 1.65rem;
  line-height: 1.08;
  margin-top: 2px;
}

.confirmation-copy p {
  color: var(--text-soft);
  font-size: 1.1rem;
  margin: 10px auto 18px;
  max-width: 420px;
}

.confirmation-copy strong {
  color: var(--brand-accent);
}

.confirmation-summary {
  background: #faf5ff;
  border-radius: 16px;
  padding: 18px 14px;
  text-align: left;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  font-size: 1rem;
}

.summary-row + .summary-row {
  margin-top: 8px;
}

.summary-row span {
  color: var(--text-main);
}

.summary-row strong {
  color: var(--text-main);
  font-weight: 500;
  text-align: right;
}

@media (max-width: 575px) {
  .iframe-shell {
    padding: 12px;
  }

  .booking-card {
    border-radius: 22px;
    padding: 14px 14px 12px;
  }

  .step-title {
    font-size: 1.45rem;
  }

  .time-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .time-preference-grid {
    grid-template-columns: 1fr;
  }

  .time-grid-panel.is-active {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step-actions {
    grid-template-columns: 1fr;
  }

  .step-actions:not(.is-single) .action-button-primary {
    order: 1;
  }

  .step-actions:not(.is-single) .action-button-secondary {
    order: 2;
  }

  .confirmation-copy h2 {
    font-size: 1.42rem;
  }

  .confirmation-copy h3 {
    font-size: 1.1rem;
  }

  .confirmation-copy p {
    font-size: 0.98rem;
    max-width: 280px;
  }

  .summary-row {
    align-items: baseline;
    flex-direction: row;
    gap: 10px;
    justify-content: space-between;
  }

  .summary-row strong {
    text-align: right;
  }
}

.catalog-page {
  width: min(100%, 960px);
}

.catalog-card {
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--shadow-card);
  padding: 24px;
}

.catalog-title {
  margin: 0 0 8px;
  font-size: 1.8rem;
}

.catalog-copy {
  color: var(--text-soft);
  margin-bottom: 20px;
}

.catalog-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.catalog-field label {
  display: block;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 8px;
}

.catalog-summary,
.catalog-results {
  margin-top: 24px;
}

.catalog-summary h2,
.catalog-results h2 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.catalog-summary dl {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.catalog-summary dt {
  color: var(--text-soft);
  font-size: 0.9rem;
}

.catalog-summary dd {
  margin: 4px 0 0;
  font-weight: 700;
}

.catalog-list {
  margin: 0;
  padding-left: 18px;
}

.catalog-list li + li {
  margin-top: 6px;
}

@media (max-width: 575px) {
  .catalog-grid,
  .catalog-summary dl {
    grid-template-columns: 1fr;
  }

  .catalog-card {
    padding: 18px;
  }
}
