/* ============================================================
   Demo Booking Modal — Square 2-col layout
   ============================================================ */

/* ── Overlay ─────────────────────────────────────────────── */
#bd-booking-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 16px;
  backdrop-filter: blur(3px);
}
#bd-booking-overlay.bd-open { display: flex; }

/* ── Modal — 2 col square ────────────────────────────────── */
#bd-booking-modal {
  display: grid;
  grid-template-columns: 300px 1fr;
  width: 100%;
  max-width: 780px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 24px 72px rgba(0,0,0,0.22);
  position: relative;
  background: #fff;
}

/* ── Close ───────────────────────────────────────────────── */
#bd-booking-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 6px;
  transition: color 0.15s;
  z-index: 10;
}
#bd-booking-close:hover { color: #161616; }

/* ══════════════════════════════════════════════════════════
   LEFT — Meeting info (light)
   ══════════════════════════════════════════════════════════ */
#bd-panel-left {
  background: #f7f9f5;
  padding: 36px 28px 32px;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #eee;
}

.bd-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.bd-logo { height: 28px; width: auto; object-fit: contain; }
.bd-brand-name {
  font-size: 16px;
  font-weight: 700;
  color: #161616;
  letter-spacing: 0.02em;
}

/* Hero block */
.bd-left-hero { margin-bottom: 20px; }

.bd-left-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #e8f7df;
  color: #2e7a08;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.bd-meeting-title {
  font-family: "Clash Display", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #0d0d0d;
  margin: 0 0 10px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.bd-meeting-desc {
  font-size: 13.5px;
  color: #777;
  line-height: 1.65;
  margin: 0;
}

.bd-panel-left-divider {
  width: 100%;
  height: 1px;
  background: #e4e4e4;
  margin: 20px 0;
}

/* Meta list */
.bd-meeting-meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.bd-meeting-meta li {
  display: flex;
  align-items: center;
  gap: 12px;
}
.bd-meta-icon {
  width: 36px;
  height: 36px;
  background: #fff;
  border: 1.5px solid #d8f0c8;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #4db20c;
  box-shadow: 0 1px 4px rgba(77,178,12,0.10);
}
.bd-meta-label {
  font-size: 10.5px;
  color: #aaa;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  line-height: 1;
  margin-bottom: 3px;
}
.bd-meta-value {
  font-size: 15px;
  font-weight: 700;
  color: #161616;
  line-height: 1;
}

/* Footer trust */
.bd-left-footer { margin-top: 24px; }
.bd-trust-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #888;
}

/* ══════════════════════════════════════════════════════════
   RIGHT — Form fields
   ══════════════════════════════════════════════════════════ */
#bd-panel-right {
  display: flex;
  flex-direction: column;
}

#bd-booking-form-content {
  flex: 1;
  padding: 40px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.bd-form-heading {
  font-size: 15px;
  font-weight: 700;
  color: #aaa;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 4px;
}

/* ── Field group ─────────────────────────────────────────── */
.bd-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bd-label {
  font-size: 14px;
  font-weight: 600;
  color: #555;
}

