mirror of
https://github.com/zvx-echo6/navi.git
synced 2026-05-20 14:44:51 +02:00
- Add viewMode state to store with localStorage persistence - Add satellite layer functions to MapView (ESRI World Imagery via nginx proxy) - Add view mode segmented control in LayerControl popover - Add view-mode-control CSS styles - Hide/show vector fills and lines based on view mode Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
585 lines
12 KiB
CSS
585 lines
12 KiB
CSS
@import "tailwindcss";
|
|
|
|
/* ═══════════════════════════════════════════════════════
|
|
NAVI DESIGN TOKENS
|
|
Warm grays, sage greens, khaki tans, deep blacks.
|
|
No blue in UI chrome.
|
|
|
|
NOTE: Color tokens (--bg-*, --text-*, --border, etc.)
|
|
are now applied via applyThemeUI() in src/themes/registry.js.
|
|
Each theme defines its own ui object with CSS custom properties.
|
|
═══════════════════════════════════════════════════════ */
|
|
|
|
:root {
|
|
/* ── Type scale ── */
|
|
/* Font families (--font-sans, --font-mono) are now in theme ui objects */
|
|
--text-xs: 0.6875rem; /* 11px */
|
|
--text-sm: 0.8125rem; /* 13px */
|
|
--text-base: 0.875rem; /* 14px */
|
|
--text-md: 1rem; /* 16px */
|
|
--text-lg: 1.125rem; /* 18px */
|
|
}
|
|
|
|
/* ═══ BASE STYLES ═══ */
|
|
html, body, #root {
|
|
margin: 0;
|
|
padding: 0;
|
|
height: 100%;
|
|
overflow: hidden;
|
|
font-family: var(--font-sans);
|
|
}
|
|
|
|
body {
|
|
background: var(--bg-base);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
/* Mono class utility */
|
|
.font-mono {
|
|
font-family: var(--font-mono);
|
|
}
|
|
|
|
/* ═══ FOCUS RING — accent, never blue ═══ */
|
|
*:focus-visible {
|
|
outline: 2px solid var(--accent);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
/* ═══ TRANSITIONS — respect reduced motion ═══ */
|
|
@media (prefers-reduced-motion: reduce) {
|
|
*, *::before, *::after {
|
|
animation-duration: 0.01ms !important;
|
|
transition-duration: 0.01ms !important;
|
|
}
|
|
}
|
|
|
|
/* ═══ MAPLIBRE POPUP ═══ */
|
|
.maplibregl-popup-content {
|
|
background: var(--bg-raised) !important;
|
|
border: 1px solid var(--border) !important;
|
|
border-radius: 8px !important;
|
|
padding: 8px 12px !important;
|
|
box-shadow: var(--shadow-lg) !important;
|
|
color: var(--text-primary) !important;
|
|
}
|
|
|
|
.maplibregl-popup-tip {
|
|
border-top-color: var(--bg-raised) !important;
|
|
border-bottom-color: var(--bg-raised) !important;
|
|
}
|
|
|
|
.maplibregl-popup-close-button {
|
|
color: var(--text-secondary) !important;
|
|
font-size: 16px !important;
|
|
padding: 2px 6px !important;
|
|
}
|
|
|
|
.maplibregl-popup-close-button:hover {
|
|
color: var(--text-primary) !important;
|
|
background: transparent !important;
|
|
}
|
|
|
|
/* ═══ SCROLLBAR ═══ */
|
|
::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background: var(--border);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background: var(--text-tertiary);
|
|
}
|
|
|
|
/* ═══ GPS CHEVRON MARKER ═══ */
|
|
.navi-chevron {
|
|
width: 16px;
|
|
height: 16px;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.navi-gps-dot {
|
|
width: 12px;
|
|
height: 12px;
|
|
border-radius: 50%;
|
|
background: var(--accent);
|
|
border: 2px solid var(--bg-raised);
|
|
box-shadow: 0 0 0 2px var(--accent);
|
|
}
|
|
|
|
/* ═══ STOP PIN MARKERS (map) ═══ */
|
|
.navi-pin {
|
|
width: 26px;
|
|
height: 26px;
|
|
border-radius: 50%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-family: var(--font-sans);
|
|
font-size: 11px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
border: 2px solid var(--pin-stroke);
|
|
cursor: pointer;
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.navi-pin--origin { background: var(--pin-origin); }
|
|
.navi-pin--destination { background: var(--pin-destination); }
|
|
.navi-pin--intermediate { background: var(--pin-intermediate); }
|
|
|
|
/* ═══ FORM ELEMENTS ═══ */
|
|
.navi-input {
|
|
padding: 0.5rem 0.75rem;
|
|
font-size: var(--text-sm);
|
|
font-family: var(--font-sans);
|
|
background: var(--bg-input);
|
|
border: 1px solid var(--border);
|
|
border-radius: 0.5rem;
|
|
color: var(--text-primary);
|
|
transition: border-color 0.1s;
|
|
}
|
|
|
|
.navi-input::placeholder {
|
|
color: var(--text-tertiary);
|
|
}
|
|
|
|
.navi-input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
box-shadow: 0 0 0 2px var(--accent-muted);
|
|
}
|
|
|
|
.navi-input:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.navi-btn-secondary {
|
|
padding: 0.375rem 0.75rem;
|
|
font-size: var(--text-xs);
|
|
font-family: var(--font-sans);
|
|
font-weight: 500;
|
|
background: var(--tan-muted);
|
|
color: var(--tan);
|
|
border: 1px solid var(--border);
|
|
border-radius: 0.5rem;
|
|
cursor: pointer;
|
|
transition: background 0.1s;
|
|
}
|
|
|
|
.navi-btn-secondary:hover:not(:disabled) {
|
|
background: var(--accent-muted);
|
|
color: var(--accent);
|
|
}
|
|
|
|
.navi-btn-secondary:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* ═══ PREVIEW PIN (selected but not committed) ═══ */
|
|
.navi-pin-preview {
|
|
position: relative;
|
|
width: 28px;
|
|
height: 28px;
|
|
border-radius: 50%;
|
|
border: 3px solid var(--accent);
|
|
background: transparent;
|
|
box-shadow: 0 0 0 3px var(--accent-muted), var(--shadow);
|
|
pointer-events: none;
|
|
}
|
|
.navi-pin-center-dot {
|
|
position: absolute;
|
|
left: 50%;
|
|
top: 50%;
|
|
transform: translate(-50%, -50%);
|
|
width: 4px;
|
|
height: 4px;
|
|
border-radius: 50%;
|
|
background: var(--accent);
|
|
pointer-events: none;
|
|
}
|
|
.navi-feature-highlight {
|
|
position: relative;
|
|
width: 24px;
|
|
height: 24px;
|
|
border-radius: 50%;
|
|
border: 2px solid var(--accent);
|
|
background: var(--accent-muted);
|
|
animation: navi-pulse 1.5s ease-in-out infinite;
|
|
pointer-events: none;
|
|
}
|
|
@keyframes navi-pulse {
|
|
0%, 100% { transform: scale(1); opacity: 0.8; }
|
|
50% { transform: scale(1.2); opacity: 0.5; }
|
|
}
|
|
|
|
/* ═══ PLACE DETAIL PANEL ═══ */
|
|
.navi-place-detail {
|
|
transition: transform 150ms ease, opacity 150ms ease;
|
|
}
|
|
|
|
.navi-place-detail-enter {
|
|
transform: translateX(-10px);
|
|
opacity: 0;
|
|
}
|
|
|
|
.navi-place-detail-active {
|
|
transform: translateX(0);
|
|
opacity: 1;
|
|
}
|
|
|
|
/* ═══ BOTTOM-RIGHT MAP CONTROLS ═══ */
|
|
.map-controls-br {
|
|
position: absolute;
|
|
bottom: 80px;
|
|
right: 10px;
|
|
z-index: 10;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
.map-control-btn {
|
|
width: 44px;
|
|
height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--bg-raised);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
box-shadow: var(--shadow);
|
|
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
|
}
|
|
|
|
.map-control-btn:hover {
|
|
color: var(--text-primary);
|
|
border-color: var(--accent);
|
|
background: var(--bg-overlay);
|
|
}
|
|
|
|
.map-control-btn:active {
|
|
background: var(--bg-muted);
|
|
}
|
|
|
|
/* ═══ LAYER CONTROL ═══ */
|
|
.layer-control {
|
|
position: relative;
|
|
}
|
|
|
|
.layer-control-btn {
|
|
width: 44px;
|
|
height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--bg-raised);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
box-shadow: var(--shadow);
|
|
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
|
}
|
|
|
|
.layer-control-btn:hover {
|
|
color: var(--text-primary);
|
|
border-color: var(--accent);
|
|
background: var(--bg-overlay);
|
|
}
|
|
|
|
.layer-control-btn:active {
|
|
background: var(--bg-muted);
|
|
}
|
|
|
|
.layer-control-popover {
|
|
position: absolute;
|
|
bottom: 0;
|
|
right: 52px;
|
|
min-width: 180px;
|
|
background: var(--bg-raised);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
padding: 8px 0;
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
.view-mode-control {
|
|
display: flex;
|
|
gap: 2px;
|
|
padding: 8px;
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
}
|
|
|
|
.view-mode-btn {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 2px;
|
|
padding: 6px 8px;
|
|
border: none;
|
|
border-radius: 6px;
|
|
background: transparent;
|
|
color: var(--text-secondary);
|
|
font-size: var(--text-xs);
|
|
cursor: pointer;
|
|
transition: all 0.15s;
|
|
}
|
|
|
|
.view-mode-btn:hover {
|
|
background: var(--bg-overlay);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.view-mode-btn.active {
|
|
background: var(--accent);
|
|
color: var(--text-inverse);
|
|
}
|
|
|
|
.layer-control-header {
|
|
padding: 4px 12px 6px;
|
|
font-size: var(--text-xs);
|
|
font-weight: 600;
|
|
color: var(--text-tertiary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.layer-control-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 6px 12px;
|
|
cursor: pointer;
|
|
transition: background 0.1s;
|
|
}
|
|
|
|
.layer-control-item:hover {
|
|
background: var(--bg-overlay);
|
|
}
|
|
|
|
.layer-control-label {
|
|
font-size: var(--text-sm);
|
|
color: var(--text-primary);
|
|
}
|
|
|
|
.layer-control-toggle {
|
|
appearance: none;
|
|
width: 32px;
|
|
height: 18px;
|
|
background: var(--border);
|
|
border-radius: 9px;
|
|
position: relative;
|
|
cursor: pointer;
|
|
transition: background 0.15s;
|
|
flex-shrink: 0;
|
|
margin-left: 12px;
|
|
}
|
|
|
|
.layer-control-toggle::after {
|
|
content: '';
|
|
position: absolute;
|
|
top: 2px;
|
|
left: 2px;
|
|
width: 14px;
|
|
height: 14px;
|
|
background: var(--text-primary);
|
|
border-radius: 50%;
|
|
transition: transform 0.15s;
|
|
}
|
|
|
|
.layer-control-toggle:checked {
|
|
background: var(--accent);
|
|
}
|
|
|
|
.layer-control-toggle:checked::after {
|
|
transform: translateX(14px);
|
|
}
|
|
|
|
|
|
/* ═══ PLACE DETAIL ENRICHMENT ═══ */
|
|
.place-detail-section {
|
|
margin-top: 2px;
|
|
}
|
|
|
|
.place-detail-section-header {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding-bottom: 6px;
|
|
font-size: 10px;
|
|
font-weight: 600;
|
|
color: var(--text-tertiary);
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
}
|
|
|
|
.category-badge {
|
|
display: inline-block;
|
|
padding: 2px 8px;
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
color: var(--accent);
|
|
background: var(--accent-muted);
|
|
border-radius: 10px;
|
|
}
|
|
|
|
|
|
/* ═══ LOCATE BUTTON ═══ */
|
|
.locate-btn {
|
|
width: 44px;
|
|
height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
background: var(--bg-raised);
|
|
border: 1px solid var(--border);
|
|
border-radius: 10px;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
box-shadow: var(--shadow);
|
|
transition: color 0.15s, border-color 0.15s, background 0.15s;
|
|
}
|
|
|
|
.locate-btn:hover {
|
|
color: var(--text-primary);
|
|
border-color: var(--accent);
|
|
background: var(--bg-overlay);
|
|
}
|
|
|
|
.locate-btn:active {
|
|
background: var(--bg-muted);
|
|
}
|
|
|
|
/* ═══ STOP REMOVE BUTTON (touch-friendly) ═══ */
|
|
.stop-remove-btn {
|
|
opacity: 0;
|
|
transition: opacity 0.15s;
|
|
}
|
|
|
|
.group:hover .stop-remove-btn {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* ═══ MOBILE OVERRIDES ═══ */
|
|
@media (max-width: 767px) {
|
|
body {
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.map-controls-br {
|
|
bottom: 70px;
|
|
right: 8px;
|
|
}
|
|
|
|
.layer-control-popover {
|
|
right: 52px;
|
|
max-height: 60vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.stop-remove-btn {
|
|
opacity: 0.6;
|
|
}
|
|
}
|
|
|
|
/* ═══ CONTACT MODAL ═══ */
|
|
.contact-modal-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
z-index: 50;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.contact-modal {
|
|
background: var(--bg-raised);
|
|
border: 1px solid var(--border);
|
|
border-radius: 12px;
|
|
width: 90%;
|
|
max-width: 420px;
|
|
max-height: 85vh;
|
|
overflow-y: auto;
|
|
padding: 20px;
|
|
box-shadow: var(--shadow-lg);
|
|
}
|
|
|
|
/* ═══ PANEL TAB BAR ═══ */
|
|
.navi-tab-bar {
|
|
display: flex;
|
|
gap: 4px;
|
|
border-bottom: 1px solid var(--border-subtle);
|
|
}
|
|
|
|
.navi-tab {
|
|
padding: 6px 12px;
|
|
font-size: var(--text-xs);
|
|
font-weight: 500;
|
|
color: var(--text-tertiary);
|
|
background: transparent;
|
|
border: none;
|
|
border-bottom: 2px solid transparent;
|
|
cursor: pointer;
|
|
transition: color 0.1s, border-color 0.1s;
|
|
}
|
|
|
|
.navi-tab:hover {
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.navi-tab-active {
|
|
color: var(--accent);
|
|
border-bottom-color: var(--accent);
|
|
}
|
|
|
|
/* ═══ CONTACT LIST ITEMS ═══ */
|
|
.contact-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 8px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: background 0.1s;
|
|
}
|
|
|
|
.contact-item:hover {
|
|
background: var(--bg-overlay);
|
|
}
|
|
|
|
/* Scale control - dark theme styling */
|
|
.maplibregl-ctrl-scale {
|
|
background-color: rgba(0, 0, 0, 0.6);
|
|
border: 2px solid rgba(255, 255, 255, 0.3);
|
|
border-top: none;
|
|
color: rgba(255, 255, 255, 0.9);
|
|
font-size: 11px;
|
|
font-weight: 500;
|
|
padding: 0 5px;
|
|
line-height: 1.5;
|
|
text-shadow: 0 0 2px rgba(0, 0, 0, 0.8);
|
|
}
|
|
|
|
/* ═══ MAPLIBRE CONTROL POSITIONING ═══ */
|
|
.maplibregl-ctrl-bottom-right {
|
|
bottom: 24px;
|
|
right: 10px;
|
|
}
|
|
|
|
.maplibregl-ctrl-bottom-right .maplibregl-ctrl-scale {
|
|
margin-right: 0;
|
|
margin-bottom: 0;
|
|
}
|