/* ============================================================
   SCOPE: All styles scoped to .ma-bat to avoid WordPress conflicts
   ============================================================ */

.ma-bat *,
.ma-bat *::before,
.ma-bat *::after {
  box-sizing: border-box;
}

.ma-bat {
  font-family: 'Red Hat Display', sans-serif;
  color: #2b2824;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* --- Heading --- */
.ma-bat__heading {
  font-family: 'Red Hat Display', sans-serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 6px;
  line-height: 1.15;
  transition: opacity 0.3s, transform 0.3s;
}

.ma-bat__subheading {
  font-size: 16px;
  color: #666;
  margin: 0 0 28px;
  transition: opacity 0.3s, transform 0.3s;
}

/* --- Centre selector row --- */
.ma-bat__selector-row {
  display: flex;
  gap: 12px;
  align-items: stretch;
  margin-bottom: 24px;
  flex-wrap: wrap;
  transition: opacity 0.3s, transform 0.3s;
}

.ma-bat__selector-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
  margin-bottom: 6px;
}

.ma-bat__selector-wrap {
  flex: 1;
  min-width: 220px;
  position: relative;
}

/* Loading indicator on the select itself */
.ma-bat__selector-wrap::after {
  content: '';
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%) scale(0);
  width: 16px;
  height: 16px;
  border: 2px solid #f0f0f0;
  border-top-color: #d81635;
  border-radius: 50%;
  animation: ma-spin 0.7s linear infinite;
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.ma-bat__selector-wrap.is-loading::after {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}

.ma-bat__select {
  width: 100%;
  height: 52px;
  padding: 0 44px 0 16px;
  font-family: 'Red Hat Display', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #2b2824;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 16px center;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ma-bat__select:focus {
  outline: none;
  border-color: #d81635;
  box-shadow: 0 0 0 3px rgba(216,22,53,0.1);
}

.ma-bat__select:hover:not(:focus) {
  border-color: #bbb;
}

/* --- Calendar panel --- */
.ma-bat__calendar-panel {
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.07);
  /* Panel entrance animation */
  animation: ma-panel-in 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ma-panel-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Slide-out when transitioning to form */
.ma-bat__calendar-panel.is-hiding {
  animation: ma-panel-out 0.25s cubic-bezier(0.22, 1, 0.36, 1) both;
  pointer-events: none;
}

@keyframes ma-panel-out {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-8px); }
}

.ma-bat__cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1.5px solid #f0f0f0;
  background: #fafafa;
  /* padding/gap set in responsive block */
}

.ma-bat__cal-btn {
  cursor: pointer;
  transition: background 0.15s, transform 0.12s, box-shadow 0.15s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* All sizing/colour set in responsive block with !important */
}
.ma-bat__cal-btn.is-disabled {
  background: #f0c0c8 !important;
  border: none !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}
.ma-bat__cal-btn.is-disabled svg path {
  stroke: #fff !important;
}

/* --- Grid container with slide animation --- */
.ma-bat__grid-outer {
  overflow: hidden;
  position: relative;
}

.ma-bat__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1.5px solid #f0f0f0;
}

