* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 16px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1a1a1a;
  background: #fff;
}

#bma-book { max-width: 860px; margin: 0 auto; }

.bk-section-title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 6px;
}

.bk-form-subtitle {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 16px;
}

/* ── Filters ─────────────────────────────────────────────────── */

.bk-filters {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 20px;
}

.bk-filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.bk-filter-row:last-child { margin-bottom: 0; }

.bk-filter-loading {
  font-size: 12px;
  color: #9ca3af;
  padding-top: 6px;
}

.bk-chip-group { display: flex; flex-wrap: wrap; gap: 6px; }

.bk-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border: 1.5px solid #d1d5db;
  border-radius: 20px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: all .15s;
  white-space: nowrap;
}

/* State lives entirely in the pill's own color — no native checkbox/radio glyph
   shown alongside it (that's the modern filter-chip convention: Material chips,
   Airbnb/Fresha filter pills all do this — the fill *is* the checkbox). */
.bk-chip input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.bk-chip:hover { border-color: #9ca3af; }

.bk-chip:has(input:checked) {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
}

.bk-inst-more-row {
  flex: 0 0 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 2px;
}

.bk-more-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 0;
  text-align: left;
  width: fit-content;
}
.bk-more-btn:hover { text-decoration: underline; }

.bk-select {
  padding: 7px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
}

.bk-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  padding-top: 7px;
  white-space: nowrap;
}

@media (max-width: 640px) {
  .bk-filter-label { display: none; }
}

.bk-filters-heading {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 10px;
}

.bk-instrument-no-match {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}

/* The one actual submit action on this panel — kept to its natural (not full-width)
   size so it reads as "the button to press," not a filled bar, but bumped up a
   little from the default .bk-btn and centered so it stays the visual anchor of
   the panel regardless of how many teacher cards load in below it. */
.bk-submit-request-wrap {
  text-align: center;
  margin: 2px 0 18px;
}

.bk-submit-request-wrap .bk-btn {
  padding: 11px 32px;
  font-size: 15px;
}

.bk-selected-summary-note {
  font-size: 13px;
  color: #1e3a8a;
}

/* ── Mobile filter tabs (narrow screens only) ───────────────────── */

/* These aren't content-switching tabs (there's no default "currently open" panel
   to anchor an underline convention to) — they're the widget's actual entry
   point: "tap one of these first, don't scroll every teacher." That's the same
   job as Google Flights'/Airbnb's own search bar, so it gets that treatment
   instead: one bordered, shadowed, self-contained bar with internal dividers,
   not free-floating tab labels over a thin line. */
.bk-filter-tabs {
  display: none;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
  overflow: hidden;
}

.bk-filter-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  border: none;
  border-right: 1px solid #e5e7eb;
  background: none;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: color .15s, background-color .15s;
}

.bk-filter-tab:last-child { border-right: none; }

