/* ── Booking Widget ── prefixed .bw-* ── Impulse Lab-inspired design ── */

/* ── Toggle button (bottom-right, round, brand blue) ── */
.bw-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background: var(--brand-primary-500);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 0 #fff, 0 0 0 4px rgba(41, 112, 255, .16), rgba(51,51,51,.04) 0 0 0 1px, rgba(51,51,51,.04) 0 1px 1px .5px;
  transition: transform var(--transition-fast), background var(--transition-fast);
}

.bw-toggle:hover {
  background: var(--brand-primary-600);
}

.bw-toggle:active {
  transform: scale(.95);
}

/* ── Icon container (two overlapping SVGs) ── */
.bw-toggle-icons {
  position: relative;
  width: 26px;
  height: 26px;
}

.bw-toggle-icons svg {
  position: absolute;
  inset: 0;
  width: 26px;
  height: 26px;
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s cubic-bezier(.4,0,.2,1);
}

/* Calendar icon: visible when card is closed */
.bw-toggle-cal {
  transform: rotate(0deg) scale(1);
  opacity: 1;
}

/* Close icon: hidden when card is closed */
.bw-toggle-close {
  transform: rotate(-45deg) scale(.75);
  opacity: 0;
}

/* When card is open → swap icons */
.bw-toggle.bw-active .bw-toggle-cal {
  transform: rotate(45deg) translateY(2px) scale(.75);
  opacity: 0;
}

.bw-toggle.bw-active .bw-toggle-close {
  transform: rotate(0deg) translateY(0) scale(1);
  opacity: 1;
}

/* ── Glass backdrop (full screen, behind card) ── */
.bw-backdrop {
  position: fixed;
  inset: 0;
  z-index: 88;
  background: rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.bw-backdrop.bw-visible {
  opacity: 1;
  pointer-events: auto;
}

/* ── Card (floats above toggle) ── */
.bw-card {
  position: fixed;
  bottom: 104px;
  right: 24px;
  z-index: 89;
  width: 368px;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 16px;
  box-shadow: rgba(51,51,51,.04) 0 0 0 1px, rgba(51,51,51,.04) 0 1px 1px .5px;
  padding: 20px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu',
    'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  opacity: 0;
  transform: translateY(8px) scale(.97);
  transform-origin: bottom right;
  transition: opacity var(--transition-normal), transform var(--transition-normal);
  pointer-events: none;
}

.bw-card.bw-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* ── Header row: photo + name ── */
.bw-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.bw-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
}

.bw-avatar {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  object-fit: cover;
}

.bw-online-dot {
  position: absolute;
  bottom: 1px;
  right: 1px;
  width: 10px;
  height: 10px;
  background: #22c55e;
  border: 2px solid #fff;
  border-radius: 9999px;
}

.bw-header-text {
  display: flex;
  align-items: baseline;
  gap: 4px;
}

.bw-name {
  font-size: .75rem;
  font-weight: 400;
  color: #5c5c5c;
}

.bw-role {
  font-size: .75rem;
  color: #5c5c5c;
}

.bw-name-dot {
  color: #5c5c5c;
  font-size: .75rem;
}

/* ── Body ── */
.bw-title {
  font-size: 1rem;
  font-weight: 500;
  color: #171717;
  margin: 0 0 6px;
}

.bw-subtitle {
  font-size: .875rem;
  color: #5c5c5c;
  margin: 0 0 16px;
  line-height: 1.5;
}

/* ── Day pills ── */
.bw-days {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.bw-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 52px;
  padding: 8px 10px;
  border: 1px solid #ebebeb;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.bw-day:hover {
  border-color: var(--brand-primary-500);
}

.bw-day.bw-day-selected {
  border-color: var(--brand-primary-500);
  background: rgba(41, 112, 255, .06);
}

.bw-day-label {
  font-size: .75rem;
  color: #5c5c5c;
}

.bw-day-num {
  font-size: .875rem;
  font-weight: 500;
  color: #171717;
}

/* ── CTA ── */
.bw-cta {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 9999px;
  background: var(--brand-primary-500);
  color: #fff;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background var(--transition-fast);
}

.bw-cta:hover {
  background: var(--brand-primary-600);
}

/* ── Responsive: mobile ── */
@media (max-width: 640px) {
  .bw-card {
    left: 12px;
    right: 12px;
    bottom: 96px;
    width: auto;
    padding: 16px;
  }

  .bw-toggle {
    bottom: 16px;
    right: 16px;
    width: 56px;
    height: 56px;
  }

  .bw-toggle-icons {
    width: 22px;
    height: 22px;
  }

  .bw-toggle-icons svg {
    width: 22px;
    height: 22px;
  }

  .bw-title {
    font-size: .9375rem;
  }

  .bw-subtitle {
    font-size: .8125rem;
    margin-bottom: 12px;
  }

  .bw-days {
    gap: 6px;
    margin-bottom: 12px;
  }

  .bw-day {
    min-width: 46px;
    padding: 6px 8px;
  }

  .bw-cta {
    padding: 10px 14px;
    font-size: .8125rem;
  }
}