/* Week slide animations */
.ma-bat__grid.slide-in-left {
  animation: ma-slide-in-left 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.ma-bat__grid.slide-in-right {
  animation: ma-slide-in-right 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes ma-slide-in-left {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes ma-slide-in-right {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}

.ma-bat__day-col {
  border-right: 1px solid #f0f0f0;
  min-height: 160px;
}

.ma-bat__day-col:last-child {
  border-right: none;
}

.ma-bat__day-header {
  padding: 10px 6px 8px;
  text-align: center;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
}

.ma-bat__day-name {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #999;
  display: block;
}

.ma-bat__day-date {
  font-size: 15px;
  font-weight: 700;
  color: #2b2824;
  display: block;
  margin-top: 2px;
}

.ma-bat__day-col--today .ma-bat__day-header {
  background: #fff5f7;
}

.ma-bat__day-col--today .ma-bat__day-name {
  color: #d81635;
}

.ma-bat__day-col--today .ma-bat__day-date {
  color: #d81635;
}

/* Today badge */
.ma-bat__today-badge {
  display: inline-block;
  background: #d81635;
  color: #fff;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 1px 5px;
  border-radius: 10px;
  margin-top: 3px;
}

.ma-bat__day-col--past .ma-bat__day-header {
  background: #f8f8f8;
}

.ma-bat__day-col--past .ma-bat__day-name,
.ma-bat__day-col--past .ma-bat__day-date {
  color: #ccc;
}

.ma-bat__slots {
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

/* Staggered slot button entrance */
.ma-bat__slot-btn {
  width: 100%;
  max-width: 100px;
  padding: 8px 4px;
  font-family: 'Red Hat Display', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #d81635;
  background: #fff5f7;
  border: 1.5px solid #d81635;
  border-radius: 20px;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s, color 0.15s, transform 0.12s, box-shadow 0.15s;
  line-height: 1.2;
  opacity: 0;
  animation: ma-slot-in 0.25s ease both;
}

.ma-bat__slot-btn:hover {
  background: #d81635;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(216,22,53,0.3);
}

.ma-bat__slot-btn:active {
  transform: translateY(0) scale(0.97);
  box-shadow: none;
}

@keyframes ma-slot-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger delays for slot buttons (up to 8 per day) */
.ma-bat__slot-btn:nth-child(1) { animation-delay: 0.05s; }
.ma-bat__slot-btn:nth-child(2) { animation-delay: 0.10s; }
.ma-bat__slot-btn:nth-child(3) { animation-delay: 0.15s; }
.ma-bat__slot-btn:nth-child(4) { animation-delay: 0.20s; }
.ma-bat__slot-btn:nth-child(5) { animation-delay: 0.25s; }
.ma-bat__slot-btn:nth-child(6) { animation-delay: 0.30s; }
.ma-bat__slot-btn:nth-child(7) { animation-delay: 0.35s; }
.ma-bat__slot-btn:nth-child(8) { animation-delay: 0.40s; }

.ma-bat__no-slots {
  color: #ddd;
  font-size: 18px;
  text-align: center;
  padding: 20px 0;
  line-height: 1;
}

.ma-bat__day-col--past .ma-bat__slots {
  background: #fafafa;
}

/* --- Skeleton loading state --- */
.ma-bat__skeleton-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-top: 1.5px solid #f0f0f0;
}

.ma-bat__skeleton-col {
  border-right: 1px solid #f0f0f0;
  min-height: 160px;
}

.ma-bat__skeleton-col:last-child {
  border-right: none;
}

.ma-bat__skeleton-hdr {
  padding: 10px 6px 8px;
  border-bottom: 1px solid #f0f0f0;
  background: #fafafa;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.ma-bat__skeleton-body {
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.ma-bat__skel {
  border-radius: 6px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e4e4e4 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: ma-shimmer 1.4s infinite;
}

@keyframes ma-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.ma-bat__skel--name  { width: 24px; height: 9px; }
.ma-bat__skel--date  { width: 20px; height: 14px; border-radius: 4px; }
.ma-bat__skel--slot  { width: 68px; height: 30px; border-radius: 20px; }

/* --- No availability message --- */
.ma-bat__no-avail {
  padding: 32px 24px;
  text-align: center;
  color: #999;
  font-size: 14px;
  line-height: 1.6;
}

.ma-bat__no-avail strong {
  display: block;
  font-size: 16px;
  color: #555;
  margin-bottom: 6px;
}

/* --- CRM form container (shown after slot selection) --- */
.ma-bat__crm-wrap {
  display: none;
  margin-top: 0;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.35s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.ma-bat__crm-wrap.is-visible {
  display: block;
}

.ma-bat__crm-wrap.is-animated {
  opacity: 1;
  transform: translateY(0);
}

.ma-bat__back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Red Hat Display', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #888;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px 0;
  margin-bottom: 16px;
  transition: color 0.15s;
}

.ma-bat__back-btn:hover { color: #d81635; }

.ma-bat__back-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.15s;
}

.ma-bat__back-btn:hover svg {
  transform: translateX(-3px);
}

/* ============================================================
   FIX 2: Hide the CRM's FullCalendar from frame one.
   .ma-bat__crm-is-loading is added to #ma-bat-form-host BEFORE
   crmForm.render() is called, so the calendar never appears.
   The class is removed only after the slot is auto-selected.
   ============================================================ */
#ma-bat-form-host.ma-bat__crm-is-loading .childcarecrm-form__calendar-container,
#ma-bat-form-host.ma-bat__crm-is-loading .fc,
#ma-bat-form-host.ma-bat__crm-is-loading .fc-view-harness,
#ma-bat-form-host.ma-bat__crm-is-loading .fc-toolbar {
  display: none !important;
}

/* ============================================================
   CRM FORM BRAND OVERRIDES
   These override the CRM's default styles to match MA branding.
   Selectors target #childcarecrm-tour-form which is always
   present inside #ma-bat-form-host (never wiped — see Fix 1).
   ============================================================ */

/* All text in the CRM form — Red Hat Display */
#childcarecrm-tour-form,
#childcarecrm-tour-form *:not(.fc-button):not(.fc-icon) {
  font-family: 'Red Hat Display', sans-serif !important;
  box-sizing: border-box !important;
}

/* ── Form wrapper ── */
#childcarecrm-tour-form .childcarecrm-form {
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* ── Header bar ── */
#childcarecrm-tour-form .childcarecrm-form__header {
  background: #d81635 !important;
  font-family: 'Red Hat Display', sans-serif !important;
  border-radius: 10px 10px 0 0 !important;
  padding: 16px 20px !important;
}

/* ── Selected time display ── */
#childcarecrm-tour-form .childcarecrm-form__selected-time {
  background: #fff5f7 !important;
  border: 1.5px solid #f5c0c8 !important;
  border-left: 4px solid #d81635 !important;
  border-radius: 8px !important;
  color: #d81635 !important;
  font-family: 'Red Hat Display', sans-serif !important;
  font-weight: 700 !important;
  font-size: 15px !important;
  padding: 12px 16px !important;
  margin-bottom: 20px !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
}

