/* Dark theme for all calendar popups:
   - DataTables Editor datetime (editor-datetime)
   - daterangepicker
   - bootstrap-datepicker
   Month/year labels were invisible: light body text on white popup. */

/* ========== Editor datetime ========== */
[data-bs-theme=dark] div.editor-datetime {
	background-color: #2b2d31 !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
	color: #e8eaed !important;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.55) !important;
	width: 300px;
	color-scheme: dark;
}
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-title {
	color: #f1f3f5 !important;
	padding: 8px 36px 6px !important;
	text-align: center;
	position: relative;
	z-index: 1;
}
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-iconLeft,
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-iconRight {
	z-index: 3;
	width: 28px;
	height: 28px;
}
/* Month/year: always show native selects (JS also strips the empty <span>) */
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-label {
	position: relative !important;
	display: inline-block !important;
	height: auto !important;
	min-width: 0 !important;
	margin: 0 2px !important;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	vertical-align: middle;
}
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-label > span {
	display: none !important;
}
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-label select,
[data-bs-theme=dark] div.editor-datetime select.editor-datetime-month,
[data-bs-theme=dark] div.editor-datetime select.editor-datetime-year {
	position: static !important;
	top: auto !important;
	left: auto !important;
	inset: auto !important;
	opacity: 1 !important;
	display: inline-block !important;
	visibility: visible !important;
	width: auto !important;
	min-width: 6.5rem !important;
	height: 2rem !important;
	margin: 0 2px !important;
	padding: 0.2rem 0.45rem !important;
	border: 1px solid rgba(255, 255, 255, 0.25) !important;
	border-radius: 0.25rem !important;
	background-color: #1e2024 !important;
	background-image: none !important;
	color: #ffffff !important;
	font-size: 0.875rem !important;
	font-weight: 600 !important;
	line-height: 1.2 !important;
	-webkit-appearance: menulist !important;
	appearance: menulist !important;
	cursor: pointer !important;
	z-index: 5 !important;
	color-scheme: dark;
}
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-label select option,
[data-bs-theme=dark] div.editor-datetime select.editor-datetime-month option,
[data-bs-theme=dark] div.editor-datetime select.editor-datetime-year option {
	background-color: #1e2024 !important;
	color: #ffffff !important;
}

/* Native HTML5 date inputs inside Editor modals */
[data-bs-theme=dark] .DTE input[type="date"],
[data-bs-theme=dark] .DTED input[type="date"] {
	color-scheme: dark;
	min-height: 2.25rem;
}
[data-bs-theme=dark] div.editor-datetime table th {
	color: #adb5bd !important;
}
[data-bs-theme=dark] div.editor-datetime table td {
	color: #e8eaed !important;
}
[data-bs-theme=dark] div.editor-datetime table td.selectable {
	background: rgba(255, 255, 255, 0.04) !important;
}
[data-bs-theme=dark] div.editor-datetime table td.selectable.disabled,
[data-bs-theme=dark] div.editor-datetime table td.selectable.disabled button:hover {
	color: #6c757d !important;
	background: transparent !important;
}
[data-bs-theme=dark] div.editor-datetime table td.selectable.now {
	background-color: rgba(240, 61, 30, 0.18) !important;
}
[data-bs-theme=dark] div.editor-datetime table td.selectable.selected button {
	background: #F03D1E !important;
	color: #fff !important;
}
[data-bs-theme=dark] div.editor-datetime table td.selectable button:hover {
	background: #c43218 !important;
	color: #fff !important;
}
[data-bs-theme=dark] div.editor-datetime table button {
	color: inherit !important;
}
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-iconLeft,
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-iconRight,
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-iconUp,
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-iconDown {
	filter: invert(1) brightness(1.4);
}
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-iconLeft:hover,
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-iconRight:hover,
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-iconUp:hover,
[data-bs-theme=dark] div.editor-datetime div.editor-datetime-iconDown:hover {
	background-color: rgba(255, 255, 255, 0.08);
}

