/* ==========================================================================
   EEW — European Energy Watch
   Main Stylesheet v1.0.0
   ========================================================================== */

/* ---------- CSS Variables (Light Mode Default) ---------- */
:root {
    --bg-primary: #f8f9fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f0f2f5;
    --bg-card: #ffffff;
    --bg-hover: #eef1f6;

    --text-primary: #1a1d23;
    --text-secondary: #5a6170;
    --text-tertiary: #8c93a3;
    --text-inverse: #ffffff;

    --border-color: #e2e5eb;
    --border-light: #eef1f6;

    --accent-blue: #2563eb;
    --accent-blue-hover: #1d4ed8;
    --accent-green: #16a34a;
    --accent-red: #dc2626;
    --accent-amber: #d97706;
    --accent-purple: #7c3aed;

    --chart-renewable: #16a34a;
    --chart-fossil: #6b7280;
    --chart-nuclear: #7c3aed;
    --chart-hydro: #0891b2;
    --chart-solar: #eab308;
    --chart-wind: #06b6d4;
    --chart-gas: #f97316;
    --chart-coal: #57534e;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.10);

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    --header-height: 56px;
    --max-width: 1320px;
}

/* ---------- Dark Mode ---------- */
[data-theme="dark"] {
    --bg-primary: #0f1117;
    --bg-secondary: #1a1d27;
    --bg-tertiary: #22252f;
    --bg-card: #1a1d27;
    --bg-hover: #262a36;

    --text-primary: #e8eaf0;
    --text-secondary: #9ea3b0;
    --text-tertiary: #6b7082;
    --text-inverse: #0f1117;

    --border-color: #2d3140;
    --border-light: #262a36;

    --shadow-sm: 0 1px 2px rgba(0,0,0,0.2);
    --shadow-md: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.4);
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--accent-blue); text-decoration: none; }
a:hover { color: var(--accent-blue-hover); }

img { max-width: 100%; height: auto; }

/* ---------- Layout ---------- */
.eew-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.eew-main {
    padding-top: calc(var(--header-height) + 20px);
    padding-bottom: 60px;
}

/* ---------- Header ---------- */
.eew-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    align-items: center;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.eew-header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eew-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.05rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.eew-logo-icon {
    width: 28px;
    height: 28px;
    background: var(--accent-blue);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
}

/* Nav */
.eew-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.eew-nav a {
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.87rem;
    font-weight: 500;
    transition: all 0.15s;
}

.eew-nav a:hover,
.eew-nav a.active {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.eew-nav a.active {
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.08);
}

/* Controls (theme + lang toggles) */
.eew-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.eew-toggle-btn {
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.15s;
}

.eew-toggle-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
}

.eew-lang-selector {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.eew-lang-btn {
    padding: 6px 10px;
    border: none;
    background: transparent;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.eew-lang-btn.active {
    background: var(--accent-blue);
    color: white;
}

.eew-lang-btn:hover:not(.active) {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* Mobile menu */
.eew-menu-toggle {
    display: none;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}

/* ---------- Hero / Page Title ---------- */
.eew-hero {
    padding: 28px 0 20px;
}

.eew-hero h1 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}

.eew-hero p {
    color: var(--text-secondary);
    font-size: 0.93rem;
}

.eew-updated {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-tertiary);
    font-size: 0.78rem;
    margin-top: 8px;
}

.eew-updated .dot {
    width: 6px;
    height: 6px;
    background: var(--accent-green);
    border-radius: 50%;
    display: inline-block;
}

/* ---------- KPI Cards Row ---------- */
.eew-kpi-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.eew-kpi-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}

.eew-kpi-label {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}

.eew-kpi-value {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.eew-kpi-change {
    font-size: 0.82rem;
    font-weight: 600;
    margin-top: 4px;
}

.eew-kpi-change.positive { color: var(--accent-green); }
.eew-kpi-change.negative { color: var(--accent-red); }
.eew-kpi-change.neutral  { color: var(--text-tertiary); }

/* ---------- Cards / Panels ---------- */
.eew-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
    overflow: hidden;
}

.eew-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.eew-card-title {
    font-size: 0.95rem;
    font-weight: 650;
    color: var(--text-primary);
}

.eew-card-subtitle {
    font-size: 0.78rem;
    color: var(--text-tertiary);
}

.eew-card-body {
    padding: 20px;
}

.eew-card-body.no-padding {
    padding: 0;
}

/* ---------- Grid Layouts ---------- */
.eew-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.eew-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.eew-grid-map-table {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    gap: 20px;
}

/* ---------- Price Table ---------- */
.eew-price-table {
    width: 100%;
    border-collapse: collapse;
}