/* ── Change Time button ── */
#childcarecrm-tour-form .childcarecrm-form__change-time,
#childcarecrm-tour-form button.childcarecrm-form__back-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  background: #fff !important;
  border: 1.5px solid #d81635 !important;
  border-radius: 6px !important;
  color: #d81635 !important;
  font-family: 'Red Hat Display', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em !important;
  text-transform: uppercase !important;
  padding: 6px 14px !important;
  cursor: pointer !important;
  transition: background 0.15s, color 0.15s !important;
  text-decoration: none !important;
  margin-top: 8px !important;
}

#childcarecrm-tour-form .childcarecrm-form__change-time:hover,
#childcarecrm-tour-form button.childcarecrm-form__back-button:hover {
  background: #d81635 !important;
  color: #fff !important;
}

/* ── Field wrapper spacing ── */
#childcarecrm-tour-form .childcarecrm-form__field {
  margin-bottom: 18px !important;
}

/* ── Contact row — email + How Did You Hear side by side ── */
#childcarecrm-tour-form .childcarecrm-form__contact-row {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 16px !important;
  align-items: start !important;
}

/* Each field inside the contact row fills its column */
#childcarecrm-tour-form .childcarecrm-form__field--contact-pair {
  display: block !important;
  width: 100% !important;
}

/* Ensure email input fills its column */
#childcarecrm-tour-form .childcarecrm-form__field--contact-pair input[type="email"] {
  width: 100% !important;
}

/* ── Labels ── */
#childcarecrm-tour-form label {
  font-family: 'Red Hat Display', sans-serif !important;
  font-weight: 700 !important;
  font-size: 11px !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  color: #666 !important;
  margin-bottom: 6px !important;
  display: block !important;
}

