/* ============================================================
   Dog Booking – Frontend v4
   Scoped to #dwb-root with !important guards.
   Custom checkboxes (no native browser rendering).
   ============================================================ */

/* ── BASE RESET ───────────────────────────────────── */
#dwb-root *, #dwb-root *::before, #dwb-root *::after {
  box-sizing: border-box !important;
}
#dwb-root {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif !important;
  font-size: 15px !important;
  color: #111827 !important;
  line-height: 1.5 !important;
  max-width: 820px !important;
  margin: 0 auto !important;
  padding: 0 !important;
}
#dwb-root h2, #dwb-root h3, #dwb-root p {
  margin: 0 !important;
  padding: 0 !important;
}

/* ── PANELS ───────────────────────────────────────── */
#dwb-root .dwb-panel        { display: none !important; }
#dwb-root .dwb-panel.dwb-on { display: block !important; }

/* ── CARD WRAPPER ─────────────────────────────────── */
#dwb-root .dwb-card {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 32px !important;
}

/* ── STEP HEADER ──────────────────────────────────── */
#dwb-root .dwb-step-hdr {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  margin-bottom: 24px !important;
}
#dwb-root .dwb-step-num {
  width: 28px !important; height: 28px !important;
  border-radius: 50% !important;
  background: #111827 !important;
  color: #fff !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
}
#dwb-root .dwb-step-title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: #111827 !important;
}

/* ── BACK BUTTON ──────────────────────────────────── */
#dwb-root .dwb-back-btn {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  font-size: 13px !important;
  color: #6b7280 !important;
  cursor: pointer !important;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  margin-bottom: 20px !important;
  font-family: inherit !important;
  transition: color .12s !important;
}
#dwb-root .dwb-back-btn:hover { color: #111827 !important; }

/* ── SUMMARY BAR ──────────────────────────────────── */
#dwb-root .dwb-sumbar {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  margin-bottom: 24px !important;
}
#dwb-root .dwb-sumbar-chip {
  background: #f3f4f6 !important;
  border-radius: 20px !important;
  padding: 5px 14px !important;
  font-size: 13px !important;
  color: #374151 !important;
  font-weight: 500 !important;
}
#dwb-root .dwb-sumbar-chip strong {
  color: #111827 !important;
  font-weight: 700 !important;
}

/* ── SECTION TITLE ────────────────────────────────── */
#dwb-root .dwb-sec-title {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #374151 !important;
  text-transform: uppercase !important;
  letter-spacing: .06em !important;
  margin-bottom: 14px !important;
  margin-top: 24px !important;
}
#dwb-root .dwb-sec-title:first-child { margin-top: 0 !important; }

/* ── WORKSHOP CARDS (panel 1) ─────────────────────── */
#dwb-root .dwb-workshop-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  gap: 12px !important;
}
#dwb-root .dwb-ws-card {
  border: 2px solid #e5e7eb !important;
  border-radius: 10px !important;
  cursor: pointer !important;
  transition: border-color .15s, background .15s !important;
  background: #fff !important;
  overflow: hidden !important;
}
#dwb-root .dwb-ws-card:hover {
  border-color: #9ca3af !important;
  background: #f9fafb !important;
}
#dwb-root .dwb-ws-card.dwb-ws-sel {
  border-color: #111827 !important;
  background: #f9fafb !important;
}
#dwb-root .dwb-ws-img {
  display: block !important;
  width: 100% !important;
  height: 130px !important;
  object-fit: cover !important;
}
#dwb-root .dwb-ws-body {
  padding: 14px 16px !important;
}
#dwb-root .dwb-ws-name {
  font-size: 14px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  margin-bottom: 4px !important;
}
#dwb-root .dwb-ws-range {
  font-size: 12px !important;
  color: #6b7280 !important;
}

