/**
 * HR Flatpickr calendar chrome — matches employee_list.php
 * (PatientsModule/assets/css/flatpickr-hospitals-parity.css).
 * html-prefixed so leftover page-specific calendar rules cannot win.
 */

html[data-bs-theme="dark"] .flatpickr-calendar {
  border: 1px solid rgba(255, 255, 255, .05) !important;
  box-shadow: 0 0 12px 2px rgba(0, 183, 255, .35), 0 0 25px 3px rgba(150, 66, 255, .2) !important;
  background: linear-gradient(145deg, #1a1a1a, #2b2b2b) !important;
  border-radius: .75rem !important;
  overflow: hidden !important;
  color: #f0f4f8 !important;
}

html[data-bs-theme="dark"] .flatpickr-innerContainer,
html[data-bs-theme="dark"] .flatpickr-days,
html[data-bs-theme="dark"] .flatpickr-days .dayContainer,
html[data-bs-theme="dark"] .flatpickr-calendar.flatpickr-monthSelect-theme-light .flatpickr-innerContainer,
html[data-bs-theme="dark"] .flatpickr-calendar.flatpickr-monthSelect-theme-light .flatpickr-innerContainer > div {
  background: transparent !important;
}

html[data-bs-theme="dark"] .flatpickr-day {
  background: transparent !important;
  border: none !important;
  color: #f0f4f8 !important;
}

html[data-bs-theme="dark"] .flatpickr-day:hover,
html[data-bs-theme="dark"] .flatpickr-day:focus {
  background: #1e90ff !important;
  color: #fff !important;
  border-color: #1e90ff !important;
}

html[data-bs-theme="dark"] .flatpickr-day.selected,
html[data-bs-theme="dark"] .flatpickr-day.selected:hover,
html[data-bs-theme="dark"] .flatpickr-day.startRange,
html[data-bs-theme="dark"] .flatpickr-day.endRange {
  background: #00d4ff !important;
  color: #000 !important;
  border-color: #00d4ff !important;
}

html[data-bs-theme="dark"] .flatpickr-day.today {
  border-color: #00d4ff !important;
  background: rgba(0, 212, 255, .1) !important;
}

html[data-bs-theme="dark"] .flatpickr-day.inRange,
html[data-bs-theme="dark"] .flatpickr-day.prevMonthDay.inRange,
html[data-bs-theme="dark"] .flatpickr-day.nextMonthDay.inRange,
html[data-bs-theme="dark"] .flatpickr-day.today.inRange,
html[data-bs-theme="dark"] .flatpickr-day.prevMonthDay.today.inRange,
html[data-bs-theme="dark"] .flatpickr-day.nextMonthDay.today.inRange {
  background: #1a4a7a !important;
  box-shadow: -5px 0 0 #1a4a7a, 5px 0 0 #1a4a7a !important;
  border: none !important;
  border-color: #1a4a7a !important;
  border-radius: 0 !important;
  color: #cce5ff !important;
  outline: none !important;
}

html[data-bs-theme="dark"] .flatpickr-current-month,
html[data-bs-theme="dark"] .flatpickr-current-month input.cur-year,
html[data-bs-theme="dark"] .flatpickr-monthDropdown-months {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #fff !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

html[data-bs-theme="dark"] .flatpickr-months,
html[data-bs-theme="dark"] .flatpickr-months .flatpickr-month,
html[data-bs-theme="dark"] .flatpickr-months > div > div,
html[data-bs-theme="dark"] .flatpickr-prev-month,
html[data-bs-theme="dark"] .flatpickr-next-month {
  background: linear-gradient(135deg, #0d6efd, #3a86ff) !important;
  color: #fff !important;
  fill: #fff !important;
}

html[data-bs-theme="dark"] .flatpickr-weekdays {
  background: linear-gradient(135deg, #0d6efd, #3a86ff) !important;
}

html[data-bs-theme="dark"] .flatpickr-weekday {
  background: transparent !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] .flatpickr-time {
  background: #121e28 !important;
  border-top: 1px solid rgba(255, 255, 255, .12) !important;
}

html[data-bs-theme="dark"] .flatpickr-time input,
html[data-bs-theme="dark"] .flatpickr-time .numInput,
html[data-bs-theme="dark"] .flatpickr-time .flatpickr-hour,
html[data-bs-theme="dark"] .flatpickr-time .flatpickr-minute {
  background-color: #0d6efd !important;
  color: #fff !important;
  border: 1px solid rgba(13, 110, 253, .3) !important;
  border-radius: 5px !important;
}

html[data-bs-theme="light"] .flatpickr-calendar {
  border: 1px solid rgba(0, 0, 0, .08) !important;
  border-radius: .75rem !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .08) !important;
  background: #fff !important;
  overflow: hidden !important;
}

html[data-bs-theme="light"] .flatpickr-innerContainer,
html[data-bs-theme="light"] .flatpickr-days,
html[data-bs-theme="light"] .flatpickr-days .dayContainer {
  background: #ffffff !important;
}

html[data-bs-theme="light"] .flatpickr-day {
  color: #0e2433 !important;
}

html[data-bs-theme="light"] .flatpickr-day:hover,
html[data-bs-theme="light"] .flatpickr-day:focus {
  background: #1e90ff !important;
  color: #fff !important;
  border-color: #1e90ff !important;
}

html[data-bs-theme="light"] .flatpickr-day.selected,
html[data-bs-theme="light"] .flatpickr-day.selected:hover,
html[data-bs-theme="light"] .flatpickr-day.startRange,
html[data-bs-theme="light"] .flatpickr-day.endRange {
  background: #0d6efd !important;
  color: #fff !important;
  border-color: #0d6efd !important;
}

html[data-bs-theme="light"] .flatpickr-day.today {
  border-color: #0d6efd !important;
  background: rgba(13, 110, 253, .08) !important;
}

html[data-bs-theme="light"] .flatpickr-day.inRange,
html[data-bs-theme="light"] .flatpickr-day.prevMonthDay.inRange,
html[data-bs-theme="light"] .flatpickr-day.nextMonthDay.inRange,
html[data-bs-theme="light"] .flatpickr-day.today.inRange {
  background: #d4e8ff !important;
  box-shadow: -5px 0 0 #d4e8ff, 5px 0 0 #d4e8ff !important;
  border: none !important;
  border-radius: 0 !important;
  color: #0e2433 !important;
}

html[data-bs-theme="light"] .flatpickr-current-month,
html[data-bs-theme="light"] .flatpickr-current-month input.cur-year,
html[data-bs-theme="light"] .flatpickr-monthDropdown-months {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #fff !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}

html[data-bs-theme="light"] .flatpickr-months,
html[data-bs-theme="light"] .flatpickr-months .flatpickr-month,
html[data-bs-theme="light"] .flatpickr-months > div > div,
html[data-bs-theme="light"] .flatpickr-prev-month,
html[data-bs-theme="light"] .flatpickr-next-month {
  background: linear-gradient(135deg, #0d6efd, #3a86ff) !important;
  color: #fff !important;
  fill: #fff !important;
}

html[data-bs-theme="light"] .flatpickr-weekdays {
  background: linear-gradient(135deg, #0d6efd, #3a86ff) !important;
}

html[data-bs-theme="light"] .flatpickr-weekday {
  background: transparent !important;
  color: #fff !important;
}

html[data-bs-theme="light"] .flatpickr-time {
  background: #f6faff !important;
  border-top: 1px solid rgba(13, 110, 253, .2) !important;
}

html[data-bs-theme="light"] .flatpickr-time input,
html[data-bs-theme="light"] .flatpickr-time .numInput,
html[data-bs-theme="light"] .flatpickr-time .flatpickr-hour,
html[data-bs-theme="light"] .flatpickr-time .flatpickr-minute {
  background: #0d6efd !important;
  color: #fff !important;
  border: 1px solid rgba(13, 110, 253, .3) !important;
  border-radius: 5px !important;
}

/* Month-select plugin cells — same hover/selected language as day cells */
html[data-bs-theme="dark"] .flatpickr-monthSelect-month {
  color: #f0f4f8 !important;
  background: transparent !important;
  border-radius: 6px !important;
}

html[data-bs-theme="dark"] .flatpickr-monthSelect-month:hover {
  background: #1e90ff !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] .flatpickr-monthSelect-month.selected {
  background: #00d4ff !important;
  color: #000 !important;
}

html[data-bs-theme="light"] .flatpickr-monthSelect-month:hover {
  background: #1e90ff !important;
  color: #fff !important;
}

html[data-bs-theme="light"] .flatpickr-monthSelect-month.selected {
  background: #0d6efd !important;
  color: #fff !important;
}

html[data-bs-theme="dark"] .flatpickr-monthDropdown-months option,
html[data-bs-theme="dark"] a.flatpickr-monthDropdown-month,
html[data-bs-theme="dark"] .flatpickr-current-month select option {
  background: #08151d !important;
  color: #e7eef7 !important;
}

html[data-bs-theme="dark"] .flatpickr-monthDropdown-months option:hover,
html[data-bs-theme="dark"] .flatpickr-monthDropdown-month:hover,
html[data-bs-theme="dark"] .flatpickr-current-month select option:hover,
html[data-bs-theme="dark"] .flatpickr-current-month select option:checked,
html[data-bs-theme="dark"] .flatpickr-current-month select option[selected] {
  background-color: rgba(13, 110, 253, .35) !important;
  color: #fff !important;
}

html[data-bs-theme="light"] .flatpickr-monthDropdown-months option,
html[data-bs-theme="light"] a.flatpickr-monthDropdown-month,
html[data-bs-theme="light"] .flatpickr-current-month select option {
  background: #ffffff !important;
  color: #0e2433 !important;
}

html[data-bs-theme="light"] .flatpickr-monthDropdown-months option:hover,
html[data-bs-theme="light"] .flatpickr-monthDropdown-month:hover,
html[data-bs-theme="light"] .flatpickr-current-month select option:hover,
html[data-bs-theme="light"] .flatpickr-current-month select option:checked,
html[data-bs-theme="light"] .flatpickr-current-month select option[selected] {
  background-color: #0d6efd !important;
  color: #fff !important;
}

.flatpickr-calendar.open {
  z-index: 999999 !important;
}