/* ── Required asterisk — show on ALL labels via ::after pseudo-element ── */
#childcarecrm-tour-form label::after {
  content: ' *' !important;
  color: #d81635 !important;
  font-weight: 700 !important;
}

/* Hide the CRM's own required mark to avoid double asterisk ── */
#childcarecrm-tour-form .childcarecrm-form__label-required-mark {
  display: none !important;
}

/* Remove asterisk from day chip labels only — section heading keeps its asterisk */
#childcarecrm-tour-form .childcarecrm-form__control--choice-multiple label::after {
  content: none !important;
}

/* ── Text / email / tel / date inputs ── */
#childcarecrm-tour-form input[type="text"],
#childcarecrm-tour-form input[type="email"],
#childcarecrm-tour-form input[type="tel"] {
  font-family: 'Red Hat Display', sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #2b2824 !important;
  background: #fff !important;
  border: 1.5px solid #d0d0d0 !important;
  border-radius: 8px !important;
  height: 48px !important;
  padding: 0 14px !important;
  width: 100% !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  box-shadow: none !important;
  outline: none !important;
  appearance: none !important;
}

#childcarecrm-tour-form input[type="text"]:focus,
#childcarecrm-tour-form input[type="email"]:focus,
#childcarecrm-tour-form input[type="tel"]:focus {
  border-color: #d81635 !important;
  box-shadow: 0 0 0 3px rgba(216,22,53,0.10) !important;
  outline: none !important;
}

#childcarecrm-tour-form input[type="text"]:hover:not(:focus),
#childcarecrm-tour-form input[type="email"]:hover:not(:focus),
#childcarecrm-tour-form input[type="tel"]:hover:not(:focus) {
  border-color: #aaa !important;
}

/* ── Placeholder text ── */
#childcarecrm-tour-form input::placeholder {
  color: #bbb !important;
  font-weight: 400 !important;
}

/* ── Selects / Dropdowns ── */
#childcarecrm-tour-form select {
  font-family: 'Red Hat Display', sans-serif !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  color: #2b2824 !important;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center !important;
  border: 1.5px solid #d0d0d0 !important;
  border-radius: 8px !important;
  height: 48px !important;
  padding: 0 40px 0 14px !important;
  width: 100% !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer !important;
  transition: border-color 0.2s, box-shadow 0.2s !important;
  box-shadow: none !important;
  outline: none !important;
}

#childcarecrm-tour-form select:focus {
  border-color: #d81635 !important;
  box-shadow: 0 0 0 3px rgba(216,22,53,0.10) !important;
  outline: none !important;
}

#childcarecrm-tour-form select:hover:not(:focus) {
  border-color: #aaa !important;
}

/* ── DOB row — three selects side by side ── */
#childcarecrm-tour-form .childcarecrm-form__date-of-birth {
  display: flex !important;
  gap: 8px !important;
  align-items: center !important;
}

#childcarecrm-tour-form .childcarecrm-form__date-day,
#childcarecrm-tour-form .childcarecrm-form__date-month,
#childcarecrm-tour-form .childcarecrm-form__date-year {
  flex: 1 !important;
}

/* ── Expected start date — calendar icon ── */
#childcarecrm-tour-form .childcarecrm-form__expected-start-date {
  position: relative !important;
}

#childcarecrm-tour-form .childcarecrm-form__expected-start-date input[type="text"] {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23aaa' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  cursor: pointer !important;
}

/* contact-pair handled by .childcarecrm-form__contact-row grid above */

/* ── Child info section — date field spacing ── */
#childcarecrm-tour-form .childcarecrm-form__field:has(.childcarecrm-form__control--date) {
  padding-top: 0 !important;
  border-top: none !important;
  margin-top: 8px !important;
}

/* ── Divider directly above Child First Name ── */
.ma-bat__child-divider {
  border: none !important;
  border-top: 2px solid #e8e8e8 !important;
  margin: 32px 0 28px 0 !important;
  display: block !important;
}