/* ── CALENDAR ─────────────────────────────────────── */
#dwb-root .dwb-cal-widget {
  display: flex !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 10px !important;
  overflow: hidden !important;
  background: #fff !important;
}
#dwb-root .dwb-cal-left  {
  flex: 1 1 auto !important;
  padding: 24px !important;
  min-width: 0 !important;
}
#dwb-root .dwb-cal-right {
  width: 200px !important;
  flex-shrink: 0 !important;
  border-left: 1px solid #e5e7eb !important;
  padding: 24px 14px !important;
  background: #fafafa !important;
}
#dwb-root .dwb-cal-right.dwb-hidden { display: none !important; }

#dwb-root .dwb-cal-nav-row {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  margin-bottom: 18px !important;
}
#dwb-root .dwb-cal-month {
  font-size: 16px !important;
  font-weight: 700 !important;
  color: #111827 !important;
}
#dwb-root .dwb-nav-btn {
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 6px !important;
  width: 30px !important; height: 30px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  color: #374151 !important;
  font-size: 14px !important;
  padding: 0 !important;
  line-height: 1 !important;
  font-family: inherit !important;
}
#dwb-root .dwb-nav-btn:hover { background: #f3f4f6 !important; }

#dwb-root .dwb-weekdays {
  display: grid !important;
  grid-template-columns: repeat(7,1fr) !important;
  margin-bottom: 4px !important;
}
#dwb-root .dwb-wday {
  text-align: center !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  color: #9ca3af !important;
  text-transform: uppercase !important;
  letter-spacing: .05em !important;
  padding: 0 0 6px !important;
}
#dwb-root .dwb-days-grid {
  display: grid !important;
  grid-template-columns: repeat(7,1fr) !important;
  gap: 2px !important;
}
#dwb-root .dwb-day {
  aspect-ratio: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 50% !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #d1d5db !important;
  cursor: default !important;
  background: transparent !important;
  border: 2px solid transparent !important;
  transition: background .1s, color .1s !important;
  margin: 0 !important; padding: 0 !important;
  line-height: 1 !important;
}
#dwb-root .dwb-day.dwb-avail {
  color: #111827 !important;
  cursor: pointer !important;
}
#dwb-root .dwb-day.dwb-avail:hover { background: #f3f4f6 !important; }
#dwb-root .dwb-day.dwb-today       { border-color: #2563eb !important; color: #2563eb !important; font-weight: 800 !important; }
#dwb-root .dwb-day.dwb-today.dwb-avail { color: #2563eb !important; }
#dwb-root .dwb-day.dwb-sel         { background: #111827 !important; color: #fff !important; font-weight: 700 !important; border-color: transparent !important; }

#dwb-root .dwb-legend {
  display: flex !important;
  gap: 14px !important;
  margin-top: 14px !important;
  font-size: 12px !important;
  color: #6b7280 !important;
}
#dwb-root .dwb-leg-item { display: flex !important; align-items: center !important; gap: 5px !important; }
#dwb-root .dwb-leg-dot  { width: 10px !important; height: 10px !important; border-radius: 50% !important; display: inline-block !important; flex-shrink: 0 !important; }
#dwb-root .dwb-ld-avail   { background: #111827 !important; }
#dwb-root .dwb-ld-blocked { background: #d1d5db !important; }
#dwb-root .dwb-ld-today   { background: transparent !important; border: 2px solid #2563eb !important; }

/* slots */
#dwb-root .dwb-slots-hdr {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #374151 !important;
  margin-bottom: 10px !important;
  line-height: 1.4 !important;
}
#dwb-root .dwb-slot-btn {
  display: block !important;
  width: 100% !important;
  padding: 9px 6px !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 7px !important;
  background: #fff !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #111827 !important;
  cursor: pointer !important;
  text-align: center !important;
  margin-bottom: 6px !important;
  font-family: inherit !important;
  transition: border-color .12s !important;
}
#dwb-root .dwb-slot-btn:hover  { border-color: #111827 !important; }
#dwb-root .dwb-slot-btn.dwb-sel{ background: #111827 !important; color: #fff !important; border-color: #111827 !important; }
#dwb-root .dwb-slots-empty     { font-size: 13px !important; color: #9ca3af !important; text-align: center !important; padding: 12px 0 !important; }

