/* Themed appointment form — uses --appt-* from AppointmentTheme.apply() */

.appointment-form[data-themed="true"] {
  background: var(--appt-form-bg, var(--white));
  border: 1px solid var(--appt-form-border, rgba(14, 138, 138, 0.1));
  transition: background 0.25s ease, border-color 0.25s ease;
}

.appointment-form--shadow[data-themed="true"] {
  box-shadow: var(--shadow-lg);
}

.appointment-form[data-themed="true"] h3 {
  color: var(--appt-navy, var(--navy));
}

.appointment-form[data-themed="true"] .btn--primary {
  background: var(--appt-primary, var(--teal));
  border-color: var(--appt-primary, var(--teal));
  color: var(--appt-btn-text, #fff);
}

.appointment-form[data-themed="true"] .btn--primary:hover:not(:disabled) {
  background: var(--appt-primary-dark, var(--teal-dark));
  border-color: var(--appt-primary-dark, var(--teal-dark));
}

.appointment-form[data-themed="true"] input:focus,
.appointment-form[data-themed="true"] select:focus,
.appointment-form[data-themed="true"] textarea:focus {
  border-color: var(--appt-primary, var(--teal));
  box-shadow: 0 0 0 3px var(--appt-focus-ring, rgba(14, 138, 138, 0.12));
}

.appointment-form[data-themed="true"] .form-message.success {
  background: var(--appt-accent-light, var(--teal-light));
  color: var(--appt-navy, var(--navy));
  border: 1px solid var(--appt-primary, var(--teal));
}

.appointment-page[data-themed="true"] .appointment-page__contact a,
.appointment-page[data-themed="true"] .appointment-page__home-link {
  color: var(--appt-primary, var(--teal));
}

.appointment-page[data-themed="true"] .appointment-page__footer {
  background: var(--appt-navy, var(--navy));
}

.appointment-form[data-appt-bg-style="pattern-soft"][data-themed="true"] {
  background-color: var(--white);
  background-image:
    radial-gradient(var(--appt-accent-light, #e6f5f5) 1px, transparent 1px);
  background-size: 20px 20px;
}

.settings-theme-preview-open {
  width: 100%;
  margin-top: 12px;
}

.theme-preview-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.theme-preview-modal[hidden] {
  display: none;
}

.theme-preview-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.theme-preview-modal__dialog {
  position: relative;
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border: 1px solid #e2e8f0;
}

.theme-preview-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 24px 0;
}

.theme-preview-modal__header h2 {
  margin: 0 0 6px;
  font-size: 1.25rem;
}

.theme-preview-modal__subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.theme-preview-modal__close {
  border: none;
  background: transparent;
  font-size: 1.75rem;
  line-height: 1;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0 4px;
}

.theme-preview-modal__close:hover {
  color: var(--navy);
}

.theme-preview-modal__body {
  padding: 16px 24px 8px;
}

.theme-preview-modal__page {
  border-radius: var(--radius-sm);
  padding: 20px;
  min-height: 280px;
}

.theme-preview-modal__intro {
  text-align: center;
  margin-bottom: 18px;
}

.theme-preview-modal__intro h3 {
  margin: 10px 0 6px;
  font-size: 1.35rem;
}

.theme-preview-modal__intro p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.theme-preview-modal__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 16px 24px 20px;
  border-top: 1px solid #e2e8f0;
}

.theme-preview-modal__page .appointment-form {
  margin: 0 auto;
  max-width: 560px;
}

.theme-preview-modal__page .appointment-form .settings-input,
.theme-preview-modal__page .appointment-form input,
.theme-preview-modal__page .appointment-form select,
.theme-preview-modal__page .appointment-form textarea {
  width: 100%;
  box-sizing: border-box;
}