/* ── Extra spacing above care days field — full section break ── */
#childcarecrm-tour-form .childcarecrm-form__care-days-checkboxes.childcarecrm-form__field {
  margin-top: 48px !important;
  padding-top: 24px !important;
  border-top: 1.5px solid #f0f0f0 !important;
  width: 100% !important;
  display: block !important;
  clear: both !important;
}

/* ── Care days checkboxes — styled as toggle chips ── */
#childcarecrm-tour-form .childcarecrm-form__control--choice-multiple {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  padding: 4px 0 !important;
}

/* Hide the raw checkbox input */
#childcarecrm-tour-form .childcarecrm-form__control--choice-multiple input[type="checkbox"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}

/* Style the label as a clickable chip */
#childcarecrm-tour-form .childcarecrm-form__control--choice-multiple label {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 52px !important;
  height: 40px !important;
  padding: 0 14px !important;
  background: #fff !important;
  border: 1.5px solid #d0d0d0 !important;
  border-radius: 8px !important;
  font-family: 'Red Hat Display', sans-serif !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  letter-spacing: 0.06em !important;
  text-transform: uppercase !important;
  color: #555 !important;
  cursor: pointer !important;
  transition: background 0.15s, border-color 0.15s, color 0.15s !important;
  user-select: none !important;
  margin: 0 !important;
}

#childcarecrm-tour-form .childcarecrm-form__control--choice-multiple label:hover {
  border-color: #d81635 !important;
  color: #d81635 !important;
  background: #fff5f7 !important;
}

/* Checked state — filled red chip */
#childcarecrm-tour-form .childcarecrm-form__control--choice-multiple input[type="checkbox"]:checked + label {
  background: #d81635 !important;
  border-color: #d81635 !important;
  color: #fff !important;
}

/* ── Select All link ── */
#childcarecrm-tour-form .childcarecrm-form__select-all,
#childcarecrm-tour-form a[data-action="select-all"],
#childcarecrm-tour-form .childcarecrm-form__care-days-checkboxes a {
  font-size: 12px !important;
  font-weight: 600 !important;
  color: #d81635 !important;
  text-decoration: underline !important;
  cursor: pointer !important;
  margin-left: 4px !important;
  align-self: center !important;
}

/* ── Additional Child button — red underlined text link ── */
#childcarecrm-tour-form .childcarecrm-form__add-child,
#childcarecrm-tour-form button[data-action="add-child"],
#childcarecrm-tour-form .childcarecrm-form__contact-row > button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  background: transparent !important;
  border: none !important;
  border-bottom: 1.5px solid #d81635 !important;
  border-radius: 0 !important;
  color: #d81635 !important;
  font-family: 'Red Hat Display', sans-serif !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 2px 0 !important;
  cursor: pointer !important;
  transition: opacity 0.15s !important;
  margin-top: 12px !important;
  text-decoration: none !important;
}

#childcarecrm-tour-form .childcarecrm-form__add-child:hover,
#childcarecrm-tour-form button[data-action="add-child"]:hover,
#childcarecrm-tour-form .childcarecrm-form__contact-row > button:hover {
  opacity: 0.75 !important;
  background: transparent !important;
}

/* ── Submit / Confirm buttons — MA website style ── */
#childcarecrm-tour-form #childcarecrm-form__submit-button,
#childcarecrm-tour-form #childcarecrm-form__confirm-button {
  background: #d81635 !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: 'Red Hat Display', sans-serif !important;
  font-size: 16px !important;
  font-weight: 700 !important;
  letter-spacing: 0.01em !important;
  color: #fff !important;
  height: 52px !important;
  padding: 0 32px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 14px rgba(216,22,53,0.25) !important;
  transition: background 0.15s, box-shadow 0.15s, transform 0.12s !important;
  width: auto !important;
  min-width: 180px !important;
  justify-content: center !important;
  margin-top: 8px !important;
}

