/* booking-module v3: team.html card styles + time-range filters */

/* Theme uses Lenis + body{overflow:hidden}; booking page restores native document scroll */
html.lenis:has(body.bm-v3),
html:has(body.bm-v3) {
  height: auto !important;
}

html.lenis body.bm-v3,
body.bm-v3 {
  overflow-x: hidden !important;
  overflow-y: auto !important;
  height: auto !important;
}

body.bm-v3 #wrapper {
  overflow: visible;
  min-height: 100%;
}

.bm-v3 {
  --bm-team-card-h: 228px;
  --bm-showroom-gap: 12px;
  --bm-showroom-rows: 1;
  --bm-showroom-h: calc(var(--bm-team-card-h) * var(--bm-showroom-rows) + var(--bm-showroom-gap) * (var(--bm-showroom-rows) - 1));
}

.bm-v3 .bm-stepper {
  scroll-margin-top: 100px;
}

.bm-v3 .bm-step-pane[data-step="2"] {
  overflow: visible;
  padding-bottom: 24px;
}

.bm-v3 .bm-card--therapists .bm-card-bd {
  overflow: visible;
}

.bm-v3 #bm_slot_picker_section {
  position: relative;
  z-index: 2;
}

/* from team.html */
.bm-v3 .team-specialty {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(0, 0, 0, .65);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.bm-v3 .team-photo {
  aspect-ratio: 1 / 1;
  width: 96px;
  max-width: 100%;
  margin: 10px auto 0;
  overflow: hidden;
  background: transparent !important;
}

.bm-v3 .team-photo.bg-color-op-3 {
  background: transparent !important;
}

.bm-v3 .team-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  padding: 0 !important;
}

/* time range bar */
.bm-time-range-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 16px;
}

.bm-time-range-bar__label {
  font-weight: 800;
  font-size: 13px;
  color: rgba(0, 0, 0, .65);
  margin-right: 4px;
}

.bm-time-range-btn {
  border: 1px solid rgba(0, 0, 0, .12);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  line-height: 1.3;
}

.bm-time-range-btn small {
  display: block;
  font-size: 11px;
  color: rgba(0, 0, 0, .5);
  font-weight: 400;
}

.bm-time-range-btn:hover {
  border-color: rgba(25, 135, 84, .4);
  background: rgba(25, 135, 84, .06);
}

.bm-time-range-btn.is-active {
  border-color: rgba(25, 135, 84, .6);
  background: rgba(25, 135, 84, .14);
  font-weight: 700;
}

/* date range bar */
.bm-date-range-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid rgba(0, 0, 0, .08);
  border-radius: 10px;
  background: rgba(0, 0, 0, .02);
}

.bm-date-range-bar__label {
  font-weight: 800;
  font-size: 13px;
  color: rgba(0, 0, 0, .65);
  margin-right: 4px;
}

.bm-date-range-bar__inputs {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bm-date-range-bar__inputs input[type="date"] {
  width: auto;
  min-width: 148px;
}

.bm-date-range-bar__sep {
  color: rgba(0, 0, 0, .45);
  font-weight: 700;
}

.bm-date-range-bar__hint {
  flex: 1 1 100%;
  margin-top: -2px;
}

/* therapist list: 4 per row, fixed 1-row viewport height */
.bm-v3 .bm-team-showroom-wrap {
  margin-top: 4px;
}

.bm-v3 .bm-team-showroom {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--bm-showroom-gap);
  align-items: stretch;
  min-height: var(--bm-showroom-h);
  max-height: var(--bm-showroom-h);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 4px 6px 6px 4px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}

@media (max-width: 991.98px) {
  .bm-v3 .bm-team-showroom {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 767.98px) {
  .bm-v3 .bm-team-showroom {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 575.98px) {
  .bm-v3 {
    --bm-team-card-h: 240px;
  }
}

.bm-v3 .bm-team-card {
  border: 2px solid rgba(0, 0, 0, .08);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
  height: auto;
  min-height: var(--bm-team-card-h);
  display: flex;
  flex-direction: column;
}

.bm-v3 .bm-team-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, .08);
}

.bm-v3 .bm-team-card.is-selected {
  border-color: rgba(25, 135, 84, .55);
  box-shadow: 0 12px 32px rgba(25, 135, 84, .12);
}

.bm-v3 .bm-team-card.is-disabled {
  opacity: .5;
  cursor: not-allowed;
  transform: none;
}

.bm-v3 .bm-team-card--any {
  border: 2px dashed rgba(0, 0, 0, .15);
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 12px 8px;
}

.bm-v3 .bm-team-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 10px 10px !important;
  min-height: 0;
  overflow: visible;
}

.bm-v3 .bm-team-card h3 {
  font-size: 0.95rem;
  line-height: 1.35;
  font-weight: 800;
}

.bm-v3 .bm-team-card__avail {
  display: inline-block;
  margin-top: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #0f5132;
  background: rgba(25, 135, 84, .12);
  box-shadow: inset 0 0 0 1px rgba(25, 135, 84, .25);
}

.bm-v3 .bm-team-card__avail.is-empty {
  color: rgba(0, 0, 0, .45);
  background: rgba(0, 0, 0, .04);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.bm-day-slots-panel.is-highlight {
  animation: bm-slot-highlight .9s ease;
}

@keyframes bm-slot-highlight {
  0% { box-shadow: 0 0 0 0 rgba(25, 135, 84, .45); }
  40% { box-shadow: 0 0 0 6px rgba(25, 135, 84, .25); }
  100% { box-shadow: 0 0 0 0 rgba(25, 135, 84, 0); }
}

/* Bootstrap / refresh loading overlay */
.bm-v3 .bm-booking-root {
  position: relative;
}

.bm-v3 .bm-booking-root.is-loading {
  pointer-events: none;
  user-select: none;
}

.bm-v3 .bm-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(2px);
  border-radius: 12px;
}

.bm-v3 .bm-loading-overlay[hidden] {
  display: none !important;
}

.bm-v3 .bm-loading-overlay__panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 160px;
  padding: 20px 28px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.bm-v3 .bm-loading-overlay__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(25, 135, 84, 0.15);
  border-top-color: #198754;
  border-radius: 50%;
  animation: bm-spin 0.8s linear infinite;
}

.bm-v3 .bm-loading-overlay__text {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.72);
  text-align: center;
}

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