/* ── FORM FIELDS ──────────────────────────────────── */
#dwb-root .dwb-field { margin-bottom: 16px !important; }
#dwb-root .dwb-field > label:not(.dwb-custom-cb):not(.dwb-inv-toggle) {
  display: block !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-bottom: 5px !important;
  padding: 0 !important;
  cursor: default !important;
}
#dwb-root .dwb-field input[type="text"],
#dwb-root .dwb-field input[type="email"],
#dwb-root .dwb-field input[type="tel"],
#dwb-root .dwb-field input[type="number"],
#dwb-root .dwb-field select,
#dwb-root .dwb-field textarea {
  display: block !important;
  width: 100% !important;
  padding: 10px 14px !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-family: inherit !important;
  color: #111827 !important;
  background: #fff !important;
  outline: none !important;
  -webkit-appearance: auto !important;
  transition: border-color .12s !important;
}
#dwb-root .dwb-field input:focus,
#dwb-root .dwb-field select:focus,
#dwb-root .dwb-field textarea:focus {
  border-color: #111827 !important;
  box-shadow: 0 0 0 3px rgba(0,0,0,.06) !important;
}
#dwb-root .dwb-hint {
  font-size: 12px !important;
  color: #6b7280 !important;
  margin-top: 4px !important;
}
#dwb-root .dwb-req { color: #ef4444 !important; }
#dwb-root .dwb-grid2 {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 14px !important;
}

/* ── CUSTOM CHECKBOX ──────────────────────────────── */
/*  Hide native, draw our own square */
#dwb-root .dwb-custom-cb {
  display: flex !important;
  align-items: flex-start !important;
  gap: 11px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  color: #111827 !important;
  line-height: 1.5 !important;
  margin-bottom: 10px !important;
}
#dwb-root .dwb-custom-cb input[type="checkbox"] {
  /* hide native */
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  pointer-events: none !important;
}
/* the visual box */
#dwb-root .dwb-cb-box {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 18px !important;
  height: 18px !important;
  min-width: 18px !important;
  border: 2px solid #9ca3af !important;
  border-radius: 4px !important;
  background: #fff !important;
  margin-top: 2px !important;
  transition: background .12s, border-color .12s !important;
  flex-shrink: 0 !important;
}
/* checkmark SVG path – hidden by default */
#dwb-root .dwb-cb-box::after {
  content: '' !important;
  display: block !important;
  width: 10px !important;
  height: 6px !important;
  border-left: 2.5px solid #fff !important;
  border-bottom: 2.5px solid #fff !important;
  transform: rotate(-45deg) translateY(-2px) !important;
  opacity: 0 !important;
  transition: opacity .1s !important;
}
/* CHECKED state */
#dwb-root .dwb-custom-cb.dwb-checked .dwb-cb-box {
  background: #111827 !important;
  border-color: #111827 !important;
}
#dwb-root .dwb-custom-cb.dwb-checked .dwb-cb-box::after {
  opacity: 1 !important;
}
#dwb-root .dwb-custom-cb:hover .dwb-cb-box {
  border-color: #374151 !important;
}

/* addon card */
#dwb-root .dwb-addon-card {
  border: 1.5px solid #e5e7eb !important;
  border-radius: 8px !important;
  padding: 12px 14px !important;
  margin-bottom: 8px !important;
  cursor: pointer !important;
  transition: border-color .12s, background .12s !important;
}
#dwb-root .dwb-addon-card:hover { border-color: #9ca3af !important; }
#dwb-root .dwb-addon-card.dwb-checked {
  border-color: #111827 !important;
  background: #f9fafb !important;
}
#dwb-root .dwb-addon-card .dwb-custom-cb { margin-bottom: 0 !important; }
#dwb-root .dwb-addon-inner { flex: 1 !important; }
#dwb-root .dwb-addon-row1 {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}
#dwb-root .dwb-addon-name { font-weight: 600 !important; color: #111827 !important; }
#dwb-root .dwb-addon-price {
  font-size: 13px !important;
  font-weight: 700 !important;
  color: #111827 !important;
  white-space: nowrap !important;
  background: #f3f4f6 !important;
  padding: 2px 8px !important;
  border-radius: 12px !important;
}
#dwb-root .dwb-addon-desc { font-size: 12px !important; color: #6b7280 !important; margin-top: 2px !important; }