#childcarecrm-tour-form #childcarecrm-form__submit-button::after,
#childcarecrm-tour-form #childcarecrm-form__confirm-button::after {
  content: '\2197' !important;
  font-size: 18px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  display: inline-block !important;
  transition: transform 0.18s !important;
}

#childcarecrm-tour-form #childcarecrm-form__submit-button:hover,
#childcarecrm-tour-form #childcarecrm-form__confirm-button:hover {
  background: #b8102a !important;
  box-shadow: 0 6px 20px rgba(216,22,53,0.35) !important;
}

#childcarecrm-tour-form #childcarecrm-form__submit-button:hover::after,
#childcarecrm-tour-form #childcarecrm-form__confirm-button:hover::after {
  transform: translate(2px, -2px) !important;
}

#childcarecrm-tour-form #childcarecrm-form__submit-button:active,
#childcarecrm-tour-form #childcarecrm-form__confirm-button:active {
  transform: scale(0.98) !important;
  box-shadow: none !important;
}

/* ── Disclaimer text ── */
#childcarecrm-tour-form .childcarecrm-form__disclaimer {
  font-size: 12px !important;
  color: #999 !important;
  line-height: 1.5 !important;
  margin-top: 16px !important;
}

/* ── Error messages ── */
#childcarecrm-tour-form .childcarecrm-form__errors {
  background: #fff5f7 !important;
  border: 1.5px solid #f5c0c8 !important;
  border-left: 4px solid #d81635 !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  color: #d81635 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  margin-bottom: 16px !important;
}

/* ── Step indicator dots ── */
#childcarecrm-tour-form .childcarecrm-form__step--active {
  background: #d81635 !important;
  border-color: #d81635 !important;
}

#childcarecrm-tour-form .childcarecrm-form__step--complete {
  background: #2e7d32 !important;
  border-color: #2e7d32 !important;
}

/* ── Hide the CRM's own calendar — we handle slot selection ourselves ── */
#childcarecrm-tour-form .childcarecrm-form__calendar-container {
  display: none !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ── Nav buttons: always solid red circles, visible at all sizes ── */
.ma-bat__cal-btn {
  width: 40px  !important;
  height: 40px !important;
  min-width: 40px  !important;
  min-height: 40px !important;
  max-width: 40px  !important;
  max-height: 40px !important;
  padding: 0 !important;
  flex-shrink: 0 !important;
  border-radius: 50% !important;
  background: #d81635 !important;
  border: none !important;
  color: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  box-sizing: border-box !important;
}

.ma-bat__cal-btn svg {
  width: 16px !important;
  height: 16px !important;
  display: block !important;
  flex-shrink: 0 !important;
}

.ma-bat__cal-btn svg path {
  stroke: #fff !important;
  stroke-width: 2.2 !important;
}

.ma-bat__cal-btn:hover:not(:disabled) {
  background: #b8102a !important;
  border: none !important;
  transform: scale(1.08) !important;
  box-shadow: 0 3px 10px rgba(216,22,53,0.35) !important;
}

.ma-bat__cal-btn:active:not(:disabled) {
  transform: scale(0.95) !important;
}

/* .is-disabled class handles disabled state for div-based buttons */

/* ── Week header: compact on all screens ── */
.ma-bat__cal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  gap: 12px;
}

