/******************************************************************************
 *
 * Date / Time Picker
 *
 * Shared date and time picker component used throughout CRDM.
 *
 ******************************************************************************/

.datePicker {
	display: flex !important;
	align-items: center;
	gap: 0.2rem;
}

.datePicker input {
	width: 10ch;     			/* ≈80px – better than fixed px */
	min-width: 80px; 			/* prevent becoming too tiny */
}

/* Mobile / narrow screen adjustments */
@media (max-width: 810px) {
	.datePicker input {
		width: 100%;
	}
}

/* ====================== JQUERY UI DATEPICKER ====================== */

/* Main Container */
.ui-datepicker:not(.ui-timepicker-div) {
	background: #fff;
	border: none;
	border-radius: 4px;
	box-shadow: 0 3px 10px rgba(0,0,0,0.1);
	font-family: inherit;
	padding: 10px;
	width: 250px !important;
	z-index: 9999 !important;
}

/* Header */
.ui-datepicker .ui-widget-header {
	border:none;
}

.ui-datepicker-header {
	background: #fff;
	border-bottom: 1px solid #e5e5e5;
	position: relative;
}

/* Month/Year Title */
.ui-datepicker .ui-datepicker-title {
	font-weight: 600;
	color: #111827;
	font-size: 15px;
}

/* Navigation Arrows */
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
	position: absolute;
	top: 45% !important;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	color: rgba(0,0,0,0.9);
}

.ui-datepicker .ui-datepicker-prev { left: 8px; }
.ui-datepicker .ui-datepicker-next { right: 8px; }

/* Hide default jQuery UI icons */
.ui-datepicker .ui-datepicker-prev span.ui-icon,
.ui-datepicker .ui-datepicker-next span.ui-icon {
	display: none;
}

/* Custom chevrons */
.ui-datepicker .ui-datepicker-prev::before {
	content: '‹';
	font-size: 30px;
	line-height: 1;
	font-weight: 300;
}

.ui-datepicker .ui-datepicker-next::after {
	content: '›';
	font-size: 30px;
	line-height: 1;
	font-weight: 300;
}

/* Hover effect */
.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
	color: #f64747;
	background: transparent !important;
	border: none;
}

/* Day Headers */
.ui-datepicker th {
	font-family: Arial, Verdana, sans-serif;
	background: inherit;
	font-weight: 400;
}

.ui-datepicker th span {
	color: #333;
	font-size: 13px;
}

/* Day Cells */
.ui-datepicker td .ui-state-default,
.ui-datepicker .ui-datepicker-calendar .ui-state-default {
	background: transparent;
	border: none;
	text-align: center;
	color: #333;
	border-radius: 4px;
}

/* Hover State */
.ui-datepicker td .ui-state-hover {
	background: #e6e6e6 !important;
}

/* Selected State */
.ui-datepicker td .ui-state-active,
.ui-datepicker .ui-datepicker-calendar .ui-state-active {
	background: #569ff7 !important;
	color: #fff !important;
}

/* Month & Year selects */
.ui-datepicker select.ui-datepicker-month,
.ui-datepicker select.ui-datepicker-year {
	width: 45%;
	border: none;
	background: inherit;
	text-align: center;
}

/* ====================== TIMEPICKER - Flatpickr-like Style ====================== */

.ui-timepicker-div {
	background: #ffffff;
	border-top: 1px solid #e5e5e5;
	padding: 0px 6px 1px;
	border-radius: 0 0 6px 6px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	font-family: inherit;
}


.ui-timepicker-div .ui-datepicker-title {
	color: #475569;
}

/* Title / Current Time */
.ui_tpicker_time_label {
	font-size: 13px;
	color: #64748b;
	margin-bottom: 4px;
}

.ui_tpicker_time {
	font-size: 16px;
	font-weight: 600;
	color: #475569;
	/*
	text-align: center;
	*/
	margin-bottom: 12px;
	letter-spacing: 0.5px;
}

/* Labels (Hour, Minute, etc.) */
.ui-timepicker-div dt {
	font-size: 13px;
	font-weight: 500;
	color: #475569;
	margin: 12px 0 6px 0;
}

/* Sliders - Modern Flatpickr-style */
.ui-timepicker-div .ui-slider {
	height: 6px;
	background: #e2e8f0;
	border-radius: 9999px;
	margin: 8px 4px 16px;
}

.ui-timepicker-div .ui-slider .ui-slider-handle {
	width: 14px;
	height: 20px;
	background: #3b82f6;
	border: 1px solid #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
	top: -9px;
	border-radius: 4px;
	cursor: pointer;
}

