/* mahaTimePicker (js/mahaTimePicker.js) — loaded by the web layouts (tiles admin / mahaAdmin / empty head.jsp).
   Three wheels (morning / afternoon · hour · minute) in a card under the field; the same white card and teal as
   mahaPeriodPicker (.maha-pick). --maha-tp-row and --maha-tp-shown are set by the script. */

/* a field keeps its own look; it only says it opens something */
.maha-tp-select { cursor:pointer; }
.maha-tp-select.is-locked { cursor:default; }

/* the time field of the web where a screen has no look of its own (generateTimeOptions* make it): the size and border of
   the SumoSelect box it replaces, a clock instead of the arrow */
select.maha-tp-field, input.maha-tp-field { -webkit-appearance:none; appearance:none; width:120px; height:32px; box-sizing:border-box; margin:0;
	padding:0 28px 0 10px; border:1px solid #e0e0e0; border-radius:4px; font:inherit; font-size:12px; color:#555; vertical-align:middle;
	background:#fff url("../images/ic_time.svg") no-repeat right 9px center / 14px 14px;   /* the clock of the site's time fields */
	transition:border-color .12s; }
select.maha-tp-field:hover:not(:disabled), input.maha-tp-field:hover:not(:disabled) { border-color:#b9d9d7; }
select.maha-tp-field[aria-expanded="true"], input.maha-tp-field[aria-expanded="true"] { border-color:#339697; }
select.maha-tp-field:disabled, input.maha-tp-field:disabled, .maha-tp-field.is-locked { background-color:#f6f8f9; color:#8a94a0; }
/* an hour or a minute alone (enhanceHM) */
select.maha-tp-field.is-hm { width:64px; padding-right:24px !important; background-position:right 7px center; }
/* a screen that pads its selects (e.g. #mtVisitWrap .vr-custom-fields select) must not run the time into the clock */
select.maha-tp-field:not(.is-hm), input.maha-tp-field { padding-right:28px !important; }

/* above the side panels and their dims (9998), like the period picker */
.maha-tp { position:absolute; z-index:10010; width:256px; box-sizing:border-box; padding:12px 12px 10px; background:#fff; border:1px solid #e3e7ec;
	border-radius:14px; box-shadow:0 14px 34px rgba(30,40,50,.16), 0 2px 6px rgba(30,40,50,.06); color:#2b3038; font-size:13px; line-height:1.4;
	animation:mahaTpIn .16s cubic-bezier(.2,.7,.2,1) both; transform-origin:28px 0; user-select:none; }
.maha-tp.is-above { transform-origin:28px 100%; animation-name:mahaTpInAbove; }
.maha-tp-h { margin:0 2px 8px; font-size:12px; font-weight:800; color:#5c6670; }

/* the drum: rows fade out towards the top and the bottom */
.maha-tp-wheels { position:relative; display:flex; align-items:stretch; height:calc(var(--maha-tp-row, 36px) * var(--maha-tp-shown, 5));
	-webkit-mask-image:linear-gradient(to bottom, transparent 0, #000 32%, #000 68%, transparent 100%);
	mask-image:linear-gradient(to bottom, transparent 0, #000 32%, #000 68%, transparent 100%); }
/* the pick: a soft teal band across the three wheels */
.maha-tp-band { position:absolute; left:0; right:0; top:calc(var(--maha-tp-row, 36px) * (var(--maha-tp-shown, 5) - 1) / 2); height:var(--maha-tp-row, 36px);
	border-radius:10px; background:#e9f6f5; box-shadow:inset 0 0 0 1px #cfe9e7; pointer-events:none; }
.maha-tp-col { position:relative; z-index:1; flex:1 1 0; min-width:0; height:100%; overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain;
	scrollbar-width:none; perspective:260px; outline:0; border-radius:10px; cursor:grab; }
.maha-tp-col::-webkit-scrollbar { display:none; }
.maha-tp-col:active { cursor:grabbing; }
.maha-tp-col.is-ap { flex:0 0 68px; }
.maha-tp-col:focus-visible { box-shadow:inset 0 0 0 2px #339697; }
.maha-tp-sp { height:calc(var(--maha-tp-row, 36px) * (var(--maha-tp-shown, 5) - 1) / 2); }
.maha-tp-i { height:var(--maha-tp-row, 36px); line-height:var(--maha-tp-row, 36px); text-align:center; font-size:15px; font-weight:600; color:#8a94a0;
	font-variant-numeric:tabular-nums; backface-visibility:hidden; transform-origin:50% 50%; will-change:transform, opacity; }
.maha-tp-col.is-ap .maha-tp-i { font-size:13.5px; }
.maha-tp-i.is-mid { color:#1f6e6d; font-weight:800; font-size:17px; }
.maha-tp-col.is-ap .maha-tp-i.is-mid { font-size:14.5px; }
/* makes no time that can be picked with the other wheels: it can be passed over, the wheel rolls on from it */
.maha-tp-i.is-off { color:#d5dbe1; }
.maha-tp-i.is-mid.is-off { color:#a9c9c8; }
.maha-tp-colon { position:relative; z-index:1; flex:0 0 8px; align-self:center; font-size:17px; font-weight:800; color:#1f6e6d; text-align:center; }

/* the time, how long it lasts (the end of a pair), OK */
.maha-tp-f { display:flex; align-items:center; gap:6px; margin-top:10px; padding-top:10px; border-top:1px solid #eef0f4; }
.maha-tp-v { font-size:13px; font-weight:800; color:#2b3038; font-variant-numeric:tabular-nums; white-space:nowrap; }
.maha-tp-d:not(:empty) { padding:0 7px; border-radius:999px; background:#e3f2f1; color:#22706f; font-size:11px; font-weight:800; line-height:18px; white-space:nowrap; }
.maha-tp-ok { flex:0 0 auto; margin-left:auto; height:28px; padding:0 14px; border:1px solid #339697; border-radius:8px; background:#339697;
	font:inherit; font-size:12px; font-weight:700; color:#fff; cursor:pointer; transition:background .12s; }
.maha-tp-ok:hover { background:#2b8283; }
.maha-tp-ok:focus-visible { outline:2px solid #339697; outline-offset:2px; }

@keyframes mahaTpIn { from { opacity:0; transform:translateY(-4px) scale(.98); } to { opacity:1; transform:none; } }
@keyframes mahaTpInAbove { from { opacity:0; transform:translateY(4px) scale(.98); } to { opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce) {
	.maha-tp { animation:none !important; }
	.maha-tp-i { transform:none !important; }
}