.bk-filter-tab:hover { background: #f9fafb; }

.bk-filter-tab.bk-active {
  background: #eff6ff;
  color: #1d4ed8;
}

/* Chevron — the "tap to open" cue that doesn't depend on color/contrast; flips
   when its panel is open rather than relying on an underline to show state. */
.bk-filter-tab::after {
  content: "";
  width: 11px;
  height: 11px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23374151' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  transition: transform .15s;
}

.bk-filter-tab.bk-active::after {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4ed8' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  transform: rotate(180deg);
}

.bk-filter-tab-count { font-size: 11px; font-weight: 700; }

/* ── Buttons ─────────────────────────────────────────────────── */

.bk-btn {
  padding: 9px 22px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}

.bk-btn:hover { background: #1d4ed8; }
.bk-btn:disabled { background: #9ca3af; cursor: default; }

.bk-btn-next { padding: 8px 18px; font-size: 14px; }

.bk-back-btn {
  background: none;
  border: none;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.bk-back-btn:hover { color: #1d4ed8; }

/* ── Status ──────────────────────────────────────────────────── */

.bk-status-msg {
  text-align: center;
  padding: 32px 16px;
  color: #9ca3af;
  font-size: 15px;
}

.bk-status-err { color: #dc2626; }

/* ── Banner scroll sentinel ────────────────────────────────────── */

/* Invisible marker only — the floating bar's actual content/styling lives in
   wordpress-embed.html (rendered in the parent page, not here). */
.bk-banner-sentinel { height: 1px; }

/* ── Teacher cards ───────────────────────────────────────────── */

.bk-cards {
  position: relative;
  margin-bottom: 10px;
  min-height: 10px;
}

.bk-card {
  box-sizing: border-box;
}

.bk-card {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px 14px 12px;
  background: #fff;
  transition: box-shadow .15s;
  cursor: pointer;
}

.bk-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); }

.bk-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.bk-card-photo {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #e5e7eb;
}

.bk-card-header-text { flex: 1; min-width: 0; }

.bk-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
}

.bk-card-rate {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.bk-card-instruments {
  font-size: 12.5px;
  color: #6b7280;
}

.bk-card-bio {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin-bottom: 10px;
}

/* ── Date groups & slots ─────────────────────────────────────── */

.bk-date-group { margin-bottom: 10px; }

.bk-date-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 5px;
}

.bk-slot-row { display: flex; flex-wrap: wrap; gap: 5px; }

.bk-slot {
  padding: 4px 10px;
  border: 1.5px solid #93c5fd;
  border-radius: 20px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.bk-slot:hover { background: #dbeafe; border-color: #60a5fa; }
.bk-slot.selected { background: #2563eb; color: #fff; border-color: #2563eb; }

/* Range chip (3+ contiguous slots collapsed) — small caret hints it expands on tap */
.bk-slot-range::after { content: " \25be"; font-size: 9px; opacity: .7; }

/* ── Bottom bar (skip + summary) ─────────────────────────────── */


/* ── Review card (Panel A) — recap of the contact form before submit ────── */

/* Flatter shadow + larger radius + generous whitespace over heavier borders or
   decoration — the hierarchy comes from typography and spacing (title divider,
   muted uppercase labels vs. bold dark values), not from added ornamentation. */
.bk-review-card {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .06);
  padding: 20px 22px;
  margin-bottom: 14px;
}

.bk-review-card-title {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid #f1f2f4;
}

.bk-review-card-saved {
  font-size: 12px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: none;
  letter-spacing: normal;
}

/* Normal weight by default so the <strong> student name (the actual subject
   of the request) is the thing that visually stands out on its line, not
   the whole line uniformly bold. */
.bk-review-line {
  font-size: 14px;
  font-weight: 400;
  color: #374151;
  margin-bottom: 6px;
}
.bk-review-line:last-of-type { margin-bottom: 0; }
.bk-review-line strong { font-weight: 700; color: #111827; }

.bk-review-more-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.bk-review-teaser {
  font-size: 13px;
  color: #6b7280;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#bk-review-more-btn { flex-shrink: 0; }

.bk-review-details {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #f1f2f4;
}

.bk-review-item { display: flex; flex-direction: column; gap: 3px; min-width: 0; }

.bk-review-label {
  font-size: 11px;
  font-weight: 600;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.bk-review-value {
  font-size: 14.5px;
  font-weight: 600;
  color: #111827;
  line-height: 1.35;
  overflow-wrap: break-word;
}

/* ── Selected slots summary (Panel B) ───────────────────────── */

.bk-selected-summary {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px 14px;
  margin-top: 14px;
}

.bk-selected-summary-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e3a8a;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 8px;
}

.bk-selected-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #1e3a8a;
  padding: 2px 0;
}

.bk-selected-item::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60a5fa;
  flex-shrink: 0;
}

.bk-selected-item--none {
  color: #9ca3af;
  font-style: italic;
}
.bk-selected-item--none::before { background: #d1d5db; }

.bk-selected-item-editable { justify-content: flex-start; }

.bk-selected-remove {
  background: none;
  border: none;
  color: #1e3a8a;
  font-size: 12px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
}
.bk-selected-remove:hover { color: #1e40af; }

/* ── Contact form ────────────────────────────────────────────── */

.bk-form-section-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #6b7280;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.bk-field-hint {
  font-weight: 400;
  color: #9ca3af;
  font-size: 11px;
}

.bk-select-field {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

/* Single column throughout — research consistently favors it over multi-column
   forms (CXL: ~15s faster completion at 95% confidence) since users read
   top-to-bottom without jumping between fields. */
.bk-form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

.bk-field { display: flex; flex-direction: column; gap: 5px; }
.bk-field-full { grid-column: 1 / -1; }

.bk-field label { font-size: 13px; font-weight: 600; color: #374151; }

.bk-req { color: #dc2626; }

.bk-field input,
.bk-field textarea,
.bk-field select {
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.bk-field input:focus,
.bk-field textarea:focus {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
  border-color: transparent;
}

.bk-field textarea { resize: vertical; }

.bk-field-error { color: #dc2626; font-size: 12px; }

.bk-field-invalid input,
.bk-field-invalid textarea { border-color: #dc2626; }

/* Matches the SMS consent checkbox (bma-sms-consent.js's inline-styled markup)
   just below this field on the form, so the two read as the same control. */
.bk-checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0;
}

.bk-checkbox-field input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
  cursor: pointer;
}

.bk-checkbox-field label {
  font-size: 12.5px;
  line-height: 1.55;
  color: inherit;
  cursor: pointer;
}

.bk-financial-aid-detail { margin-top: 8px; }

.bk-form-error { color: #dc2626; font-size: 13px; padding: 10px 0; }

.cf-turnstile { margin: 16px 0 4px; }

/* ── View profile button (on card) ──────────────────────────── */

.bk-view-profile {
  display: inline-block;
  margin-top: 10px;
  background: none;
  border: none;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.bk-view-profile:hover { text-decoration: underline; }

/* ── Modal overlay ───────────────────────────────────────────── */

#bk-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px;
  overflow-y: auto;
}

#bk-modal {
  background: #fff;
  border-radius: 14px;
  width: 100%;
  max-width: 560px;
  padding: 28px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  margin: auto;
}

/* ── Idle / abandonment prompt overlay ──────────────────────────
   Mirrors the modal overlay above but smaller — see wordpress-embed.html's
   MODAL_CSS for the real-embed shadow-DOM copy; keep both in sync. */
#bk-idle-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

#bk-idle-card {
  background: #fff;
  border-radius: 14px;
  max-width: 420px;
  width: 100%;
  padding: 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

#bk-idle-text {
  font-size: 15px;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 18px;
}

#bk-idle-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.bk-idle-btn {
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.bk-idle-btn-secondary { background: #f3f4f6; color: #374151; }
.bk-idle-btn-secondary:hover { background: #e5e7eb; }
.bk-idle-btn-primary { background: #2563eb; color: #fff; }
.bk-idle-btn-primary:hover { background: #1d4ed8; }

.bk-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 22px;
  color: #9ca3af;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
}
.bk-modal-close:hover { color: #111827; background: #f3f4f6; }

/* ── Modal content ───────────────────────────────────────────── */

.bk-modal-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.bk-modal-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 3px solid #e5e7eb;
}

.bk-modal-header-text { flex: 1; }

.bk-modal-name {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 3px;
}

.bk-modal-rate {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
}

.bk-modal-instruments {
  font-size: 13px;
  color: #6b7280;
}

.bk-modal-bio {
  font-size: 14px;
  color: #374151;
  line-height: 1.65;
  margin-bottom: 20px;
}
.bk-modal-bio p { margin: 0 0 1em; }
.bk-modal-bio p:last-child { margin-bottom: 0; }

.bk-modal-cancel-policy {
  margin-bottom: 20px;
}
.bk-modal-cancel-label {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-bottom: 12px;
}
.bk-modal-cancel-text {
  font-size: 14px;
  color: #374151;
  line-height: 1.65;
}
.bk-modal-cancel-text p { margin: 0 0 1em; }
.bk-modal-cancel-text p:last-child { margin-bottom: 0; }

.bk-modal-video {
  display: block;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 20px;
  max-width: 320px;
}
.bk-modal-video img { width: 100%; display: block; }
.bk-modal-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.35);
  color: #fff;
  font-size: 40px;
  transition: background .15s;
}
.bk-modal-video:hover .bk-modal-play { background: rgba(0,0,0,.5); }

.bk-modal-video-link {
  display: inline-block;
  margin-bottom: 20px;
  color: #2563eb;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.bk-modal-video-link:hover { text-decoration: underline; }

.bk-modal-slots-title {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: #6b7280;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
  margin-bottom: 12px;
}

/* ── Success panel ───────────────────────────────────────────── */

.bk-success { text-align: center; padding: 48px 24px; }
.bk-success-icon { font-size: 48px; color: #16a34a; margin-bottom: 12px; }
.bk-success-title { font-size: 22px; font-weight: 700; color: #111827; margin-bottom: 8px; }
.bk-success-body { font-size: 15px; color: #6b7280; margin-bottom: 24px; }

/* ── Responsive ──────────────────────────────────────────────── */

/* Narrow screens: collapse the chip rows behind a single row of dropdown tabs,
   so the compelling content (teacher cards) isn't buried under filter chrome. */
@media (max-width: 640px) {
  .bk-filter-tabs { display: flex; }

  .bk-filters { padding: 10px; }

  #bk-days-row, #bk-inst-row {
    display: none;
    margin: 8px 0 0;
    padding: 10px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
  }
  #bk-days-row.bk-open, #bk-inst-row.bk-open { display: flex; }
}

/* ── Gift certificate banner / code entry ───────────────────────────────────── */
.bk-gift-banner { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e3a8a; border-radius: 10px;
  padding: 12px 14px; font-size: 14px; line-height: 1.45; margin-bottom: 16px; }
.bk-gift-entry { margin: 0 0 14px; }
.bk-gift-toggle { background: none; border: none; padding: 0; color: #2563eb; font-size: 13px;
  text-decoration: underline; cursor: pointer; }
.bk-gift-input-wrap { display: flex; gap: 8px; }
.bk-gift-input-wrap input { flex: 1; min-width: 0; padding: 9px 10px; border: 1.5px solid #d1d5db; border-radius: 8px;
  font-size: 15px; letter-spacing: .08em; text-transform: uppercase; }
.bk-gift-apply { padding: 9px 16px; border: 1.5px solid #2563eb; background: #2563eb; color: #fff;
  border-radius: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