/* ========== daterangepicker ========== */
[data-bs-theme=dark] .daterangepicker {
	background-color: #2b2d31 !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
	color: #e8eaed !important;
}
[data-bs-theme=dark] .daterangepicker:after {
	border-bottom-color: #2b2d31;
}
[data-bs-theme=dark] .daterangepicker.drop-up:after {
	border-top-color: #2b2d31;
}
[data-bs-theme=dark] .daterangepicker .calendar-table {
	background-color: #2b2d31 !important;
	border-color: #2b2d31 !important;
}
[data-bs-theme=dark] .daterangepicker .calendar-table th,
[data-bs-theme=dark] .daterangepicker .calendar-table td {
	color: #e8eaed;
}
[data-bs-theme=dark] .daterangepicker th.month {
	color: #f1f3f5 !important;
}
[data-bs-theme=dark] .daterangepicker select.monthselect,
[data-bs-theme=dark] .daterangepicker select.yearselect,
[data-bs-theme=dark] .daterangepicker select.hourselect,
[data-bs-theme=dark] .daterangepicker select.minuteselect,
[data-bs-theme=dark] .daterangepicker select.secondselect,
[data-bs-theme=dark] .daterangepicker select.ampmselect {
	background-color: #1e2024 !important;
	border: 1px solid rgba(255, 255, 255, 0.15) !important;
	color: #f1f3f5 !important;
}
[data-bs-theme=dark] .daterangepicker .calendar-table .next span,
[data-bs-theme=dark] .daterangepicker .calendar-table .prev span {
	border-color: #e8eaed;
}
[data-bs-theme=dark] .daterangepicker td.available:hover,
[data-bs-theme=dark] .daterangepicker th.available:hover {
	background-color: rgba(255, 255, 255, 0.08) !important;
	color: #fff !important;
}
[data-bs-theme=dark] .daterangepicker td.off,
[data-bs-theme=dark] .daterangepicker td.off.in-range,
[data-bs-theme=dark] .daterangepicker td.off.start-date,
[data-bs-theme=dark] .daterangepicker td.off.end-date {
	background-color: transparent !important;
	color: #6c757d !important;
}
[data-bs-theme=dark] .daterangepicker td.in-range {
	background-color: rgba(240, 61, 30, 0.18) !important;
	color: #e8eaed !important;
}
[data-bs-theme=dark] .daterangepicker td.active,
[data-bs-theme=dark] .daterangepicker td.active:hover {
	background-color: #F03D1E !important;
	color: #fff !important;
}
[data-bs-theme=dark] .daterangepicker .drp-buttons {
	border-top-color: rgba(255, 255, 255, 0.12) !important;
}
[data-bs-theme=dark] .daterangepicker .drp-selected {
	color: #adb5bd !important;
}
[data-bs-theme=dark] .daterangepicker .ranges li {
	color: #e8eaed;
}
[data-bs-theme=dark] .daterangepicker .ranges li:hover {
	background-color: rgba(255, 255, 255, 0.08);
}
[data-bs-theme=dark] .daterangepicker .ranges li.active {
	background-color: #F03D1E !important;
	color: #fff !important;
}
[data-bs-theme=dark] .daterangepicker .drp-buttons .btn {
	border-color: rgba(255, 255, 255, 0.2);
}
[data-bs-theme=dark] .daterangepicker .drp-buttons .applyBtn {
	background-color: #F03D1E !important;
	border-color: #F03D1E !important;
	color: #fff !important;
}

/* ========== bootstrap-datepicker ========== */
[data-bs-theme=dark] .datepicker,
[data-bs-theme=dark] .datepicker-dropdown,
[data-bs-theme=dark] .datepicker.datepicker-inline {
	background-color: #2b2d31 !important;
	border-color: rgba(255, 255, 255, 0.15) !important;
	color: #e8eaed !important;
}
[data-bs-theme=dark] .datepicker-dropdown:after {
	border-bottom-color: #2b2d31;
}
[data-bs-theme=dark] .datepicker-dropdown.datepicker-orient-top:after {
	border-top-color: #2b2d31;
}
[data-bs-theme=dark] .datepicker table tr td,
[data-bs-theme=dark] .datepicker table tr th {
	color: #e8eaed;
}
[data-bs-theme=dark] .datepicker .datepicker-switch,
[data-bs-theme=dark] .datepicker .prev,
[data-bs-theme=dark] .datepicker .next,
[data-bs-theme=dark] .datepicker tfoot tr th {
	color: #f1f3f5 !important;
}
[data-bs-theme=dark] .datepicker table tr td.day:hover,
[data-bs-theme=dark] .datepicker table tr td.focused,
[data-bs-theme=dark] .datepicker .datepicker-switch:hover,
[data-bs-theme=dark] .datepicker .prev:hover,
[data-bs-theme=dark] .datepicker .next:hover,
[data-bs-theme=dark] .datepicker tfoot tr th:hover {
	background-color: rgba(255, 255, 255, 0.08) !important;
	color: #fff !important;
}
[data-bs-theme=dark] .datepicker table tr td.old,
[data-bs-theme=dark] .datepicker table tr td.new {
	color: #6c757d !important;
}
[data-bs-theme=dark] .datepicker table tr td.active,
[data-bs-theme=dark] .datepicker table tr td.active:hover,
[data-bs-theme=dark] .datepicker table tr td.active.disabled,
[data-bs-theme=dark] .datepicker table tr td.active.disabled:hover,
[data-bs-theme=dark] .datepicker table tr td span.active,
[data-bs-theme=dark] .datepicker table tr td span.active:hover {
	background-image: none !important;
	background-color: #F03D1E !important;
	color: #fff !important;
}
[data-bs-theme=dark] .datepicker table tr td.today,
[data-bs-theme=dark] .datepicker table tr td.today:hover {
	background-image: none !important;
	background-color: rgba(240, 61, 30, 0.22) !important;
	color: #e8eaed !important;
}
[data-bs-theme=dark] .datepicker table tr td.range {
	background-color: rgba(240, 61, 30, 0.14) !important;
	color: #e8eaed !important;
}
[data-bs-theme=dark] .datepicker table tr td span:hover {
	background-color: rgba(255, 255, 255, 0.08) !important;
}
