/* ── Month select plugin (flatpickr) ─────────────────────────────────────── */

.flatpickr-monthSelect-months {
  display: flex;
  flex-wrap: wrap;
  margin: 10px 1px 3px 1px;
}

.flatpickr-monthSelect-month {
  background: none;
  border: 1px solid transparent;
  border-radius: 4px;
  box-sizing: border-box;
  color: #393939;
  cursor: pointer;
  display: inline-block;
  font-weight: 400;
  margin: 0.5px;
  padding: 10px;
  text-align: center;
  width: 33%;
}

.flatpickr-monthSelect-month.today {
  border-color: transparent;
}

.flatpickr-monthSelect-month:hover,
.flatpickr-monthSelect-month:focus {
  background: #e6e6e6;
  outline: 0;
}

.flatpickr-monthSelect-month.selected {
  background-color: #1A182B;
  box-shadow: none;
  color: #fff;
  border-color: #1A182B;
}

/* ── Day picker (custom) ─────────────────────────────────────────────────── */

.ts-day-picker {
  position: fixed;
  z-index: 9999;
  width: 308px;
  background: #fff;
  border-radius: 5px;
  font-size: 14px;
  user-select: none;
  box-shadow: 1px 0 0 #e6e6e6, -1px 0 0 #e6e6e6, 0 1px 0 #e6e6e6, 0 -1px 0 #e6e6e6, 0 3px 13px rgba(0, 0, 0, 0.08);
}

.ts-day-picker__label {
  font-weight: 600;
  font-size: 14px;
  color: #393939;
  text-align: center;
  padding: 10px 12px;
  margin: 0;
  border-bottom: 1px solid #e6e6e6;
}

.ts-day-picker__grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  padding: 10px;
}

.ts-day-picker__cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  border-radius: 50%;
  cursor: pointer;
  color: #393939;
  background: transparent;
}

.ts-day-picker__cell:hover {
  background: #e6e6e6;
}

.ts-day-picker__cell--selected {
  background: #1A182B;
  color: #fff;
}

.ts-day-picker__cell--selected:hover {
  background: #1A182B;
}

.flatpickr-calendar.tof-cal { width: auto !important; max-width: none; }
.tof-cal .tof-top { display: flex; align-items: stretch; }
.tof-cal .tof-cal-col { padding: 8px; }
.tof-picker { display: none; }
.tof-cal .tof-day-rows { display: flex; flex-direction: column; width: 260px; border-left: 1px solid #ECEFF3; padding: 16px; }
.tof-day-rows .tof-panel-title { font-size: 14px; font-weight: 600; color: #1A182B; margin: 0 0 10px; }
.tof-day-rows .tof-day-list { display: flex; flex-direction: column; gap: 8px; max-height: 232px; overflow-y: auto; }
.tof-day-rows .tof-day-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tof-day-rows .tof-day-label { font-size: 14px; color: #36394A; }
.tof-day-rows .tof-day-select { font-size: 13px; border: 1px solid #DFE1E7; border-radius: 8px; padding: 4px 8px; background: #fff; cursor: pointer; }
.tof-cal .tof-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-top: 1px solid #ECEFF3; }
.tof-cal .tof-total { font-size: 14px; color: #818898; margin: 0; }
.tof-cal .tof-total strong { color: #1A182B; font-weight: 600; }
.tof-cal .tof-actions { display: flex; gap: 8px; }
.tof-cal .tof-cancel { font-size: 14px; padding: 6px 16px; border: 1px solid #DFE1E7; border-radius: 8px; background: #fff; color: #36394A; cursor: pointer; }
.tof-cal .tof-save { font-size: 14px; padding: 6px 16px; border: none; border-radius: 8px; background: #FFB885; color: #1A182B; cursor: pointer; }

/* Non-split types: plain, natural-width calendar with no half/full side panel */
.flatpickr-calendar.tof-cal-plain { width: fit-content !important; }
.tof-cal-plain .tof-top { display: block; }
.tof-cal-plain .tof-total { display: none; }
.tof-cal-plain .tof-footer { justify-content: flex-end; }
