/* The RallyTrain time picker (assets/js/time-picker.js): the box, then the panel. */

/* The box reads as a picker: a clock on the right, a pointer over it. */
input[data-rt-time] {
	cursor: pointer;
	padding-right: 2.3rem !important;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='9'/><polyline points='12 7 12 12 15.5 14'/></svg>") !important;
	background-repeat: no-repeat !important;
	background-position: right 0.7rem center !important;
	background-size: 1.1rem !important;
}

/* A box the picker could not read (the Board Portal styles the label too). */
input[data-rt-time].rt-time-bad {
	border-color: #b3141c !important;
}

.rt-time-msg {
	display: block;
	margin-top: 0.3rem;
	color: #b3141c;
	font-weight: 700;
}

.rt-timepick[hidden],
.rt-timepick-shade[hidden] {
	display: none;
}

.rt-timepick {
	position: absolute;
	z-index: 100000;
	box-sizing: border-box;
	width: 20rem;
	max-width: calc(100vw - 16px);
	padding: 0.9rem;
	background: #fff;
	color: var(--rt-ink, #1c1c1c);
	border: 1px solid var(--rt-line, #cbd5e1);
	border-radius: 0.9rem;
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.22);
	font-size: 1rem;
	line-height: 1.2;
	text-align: left;
}

.rt-timepick-top {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.6rem;
	padding-bottom: 0.6rem;
	border-bottom: 1px solid var(--rt-line, #e2e8f0);
}

.rt-timepick-for {
	font-size: 0.85rem;
	font-weight: 700;
	color: #475569;
}

.rt-timepick-read {
	font-size: 1.45rem;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.rt-timepick-label {
	margin: 0.7rem 0 0.3rem;
	font-size: 0.78rem;
	font-weight: 700;
	color: #475569;
}

.rt-timepick-grid {
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 0.3rem;
}

.rt-timepick-ap {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.3rem;
	margin-top: 0.8rem;
}

/* Every button is spelled out: the theme's own button styles stay out. */
.rt-timepick button {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	width: auto;
	min-width: 0;
	min-height: 2.5rem;
	margin: 0;
	padding: 0 0.2rem;
	background: #fff;
	color: var(--rt-ink, #1c1c1c);
	border: 1px solid var(--rt-line, #cbd5e1);
	border-radius: 0.55rem;
	box-shadow: none;
	font: inherit;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1;
	cursor: pointer;
	transition: none;
}

.rt-timepick button:hover {
	background: #f1f5f9;
	color: var(--rt-ink, #1c1c1c);
}

.rt-timepick button:focus-visible {
	outline: 3px solid var(--rt-primary-bright, #2563eb);
	outline-offset: 1px;
}

.rt-timepick button.is-on,
.rt-timepick button.is-on:hover {
	background: var(--rt-primary, #1f3b73);
	color: var(--rt-on-primary, #fff);
	border-color: var(--rt-primary, #1f3b73);
}

.rt-timepick-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	margin-top: 0.9rem;
}

.rt-timepick .rt-timepick-clear {
	padding: 0 0.9rem;
	border-color: transparent;
	color: #475569;
}

.rt-timepick .rt-timepick-done,
.rt-timepick .rt-timepick-done:hover {
	padding: 0 1.6rem;
	background: var(--rt-primary, #1f3b73);
	color: var(--rt-on-primary, #fff);
	border-color: var(--rt-primary, #1f3b73);
}

/* On a phone it is a sheet from the bottom, with thumb-sized buttons. */
.rt-timepick-shade {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(15, 23, 42, 0.45);
}

.rt-timepick--sheet {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	top: auto;
	width: auto;
	max-width: none;
	padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px));
	border-width: 0;
	border-radius: 1rem 1rem 0 0;
}

.rt-timepick--sheet button {
	min-height: 2.9rem;
	font-size: 1.05rem;
}
