/* ============================================================
   URHEBER-IMPULS — bookly-override.css
   CSS-Override für Bookly-Buchungsformular
   Einbindung via Code Snippets Free in WordPress
   Ziel: Bookly-Widget ins Designsystem einpassen
   ============================================================ */

/* ─── Bookly-Wrapper ───────────────────────────────────────── */
.bookly-form {
  font-family: 'Inter', system-ui, sans-serif !important;
  color: #1F2522 !important;
}

/* ─── Bookly-Container ─────────────────────────────────────── */
.bookly-container,
.bookly-form .bookly-form-group {
  background: #FFFFFF !important;
  border: 1.5px solid #DED3C6 !important;
  border-radius: 0.875rem !important;
  box-shadow: 0 4px 12px rgba(18,60,47,0.08) !important;
}

/* ─── Eingabefelder ────────────────────────────────────────── */
.bookly-form input[type="text"],
.bookly-form input[type="email"],
.bookly-form input[type="tel"],
.bookly-form input[type="number"],
.bookly-form select,
.bookly-form textarea {
  border: 1.5px solid #D8CEC0 !important;
  border-radius: 0.5rem !important;
  padding: 0.75rem 1rem !important;
  font-size: 1rem !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  color: #1F2522 !important;
  background: #FFFFFF !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}

.bookly-form input:focus,
.bookly-form select:focus,
.bookly-form textarea:focus {
  outline: none !important;
  border-color: #C8A24A !important;
  box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.18) !important;
}

/* ─── Labels ───────────────────────────────────────────────── */
.bookly-form label,
.bookly-form .bookly-label {
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  color: #123C2F !important;
  margin-bottom: 0.375rem !important;
  font-family: 'Inter', system-ui, sans-serif !important;
}

/* ─── Primärer Button (Weiter / Buchen) ────────────────────── */
.bookly-form .bookly-btn,
.bookly-form .bookly-btn-next,
.bookly-form .bookly-btn-submit,
.bookly-form button[type="submit"],
.bookly-form .btn-primary {
  background-color: #123C2F !important;
  color: #FAF7F1 !important;
  border: none !important;
  border-radius: 0.875rem !important;
  padding: 0.875rem 1.625rem !important;
  font-size: 0.9375rem !important;
  font-weight: 600 !important;
  font-family: 'Inter', system-ui, sans-serif !important;
  cursor: pointer !important;
  transition: background-color 0.18s, box-shadow 0.18s !important;
}

.bookly-form .bookly-btn:hover,
.bookly-form .bookly-btn-next:hover,
.bookly-form .bookly-btn-submit:hover {
  background-color: #0d2e24 !important;
  box-shadow: 0 4px 12px rgba(18,60,47,0.2) !important;
}

.bookly-form .bookly-btn:focus-visible,
.bookly-form .bookly-btn-next:focus-visible {
  outline: 2px solid #C8A24A !important;
  outline-offset: 3px !important;
}

/* ─── Sekundärer Button (Zurück) ───────────────────────────── */
.bookly-form .bookly-btn-back,
.bookly-form button.back {
  background-color: transparent !important;
  color: #123C2F !important;
  border: 1.5px solid #DED3C6 !important;
  border-radius: 0.875rem !important;
  padding: 0.875rem 1.625rem !important;
  font-size: 0.9375rem !important;
  font-weight: 500 !important;
  font-family: 'Inter', system-ui, sans-serif !important;
}

/* ─── Kalender-Tage ────────────────────────────────────────── */
.bookly-form .bookly-calendar .bookly-day.bookly-available:hover,
.bookly-form .bookly-calendar .bookly-day.bookly-available.bookly-selected {
  background-color: #123C2F !important;
  color: #FAF7F1 !important;
  border-radius: 0.5rem !important;
}

.bookly-form .bookly-calendar .bookly-day.bookly-today {
  border: 2px solid #C8A24A !important;
  border-radius: 0.5rem !important;
}

/* ─── Zeitslots ────────────────────────────────────────────── */
.bookly-form .bookly-time-slot.bookly-available:hover,
.bookly-form .bookly-time-slot.bookly-selected {
  background-color: #123C2F !important;
  color: #FAF7F1 !important;
  border-color: #123C2F !important;
  border-radius: 0.5rem !important;
}

/* ─── Progress-Bar / Steps ─────────────────────────────────── */
.bookly-form .bookly-progress-tracker .bookly-step.bookly-active,
.bookly-form .bookly-progress-tracker .bookly-step.bookly-completed {
  background-color: #123C2F !important;
  color: #FAF7F1 !important;
}

.bookly-form .bookly-progress-tracker .bookly-connector.bookly-active {
  background-color: #C8A24A !important;
}