.ma-bat__cal-title {
  font-family: 'Red Hat Display', sans-serif;
  font-size: clamp(13px, 3vw, 17px);
  font-weight: 700;
  color: #1a1a2e;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ma-bat__cal-nav {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

/* ── Small screens: scrollable grid with readable slot buttons ── */
@media (max-width: 640px) {
  .ma-bat__cal-header {
    padding: 10px 12px;
    gap: 8px;
  }

  .ma-bat__grid-outer {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  .ma-bat__grid,
  .ma-bat__skeleton-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 72px) !important;
    width: max-content !important;
    min-width: 100% !important;
  }

  .ma-bat__day-col,
  .ma-bat__skeleton-col {
    width: 72px !important;
    min-width: 72px !important;
  }

  .ma-bat__day-name  { font-size: 8px !important; }
  .ma-bat__day-date  { font-size: 11px !important; }

  .ma-bat__slots {
    padding: 6px 4px !important;
  }

  .ma-bat__slot-btn {
    width: calc(100% - 8px) !important;
    max-width: none !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    padding: 7px 4px !important;
    border-radius: 20px !important;
    white-space: nowrap !important;
    text-align: center !important;
    line-height: 1.2 !important;
    overflow: visible !important;
    text-overflow: unset !important;
  }

  .ma-bat__skel--slot {
    width: 56px !important;
  }

  /* ── Contact row — stack on mobile ── */
  #childcarecrm-tour-form .childcarecrm-form__contact-row {
    grid-template-columns: 1fr !important;
  }
}

@keyframes ma-spin { to { transform: rotate(360deg); } }

/* ── Confirmation modal — full-screen backdrop + centred card ── */
.ma-bat__confirm-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(0, 0, 0, 0.55);
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ma-bat__confirm-modal.is-visible {
  display: flex;
}
.ma-bat__confirm-card {
  background: #fff;
  border-radius: 16px;
  padding: 48px 40px 40px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.18);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: ma-modal-in 0.25s ease;
}
@keyframes ma-modal-in {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}
.ma-bat__confirm-icon {
  width: 64px;
  height: 64px;
  background: #d81635;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ma-bat__confirm-icon svg {
  width: 32px;
  height: 32px;
  stroke: #fff;
  fill: none;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ma-bat__confirm-heading {
  font-family: 'Red Hat Display', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: #2b2824;
  line-height: 1.3;
  margin: 0;
}
.ma-bat__confirm-body {
  font-family: 'Red Hat Display', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: #555;
  line-height: 1.6;
  margin: 0;
}
.ma-bat__confirm-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #f0c0c8;
  border-top-color: #d81635;
  border-radius: 50%;
  animation: ma-spin 0.75s linear infinite;
  margin-top: 4px;
}
.ma-bat__confirm-redirect {
  font-family: 'Red Hat Display', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: #aaa;
  margin: 0;
}

/* Suppress the CRM's own confirmation scroll — keep it hidden ── */
#childcarecrm-tour-form .childcarecrm-form__confirmation { display: none !important; }

/* ── Loading spinner overlay ── */
.ma-bat__spinner-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 48px 24px;
  text-align: center;
}
.ma-bat__spinner-wrap.is-visible {
  display: flex;
}
.ma-bat__spinner {
  width: 44px;
  height: 44px;
  border: 3.5px solid #f0c0c8;
  border-top-color: #d81635;
  border-radius: 50%;
  animation: ma-spin 0.75s linear infinite;
}
.ma-bat__spinner-text {
  font-family: 'Red Hat Display', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: #888;
  letter-spacing: 0.02em;
}

/* ── Inline error (surfaced if name/email missing on submit) ── */
.ma-bat__inline-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: #fff5f7;
  border: 1.5px solid #f5c0c8;
  border-left: 4px solid #d81635;
  border-radius: 8px;
  color: #d81635;
  font-family: 'Red Hat Display', sans-serif;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
}

/* ============================================================
   THANK-YOU PAGE — rendered by [ma_thank_you]
   ============================================================ */
.ma-bat-thanks {
  font-family: 'Red Hat Display', sans-serif;
  color: #2b2824;
  margin: 0 auto;
  padding: 0 16px;
  line-height: 1.65;
  font-size: 16px;
}

.ma-bat-thanks p {
  margin: 0 0 18px;
}

.ma-bat-thanks p:last-child {
  margin-bottom: 0;
}

.ma-bat-thanks a {
  color: #d81635;
  text-decoration: underline;
  font-weight: 600;
}

.ma-bat-thanks a:hover,
.ma-bat-thanks a:focus {
  color: #b8102a;
}