.ui-timepicker-div .ui-slider .ui-slider-handle:hover {
	background: #2563eb;
	box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

/* Grid labels (if using step grids) */
.ui-tpicker-grid-label td {
	font-size: 12px;
	color: #64748b;
	padding: 4px 2px;
}

/* Select dropdowns (for timezone or when using select controlType) */
.ui-timepicker-div select {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #fff;
	font-size: 14px;
	color: #1e2937;
}

.ui-timepicker-div select:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Overall container adjustments */
.ui-timepicker-div dl {
	margin: 0;
}

.ui-timepicker-div dd {
	margin: 0 0 14px 0;
}

/* If using controlType: 'select' instead of sliders */
.ui-timepicker-select {
	padding: 6px 10px;
	border-radius: 6px;
}

.ui-timepicker-div .ui-datepicker .ui-datepicker-title {
	font-size: 16px;
}

.ui-timepicker-div .ui-widget-header {
	border-bottom: 1px solid #aaa;
	border-radius: 0px;
	background: none;
}


.calIcon {
	width:24px;
	height:24px;
	background:#fff;
	/*
	border:1px solid #777;
	*/
	border-radius:3px;
	overflow:hidden;
	font-family:Arial,sans-serif;
	position:relative;
	box-shadow:0 1px 2px #0003;
	flex-shrink: 0;
	cursor: pointer;
}

.calIconMonth{
	height: 9px;
	background: #1e88e5;
	color: white;
	font-size: 7px;
	font-weight: bold;
	text-align: center;
	line-height: 9px;
}
.calIconDay {
	position:absolute;
	inset:8px 0 0 0;
	display:flex;
	align-items:center;
	justify-content:center;
	font-size:12px;
	font-weight:bold;
	color:#000;
}

.date-with-icon {
	display: flex;
	gap: 5px;
}

.clockIcon {
	width: 24px;
	height: 24px;
	background: transparent;
	border-radius: 4px;
	overflow: hidden;
	font-family: Arial, sans-serif;
	position: relative;
	box-shadow: 0 1px 3px rgba(0,0,0,0.3);
	flex-shrink: 0;
	cursor: pointer;
	/*
	border: 1px solid #ddd;
	transition: all 0.3s ease;
	*/
}

/* Analog mode styles */
.clockFace {
	position: absolute;
	inset: 0px;
	background: radial-gradient(circle at center,
				#f8fbff 0%,
				#e6f0ff 40%,
				#d0e0ff 70%,
				#b8d0f5 100%);
	border-radius: 50%;
	border: 1px solid #555555;
	box-shadow: inset 0 0 3px rgba(255,255,255,0.8),
				inset 0 1px 2px rgba(0,0,0,0.15);
}

/* Tiny numbers (12, 3, 6, 9) */
.clockNumber {
	position: absolute;
	font-family: Arial, sans-serif;
	font-size: 4.5px;
	font-weight: bold;
	color: #222222;
	text-shadow: 0 0 1px rgba(255,255,255,0.8);
	user-select: none;
	pointer-events: none;
}

#num12 { bottom: 4px;  left: 50%; transform: translateX(-50%); }
#num3  { top: 50%; right: 3px; transform: translateY(-50%); }
#num6  { top: 4px; left: 50%; transform: translateX(-50%); }
#num9  { top: 50%; left: 3px;  transform: translateY(-50%); }

.clockHand {
	position: absolute;
	left: 50%;
	top: 50%;
	transform-origin: 50% 100%;
	background: #1c1c1c;
	border-radius: 1px;
	box-shadow: 0 1px 1px rgba(0,0,0,0.4);
}

.clockHour {
	width: 1.5px;
	height: 6px;
	margin-left: -1.1px;
	margin-top: -6px;
}

.clockMinute {
	width: 1px;
	height: 9px;
	margin-left: -0.7px;
	margin-top: -9px;
}

.clockCenter {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 2px;
	height: 2px;
	background: #C00;
	border-radius: 50%;
	transform: translate(-50%, -50%);
	z-index: 10;
	box-shadow: 0 0 1px rgba(0,0,0,0.6);
}

/* Digital mode styles */
.clockDigital {
	position: absolute;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	font-size: 8.5px;
	font-weight: bold;
	color: #222;
	letter-spacing: -0.5px;
	background: #fff;
}

/* Mode switch helper */
.clockIcon.digital .clockFace,
.clockIcon.digital .clockNumber,
.clockIcon.digital .clockHand,
.clockIcon.digital .clockCenter {
	display: none;
}

.clockIcon.digital .clockDigital {
	display: flex;
}