/* Left Panel */
.left-panel {
    position: fixed;
    top: var(--topbar-height);
    left: 0;
    bottom: 0;
    width: var(--panel-width);
    background: linear-gradient(180deg, var(--bg-panel) 0%, #0a2f30 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 95, 97, 0.25);
    z-index: 150;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.left-panel.collapsed { transform: translateX(-100%); }

.left-panel-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 20px;
}

.panel-toggle {
    position: fixed;
    top: calc(var(--topbar-height) + 10px);
    left: 10px;
    width: 36px;
    height: 36px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 160;
    color: var(--text-primary);
    font-size: 16px;
    cursor: pointer;
    box-shadow: var(--shadow-card);
}

.left-panel.collapsed + .panel-toggle { left: 10px; }

.left-panel-section {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
}

.left-panel-section:last-child { border-bottom: none; }

.section-title {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

/* Weather Row in Conditions Card */
.weather-row {
    margin-top: 8px;
}

.weather-divider {
    height: 1px;
    background: var(--border-color);
    margin-bottom: 8px;
}

.weather-main {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.weather-detail {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Action Buttons in Left Panel */
.panel-actions {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.panel-action-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition);
}

.panel-action-btn:hover {
    background: rgba(255,255,255,0.12);
    border-color: var(--border-light);
}

.panel-action-btn .icon {
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

/* Right Panel (Detail) */
.right-panel {
    position: fixed;
    top: var(--topbar-height);
    right: 0;
    bottom: 0;
    width: 400px;
    max-width: 100vw;
    background: linear-gradient(180deg, var(--bg-panel) 0%, #0a2f30 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-color);
    z-index: 180;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    box-shadow: var(--shadow-panel);
}

.right-panel.open { transform: translateX(0); }

.right-panel-header {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-shrink: 0;
}

.right-panel-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.right-panel-subtitle {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: 2px;
}

.right-panel-close {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    font-size: 18px;
    color: var(--text-muted);
    cursor: pointer;
    flex-shrink: 0;
    transition: all var(--transition);
}

.right-panel-close:hover {
    background: rgba(255,255,255,0.12);
    color: var(--text-primary);
}

.right-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.right-panel-content .card { margin-bottom: 12px; }

/* Detail Panel Tabs */
.detail-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
}

.detail-tab {
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    cursor: pointer;
    transition: all var(--transition);
}

.detail-tab.active {
    background: rgba(255,255,255,0.1);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.detail-tab-pane {
    display: none;
}

.detail-tab-pane.active {
    display: block;
}

/* Type Badge */
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 2px 8px;
    border-radius: 4px;
}

.type-badge.gauge { background: rgba(56,189,248,0.15); color: var(--color-gauge); }
.type-badge.access { background: rgba(34,197,94,0.15); color: var(--color-access); }
.type-badge.rapid { background: rgba(253,126,20,0.15); color: var(--color-rapid); }
.type-badge.dam { background: rgba(255,68,68,0.15); color: var(--color-dam); }
.type-badge.tidal { background: rgba(23,162,184,0.15); color: var(--color-tidal); }
.type-badge.scene { background: rgba(251,191,36,0.15); color: #fbbf24; }
.type-badge.quality { background: rgba(155,89,182,0.15); color: var(--color-quality); }

/* Mile badge */
.mile-badge {
    display: inline-flex;
    align-items: center;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(0, 95, 97, 0.35);
    color: #00d4d8;
    border: 1px solid rgba(0, 131, 138, 0.5);
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}

.right-panel-title .mile-badge {
    font-size: 11px;
    vertical-align: baseline;
    position: relative;
    top: -1px;
}

.direction-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 8px;
    background: rgba(56,189,248,0.12);
    color: var(--color-gauge);
    margin-left: 6px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Float Plan Select */
.float-plan-select optgroup {
    font-weight: 700;
    font-size: 12px;
    color: var(--text-muted);
    padding-top: 6px;
}

.float-plan-select option {
    font-weight: 400;
    font-size: 13px;
    padding: 4px 8px;
    color: var(--text-primary);
}

.float-plan-select option:disabled {
    color: #ff4444;
    font-weight: 600;
    font-style: italic;
}

/* Gauge Detail */
.gauge-reading {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.gauge-reading .big-value {
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.gauge-reading .unit {
    font-size: 13px;
    color: var(--text-secondary);
}

.gauge-reading .trend {
    font-size: 13px;
    font-weight: 600;
    margin-left: auto;
}

.flood-bar {
    height: 6px;
    background: rgba(255,255,255,0.09);
    border-radius: 3px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

.flood-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.flood-bar-marker {
    position: absolute;
    top: -4px;
    width: 2px;
    height: 14px;
    background: var(--text-muted);
    transform: translateX(-50%);
}

/* Webcam */
.webcam-container {
    border-radius: var(--radius-md);
    overflow: hidden;
    position: relative;
}

.webcam-container img {
    width: 100%;
    display: block;
}

.webcam-timestamp {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 10px;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
}

/* Webcam hero (reuses scene-thumb-wrap for layout) */
.webcam-hero {
    margin-bottom: 12px;
}

.webcam-badge {
    background: rgba(56, 189, 248, 0.85) !important;
    gap: 4px;
}

.webcam-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    background: #ff4444;
    border-radius: 50%;
    display: inline-block;
    animation: webcam-pulse 1.5s ease-in-out infinite;
}

@keyframes webcam-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

/* Directions / External Link Button */
.btn-directions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--accent);
    color: #020617; /* Dark text for better contrast on Cyan 400 */
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    transition: background var(--transition);
}

.btn-directions:hover { background: var(--accent-hover); color: #020617; }

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
    transition: all var(--transition);
}

.btn-outline:hover {
    background: rgba(255,255,255,0.09);
    border-color: var(--border-light);
}

.action-row {
    display: flex;
    gap: 0;
    margin-top: 12px;
    margin-bottom: 12px;
}

.action-row > a,
.action-row > button {
    border-radius: 0;
    flex: 1;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    min-width: 0;
    padding: 8px 10px;
}

.action-row > :first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.action-row > :last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.action-row > :only-child { border-radius: var(--radius-sm); }

.action-row > .btn-outline + .btn-outline { border-left: none; }
.action-row > .btn-directions + .btn-outline { border-left: none; }

/* Amenity chips */
.amenity-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.amenity-chip {
    display: inline-block;
    padding: 3px 10px;
    background: rgba(0,150,153,0.18);
    color: #e6f0f0;
    border: 1px solid rgba(0,150,153,0.32);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

/* Card stat rows */
.card-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.card-stat:last-child { border-bottom: none; }

.card-stat .label {
    font-size: 12px;
    color: var(--text-secondary);
}

.card-stat .value {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    max-width: 60%;
}

/* Enhanced Gauge Panel */
.gauge-updated {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 6px;
}

.sparkline-chart-wrap {
    width: 100%;
}

.sparkline-chart-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 6px;
}

.sparkline-canvas {
    width: 100%;
    height: 80px;
    display: block;
}

/* Shimmer loading animation */
.shimmer-bar {
    width: 100%;
    height: 80px;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.shimmer-bar.no-data {
    animation: none;
    background: rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: var(--text-muted);
    height: 40px;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* AI Analysis */
.ai-analysis-wrap {
    min-height: 40px;
}

.ai-analysis-text {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.ai-analysis-text.muted {
    color: var(--text-muted);
    font-style: italic;
}

/* Adjacent Gauges */
.adjacent-gauge-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    transition: background var(--transition);
    border-radius: var(--radius-sm);
    padding-left: 4px;
    padding-right: 4px;
}

.adjacent-gauge-row:last-child { border-bottom: none; }
.adjacent-gauge-row:hover { background: rgba(255,255,255,0.07); }

.adjacent-dir {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
    width: 72px;
    flex-shrink: 0;
}

.adjacent-name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.adjacent-vals {
    font-size: 11px;
    color: var(--text-secondary);
    flex-shrink: 0;
    text-align: right;
}

/* 360° Viewer Overlay */
.viewer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.viewer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.viewer-modal {
    position: relative;
    width: 92vw;
    height: 88vh;
    max-width: 1400px;
    background: #000;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 8px 60px rgba(0, 0, 0, 0.8);
}

.viewer-modal iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.viewer-modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.2s ease;
}

.viewer-modal-close:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Scene Thumbnail in Panel */
.scene-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 12px;
}

.scene-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.scene-play-btn {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    border-radius: 20px;
    pointer-events: none;
    transition: background 0.2s ease;
}

.scene-thumb-wrap:hover .scene-play-btn {
    background: rgba(0, 0, 0, 0.85);
}

.trail-description {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

/* Condition Badges */
.condition-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid transparent;
}

/* Condition Alerts */
.condition-alert {
    padding: 10px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.condition-alert-ice {
    background: rgba(96,165,250,0.15);
    border: 1px solid rgba(96,165,250,0.3);
    color: #93c5fd;
}

.condition-alert-cold {
    background: rgba(96,165,250,0.12);
    border: 1px solid rgba(96,165,250,0.25);
    color: #93c5fd;
}

.condition-alert-flood {
    background: rgba(239,68,68,0.12);
    border: 1px solid rgba(239,68,68,0.25);
    color: #fca5a5;
}

/* Condition Dot (topbar) */
.condition-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-left: 5px;
    vertical-align: middle;
    animation: dot-pulse 2.5s ease-in-out infinite;
}

/* Tidal station tide schedule */
.tide-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}

.tide-row:last-child { border-bottom: none; }

.tide-icon {
    font-size: 10px;
    width: 14px;
    text-align: center;
    flex-shrink: 0;
}

.tide-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    width: 64px;
    flex-shrink: 0;
}

.tide-time {
    font-size: 12px;
    color: var(--text-secondary);
    flex: 1;
}

.tide-height {
    font-size: 12px;
    font-weight: 700;
    text-align: right;
    white-space: nowrap;
}

/* Nearby Access rows in place detail */
.nearby-access-row:hover {
    background: rgba(34,197,94,0.06);
    border-radius: 4px;
    margin: 0 -6px;
    padding-left: 6px !important;
    padding-right: 6px !important;
}

.nearby-access-row:last-child {
    border-bottom: none !important;
}

/* Float Plan - Craft Type Selector */
.craft-selector { display:flex; gap:8px; margin:4px 0 }
.craft-btn {
    flex:1; padding:12px 8px; border:1px solid var(--border-color);
    border-radius:var(--radius-sm); background:var(--bg-secondary);
    color:var(--text-secondary); font-size:12px; cursor:pointer; text-align:center;
    transition: all var(--transition);
}
.craft-btn:hover {
    background:rgba(255,255,255,0.06);
    border-color:var(--border-light);
}
.craft-btn.active {
    border-color:var(--accent); color:var(--accent);
    background:rgba(253,119,99,0.08);
}
.craft-btn-icon { display:flex; justify-content:center; margin-bottom:4px }
.craft-btn-icon svg { width:24px; height:24px }
.craft-btn-label { font-weight:700; display:block; font-size:13px; color:var(--text) }
.craft-btn-desc { font-size:10px; opacity:0.8; margin-top:2px; display:block; color:var(--text-dim) }

/* Float Plan - Effort Selector */
.effort-selector { display:flex; gap:6px; margin:4px 0 }
.effort-btn {
    flex:1; padding:8px 4px; border:1px solid var(--border-color);
    border-radius:var(--radius-sm); background:var(--bg-secondary);
    color:var(--text-secondary); font-size:12px; cursor:pointer; text-align:center;
    transition: all var(--transition);
}
.effort-btn:hover {
    background:rgba(255,255,255,0.06);
    border-color:var(--border-light);
}
.effort-btn.active {
    border-color:var(--color-access); color:var(--color-access);
    background:rgba(34,197,94,0.08);
}
.effort-btn-label { font-weight:600; display:block; color:var(--text) }
.effort-btn-desc { font-size:10px; opacity:0.8; margin-top:2px; display:block; color:var(--text-dim) }

/* Float Plan - Virtual waypoint (North Branch access gap) warning banner */
.virtual-waypoint-banner {
    border-left: 4px solid #d97706;
    background: #fff8e6;
    color: #7c4a03;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Float Plan - one-line hazard summary (sits at top of results) */
.hazard-summary {
    border-left: 4px solid #c53030;
    background: #fff5f5;
    color: #742a2a;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    margin-bottom: 12px;
}

/* Float Plan - share / print action buttons */
.fp-action-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}
.fp-action-btn {
    flex: 1;
    font-family: Oswald, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 12px;
    border: 1px solid var(--accent);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--accent);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}
.fp-action-btn:hover {
    background: var(--accent);
    color: #020617;
}

/* Float Plan - Featured trips (curated presets) */
.featured-trips { margin-bottom: 14px; }
.featured-trips-heading {
    font-family: Oswald, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-dim);
    margin-bottom: 8px;
}
.featured-trip-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: border-color var(--transition), box-shadow var(--transition);
}
.featured-trip-card:hover,
.featured-trip-card:focus-visible {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
    outline: none;
}
.ft-name {
    font-family: Oswald, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}