.eew-price-table th {
    text-align: left;
    padding: 10px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.eew-price-table td {
    padding: 12px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.eew-price-table tr:last-child td {
    border-bottom: none;
}

.eew-price-table tr:hover td {
    background: var(--bg-hover);
}

.eew-country-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.eew-flag {
    width: 24px;
    height: 16px;
    border-radius: 2px;
    object-fit: cover;
    border: 1px solid var(--border-light);
}

.eew-price-val {
    font-weight: 650;
    font-variant-numeric: tabular-nums;
}

.eew-price-high { color: var(--accent-red); }
.eew-price-mid  { color: var(--accent-amber); }
.eew-price-low  { color: var(--accent-green); }

.eew-renewable-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.eew-renewable-bar-track {
    flex: 1;
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
}

.eew-renewable-bar-fill {
    height: 100%;
    background: var(--chart-renewable);
    border-radius: 3px;
    transition: width 0.6s ease;
}

.eew-renewable-pct {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--chart-renewable);
    min-width: 40px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ---------- Map Container ---------- */
.eew-map-container {
    width: 100%;
    height: 480px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-tertiary);
}

.eew-map-container .leaflet-container {
    background: var(--bg-tertiary) !important;
}

/* Leaflet tooltip override */
.eew-map-tooltip {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-md) !important;
    padding: 8px 12px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 0.82rem !important;
    color: var(--text-primary) !important;
}

.eew-map-tooltip .country-name {
    font-weight: 650;
    margin-bottom: 2px;
}

.eew-map-tooltip .price-value {
    font-size: 1.05rem;
    font-weight: 700;
}

/* ---------- Chart Containers ---------- */
.eew-chart-container {
    position: relative;
    width: 100%;
    height: 300px;
}

.eew-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.eew-chart-container.small { height: 200px; }
.eew-chart-container.tall  { height: 400px; }

/* ---------- Generation Mix Donut ---------- */
.eew-gen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.eew-gen-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    box-shadow: var(--shadow-sm);
    text-align: center;
}

.eew-gen-card h3 {
    font-size: 0.9rem;
    font-weight: 650;
    margin-bottom: 4px;
}

.eew-gen-card .ren-pct {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--chart-renewable);
    margin-bottom: 12px;
}

.eew-gen-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 16px;
    margin-top: 12px;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.eew-gen-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.eew-gen-legend-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* ---------- Loading / Empty States ---------- */
.eew-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    color: var(--text-tertiary);
    font-size: 0.88rem;
}

.eew-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-top-color: var(--accent-blue);
    border-radius: 50%;
    animation: eew-spin 0.7s linear infinite;
    margin-right: 10px;
}

@keyframes eew-spin {
    to { transform: rotate(360deg); }
}

.eew-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-tertiary);
}

.eew-empty p { font-size: 0.88rem; }

.eew-setup-notice {
    background: rgba(37, 99, 235, 0.06);
    border: 1px solid rgba(37, 99, 235, 0.2);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 24px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.eew-setup-notice strong {
    color: var(--accent-blue);
}

.eew-setup-notice code {
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.82rem;
}

/* ---------- Footer ---------- */
.eew-footer {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    margin-top: 40px;
    color: var(--text-tertiary);
    font-size: 0.78rem;
}

.eew-footer-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.eew-footer-links {
    display: flex;
    gap: 16px;
}

.eew-footer-links a {
    color: var(--text-tertiary);
    font-size: 0.78rem;
}

.eew-footer-links a:hover {
    color: var(--text-primary);
}

.eew-footer-sources {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    max-width: 600px;
    text-align: right;
}

/* ---------- Responsive ---------- */

@media (max-width: 1024px) {
    .eew-grid-map-table {
        grid-template-columns: 1fr;
    }
    .eew-map-container {
        height: 380px;
    }
}

@media (max-width: 768px) {
    html { font-size: 14px; }

    .eew-logo span { display: none; }

    .eew-nav { display: none; }
    .eew-nav.open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-secondary);
        border-bottom: 1px solid var(--border-color);
        padding: 12px 16px;
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }

    .eew-menu-toggle { display: flex; }

    .eew-grid-2,
    .eew-grid-3 {
        grid-template-columns: 1fr;
    }

    .eew-kpi-row {
        grid-template-columns: 1fr 1fr;
    }

    .eew-hero h1 {
        font-size: 1.3rem;
    }

    .eew-map-container {
        height: 300px;
    }

    .eew-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .eew-footer-sources {
        text-align: center;
    }

    .eew-controls {
        gap: 4px;
    }

    .eew-lang-btn {
        padding: 5px 7px;
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .eew-kpi-row {
        grid-template-columns: 1fr;
    }

    .eew-gen-grid {
        grid-template-columns: 1fr;
    }

    .eew-price-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .eew-price-table {
        min-width: 500px;
    }
}

