eurometeo / src /app /globals.css
alexdum's picture
refactor: relocate test suite to misc directory and add deselection test
2ec038a
Raw History Blame Contribute Delete
6.53 kB
@import "tailwindcss";
:root {
--background: #f8fafc;
--foreground: #0f172a;
--card-bg: rgba(255, 255, 255, 0.7);
--card-border: rgba(226, 232, 240, 0.5);
--primary: #3b82f6;
--primary-hover: #2563eb;
--accent: #f59e0b;
}
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: 'Inter', system-ui, -apple-system, sans-serif;
}
body {
background: var(--background);
color: var(--foreground);
font-family: 'Inter', system-ui, -apple-system, sans-serif;
overflow-x: hidden;
}
/* Glassmorphism sidebar base styling */
.glass-sidebar {
backdrop-filter: blur(16px) saturate(180%);
-webkit-backdrop-filter: blur(16px) saturate(180%);
box-shadow: 4px 0 30px rgba(0, 0, 0, 0.02);
}
.glass-card {
background: rgba(255, 255, 255, 0.65);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border: 1px solid rgba(226, 232, 240, 0.6);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}
/* Contain rendering for heavy charts without causing Recharts SVG size bugs */
.heavy-chart {
contain: layout style paint;
}
/* Fast tab switching: caches rendering state instead of destroying it */
.cached-view {
content-visibility: hidden;
/* Prevent the hidden tab from taking up space */
height: 0;
overflow: hidden;
/* But let the browser remember the layout size for instant reveal */
contain-intrinsic-size: auto none auto 800px;
}
.cached-view.is-active {
content-visibility: visible;
height: auto;
overflow: visible;
}
/* Fullscreen chart modal */
dialog.chart-modal {
border: none;
border-radius: 1rem;
padding: 0;
max-width: 90vw;
max-height: 85vh;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
dialog.chart-modal::backdrop {
background: rgba(15, 23, 42, 0.5);
backdrop-filter: blur(4px);
-webkit-backdrop-filter: blur(4px);
}
dialog.chart-modal[open] {
animation: modal-appear 200ms ease-out;
}
@keyframes modal-appear {
from { opacity: 0; transform: scale(0.95); }
to { opacity: 1; transform: scale(1); }
}
/* Modern micro-animations and hovers */
.btn-premium {
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-premium:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}
.btn-premium:active {
transform: translateY(0);
}
/* Custom Scrollbars */
.custom-scrollbar::-webkit-scrollbar {
width: 6px;
height: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
background-color: rgba(148, 163, 184, 0.3);
border-radius: 10px;
transition: background-color 0.2s;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
background-color: rgba(148, 163, 184, 0.5);
}
/* Note: content-visibility was removed as it breaks SVG calculation for Recharts */
.lazy-render {
contain-intrinsic-size: auto 350px;
}
/* Force MapLibre UI controls to render over Tailwind resets, especially on mobile WebKit */
.maplibregl-ctrl-group button {
background-color: #ffffff !important;
display: block !important;
}
.maplibregl-ctrl-icon {
display: block !important;
opacity: 1 !important;
}
.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E") !important;
}
.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E") !important;
}
.maplibregl-ctrl-compass .maplibregl-ctrl-icon {
background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns=\"http://www.w3.org/2000/svg\" width=\"29\" height=\"29\" viewBox=\"0 0 29 29\"%3E%3Cpath d=\"M10.5 14l4-8 4 8h-8z\" fill=\"%23ccc\"/%3E%3Cpath d=\"M10.5 16l4 8 4-8h-8z\" fill=\"%23ccc\"/%3E%3C/svg%3E") !important;
}
@media (max-width: 639px) {
.maplibregl-ctrl-group {
display: none !important;
}
}
/* Keep compact attribution collapsed by default — only expand on click */
.maplibregl-ctrl-attrib.maplibregl-compact:not(.maplibregl-compact-show) .maplibregl-ctrl-attrib-inner {
display: none !important;
}
.mobile-drawer::backdrop {
background-color: rgba(15, 23, 42, var(--drawer-backdrop, 0));
}
@media (hover: hover) {
.hover-tooltip:hover .tooltip-content,
.hover-tooltip:focus-within .tooltip-content {
opacity: 1 !important;
pointer-events: auto !important;
}
}
/* Floating station selection badge / chip (matching HungaroMet) */
.station-floating-chip {
display: flex;
align-items: center;
gap: 8px;
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border-radius: 9999px;
padding: 5px 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 2px 4px rgba(0, 0, 0, 0.06);
pointer-events: auto;
transition: all 0.2s ease;
}
.station-floating-chip:hover {
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}
.chip-dot {
width: 8px;
height: 8px;
border-radius: 50%;
background-color: #dc2626;
box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
flex-shrink: 0;
animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.7); }
70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(220, 38, 38, 0); }
}
.chip-text {
font-size: 0.8125rem;
font-weight: 600;
white-space: nowrap;
max-width: clamp(120px, 42vw, 220px);
overflow: hidden;
text-overflow: ellipsis;
}
@media (min-width: 640px) {
.chip-text {
max-width: 320px;
font-size: 0.875rem;
}
}
.btn-chip-clear {
display: inline-flex;
align-items: center;
gap: 4px;
background-color: #fee2e2;
color: #b91c1c;
border: 1px solid #fca5a5;
border-radius: 9999px;
padding: 3px 9px;
font-size: 0.75rem;
font-weight: 700;
cursor: pointer;
transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
line-height: 1.2;
flex-shrink: 0;
}
.btn-chip-clear:hover {
background-color: #ef4444;
color: #ffffff;
border-color: #ef4444;
}