/* invoice toggle */
#dwb-root .dwb-inv-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  cursor: pointer !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #374151 !important;
}
#dwb-root .dwb-inv-box {
  background: #f9fafb !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 8px !important;
  padding: 18px !important;
  margin-top: 10px !important;
}

/* ── ERROR ────────────────────────────────────────── */
#dwb-root .dwb-error {
  background: #fef2f2 !important;
  color: #dc2626 !important;
  border: 1px solid #fecaca !important;
  border-radius: 8px !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  margin-bottom: 14px !important;
}

/* ── SUBMIT BUTTON ────────────────────────────────── */
#dwb-root .dwb-next-btn,
#dwb-root .dwb-submit {
  display: block !important;
  width: 100% !important;
  padding: 14px 24px !important;
  background: #111827 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  font-family: inherit !important;
  cursor: pointer !important;
  transition: background .12s !important;
  margin-top: 8px !important;
}
#dwb-root .dwb-next-btn:hover,
#dwb-root .dwb-submit:hover    { background: #1f2937 !important; }
#dwb-root .dwb-next-btn:disabled,
#dwb-root .dwb-submit:disabled { background: #9ca3af !important; cursor: not-allowed !important; }

/* ── THANK YOU ────────────────────────────────────── */
#dwb-root .dwb-ty {
  text-align: center !important;
  padding: 56px 24px !important;
  background: #fff !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 12px !important;
  box-shadow: 0 2px 16px rgba(0,0,0,.07) !important;
}
#dwb-root .dwb-ty-icon  { font-size: 52px !important; margin-bottom: 14px !important; }
#dwb-root .dwb-ty-h     { font-size: 22px !important; font-weight: 800 !important; color: #111827 !important; margin-bottom: 8px !important; }
#dwb-root .dwb-ty-sub   { font-size: 15px !important; color: #6b7280 !important; margin-bottom: 22px !important; }
#dwb-root .dwb-ty-box   { background: #f9fafb !important; border-radius: 10px !important; padding: 18px 22px !important; max-width: 380px !important; margin: 0 auto !important; text-align: left !important; }
#dwb-root .dwb-ty-row   { display: flex !important; justify-content: space-between !important; font-size: 13px !important; padding: 5px 0 !important; border-bottom: 1px solid #f3f4f6 !important; }
#dwb-root .dwb-ty-row:last-child { border: none !important; }
#dwb-root .dwb-ty-row .dwb-lbl { color: #6b7280 !important; }
#dwb-root .dwb-ty-row .dwb-val { font-weight: 600 !important; color: #111827 !important; }

/* ── SPINNER ──────────────────────────────────────── */
#dwb-root .dwb-spin {
  display: inline-block !important;
  width: 18px !important; height: 18px !important;
  border: 2.5px solid #e5e7eb !important;
  border-top-color: #111827 !important;
  border-radius: 50% !important;
  animation: dwbS .6s linear infinite !important;
  vertical-align: middle !important;
}
@keyframes dwbS { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ───────────────────────────────────── */
@media (max-width:580px) {
  #dwb-root .dwb-card      { padding: 20px !important; }
  #dwb-root .dwb-cal-widget{ flex-direction: column !important; }
  #dwb-root .dwb-cal-right { width: 100% !important; border-left: none !important; border-top: 1px solid #e5e7eb !important; }
  #dwb-root .dwb-grid2     { grid-template-columns: 1fr !important; }
  #dwb-root .dwb-workshop-grid { grid-template-columns: 1fr !important; }
}