/* ---------- Utility classes ---------- */
.text-center { text-align: center; }
.text-right { text-align: right; }
.font-mono { font-variant-numeric: tabular-nums; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }

/* ---------- Live Badge ---------- */
.eew-updated .dot.live {
    background: var(--accent-green);
    animation: eew-pulse-dot 1.5s ease-in-out infinite;
}

.eew-live-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--accent-green);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-right: 4px;
}

@keyframes eew-pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
    50%      { opacity: 0.7; box-shadow: 0 0 0 5px rgba(22, 163, 74, 0); }
}

/* ---------- Negative Price Alert Banner ---------- */
.eew-alert-negative {
    background: rgba(30, 58, 95, 0.08);
    border: 1px solid rgba(30, 58, 95, 0.25);
    border-left: 4px solid #1e3a5f;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 10px;
}

[data-theme="dark"] .eew-alert-negative {
    background: rgba(30, 58, 95, 0.2);
    border-color: rgba(59, 130, 246, 0.3);
}

.eew-alert-icon {
    font-size: 1.1rem;
}

.eew-neg-badge {
    display: inline-block;
    background: #1e3a5f;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    margin-left: 6px;
    vertical-align: middle;
    letter-spacing: 0.04em;
}

/* ---------- Clickable Price Rows ---------- */
.eew-price-row.clickable {
    cursor: pointer;
    transition: background 0.15s;
}

.eew-price-row.clickable:hover td {
    background: var(--bg-hover);
}

.eew-price-row.has-negative td:first-child {
    border-left: 3px solid #1e3a5f;
}

.eew-expand-hint {
    display: inline-block;
    color: var(--text-tertiary);
    font-size: 0.72rem;
    margin-left: 4px;
    transition: transform 0.2s;
}

/* ---------- Hourly Chart Row ---------- */
.eew-hourly-row td {
    padding: 0 !important;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.eew-hourly-chart-container {
    height: 220px;
    padding: 16px 20px;
}

.eew-hourly-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

/* ---------- Map price label pulse (negative prices) ---------- */
@keyframes eew-pulse {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.15); }
}

/* ---------- Select Dropdowns ---------- */
.eew-select {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%236b7280' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.eew-select:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* ---------- Text Input ---------- */
.eew-input {
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.82rem;
    font-family: 'Inter', sans-serif;
}

.eew-input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15);
}

/* ---------- Primary Button ---------- */
.eew-btn-primary {
    padding: 6px 16px;
    border: none;
    border-radius: var(--radius-sm);
    background: var(--accent-blue);
    color: white;
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: background 0.15s;
}

.eew-btn-primary:hover {
    background: var(--accent-blue-hover);
}

/* ---------- Export Buttons ---------- */
.eew-export-btn {
    padding: 4px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    transition: all 0.15s;
}

.eew-export-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.05);
}

/* ---------- Triggered Alert Notification ---------- */
.eew-alert-triggered {
    background: rgba(37, 99, 235, 0.08);
    border: 1px solid rgba(37, 99, 235, 0.25);
    border-left: 4px solid var(--accent-blue);
    border-radius: var(--radius-sm);
    padding: 14px 16px;
    margin-bottom: 16px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

[data-theme="dark"] .eew-alert-triggered {
    background: rgba(37, 99, 235, 0.12);
}

/* ---------- Code Block ---------- */
.eew-code-block {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    overflow-x: auto;
}

.eew-code-block code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 0.78rem;
    color: var(--text-primary);
    word-break: break-all;
}

/* ---------- Flow map lines ---------- */
.eew-flow-line {
    animation: eew-dash 1.5s linear infinite;
}

@keyframes eew-dash {
    to { stroke-dashoffset: -24; }
}

.eew-flow-label {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* ---------- Currency Buttons ---------- */
.eew-currency-btn {
    padding: 4px 10px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.eew-currency-btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.eew-currency-btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.eew-currency-btn + .eew-currency-btn { border-left: none; }

.eew-currency-btn.active {
    background: var(--accent-blue);
    color: white;
    border-color: var(--accent-blue);
}

/* ---------- Tool Link Cards ---------- */
.eew-tool-link {
    display: inline-flex;
    align-items: center;
    padding: 10px 18px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.15s;
}

.eew-tool-link:hover {
    border-color: var(--accent-blue);
    background: rgba(37, 99, 235, 0.05);
    color: var(--accent-blue);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

/* ---------- Leaflet overrides for clean look ---------- */
.eew-price-label {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.leaflet-tooltip.eew-map-tooltip {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    color: var(--text-primary);
}

.leaflet-tooltip.eew-map-tooltip::before {
    border-top-color: var(--border-color);
}