.ft-tagline {
    font-size: 12px;
    color: var(--accent);
    margin-top: 2px;
}
.ft-subtitle {
    font-size: 11px;
    color: var(--text-dim);
    margin-top: 2px;
}

/* Compact toggle buttons (Float Times card, shared between sections + float plan) */
.toggle-row { display:flex; gap:4px; margin-bottom:6px }
.toggle-btn {
    flex:1; padding:7px 6px; border:1px solid var(--border-color);
    border-radius:var(--radius-sm); background:transparent;
    color:var(--text-secondary); font-size:12px; cursor:pointer;
    text-align:center; font-weight:400;
    transition: all 0.15s ease;
}
.toggle-btn:hover {
    background:rgba(255,255,255,0.04);
    border-color:var(--border-light);
}
.toggle-btn.active {
    border-color:var(--accent); color:var(--accent);
    background:rgba(253,119,99,0.1);
    font-weight:600;
}

/* Float Plan - Time Breakdown */
.time-breakdown-row {
    display:flex; justify-content:space-between; align-items:center;
    padding:4px 0; font-size:12px;
}
.time-breakdown-row .label { color:var(--text-secondary) }
.time-breakdown-row .value { font-weight:600 }
.time-breakdown-row .value.faster { color:#22c55e }
.time-breakdown-row .value.slower { color:#fd7e14 }
.time-breakdown-total {
    border-top:1px solid var(--border-color);
    padding-top:6px; margin-top:4px; font-weight:700; font-size:13px;
}

/* Connector Line SVG */
.connector-svg {
    position: fixed;
    inset: 0;
    z-index: 175;
    pointer-events: none;
    overflow: visible;
}

.connector-line {
    fill: none;
    stroke: rgba(255,255,255,0.7);
    stroke-width: 1.5;
    stroke-dasharray: 6, 4;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.connector-line.visible { opacity: 0.6; }

.connector-dot {
    opacity: 0;
    transition: opacity 0.35s ease;
}

.connector-dot.visible { opacity: 0.85; }

/* Hoverable rows in panels */
.nearby-access-row:hover,
.adjacent-gauge-row:hover {
    background: rgba(255,255,255,0.07);
}

/* Precipitation Forecast */
.precip-row {
    margin-top: 10px;
}

.precip-summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.precip-phrase {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.3;
}

.precip-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: 8px;
}

.precip-badge-clear { background: rgba(34,197,94,0.15); color: #22c55e; }
.precip-badge-soon { background: rgba(234,179,8,0.18); color: #eab308; }
.precip-badge-raining { background: rgba(23,162,184,0.18); color: #17a2b8; }

.precip-bars {
    display: flex;
    align-items: flex-end;
    height: 36px;
    gap: 1px;
    background: rgba(255,255,255,0.06);
    border-radius: 4px;
    padding: 3px;
}

.precip-bar {
    flex: 1;
    border-radius: 2px 2px 0 0;
    min-height: 2px;
    position: relative;
    transition: transform 0.15s ease;
}

.precip-bar:hover {
    transform: scaleY(1.15);
    transform-origin: bottom;
}

.precip-bar-tip {
    display: none;
    position: absolute;
    bottom: calc(100% + 4px);
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: var(--text-primary);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 2px 5px;
    border-radius: 4px;
    white-space: nowrap;
    z-index: 5;
    pointer-events: none;
}

.precip-bar:hover .precip-bar-tip { display: block; }

.precip-timeline {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Wind Widget */
#wind-widget {
    position: fixed;
    top: calc(var(--topbar-height) + 80px);
    left: calc(var(--panel-width) + 10px);
    z-index: 129;
    pointer-events: none;
    animation: wind-fade-in 0.6s ease;
}
@keyframes wind-fade-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
.wind-widget-inner {
    background: rgba(10, 10, 15, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.10);
    border-radius: 10px;
    padding: 6px 10px;
    text-align: center;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    min-width: 48px;
}
.wind-arrow {
    display: flex;
    justify-content: center;
    margin-bottom: 1px;
    color: #38bdf8;
    animation: wind-pulse 2s ease-in-out infinite;
}
.wind-arrow svg { width: 20px; height: 20px; }
@keyframes wind-pulse { 0%,100% { opacity: 0.8; } 50% { opacity: 1; } }
.wind-speed {
    font-size: 15px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    font-family: Inter, sans-serif;
}
.wind-unit {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.wind-gust {
    font-size: 8px;
    color: #f59e0b;
    margin-top: 2px;
    font-weight: 600;
}

/* Tributary pitch panel */
.trib-header {
    margin-bottom: 12px;
}
.trib-nickname {
    font-style: italic;
    color: var(--text-dim);
    font-size: 14px;
    margin-top: 2px;
}
.trib-stats {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 12px 0;
}
.trib-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--bg-card);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    color: var(--text);
}
.trib-pitch {
    background: rgba(130,167,45,0.08);
    border: 1px solid rgba(130,167,45,0.2);
    border-radius: 10px;
    padding: 16px;
    margin: 16px 0;
}
.trib-pitch p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--text);
    margin: 0;
}
.trib-cta {
    display: block;
    width: 100%;
    padding: 12px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Oswald', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
    transition: background 0.15s;
    box-sizing: border-box;
}
.trib-cta:hover {
    background: var(--accent-hover);
}
.trib-contact {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 8px;
}
.trib-coverage {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    margin-top: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    background: var(--bg-card);
}
.trib-coverage.available { color: #a855f7; }
.trib-coverage.capture { color: var(--text-dim); }

/* Trail detail panel */
.trail-type-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.trail-type-badge.land { background: rgba(34,197,94,0.2); color: #22c55e; }
.trail-type-badge.rail { background: rgba(245,158,11,0.2); color: #f59e0b; }

.elevation-container {
    width: 100%;
    height: 120px;
    margin: 12px 0;
    position: relative;
}

.elevation-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 8px;
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-dim);
}
.elevation-stats .stat-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.trail-connection {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 10px 12px;
    margin: 10px 0;
    cursor: pointer;
    transition: background 0.15s;
}
.trail-connection:hover {
    background: rgba(74,158,237,0.15);
}
.trail-connection .connection-label {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.trail-connection .connection-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    margin-top: 2px;
}
.trail-connection .connection-dist {
    font-size: 12px;
    color: var(--text-muted);
}

.badge-360 {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.badge-360.available {
    background: rgba(168,85,247,0.2);
    color: #a855f7;
}
.badge-360.coming-soon {
    background: rgba(136,153,170,0.15);
    color: #8899aa;
    cursor: default;
}

/* ── 360 Preview Tray ── */
.trail-preview-tray {
  position: fixed; bottom: 76px; right: 16px; z-index: 160;
  display: flex; gap: 10px; align-items: flex-end;
  pointer-events: none; opacity: 0;
  transition: opacity 0.4s ease;
  max-width: calc(100vw - 32px);
  overflow-x: auto;
}
.trail-preview-tray.visible { opacity: 1; pointer-events: auto; }
.trail-preview-card {
  position: relative; width: 160px; height: 100px;
  border-radius: 10px; overflow: hidden;
  cursor: pointer; flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.trail-preview-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.6);
  border-color: rgba(255,255,255,0.3);
}
.trail-preview-card img {
  width: 100%; height: 100%; object-fit: cover;
}
.trail-preview-card .preview-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 20px 8px 6px;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 11px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.trail-preview-card .preview-360-badge {
  position: absolute; top: 6px; right: 6px;
  background: rgba(0,0,0,0.6); color: #81C784;
  font-size: 9px; font-weight: 700; padding: 2px 6px;
  border-radius: 8px; letter-spacing: 0.5px;
}
.trail-preview-connector {
  fill: none; stroke: rgba(255,255,255,0.8);
  stroke-width: 2; stroke-dasharray: 6, 4;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.6));
}
.trail-preview-dot {
  fill: #81C784; stroke: #fff; stroke-width: 1.5;
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}
@media (max-width: 768px) {
  .trail-preview-tray { display: none; }
}

/* --- Island campsite detail panel --- */
/* Green CAMPING badge (mirrors .type-badge family) */
.type-badge.camping {
  background: rgba(45, 122, 58, 0.15);
  color: #2d7a3a;
}

/* River-mile badge inside an island title reuses .mile-badge (teal) */

/* Amenity chips — teal-tinted, readable dark-teal text */
.island-amenities {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 14px 10px;
}
.island-amenities .amenity-chip {
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  background: #e6f0f0;
  color: var(--primary);
  border: 1px solid var(--border-color);
  text-transform: capitalize;
  white-space: nowrap;
}

/* Add-as-overnight-stop button — full width, teal, Oswald uppercase */
.island-add-plan-btn {
  display: block;
  width: calc(100% - 28px);
  margin: 6px 14px 14px;
  padding: 11px 14px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-family: 'Oswald', sans-serif;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.15s;
}
.island-add-plan-btn:hover {
  background: var(--accent-hover);
}