/* ── Input wrap (shared for date / time / tz) ────────────── */
.bd-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border: 1.5px solid #e8e8e8;
  border-radius: 10px;
  background: #fafafa;
  cursor: pointer;
  transition: border-color 0.18s, background 0.18s;
  overflow: hidden;
  min-width: 0;
}
.bd-input-wrap:focus-within,
.bd-input-wrap:hover {
  border-color: #4db20c;
  background: #fff;
}
.bd-input-wrap svg:first-child { flex-shrink: 0; color: #4db20c; }
.bd-chevron { flex-shrink: 0; color: #bbb; margin-left: auto; pointer-events: none; }

.bd-input-wrap input,
.bd-input-wrap select {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: #161616;
  outline: none;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  min-width: 0;
}
.bd-input-wrap input::placeholder { color: #bbb; font-weight: 400; }
.bd-input-wrap select option { background: #fff; color: #161616; }

/* Flatpickr calendar dropdown — appended to body */
.flatpickr-calendar {
  z-index: 100001 !important;
  border-radius: 14px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.14) !important;
  border: 1px solid #eee !important;
  font-family: inherit !important;
}
.flatpickr-day.selected,
.flatpickr-day.selected:hover {
  background: #4db20c !important;
  border-color: #4db20c !important;
  color: #fff !important;
}
.flatpickr-day:hover:not(.flatpickr-disabled):not(.selected) {
  background: #e8f7df !important;
  color: #2e7a08 !important;
}
.flatpickr-day.today:not(.selected) {
  border-color: #4db20c !important;
  color: #4db20c !important;
}
.flatpickr-day.nextMonthDay:not(.flatpickr-disabled),
.flatpickr-day.prevMonthDay:not(.flatpickr-disabled) {
  color: #aaa !important;
}
.flatpickr-months .flatpickr-prev-month:hover svg,
.flatpickr-months .flatpickr-next-month:hover svg { fill: #4db20c !important; }

/* ── Time label row (label + 12h/24h toggle) ─────────────── */
.bd-time-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.bd-fmt-toggle {
  display: flex;
  background: #f0f0f0;
  border-radius: 20px;
  padding: 2px;
  gap: 2px;
}
.bd-fmt-btn {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 600;
  color: #999;
  padding: 3px 9px;
  border-radius: 16px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  line-height: 1.4;
}
.bd-fmt-btn.bd-fmt-active {
  background: #fff;
  color: #161616;
  box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

/* ── Custom time dropdown ────────────────────────────────── */
.bd-time-select-wrap {
  position: static;
}
.bd-time-trigger {
  cursor: pointer;
  user-select: none;
}
.bd-time-display-text {
  flex: 1;
  font-size: 15px;
  font-weight: 500;
  color: #bbb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.bd-time-display-text.bd-time-chosen {
  color: #161616;
}
.bd-time-dropdown {
  position: fixed;
  background: #fff;
  border: 1.5px solid #e8e8e8;
  border-radius: 12px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  z-index: 100002;
  overflow: hidden;
  animation: bd-fade-in 0.12s ease;
}
.bd-time-list {
  max-height: 210px;
  overflow-y: auto;
  padding: 6px 0;
  scrollbar-width: thin;
  scrollbar-color: #ddd transparent;
}
.bd-time-list::-webkit-scrollbar { width: 4px; }
.bd-time-list::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }
.bd-time-option {
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: background 0.1s, color 0.1s;
}
.bd-time-option:hover {
  background: #f0fae8;
  color: #2e7a08;
}
.bd-time-option.bd-time-selected {
  background: #4db20c;
  color: #fff;
  font-weight: 600;
}

/* ── Confirm button ─────────────────────────────────────── */
#bd-booking-confirm {
  width: 100%;
  padding: 15px;
  background: #161616;
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.18s, opacity 0.18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
}
#bd-booking-confirm:hover:not(:disabled) { background: #2a2a2a; }
#bd-booking-confirm:disabled { opacity: 0.55; cursor: not-allowed; }

.bd-spinner {
  width: 15px; height: 15px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bd-spin 0.7s linear infinite;
  display: none;
}
#bd-booking-confirm.bd-loading .bd-spinner { display: block; }
#bd-booking-confirm.bd-loading .bd-btn-text { opacity: 0.7; }

/* ── Error ───────────────────────────────────────────────── */
#bd-booking-error {
  display: none;
  font-size: 13px;
  color: #c0392b;
  background: #fff5f5;
  border: 1px solid #ffc1c1;
  border-radius: 8px;
  padding: 8px 12px;
  line-height: 1.5;
}

/* Inline field error on main form */
.bd-field-error {
  display: block;
  color: #e74c3c;
  font-size: 13px;
  font-weight: 500;
  margin-top: 5px;
  padding-left: 2px;
}

/* ── Success ─────────────────────────────────────────────── */
#bd-booking-success {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 28px;
  gap: 14px;
  min-height: 300px;
}
#bd-booking-success.bd-visible { display: flex; }
.bd-success-icon {
  width: 58px; height: 58px;
  background: #e8f7df;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #4db20c;
}
#bd-booking-success h3 {
  font-family: "Clash Display", sans-serif;
  font-size: 19px;
  font-weight: 600;
  color: #161616;
  margin: 0;
}
#bd-booking-success p {
  font-size: 13.5px;
  color: #777;
  margin: 0;
  line-height: 1.65;
}

/* ── Animations ─────────────────────────────────────────── */
@keyframes bd-spin { to { transform: rotate(360deg); } }
@keyframes bd-fade-in { from { opacity:0; transform:translateY(3px); } to { opacity:1; transform:none; } }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 560px) {
  #bd-booking-modal {
    display: unset !important;
    grid-template-columns: unset !important;
    border-radius: 16px;
    width: 100%;
  }
  #bd-panel-left {
    padding: 20px 20px 16px;
    border-right: none;
    border-bottom: 1px solid #e4e4e4;
  }
  .bd-meeting-desc { display: none; }
  .bd-left-footer { display: none; }
  .bd-meeting-meta { flex-direction: row; flex-wrap: wrap; gap: 10px; }
  .bd-meeting-meta li { flex: 1 1 auto; }
  #bd-booking-form-content { padding: 20px 18px 20px; }

  /* Timezone text: truncate if too long */
  .bd-time-display-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  /* 24h toggle: don't clip */
  .bd-time-label-row { gap: 8px; }
  .bd-fmt-toggle { flex-shrink: 0; }
}
