Files
SignageHTML/public/css/components.css
kyle 1fdb3e48c7 Items 10-15: ES modules, inline style cleanup, template modal, code modernization
- Item 10: Convert to ES modules with import/export, single module entry point
- Item 11: Replace inline styles with CSS classes (background overlay, card
  animations, highlight effect, config modal form elements)
- Item 12: Move ConfigManager modal HTML from JS template literal to
  <template> element in index.html
- Item 13: Replace deprecated url.parse() with new URL() in server.js
  and update route handlers to use searchParams
- Item 14: Replace JSON.parse/stringify deep clone with structuredClone()
- Item 15: Remove dead JSON-fixing regex code from departures.js route

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:30:03 +01:00

1313 lines
27 KiB
CSS

/* Clock styles - Modern entryway kiosk design with blue glow - Ribbon banner */
.clock-container {
background: linear-gradient(135deg, #003366 0%, #004080 50%, #0059b3 100%);
color: var(--color-surface);
padding: 8px 20px;
border-radius: 8px;
margin-bottom: 8px;
text-align: center;
box-shadow: 0 0 20px rgba(0, 89, 179, 0.6),
0 0 40px rgba(0, 89, 179, 0.4),
0 4px 12px rgba(0, 0, 0, 0.15),
inset 0 1px 0 rgba(255, 255, 255, 0.3);
position: relative;
overflow: hidden;
backdrop-filter: blur(10px);
transition: box-shadow 0.3s ease;
border: 2px solid rgba(255, 255, 255, 0.2);
display: flex;
align-items: center;
justify-content: center;
gap: 15px;
}
.clock-container::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.05) 50%, rgba(255, 255, 255, 0.1) 100%);
pointer-events: none;
}
.clock-container:hover {
box-shadow: 0 0 30px rgba(0, 89, 179, 0.8),
0 0 60px rgba(0, 89, 179, 0.5),
0 4px 12px rgba(0, 0, 0, 0.15),
inset 0 1px 0 rgba(255, 255, 255, 0.3);
}
body.dark-mode .clock-container {
background: linear-gradient(135deg, #001a33 0%, #002d5c 50%, #004080 100%);
box-shadow: 0 0 25px rgba(0, 89, 179, 0.7),
0 0 50px rgba(0, 89, 179, 0.4),
0 4px 12px rgba(0, 0, 0, 0.3),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
body.dark-mode .clock-container:hover {
box-shadow: 0 0 35px rgba(0, 89, 179, 0.9),
0 0 70px rgba(0, 89, 179, 0.6),
0 4px 12px rgba(0, 0, 0, 0.3),
inset 0 1px 0 rgba(255, 255, 255, 0.2);
}
/* Configuration button styles */
.config-button {
position: fixed;
bottom: 20px;
right: 20px;
width: 40px;
height: 40px;
background-color: rgba(0, 97, 161, 0.3);
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
z-index: 100;
transition: transform 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
opacity: 0.5;
}
.config-button:hover {
transform: rotate(30deg);
background-color: var(--color-primary);
opacity: 1;
}
.config-button svg {
transition: opacity 0.3s ease;
opacity: 0.7;
}
.config-button:hover svg {
opacity: 1;
}
/* Configuration modal styles */
.config-modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.5);
z-index: 200;
justify-content: center;
align-items: center;
}
.config-modal-content {
background-color: var(--color-surface);
border-radius: 8px;
width: 90%;
max-width: 600px;
max-height: 90vh;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
overflow: hidden;
display: flex;
flex-direction: column;
}
body.dark-mode .config-modal-content {
background-color: var(--color-surface-dark);
}
.config-modal-header {
background-color: var(--color-primary);
color: var(--color-surface);
padding: 15px 20px;
display: flex;
justify-content: space-between;
align-items: center;
flex-shrink: 0;
}
.config-modal-header h2 {
margin: 0;
font-size: 1.5em;
}
.config-modal-close {
font-size: 1.8em;
cursor: pointer;
line-height: 1;
}
.config-modal-close:hover {
opacity: 0.8;
}
/* Tab navigation */
.config-tabs {
display: flex;
background-color: #f0f0f0;
border-bottom: 2px solid var(--color-border);
flex-shrink: 0;
}
body.dark-mode .config-tabs {
background-color: #444;
border-bottom-color: var(--color-border-dark);
}
.config-tab {
flex: 1;
padding: 12px 20px;
background-color: transparent;
border: none;
border-bottom: 3px solid transparent;
cursor: pointer;
font-size: 0.95em;
font-weight: 500;
color: var(--color-text-muted);
transition: background-color 0.2s ease, color 0.2s ease, border-bottom-color 0.2s ease;
}
body.dark-mode .config-tab {
color: var(--color-text-muted-dark);
}
.config-tab:hover {
background-color: #e0e0e0;
color: var(--color-text);
}
body.dark-mode .config-tab:hover {
background-color: var(--color-border-dark);
color: var(--color-text-light);
}
.config-tab.active {
background-color: var(--color-surface);
color: var(--color-primary);
border-bottom-color: var(--color-primary);
font-weight: 600;
}
body.dark-mode .config-tab.active {
background-color: var(--color-surface-dark);
color: var(--color-accent);
border-bottom-color: var(--color-accent);
}
.config-modal-body {
padding: 20px;
overflow-y: auto;
flex: 1;
min-height: 0;
max-height: calc(90vh - 200px);
}
/* Custom scrollbar for modal body */
.config-modal-body::-webkit-scrollbar {
width: 8px;
}
.config-modal-body::-webkit-scrollbar-track {
background: #f1f1f1;
border-radius: 4px;
}
.config-modal-body::-webkit-scrollbar-thumb {
background: #888;
border-radius: 4px;
}
.config-modal-body::-webkit-scrollbar-thumb:hover {
background: var(--color-border-dark);
}
body.dark-mode .config-modal-body::-webkit-scrollbar-track {
background: #444;
}
body.dark-mode .config-modal-body::-webkit-scrollbar-thumb {
background: var(--color-text-muted);
}
body.dark-mode .config-modal-body::-webkit-scrollbar-thumb:hover {
background: #888;
}
.config-tab-content {
display: none;
}
.config-tab-content.active {
display: block;
}
.config-option {
margin-bottom: 15px;
}
.config-option label {
display: block;
margin-bottom: 5px;
font-weight: bold;
}
.config-option select,
.config-option input[type="text"] {
width: 100%;
padding: 8px;
border: 1px solid var(--color-border);
border-radius: 4px;
font-size: 1em;
box-sizing: border-box;
}
body.dark-mode .config-option select,
body.dark-mode .config-option input[type="text"] {
background-color: #444;
color: var(--color-text-light);
border-color: var(--color-border-dark);
}
.config-option input[type="range"] {
width: 100%;
}
.config-option button {
padding: 5px 10px;
border: 1px solid var(--color-border);
border-radius: 4px;
background-color: var(--color-bg);
cursor: pointer;
font-size: 0.9em;
}
body.dark-mode .config-option button {
background-color: var(--color-border-dark);
color: var(--color-text-light);
border-color: var(--color-text-muted);
}
.config-option button:hover {
background-color: #e0e0e0;
}
body.dark-mode .config-option button:hover {
background-color: var(--color-text-muted);
}
/* Site search styles */
#site-search-results {
border: 1px solid var(--color-border);
border-radius: 4px;
background: var(--color-surface);
margin-top: 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
body.dark-mode #site-search-results {
background-color: #444;
border-color: var(--color-border-dark);
}
.site-search-result {
padding: 10px;
border-bottom: 1px solid #eee;
cursor: pointer;
transition: background-color 0.2s;
}
.site-search-result:last-child {
border-bottom: none;
}
.site-search-result:hover {
background-color: var(--color-bg);
}
body.dark-mode .site-search-result {
border-bottom-color: var(--color-border-dark);
}
body.dark-mode .site-search-result:hover {
background-color: var(--color-border-dark);
}
.site-search-result div:first-child {
font-weight: bold;
color: var(--color-primary);
margin-bottom: 4px;
}
body.dark-mode .site-search-result div:first-child {
color: var(--color-accent);
}
.site-search-result div:last-child {
font-size: 0.85em;
color: var(--color-text-muted);
}
body.dark-mode .site-search-result div:last-child {
color: var(--color-text-muted-dark);
}
#search-site-button {
background-color: var(--color-primary);
color: var(--color-surface);
border: none;
border-radius: 4px;
cursor: pointer;
font-weight: 500;
transition: background-color 0.2s;
}
#search-site-button:hover {
background-color: var(--color-primary-dark);
}
body.dark-mode #search-site-button {
background-color: var(--color-accent);
color: var(--color-surface-dark);
}
body.dark-mode #search-site-button:hover {
background-color: #29b6f6;
}
/* Map selector button */
#select-from-map-button {
background-color: #28a745;
color: var(--color-surface);
border: none;
border-radius: 4px;
cursor: pointer;
font-weight: 500;
transition: background-color 0.2s;
}
#select-from-map-button:hover {
background-color: #218838;
}
body.dark-mode #select-from-map-button {
background-color: #34ce57;
color: var(--color-surface-dark);
}
body.dark-mode #select-from-map-button:hover {
background-color: #28a745;
}
/* Map selector modal styles */
#map-selector-modal .config-modal-content {
width: 90vw;
max-width: 1200px;
}
#map-container {
z-index: 1;
}
.map-modal-close {
font-size: 1.8em;
cursor: pointer;
line-height: 1;
color: var(--color-surface);
}
.map-modal-close:hover {
opacity: 0.8;
}
.config-modal-footer {
padding: 15px 20px;
background-color: var(--color-bg);
text-align: right;
border-top: 1px solid var(--color-border);
flex-shrink: 0;
}
body.dark-mode .config-modal-footer {
background-color: #444;
border-top-color: var(--color-border-dark);
}
.config-modal-footer button {
padding: 8px 15px;
margin-left: 10px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 1em;
}
#config-save-button {
background-color: var(--color-primary);
color: var(--color-surface);
}
#config-save-button:hover {
background-color: var(--color-primary-dark);
}
#config-cancel-button {
background-color: var(--color-border);
}
body.dark-mode #config-cancel-button {
background-color: var(--color-border-dark);
color: var(--color-text-light);
}
#config-cancel-button:hover {
background-color: #ccc;
}
body.dark-mode #config-cancel-button:hover {
background-color: var(--color-text-muted);
}
.clock-time {
font-size: 2.2em;
font-weight: 700;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
white-space: nowrap;
display: inline-block;
letter-spacing: 1px;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15),
0 1px 4px rgba(255, 255, 255, 0.3);
margin: 0;
position: relative;
z-index: 1;
line-height: 1;
color: #FFFFFF;
}
.clock-date {
font-size: 2.2em;
font-weight: 400;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
display: inline-block;
opacity: 0.98;
letter-spacing: 0.5px;
text-shadow: 0 1px 4px rgba(0, 0, 0, 0.15),
0 1px 2px rgba(255, 255, 255, 0.2);
text-transform: capitalize;
position: relative;
z-index: 1;
line-height: 1;
margin: 0;
color: #FFFFFF;
}
body.dark-mode .clock-time,
body.dark-mode .clock-date {
color: #E6F4FF;
text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3),
0 1px 4px rgba(0, 0, 0, 0.2);
}
/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
.clock-time {
font-size: 1.8em;
letter-spacing: 1px;
}
.clock-date {
font-size: 1.8em;
}
.clock-container {
padding: 6px 16px;
gap: 10px;
}
}
@media (max-width: 480px) {
.clock-time {
font-size: 1.5em;
}
.clock-date {
font-size: 1.5em;
}
.clock-container {
padding: 6px 12px;
gap: 8px;
}
}
h2 {
color: var(--color-primary);
text-align: center;
}
.status {
text-align: center;
margin-bottom: 20px;
font-style: italic;
display: none;
}
.departure-container {
display: grid;
grid-template-columns: 1fr;
gap: 12px;
margin-bottom: 20px;
}
/* Main content grid wrapper */
.main-content-grid {
display: block;
}
.departures-section {
width: 100%;
}
.weather-section {
width: 100%;
}
/* New card-based layout */
.departure-card {
background-color: var(--color-surface);
border-radius: 6px;
padding: 0;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
margin-bottom: 6px;
min-height: 75px;
display: flex;
overflow: hidden;
width: 100%;
box-sizing: border-box;
max-width: 100%;
}
body.dark-mode .departure-card {
background-color: var(--color-surface-dark);
}
/* Large line number box on the left */
.line-number-box {
background: var(--gradient-blue);
color: var(--color-surface);
min-width: 50px;
width: 50px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 4px;
border-radius: 4px 0 0 4px;
position: relative;
}
/* Transport mode icon */
.transport-mode-icon {
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 2px;
opacity: 0.95;
}
.transport-mode-icon .transport-icon {
width: 20px;
height: 20px;
fill: currentColor;
}
/* Large line number */
.line-number-large {
font-size: 1.6em;
font-weight: bold;
line-height: 1;
color: #fff;
}
/* Transport-specific colors - only metro has a different gradient */
.line-number-box.metro {
background: linear-gradient(135deg, #c41e3a 0%, #9a1629 100%);
}
.line-number-box.metro .line-number-large {
color: var(--color-surface);
}
/* Directions container on the right */
.directions-wrapper {
flex: 1;
display: flex;
flex-direction: column;
padding: 6px 10px;
gap: 5px;
min-width: 0;
overflow: hidden;
}
/* Single direction row */
.direction-row {
display: flex;
align-items: center;
justify-content: space-between;
flex: 1;
min-height: 36px;
gap: 8px;
min-width: 0;
}
/* Direction info (arrow + destination) */
.direction-info {
display: flex;
align-items: center;
gap: 6px;
flex: 1;
min-width: 0;
overflow: hidden;
}
/* Direction arrow indicator */
.direction-arrow-box {
width: 32px;
height: 32px;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.4em;
font-weight: bold;
flex-shrink: 0;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.direction-arrow-box.left {
background: repeating-linear-gradient(
45deg,
#fff5e6,
#fff5e6 4px,
#ffe6cc 4px,
#ffe6cc 8px
);
color: #ff6600;
border-color: #ff6600;
}
.direction-arrow-box.right {
background: repeating-linear-gradient(
45deg,
#e6f2ff,
#e6f2ff 4px,
#cce6ff 4px,
#cce6ff 8px
);
color: #0066cc;
border-color: #0066cc;
}
body.dark-mode .direction-arrow-box.left {
background: repeating-linear-gradient(
45deg,
#664422,
#664422 4px,
#553311 4px,
#553311 8px
);
color: #ff8800;
border-color: #ff8800;
}
body.dark-mode .direction-arrow-box.right {
background: repeating-linear-gradient(
45deg,
#223366,
#223366 4px,
#112255 4px,
#112255 8px
);
color: var(--color-accent);
border-color: var(--color-accent);
}
/* Destination text */
.direction-destination {
font-size: 1.0em;
font-weight: 600;
color: var(--color-text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
flex: 1;
min-width: 0;
}
body.dark-mode .direction-destination {
color: var(--color-text-light);
}
/* Times container */
.times-container {
display: flex;
flex-direction: column;
align-items: flex-end;
gap: 3px;
min-width: 110px;
flex-shrink: 0;
max-width: 110px;
}
/* Time display */
.time-display {
display: flex;
align-items: baseline;
gap: 4px;
white-space: nowrap;
font-size: 0.95em;
}
/* Pulse animation for urgent and now states */
@keyframes pulse-glow {
0%, 100% {
text-shadow: 0 0 8px currentColor, 0 0 12px currentColor, 0 0 16px currentColor;
}
50% {
text-shadow: 0 0 12px currentColor, 0 0 18px currentColor, 0 0 24px currentColor;
}
}
@keyframes pulse-scale {
0%, 100% {
transform: scale(1);
}
50% {
transform: scale(1.05);
}
}
.countdown-large {
font-size: 1.2em;
font-weight: bold;
color: var(--color-text);
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
white-space: nowrap;
}
.countdown-large.urgent {
color: var(--color-urgent);
animation: pulse-glow 2s ease-in-out infinite, pulse-scale 2s ease-in-out infinite;
text-shadow: 0 0 8px #c41e3a, 0 0 12px #c41e3a, 0 0 16px rgba(196, 30, 58, 0.9);
}
.countdown-large.now {
color: var(--color-now);
animation: pulse-glow 2s ease-in-out infinite, pulse-scale 2s ease-in-out infinite;
text-shadow: 0 0 8px #00a651, 0 0 12px #00a651, 0 0 16px rgba(0, 166, 81, 0.9);
}
body.dark-mode .countdown-large {
color: var(--color-text-light);
}
body.dark-mode .countdown-large.urgent {
color: var(--color-urgent-dark);
text-shadow: 0 0 8px #ff6b6b, 0 0 12px #ff6b6b, 0 0 16px rgba(255, 107, 107, 0.9);
}
body.dark-mode .countdown-large.now {
color: var(--color-now-dark);
text-shadow: 0 0 8px #4ecdc4, 0 0 12px #4ecdc4, 0 0 16px rgba(78, 205, 196, 0.9);
}
/* Time range */
.time-range {
font-size: 0.85em;
color: var(--color-text-muted);
font-weight: 500;
white-space: nowrap;
}
body.dark-mode .time-range {
color: var(--color-text-muted-dark);
}
/* Weather widget styles */
.weather-container {
margin: 20px 0;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
body.dark-mode .weather-container {
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
/* Custom weather display */
#custom-weather {
padding: 8px;
background-color: rgba(30, 36, 50, 0.8);
color: var(--color-surface);
border-radius: 8px;
text-align: center;
}
/* Ensure weather widget is visible in vertical-reverse mode */
body.vertical-reverse #custom-weather {
width: auto;
max-width: none;
}
#custom-weather .current-weather {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
margin-bottom: 12px;
flex-wrap: wrap;
}
#custom-weather .location-info {
display: flex;
align-items: center;
margin-right: 15px;
}
#custom-weather h3 {
margin: 0;
margin-right: 8px;
font-size: 1em;
}
#custom-weather .weather-icon {
display: flex;
align-items: center;
margin-right: 8px;
}
#custom-weather .weather-icon img {
width: 48px;
height: 48px;
margin-right: 5px;
}
/* Sun icon filters - bright yellow for clear sun */
#custom-weather .weather-icon img.weather-clear-sun,
#custom-weather .weather-icon img[data-condition="Clear"],
#custom-weather .forecast-hour .icon img.weather-clear-sun,
#custom-weather .forecast-hour .icon img[data-condition="Clear"] {
filter: brightness(0) saturate(100%) invert(100%) sepia(100%) saturate(10000%) hue-rotate(0deg) brightness(1.12);
}
/* Cloud with sun - preserve white clouds, color sun parts yellow */
#custom-weather .weather-icon img.weather-clouds-sun,
#custom-weather .weather-icon img[data-condition*="Clouds"]:not([data-condition="Clear"]),
#custom-weather .forecast-hour .icon img.weather-clouds-sun,
#custom-weather .forecast-hour .icon img[data-condition*="Clouds"]:not([data-condition="Clear"]) {
filter: brightness(1.25) saturate(3) hue-rotate(-30deg) contrast(1.05);
}
/* Snow icons - light grey/white */
#custom-weather .weather-icon img[data-condition*="Snow"],
#custom-weather .weather-icon img.weather-snow,
#custom-weather .forecast-hour .icon img.weather-snow {
filter: brightness(0) saturate(0%) invert(96%);
}
#custom-weather .temperature {
font-size: 1.5em;
font-weight: bold;
white-space: nowrap;
}
#custom-weather .sun-times {
text-align: center;
margin-top: 6px;
font-size: 0.75em;
color: var(--color-text-muted-dark);
}
/* Hourly forecast styles */
#custom-weather .forecast {
display: flex;
justify-content: center;
overflow-x: auto;
padding-bottom: 6px;
margin-bottom: 6px;
scrollbar-width: thin;
scrollbar-color: var(--color-accent) #1e2432;
}
#custom-weather .forecast::-webkit-scrollbar {
height: 6px;
}
#custom-weather .forecast::-webkit-scrollbar-track {
background: #1e2432;
}
#custom-weather .forecast::-webkit-scrollbar-thumb {
background-color: var(--color-accent);
border-radius: 6px;
}
#custom-weather .forecast-hour {
text-align: center;
min-width: 50px;
margin-right: 6px;
flex-shrink: 0;
background-color: rgba(30, 40, 60, 0.5);
border: 1px solid var(--color-accent);
border-radius: 4px;
padding: 6px 4px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
height: 90px;
}
#custom-weather .forecast-hour:last-child {
margin-right: 0;
}
#custom-weather .forecast-hour .time {
margin-bottom: 3px;
font-size: 0.75em;
font-weight: bold;
color: var(--color-surface);
display: block;
}
#custom-weather .forecast-hour .icon {
margin: 3px 0;
}
#custom-weather .forecast-hour .icon img {
width: 40px;
height: 40px;
}
#custom-weather .forecast-hour .temp {
font-weight: bold;
font-size: 0.8em;
}
#custom-weather .attribution {
margin-top: 10px;
font-size: 0.7em;
text-align: right;
}
#custom-weather .attribution a {
color: var(--color-accent);
text-decoration: none;
}
/* Sun times display in config */
.sun-times {
margin-top: 5px;
color: var(--color-text-muted);
}
/* Background image settings */
#background-image-url {
width: 100%;
padding: 8px;
border: 1px solid var(--color-border);
border-radius: 4px;
font-size: 1em;
margin-bottom: 10px;
}
.background-preview {
width: 100%;
height: 120px;
border: 1px solid var(--color-border);
border-radius: 4px;
margin-top: 5px;
margin-bottom: 15px;
overflow: hidden;
display: flex;
align-items: center;
justify-content: center;
background-color: var(--color-bg);
}
.background-preview img {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
.background-preview .no-image {
color: #999;
font-style: italic;
}
#background-opacity {
width: 100%;
margin-top: 5px;
}
#opacity-value {
font-weight: normal;
color: var(--color-primary-light);
}
.last-updated {
text-align: center;
font-size: 0.8em;
color: var(--color-text-muted);
margin-top: 20px;
}
/* Site header styles */
.site-header {
margin-bottom: 10px;
position: relative;
}
/* Site container styles */
.site-container {
margin-bottom: 10px;
}
.site-name {
display: inline-block;
background-color: var(--color-surface);
color: var(--color-primary);
font-weight: bold;
padding: 5px 15px;
border-radius: 4px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
position: relative;
z-index: 1;
}
.error {
color: red;
text-align: center;
padding: 20px;
background-color: #ffeeee;
border-radius: 8px;
margin: 20px 0;
}
/* Daylight Hours Bar */
#daylight-hours-bar {
position: fixed;
bottom: 0;
left: 0;
width: 100%;
height: 15px;
z-index: 1000;
overflow: visible;
}
#daylight-hours-bar .daylight-bar-background {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #191970;
background-image: var(--daylight-gradient, none);
}
#daylight-hours-bar .daylight-bar-indicator {
position: absolute;
top: -20px;
left: var(--current-hour-position, 0%);
transform: translateX(-50%);
transition: left 60s linear;
z-index: 1001;
pointer-events: none;
}
#daylight-hours-bar .sun-icon {
font-size: 18px;
display: block;
filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8));
text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}
/* Dark mode adjustments for daylight bar */
body.dark-mode #daylight-hours-bar .daylight-bar-background {
background-color: #0a0a2e;
}
/* Background overlay for custom background images */
#background-overlay {
position: fixed;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
background-size: cover;
background-position: center;
z-index: -1;
pointer-events: none;
transform-origin: center center;
}
#background-overlay.orientation-normal {
transform: scale(1.2);
}
#background-overlay.orientation-vertical {
transform: rotate(90deg) scale(2);
}
#background-overlay.orientation-upsidedown {
transform: rotate(180deg) scale(1.5);
}
#background-overlay.orientation-vertical-reverse {
transform: rotate(270deg) scale(2);
}
/* Departure card enter/leave animations */
.departure-card.card-entering {
opacity: 0;
}
.departure-card.card-entering.card-visible {
transition: opacity 0.5s ease-in;
opacity: 1;
}
.departure-card.card-leaving {
transition: opacity 0.5s ease-out;
opacity: 0;
}
/* Countdown highlight flash effect */
@keyframes highlight-flash {
0% { background-color: rgba(255, 255, 0, 0.3); }
100% { background-color: transparent; }
}
.highlight-flash {
animation: highlight-flash 1.5s ease-out;
}
/* Config modal inline style replacements */
.config-flex-row {
display: flex;
gap: 10px;
margin-top: 5px;
}
.config-flex-row-mb {
display: flex;
gap: 10px;
margin-bottom: 10px;
}
.config-site-flex {
display: flex;
align-items: center;
margin-bottom: 5px;
}
.config-site-id-row {
display: flex;
align-items: center;
}
.config-site-id-label {
margin-right: 5px;
}
.config-site-name-input {
flex: 1;
margin: 0 5px;
}
.config-site-id-input {
width: 100px;
}
.config-btn-sm {
padding: 5px 10px;
}
.config-btn-remove {
padding: 2px 5px;
}
.config-search-input {
flex: 1;
padding: 8px;
border: 1px solid #ddd;
border-radius: 4px;
}
body.dark-mode .config-search-input {
background-color: var(--color-surface-dark);
border-color: var(--color-border-dark);
color: var(--color-text-light);
}
.config-search-results {
display: none;
max-height: 200px;
overflow-y: auto;
border: 1px solid #ddd;
border-radius: 4px;
background: white;
margin-top: 5px;
}
body.dark-mode .config-search-results {
background: var(--color-surface-dark);
border-color: var(--color-border-dark);
}
.config-file-label {
padding: 5px 10px;
background-color: #ddd;
border-radius: 4px;
cursor: pointer;
}
body.dark-mode .config-file-label {
background-color: var(--color-surface-dark);
color: var(--color-text-light);
}
.config-file-input-hidden {
display: none;
}
.config-sites-add {
margin-top: 10px;
}
/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
.countdown-large.urgent,
.countdown-large.now {
animation: none;
}
.departure-card.card-entering.card-visible {
transition: none;
}
.departure-card.card-leaving {
transition: none;
}
.highlight-flash {
animation: none;
}
}