/* ─── Zusammenfassung / Bestätigung ────────────────────────── */
.bookly-form .bookly-confirmation-step,
.bookly-form .bookly-payment-step {
  background: #FAF7F1 !important;
  border: 1px solid #DED3C6 !important;
  border-radius: 0.875rem !important;
  padding: 1.5rem !important;
}

/* ─── Preis-Anzeige ────────────────────────────────────────── */
.bookly-form .bookly-price,
.bookly-form .bookly-amount {
  color: #C8A24A !important;
  font-weight: 600 !important;
}

/* ─── Fehlermeldungen ──────────────────────────────────────── */
.bookly-form .bookly-error,
.bookly-form .bookly-validation-error {
  color: #8C3B2F !important;
  font-size: 0.875rem !important;
}

/* ─── Heading im Widget ────────────────────────────────────── */
.bookly-form .bookly-box-title,
.bookly-form h3 {
  font-family: 'Playfair Display', Georgia, serif !important;
  color: #123C2F !important;
  font-size: 1.375rem !important;
}
/* ============================================================
   Bookly Refinement — Premium-Klärungssession
   Ziel: Eingabebereich entkarten, Buttons ruhiger machen
   Muss NACH den bisherigen Bookly-Regeln stehen
   ============================================================ */

/* Bookly nur innerhalb der Buchungsbox feinjustieren */
body.elementor-page .booking-section .bookly-form {
  font-family: var(--font-body, 'Inter', system-ui, sans-serif) !important;
  color: var(--foreground, #1F2522) !important;
}

/* WICHTIG: Form-Groups dürfen keine Cards sein */
body.elementor-page .booking-section .bookly-form .bookly-form-group {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  margin-bottom: 1rem !important;
  min-width: 0 !important;
}

/* Auch Bookly-Container innen nicht zusätzlich als Card aufbauen */
body.elementor-page .booking-section .bookly-form .bookly-container {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Labels klar oberhalb der Felder */
body.elementor-page .booking-section .bookly-form label,
body.elementor-page .booking-section .bookly-form .bookly-label {
  display: block !important;
  margin: 0 0 0.4rem !important;
  color: var(--primary, #123C2F) !important;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif) !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
}

/* Eingabefelder ruhiger, hochwertiger, konsistent */
body.elementor-page .booking-section .bookly-form input[type="text"],
body.elementor-page .booking-section .bookly-form input[type="email"],
body.elementor-page .booking-section .bookly-form input[type="tel"],
body.elementor-page .booking-section .bookly-form input[type="number"],
body.elementor-page .booking-section .bookly-form select,
body.elementor-page .booking-section .bookly-form textarea {
  width: 100% !important;
  min-height: 50px !important;
  border: 1.5px solid var(--input, #D8CEC0) !important;
  border-radius: 0.75rem !important;
  padding: 0.8rem 1rem !important;
  background: #FFFFFF !important;
  color: var(--foreground, #1F2522) !important;
  font-size: 0.95rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
  box-shadow: none !important;
}

/* Telefonfeld mit Länderflagge sauber machen */
body.elementor-page .booking-section .bookly-form .iti,
body.elementor-page .booking-section .bookly-form .intl-tel-input {
  width: 100% !important;
  display: block !important;
}

body.elementor-page .booking-section .bookly-form .iti input[type="tel"],
body.elementor-page .booking-section .bookly-form .intl-tel-input input[type="tel"] {
  padding-left: 3.25rem !important;
}

/* Fokus: Premium, aber nicht laut */
body.elementor-page .booking-section .bookly-form input:focus,
body.elementor-page .booking-section .bookly-form select:focus,
body.elementor-page .booking-section .bookly-form textarea:focus {
  outline: none !important;
  border-color: var(--ring, #C8A24A) !important;
  box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.16) !important;
}

/* Checkbox Datenschutz */
body.elementor-page .booking-section .bookly-form input[type="checkbox"] {
  width: 1.15rem !important;
  height: 1.15rem !important;
  margin-top: 0.15rem !important;
  accent-color: var(--primary, #123C2F) !important;
}

/* Button-Basis: weniger hart, keine aggressive Großschrift */
body.elementor-page .booking-section .bookly-form .bookly-btn,
body.elementor-page .booking-section .bookly-form button[type="submit"],
body.elementor-page .booking-section .bookly-form .btn-primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 46px !important;
  border-radius: 0.9rem !important;
  padding: 0.8rem 1.45rem !important;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif) !important;
  font-size: 0.9rem !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  letter-spacing: 0.01em !important;
  text-transform: none !important;
  box-shadow: none !important;
}

/* Primärer Weiter-/Prüfen-Button */
body.elementor-page .booking-section .bookly-form .bookly-btn-next,
body.elementor-page .booking-section .bookly-form .bookly-btn-submit,
body.elementor-page .booking-section .bookly-form .bookly-js-next-step,
body.elementor-page .booking-section .bookly-form [class*="next-step"] {
  background: var(--primary, #123C2F) !important;
  color: var(--primary-foreground, #FAF7F1) !important;
  border: 1.5px solid var(--primary, #123C2F) !important;
}

/* Zurück-Button sekundär, nicht genauso laut wie CTA */
body.elementor-page .booking-section .bookly-form .bookly-btn-back,
body.elementor-page .booking-section .bookly-form .bookly-js-back-step,
body.elementor-page .booking-section .bookly-form [class*="back-step"] {
  background: transparent !important;
  color: var(--primary, #123C2F) !important;
  border: 1.5px solid var(--border, #DED3C6) !important;
}

/* Hover dezenter */
body.elementor-page .booking-section .bookly-form .bookly-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(18, 60, 47, 0.12) !important;
}

/* Mobil: Felder untereinander, keine gequetschten Spalten */
@media (max-width: 720px) {
  body.elementor-page .booking-section .bookly-form .bookly-form-group {
    width: 100% !important;
  }

  body.elementor-page .booking-section .bookly-form .bookly-btn {
    width: 100% !important;
  }
}

/* ============================================================
   QA Mobile Overrides - Bookly / Premium-Klaerungssession
   Mobile Button-Zone und Zeitslot-Breite aus dem Live-Customizer.
   ============================================================ */

@media (max-width: 640px) {
  body.elementor-page .booking-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 1.5rem 1rem !important;
    overflow: hidden !important;
  }

  body.elementor-page .bookly-form,
  body.elementor-page .bookly-css-root,
  body.elementor-page .bookly-time-step,
  body.elementor-page .bookly-columnizer-wrap,
  body.elementor-page .bookly-columnizer,
  body.elementor-page .bookly-time-screen,
  body.elementor-page .bookly-column {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body.elementor-page .bookly-form .bookly-day,
  body.elementor-page .bookly-form .bookly-hour {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 42px !important;
    margin-inline: 0 !important;
    border-radius: 0.5rem !important;
    text-align: center !important;
  }

  body.elementor-page .bookly-form .bookly-hour {
    background: #ffffff !important;
    border: 1px solid #DED3C6 !important;
    color: #1F2522 !important;
  }

  body.elementor-page .bookly-form .bookly-hour:hover,
  body.elementor-page .bookly-form .bookly-hour.bookly-selected {
    background: #123C2F !important;
    border-color: #123C2F !important;
    color: #FAF7F1 !important;
  }

  body.elementor-page .bookly-form .bookly-nav-steps {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 1.5rem !important;
    padding-top: 1.25rem !important;
    border-top: 1px solid rgba(18, 60, 47, 0.14) !important;
  }

  body.elementor-page .bookly-form .bookly-right {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.75rem !important;
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
  }

  body.elementor-page .bookly-form .bookly-time-prev,
  body.elementor-page .bookly-form .bookly-time-next,
  body.elementor-page .bookly-form button.bookly-btn:not(.bookly-back-step) {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 46px !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 0.875rem !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    line-height: 1 !important;
    text-align: center !important;
  }

  body.elementor-page .bookly-form .bookly-back-step {
    background: transparent !important;
    color: #123C2F !important;
    border: 1.5px solid #DED3C6 !important;
    box-shadow: none !important;
  }

  body.elementor-page .bookly-form .bookly-time-prev,
  body.elementor-page .bookly-form .bookly-time-next {
    background: #123C2F !important;
    color: #FAF7F1 !important;
    border: none !important;
    box-shadow: 0 8px 20px rgba(18, 60, 47, 0.14) !important;
  }

  body.elementor-page .bookly-form .bookly-time-prev:hover,
  body.elementor-page .bookly-form .bookly-time-next:hover {
    background: #0d2e24 !important;
  }

  body.elementor-page .bookly-form .bookly-btn[disabled],
  body.elementor-page .bookly-form .bookly-btn:disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
  }
}

/* Hide Bookly back buttons globally inside Elementor pages. */
body.elementor-page .bookly-form .bookly-back-step,
body.elementor-page .bookly-form button.bookly-back-step,
body.elementor-page .bookly-form .bookly-back-step.bookly-btn,
body.elementor-page .bookly-form .bookly-nav-steps > .bookly-back-step {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
}

/* ============================================================
   Paid Session Bookly cleanup v1
   Applies to /termin-einzel-session/ and /termin-elternpaar-session/.
   Removes the nested card look from Bookly's "Leistung" and
   "Deine Angaben" steps while keeping the outer appointment card.
   ============================================================ */

body.elementor-page .ui-paid-session__bookly .bookly-form,
body.elementor-page .ui-paid-session__bookly .bookly-css-root,
body.elementor-page .ui-paid-session__bookly .bookly-container {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-form-group,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-box,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-label-error,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-service-step .bookly-form-group,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-details-step .bookly-form-group,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-time-step .bookly-form-group {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-form-group {
  display: block !important;
  margin: 0 0 1rem !important;
  padding: 0 !important;
  min-width: 0 !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form label,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-label {
  display: block !important;
  margin: 0 0 0.4rem !important;
  padding: 0 !important;
  color: #123C2F !important;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif) !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  line-height: 1.35 !important;
  text-align: left !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form input[type="text"],
body.elementor-page .ui-paid-session__bookly .bookly-form input[type="email"],
body.elementor-page .ui-paid-session__bookly .bookly-form input[type="tel"],
body.elementor-page .ui-paid-session__bookly .bookly-form input[type="number"],
body.elementor-page .ui-paid-session__bookly .bookly-form input[type="password"],
body.elementor-page .ui-paid-session__bookly .bookly-form select,
body.elementor-page .ui-paid-session__bookly .bookly-form textarea {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 46px !important;
  margin: 0 !important;
  padding: 0.72rem 0.9rem !important;
  background: #FFFFFF !important;
  border: 1.5px solid #D8CEC0 !important;
  border-radius: 0.7rem !important;
  box-shadow: none !important;
  color: #1F2522 !important;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif) !important;
  font-size: 0.98rem !important;
  font-weight: 400 !important;
  line-height: 1.35 !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form input:focus,
body.elementor-page .ui-paid-session__bookly .bookly-form select:focus,
body.elementor-page .ui-paid-session__bookly .bookly-form textarea:focus {
  border-color: #C8A24A !important;
  outline: 0 !important;
  box-shadow: 0 0 0 3px rgba(200, 162, 74, 0.16) !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form .iti,
body.elementor-page .ui-paid-session__bookly .bookly-form .intl-tel-input {
  width: 100% !important;
  display: block !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form .iti input[type="tel"],
body.elementor-page .ui-paid-session__bookly .bookly-form .intl-tel-input input[type="tel"] {
  padding-left: 3.25rem !important;
}

/* Date/time filters in the appointment step should read as plain controls, not small nested cards. */
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-week-days,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-date-from,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-time-from,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-time-to,
body.elementor-page .ui-paid-session__bookly .bookly-form [class*="week-day"],
body.elementor-page .ui-paid-session__bookly .bookly-form [class*="date-from"],
body.elementor-page .ui-paid-session__bookly .bookly-form [class*="time-from"],
body.elementor-page .ui-paid-session__bookly .bookly-form [class*="time-to"] {
  box-shadow: none !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-week-days label,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-week-days span,
body.elementor-page .ui-paid-session__bookly .bookly-form [class*="week-day"] label,
body.elementor-page .ui-paid-session__bookly .bookly-form [class*="week-day"] span {
  box-shadow: none !important;
}

/* Details step: keep fields aligned, but remove the card-on-card effect. */
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-details-step .bookly-form-group,
body.elementor-page .ui-paid-session__bookly .bookly-form [class*="details"] .bookly-form-group {
  padding: 0 !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form input[type="checkbox"] {
  width: 1.3rem !important;
  height: 1.3rem !important;
  min-height: 0 !important;
  margin: 0.1rem 0.7rem 0 0 !important;
  padding: 0 !important;
  border: 1.5px solid #123C2F !important;
  border-radius: 0.2rem !important;
  accent-color: #123C2F !important;
  box-shadow: none !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-nav-steps {
  margin-top: 1.5rem !important;
  padding-top: 1.25rem !important;
  border-top: 1px solid rgba(18, 60, 47, 0.18) !important;
}

body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-btn,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-btn-next,
body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-btn-submit,
body.elementor-page .ui-paid-session__bookly .bookly-form button[type="submit"] {
  min-height: 46px !important;
  border-radius: 0.875rem !important;
  padding: 0.8rem 1.45rem !important;
  font-family: var(--font-body, 'Inter', system-ui, sans-serif) !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.01em !important;
}

@media (max-width: 720px) {
  body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-form-group,
  body.elementor-page .ui-paid-session__bookly .bookly-form .bookly-details-step .bookly-form-group {
    width: 100% !important;
    max-width: 100% !important;
  }
}
