:root {
  --dropdown-bg: #ffffff;
  --dropdown-border: #cbd5e1;
}

html.dark,
html[data-theme="dark"] {
  --dropdown-bg: #1e293b;
  --dropdown-border: #334155;
}

/* Custom Styled Select Elements */
select:not(.flatpickr-monthDropdown-months):not(.flatpickr-month-dropdown-months):not([class*="flatpickr"]) {
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%25232563eb'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.75rem center !important;
  background-size: 1.1rem 1.1rem !important;
  padding-right: 2.5rem !important;
  cursor: pointer !important;
  transition: all 0.2s ease-in-out !important;
}

/* Dark Mode Select Arrow */
html.dark select:not(.flatpickr-monthDropdown-months):not(.flatpickr-month-dropdown-months):not([class*="flatpickr"]),
html[data-theme="dark"] select:not(.flatpickr-monthDropdown-months):not(.flatpickr-month-dropdown-months):not([class*="flatpickr"]) {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%252360a5fa'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E") !important;
}

/* Time Picker Specific Compact Select Elements */
select.time-picker-select {
  padding-right: 1.5rem !important;
  padding-left: 0.75rem !important;
  text-align: center !important;
  text-align-last: center !important;
  background-position: right 0.4rem center !important;
  background-size: 0.9rem 0.9rem !important;
}

/* Styled Dropdown Options */
select option {
  background-color: #ffffff !important;
  color: #1e293b !important;
  padding: 12px 16px !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  line-height: 1.5 !important;
  border-radius: 6px !important;
  margin: 2px 0 !important;
}

select option:checked {
  background-color: #2563eb !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}

select option:hover,
select option:focus {
  background-color: #eff6ff !important;
  color: #1d4ed8 !important;
}

/* Dark Mode Option Styling */
html.dark select option,
html[data-theme="dark"] select option {
  background-color: #1e293b !important;
  color: #f8fafc !important;
}

html.dark select option:checked,
html[data-theme="dark"] select option:checked {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

html.dark select option:hover,
html[data-theme="dark"] select option:hover,
html.dark select option:focus,
html[data-theme="dark"] select option:focus {
  background-color: #1e3a8a !important;
  color: #93c5fd !important;
}

/* Custom Date & Time Picker Input Styling */
input[type="date"],
input[type="time"],
input[type="datetime-local"] {
  position: relative;
  cursor: pointer;
  accent-color: #2563eb;
}

::-webkit-calendar-picker-indicator {
  cursor: pointer;
  border-radius: 8px;
  padding: 4px;
  filter: invert(35%) sepia(85%) saturate(1800%) hue-rotate(205deg) brightness(98%) contrast(95%);
  transition: all 0.2s ease;
}

::-webkit-calendar-picker-indicator:hover {
  background-color: #eff6ff;
  transform: scale(1.1);
}

html.dark ::-webkit-calendar-picker-indicator,
html[data-theme="dark"] ::-webkit-calendar-picker-indicator {
  filter: invert(70%) sepia(50%) saturate(1500%) hue-rotate(190deg) brightness(110%) contrast(100%);
}

html.dark ::-webkit-calendar-picker-indicator:hover,
html[data-theme="dark"] ::-webkit-calendar-picker-indicator:hover {
  background-color: rgba(30, 58, 138, 0.5);
}

/* Chrome/Edge Native Date & Time Picker Popup Field Styling Overrides */
::-webkit-datetime-edit {
  padding: 2px 4px;
}

::-webkit-datetime-edit-fields-wrapper {
  background: transparent;
}

::-webkit-datetime-edit-text {
  color: #64748b;
  padding: 0 2px;
}

::-webkit-datetime-edit-month-field,
::-webkit-datetime-edit-day-field,
::-webkit-datetime-edit-year-field,
::-webkit-datetime-edit-hour-field,
::-webkit-datetime-edit-minute-field,
::-webkit-datetime-edit-ampm-field {
  color: #1e293b;
  font-weight: 600;
  border-radius: 4px;
  padding: 2px 4px;
}

::-webkit-datetime-edit-month-field:focus,
::-webkit-datetime-edit-day-field:focus,
::-webkit-datetime-edit-year-field:focus,
::-webkit-datetime-edit-hour-field:focus,
::-webkit-datetime-edit-minute-field:focus,
::-webkit-datetime-edit-ampm-field:focus {
  background-color: #2563eb !important;
  color: #ffffff !important;
}

html.dark ::-webkit-datetime-edit-month-field,
html.dark ::-webkit-datetime-edit-day-field,
html.dark ::-webkit-datetime-edit-year-field,
html.dark ::-webkit-datetime-edit-hour-field,
html.dark ::-webkit-datetime-edit-minute-field,
html.dark ::-webkit-datetime-edit-ampm-field,
html[data-theme="dark"] ::-webkit-datetime-edit-month-field,
html[data-theme="dark"] ::-webkit-datetime-edit-day-field,
html[data-theme="dark"] ::-webkit-datetime-edit-year-field,
html[data-theme="dark"] ::-webkit-datetime-edit-hour-field,
html[data-theme="dark"] ::-webkit-datetime-edit-minute-field,
html[data-theme="dark"] ::-webkit-datetime-edit-ampm-field {
  color: #f8fafc;
}


