/* ===== Booking Modal ===== */
#bypt-booking-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px max(16px, env(safe-area-inset-bottom, 0px));
  background: rgba(15, 29, 82, 0.68);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms ease;
}
#bypt-booking-overlay.active { opacity: 1; pointer-events: auto; }

.bypt-modal {
  width: 100%;
  max-width: 880px;
  max-height: 92vh;
  overflow-y: auto;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 32px 80px rgba(15, 29, 82, 0.28);
  transform: translateY(28px) scale(0.98);
  transition: transform 280ms ease;
}
#bypt-booking-overlay.active .bypt-modal { transform: translateY(0) scale(1); }

/* Header */
.bypt-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 28px 0;
}
.bypt-modal-header h2 {
  margin: 0 0 4px;
  color: #0f1d52;
  font-family: 'Poppins', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}
.bypt-modal-header p {
  margin: 0;
  color: #5F6B76;
  font-size: 0.82rem;
}
.bypt-modal-header p i { margin-right: 3px; }
.bypt-modal-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: #f0f2fa;
  color: #0f1d52;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 180ms;
}
.bypt-modal-close:hover { background: #dde3f5; }

/* Steps */
.bypt-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px 0;
  gap: 0;
}
.bypt-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
  font-size: 0.78rem;
  font-weight: 600;
  color: #b0b8c5;
  transition: color 220ms;
  white-space: nowrap;
}
.bypt-step:not(:last-of-type)::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #dce7ee;
  margin: 0 8px;
  min-width: 20px;
}
.bypt-step-num {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef1f9;
  color: #9aabcc;
  font-size: 0.72rem;
  font-weight: 700;
  flex: 0 0 auto;
  transition: background 220ms, color 220ms;
}
.bypt-step.active .bypt-step-num,
.bypt-step.done .bypt-step-num { background: #2142A1; color: #fff; }
.bypt-step.active,
.bypt-step.done { color: #2142A1; }
.bypt-step.done .bypt-step-num::before { content: '✓'; }

/* Timezone select */
.bypt-tz-select-wrap {
  flex-shrink: 0;
  margin-left: 12px;
  max-width: 220px;
}
.bypt-tz-select {
  width: 100%;
  max-width: 220px;
  padding: 5px 24px 5px 8px;
  border: 1.5px solid #dde3f5;
  border-radius: 8px;
  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 fill='%235f6b76' d='M1.4.6 6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E") no-repeat right 8px center;
  background-size: 9px 6px;
  color: #0f1d52;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.3;
  transition: border-color 160ms;
}
.bypt-tz-select:hover,
.bypt-tz-select:focus {
  border-color: #2142A1;
  outline: none;
}
.bypt-tz-note {
  font-size: 0.78rem;
  color: #5f6b76;
  font-weight: 400;
}
.bypt-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Body */
.bypt-modal-body {
  display: grid;
  grid-template-columns: 300px 1fr;
  padding: 22px 28px 28px;
  gap: 0;
}

/* Calendar Panel */
.bypt-calendar-panel {
  border-right: 1px solid #eef1f9;
  padding-right: 24px;
}
.bypt-cal-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.bypt-cal-nav button {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid #eef1f9;
  border-radius: 8px;
  background: none;
  color: #2142A1;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 180ms;
}
.bypt-cal-nav button:hover:not(:disabled) { background: #eef1f9; }
.bypt-cal-nav button:disabled { opacity: 0.3; cursor: not-allowed; }
.bypt-cal-nav span {
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  color: #0f1d52;
}
.bypt-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  margin-bottom: 4px;
}
.bypt-cal-weekdays span {
  text-align: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #9aabcc;
  padding: 4px 0;
}
.bypt-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.bypt-cal-day {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: none;
  border-radius: 8px;
  background: none;
  font-size: 0.8rem;
  font-weight: 500;
  color: #17212B;
  cursor: pointer;
  transition: background 160ms, color 160ms;
}
.bypt-cal-day:hover:not(:disabled):not(.bypt-selected) { background: #eef1f9; color: #2142A1; }
.bypt-cal-day.bypt-selected { background: #2142A1; color: #fff; font-weight: 700; }
.bypt-cal-day:disabled { color: #d0d8e5; cursor: default; }
.bypt-cal-day.bypt-today:not(.bypt-selected) { color: #FF7A00; font-weight: 700; }

/* Content Panel */
.bypt-content-panel { padding-left: 24px; }

.bypt-panel-title {
  margin: 0 0 14px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  color: #0f1d52;
  line-height: 1.4;
}

/* Empty state */
.bypt-pick-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  text-align: center;
  gap: 12px;
  color: #9aabcc;
}
.bypt-pick-date i { font-size: 2.8rem; color: #dde3f5; }
.bypt-pick-date p { margin: 0; font-size: 0.86rem; }

/* Time Slots */
.bypt-slots-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.bypt-slot {
  padding: 10px 6px;
  border: 1.5px solid #dde3f5;
  border-radius: 10px;
  background: none;
  font-size: 0.78rem;
  font-weight: 600;
  color: #2142A1;
  text-align: center;
  cursor: pointer;
  line-height: 1.3;
  transition: all 160ms;
}
.bypt-slot:hover:not(:disabled):not(.bypt-selected) {
  border-color: #2142A1;
  background: #eef1f9;
}
.bypt-slot.bypt-selected { border-color: #2142A1; background: #2142A1; color: #fff; }
.bypt-slot:disabled {
  background: #f7f8fc;
  border-color: #eef1f9;
  color: #c0c8d8;
  cursor: not-allowed;
  text-decoration: line-through;
  text-decoration-color: #c0c8d8;
}
.bypt-slot-sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  opacity: 0.72;
  margin-top: 2px;
}

/* CTA Buttons */
.bypt-cta {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 12px;
  background: #2142A1;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 200ms, transform 180ms;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.bypt-cta:hover { background: #1a338e; }
.bypt-cta:active { transform: scale(0.98); }
.bypt-cta:disabled { background: #c8d0dc; cursor: not-allowed; }
.bypt-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  border: 1.5px solid #dde3f5;
  border-radius: 12px;
  background: none;
  font-size: 0.82rem;
  font-weight: 600;
  color: #5F6B76;
  cursor: pointer;
  transition: border-color 180ms, color 180ms;
  white-space: nowrap;
}
.bypt-back-btn:hover { border-color: #2142A1; color: #2142A1; }
.bypt-form-actions { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 16px; }

/* Booking summary chip */
.bypt-summary-chip {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 12px;
  background: #eef1f9;
  margin-bottom: 16px;
}
.bypt-summary-chip i { color: #2142A1; font-size: 1rem; flex: 0 0 auto; }
.bypt-summary-chip strong { display: block; font-size: 0.84rem; color: #0f1d52; }
.bypt-summary-chip span { font-size: 0.76rem; color: #5F6B76; }

/* Form */
.bypt-form { display: flex; flex-direction: column; gap: 12px; }
.bypt-field { display: flex; flex-direction: column; gap: 5px; }
.bypt-field label { font-size: 0.8rem; font-weight: 600; color: #0f1d52; }
.bypt-field .bypt-required { color: #e05; margin-left: 2px; }
.bypt-field input,
.bypt-field select,
.bypt-field textarea {
  padding: 10px 13px;
  border: 1.5px solid #dde3f5;
  border-radius: 10px;
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  color: #17212B;
  outline: none;
  transition: border-color 160ms, box-shadow 160ms;
}
.bypt-field input:focus,
.bypt-field select:focus,
.bypt-field textarea:focus {
  border-color: #2142A1;
  box-shadow: 0 0 0 3px rgba(33, 66, 161, 0.1);
}
.bypt-field input.bypt-error,
.bypt-field input.bypt-error:focus { border-color: #e05; box-shadow: 0 0 0 3px rgba(238, 0, 85, 0.1); }
.bypt-field textarea { resize: vertical; min-height: 76px; }

/* Confirmation */
.bypt-confirmation {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 8px 4px;
}
.bypt-confirm-icon {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF7A00, #e06c00);
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 16px;
}
.bypt-confirmation h3 {
  margin: 0 0 8px;
  font-family: 'Poppins', sans-serif;
  font-size: 1.15rem;
  color: #0f1d52;
}
.bypt-confirmation > p {
  margin: 0 0 18px;
  color: #5F6B76;
  font-size: 0.86rem;
  max-width: 340px;
}
.bypt-confirm-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #eef1f9;
  text-align: left;
  margin-bottom: 18px;
}
.bypt-confirm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: #17212B;
}
.bypt-confirm-row i { color: #2142A1; width: 16px; text-align: center; flex: 0 0 auto; }

/* Responsive */
@media (max-width: 680px) {
  .bypt-modal-body {
    grid-template-columns: 1fr;
    padding: 18px 20px 24px;
  }
  .bypt-calendar-panel {
    border-right: none;
    border-bottom: 1px solid #eef1f9;
    padding-right: 0;
    padding-bottom: 20px;
    margin-bottom: 20px;
  }
  .bypt-content-panel { padding-left: 0; }
  .bypt-modal-header { padding: 22px 20px 0; }
  .bypt-steps {
    padding: 16px 20px 0;
    flex-wrap: wrap;
    gap: 10px;
  }
  .bypt-steps .bypt-step {
    font-size: 0.68rem;
    gap: 6px;
  }
  .bypt-steps .bypt-step span:not(.bypt-step-num) {
    overflow: hidden;
    max-width: 4.5em;
    text-overflow: ellipsis;
  }
  .bypt-tz-select-wrap {
    margin-left: 0;
    max-width: none;
    width: 100%;
    order: 1;
  }
  .bypt-tz-select {
    max-width: none;
  }
}
