/* Availability time panel styles (Bootstrap friendly) */
.ds-time-panel {
  width: 200px;
  max-height: 260px;
  overflow: auto;
  border-left: 1px solid var(--bs-border-color, #dee2e6);
  padding: 8px;
  margin-left: 8px;
  box-sizing: border-box;
  /* Use theme-aware body background so panel matches light/dark themes */
  background: var(--bs-body-bg, #fff);
  -webkit-overflow-scrolling: touch;
  font-size: 0.92rem;
}

.ds-time-panel .btn {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.ds-time-panel .btn.active {
  box-shadow: 0 0 0 0.15rem rgba(13,110,253,0.15);
}

.ds-time-panel .btn[disabled],
.ds-time-panel .btn[aria-disabled="true"] {
  opacity: 0.65;
  cursor: not-allowed;
}

/* Optional scrollbar styling */
.ds-time-panel::-webkit-scrollbar { width: 10px; }
.ds-time-panel::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); border-radius: 6px; }
.ds-time-panel::-webkit-scrollbar-track { background: transparent; }

/* Flatpickr container width for panel */
.flatpickr-calendar.custom-with-timepanel { width: 480px !important; }
.flatpickr-calendar.custom-with-timepanel .flatpickr-innerContainer { display: flex; align-items: flex-start; }

@media (max-width: 560px) {
  .flatpickr-calendar.custom-with-timepanel { width: 100% !important; }
  .ds-time-panel { display: none; }
}

/* New three-line time slot button layout */
.ds-time-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 52px;
  padding: 8px 10px;
  gap: 2px;
  width: 100%;
  box-sizing: border-box;
}
.ds-time-slot .ts-top {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: baseline;
}
.ds-time-slot .ts-time {
  font-weight: 600;
}
.ds-time-slot .ts-mid {
  /* Match numeric capacity styling: same weight and color as .ts-time */
  color: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 2px;
}
.ds-time-slot .ts-bottom {
  /* Match numeric capacity and 'doctors' styling so 'available' appears consistent */
  color: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 2px;
}
.ds-time-slot.closed {
  opacity: 0.6;
}

/* Compact single-line style when a specific doctor is selected */
.ds-time-slot.compact {
  min-height: 36px;
  padding: 6px 8px;
}
.ds-time-slot.compact .ts-mid,
.ds-time-slot.compact .ts-bottom {
  display: none;
}
.ds-time-slot.compact .ts-top {
  justify-content: flex-start;
}
