Files
sunscope/assets/css/ui.css
T
fraxle ebd4b7d7b7 RC2
Tweaks and new pulldowns
2026-05-15 18:09:45 +01:00

365 lines
8.1 KiB
CSS

/* ════════════════════════════════════════════════════════════════════════
ui.css — Status banners, legend, about block, footer, and responsive.
════════════════════════════════════════════════════════════════════════ */
/* ── CUSTOM SELECT DROPDOWN ─────────────────────────────────────────── */
/* Cross-platform replacement for native <select> on the col-toggles bar */
.cs-wrap {
position: relative;
display: inline-block;
}
/* The visible pill button */
.cs-btn {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 5px 10px 5px 13px;
cursor: pointer;
border: 1.5px solid #c9b08a;
background: #f5edd6;
color: #9a7d5a;
font-family: JetBrains Mono, monospace;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.1em;
transition: all 0.15s;
user-select: none;
white-space: nowrap;
}
.cs-btn:hover {
border-color: #c8922a;
color: #6b4f2a;
background: #fef3dc;
}
/* Active state — brass border + brass text, parchment background */
.cs-btn.on {
border-color: #c8922a;
color: #c8922a;
background: #f5edd6;
font-weight: 600;
}
.cs-btn.on:hover {
background: #fef3dc;
color: #a06e18;
border-color: #a06e18;
}
/* The chevron arrow inside the button */
.cs-arrow {
font-size: 9px;
opacity: 0.6;
margin-left: 2px;
transition: transform 0.15s;
display: inline-block;
}
.cs-wrap.open .cs-arrow {
transform: rotate(180deg);
}
/* Grouped left (fused with checkbox pill) */
.cs-btn.grouped-left {
border-right: none;
border-radius: 20px 0 0 20px;
}
.cs-btn.grouped-left:only-child,
.cs-btn.grouped-left.last-child {
border-right: 1.5px solid #c9b08a;
border-radius: 20px;
}
/* The floating dropdown panel */
.cs-panel {
position: absolute;
top: calc(100% + 4px);
left: 0;
z-index: 1000;
background: #fffcf2;
border: 1.5px solid #c9b08a;
border-radius: 4px;
box-shadow: 0 4px 16px rgba(30,18,8,0.13);
min-width: 100%;
white-space: nowrap;
overflow: hidden;
}
/* Each option row */
.cs-option {
display: block;
padding: 8px 14px;
font-family: JetBrains Mono, monospace;
font-size: 12px;
text-transform: uppercase;
letter-spacing: 0.08em;
color: #4a3420;
cursor: pointer;
transition: background 0.1s, color 0.1s;
user-select: none;
}
.cs-option:hover {
background: #fef3dc;
color: #1e1208;
}
.cs-option.selected {
color: #c8922a;
font-weight: 600;
background: #fdf8ee;
}
.cs-option.disabled {
opacity: 0.5;
cursor: default;
}
.cs-option.disabled:hover {
background: transparent;
color: #4a3420;
}
/* Hide option divider between show/hide */
.cs-divider {
height: 1px;
background: #e8d8c0;
margin: 2px 0;
}
/* ── CUSTOM CHECKBOX PILL (ventilation / managed) ───────────────────── */
.cs-vent {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 5px 12px 5px 10px;
font-size: 12px;
font-family: JetBrains Mono, monospace;
letter-spacing: 0.08em;
text-transform: uppercase;
cursor: pointer;
border: 1.5px solid #c9b08a;
border-left: none;
margin-left: -1px;
padding-left: 11px;
border-radius: 0 20px 20px 0;
background: #f5edd6;
color: #9a7d5a;
user-select: none;
transition: background 0.15s, color 0.15s, border-color 0.15s;
white-space: nowrap;
}
.cs-vent:hover {
border-color: #c8922a;
color: #6b4f2a;
background: #fef3dc;
}
.cs-vent.on {
border-color: #c8922a;
color: #c8922a;
background: #f5edd6;
font-weight: 600;
}
.cs-vent.on:hover {
background: #fef3dc;
color: #a06e18;
border-color: #a06e18;
}
/* The little square tick box inside the vent pill */
.cs-checkbox {
display: inline-flex;
align-items: center;
justify-content: center;
width: 13px;
height: 13px;
border: 1.5px solid currentColor;
border-radius: 2px;
flex-shrink: 0;
transition: background 0.12s;
}
.cs-checkbox.checked::after {
content: '';
display: block;
width: 7px;
height: 5px;
border-left: 2px solid currentColor;
border-bottom: 2px solid currentColor;
transform: rotate(-45deg) translateY(-1px);
}
/* ── 9. STATUS & ERROR BANNERS ("Acquiring forecast data…") ────────── */
.utci-status {
padding: 14px 18px;
background: #f0e4c4;
color: #7a5c2a;
font-family: JetBrains Mono, monospace;
font-size: 11px;
text-align: center;
letter-spacing: 0.12em;
text-transform: uppercase;
border: 1.5px solid #c9b08a;
margin-bottom: 18px;
}
/* ── 10. LEGEND (thermal-stress band colours at the bottom) ────────── */
.utci-legend {
margin-top: 22px;
padding: 18px 20px;
background: #fdf8ee;
border: 1.5px solid #c9b08a;
}
.utci-legend-label {
font-family: JetBrains Mono, monospace;
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.18em;
color: #b09870;
margin-bottom: 12px;
display: block;
font-weight: 600;
}
.utci-legend-row {
display: flex;
flex-wrap: wrap;
gap: 4px;
}
.utci-legend-item {
padding: 6px 12px;
font-family: JetBrains Mono, monospace;
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.06em;
flex: 1;
min-width: 110px;
text-align: center;
opacity: 0.9;
}
/* ── 11. ABOUT + FOOTER ─────────────────────────────────────────────── */
.utci-about {
margin-top: 28px;
padding: 24px 28px;
background: #fdf8ee;
border: 1.5px solid #c9b08a;
}
.utci-about-heading {
font-family: Fraunces, serif;
font-size: 18px;
font-weight: 700;
color: #1e1208;
margin-bottom: 14px;
letter-spacing: -0.01em;
}
.utci-about-text {
font-family: Manrope, sans-serif;
font-size: 14px;
line-height: 1.75;
color: #4a3420;
margin-bottom: 12px;
max-width: 860px; /* keeps line length readable */
}
.utci-about-text:last-child {
margin-bottom: 0;
}
.utci-about-text strong {
color: #1e1208;
font-weight: 600;
}
.utci-about-text em {
font-style: italic;
color: #6b4f2a;
}
.utci-about-link {
display: inline-block;
margin-left: 4px;
color: #c8922a;
font-weight: 600;
text-decoration: none;
white-space: nowrap;
}
.utci-about-link:hover {
text-decoration: underline;
}
.utci-footer {
margin-top: 36px;
padding-top: 20px;
border-top: 1px solid #d4c0a0;
font-family: JetBrains Mono, monospace;
font-size: 10px;
text-transform: uppercase;
letter-spacing: 0.12em;
color: #c0a880;
line-height: 2.2;
}
/* The "Reading the table." intro snippet */
.utci-footer em {
font-family: Fraunces, serif;
font-style: italic;
text-transform: none;
letter-spacing: 0;
font-size: 14px;
color: #7a5c2a;
}
/* ── 12. RESPONSIVE (mobile) ───────────────────────────────────────── */
/* On screens narrower than 800px, stack the header vertically and
shrink the dial. Add more rules in this block to tweak mobile
layout further. */
@media (max-width: 800px) {
.utci-app {
padding: 52px 10px 32px;
}
.utci-header {
grid-template-columns: 1fr; /* stack the 3 header columns */
text-align: center;
}
.header-right {
align-items: center;
}
.utci-search-wrap {
width: 100%;
}
.scope-ring {
width: 180px; /* smaller dial on mobile */
height: 180px;
margin: 0 auto;
}
/* Halve the hourly-table cell padding on mobile so more columns fit
in the viewport before the horizontal scrollbar kicks in. */
.utci-table th {
padding: 7px 6px;
}
.utci-table td {
padding: 5px 6px;
}
/* Drop the compass-label text ("N", "NW"...) next to the wind vane on
mobile — the vane arrow alone is enough at small sizes. */
.wind-dir-label {
display: none;
}
}