config-central/configs/ontime/override.css

100 lines
2.5 KiB
CSS

/* Ontime event timer. Keep changes scoped to this view. */
.stage-timer {
--cc-timer-size: min(8.4vw, 18.2vh);
--cc-clock-size: min(5vw, 10vh);
--cc-blink-red: #b00020;
--cc-blink-period: 3s;
padding: min(2vh, 16px) clamp(14px, 2vw, 32px);
}
.stage-timer .timer-container {
display: flex;
flex-direction: column;
justify-content: flex-end !important;
}
/* Override both the countdown and FitText's inline message font size. */
.stage-timer .timer,
.stage-timer .secondary,
.stage-timer .secondary > div,
.stage-timer .end-message,
.stage-timer .message {
font-size: var(--cc-timer-size) !important;
line-height: 1.05;
}
.stage-timer .secondary {
white-space: normal;
overflow-wrap: anywhere;
flex-shrink: 0;
margin-top: 0.15em;
padding-block: 0.1em;
border-top: 0;
}
/* The fullscreen message uses a grid that Ontime centers by default. */
.stage-timer .message {
place-content: end center !important;
overflow-wrap: anywhere;
}
.stage-timer .message-overlay {
padding-bottom: min(2vh, 16px);
}
.stage-timer .clock {
font-size: var(--cc-clock-size) !important;
}
/* Hide only clock seconds (including their colon), keeping AM/PM. */
.stage-timer .clock .subscript,
.stage-timer .secondary--hidden,
.stage-timer .event,
.stage-timer .clock-container > .label,
.stage-timer .progress-container {
display: none !important;
}
.stage-timer .clock,
.stage-timer .secondary {
color: white !important;
}
/* Ontime's blink normally animates text/container opacity. */
.stage-timer .timer-container.blink,
.stage-timer .message.blink {
animation: none !important;
opacity: 1 !important;
}
/* Flash the whole view, including the opaque fullscreen-message overlay.
Blackout remains above both and retains its normal behavior. */
.stage-timer:has(.blink),
.stage-timer .message-overlay--active:has(.message.blink) {
animation: cc-ontime-background-blink var(--cc-blink-period) ease-in-out infinite !important;
}
.stage-timer:has(.blink) .timer,
.stage-timer:has(.blink) .end-message,
.stage-timer:has(.blink) .message {
color: white !important;
}
@keyframes cc-ontime-background-blink {
0%, 100% {
background-color: var(--timer-bg, var(--background-color-override, #000));
}
50% {
background-color: var(--cc-blink-red);
}
}
/* Respect viewers who have requested reduced motion: a steady red alert. */
@media (prefers-reduced-motion: reduce) {
.stage-timer:has(.blink),
.stage-timer .message-overlay--active:has(.message.blink) {
animation: none !important;
background-color: var(--cc-blink-red) !important;
}
}