/* Global polish on top of Mantine. Dash serves every .css in assets/ automatically. */

body {
    background: #f6f8fa;
    -webkit-font-smoothing: antialiased;
}

.icon {
    display: inline-block;
    flex-shrink: 0;
    background-color: currentColor;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

/* Header */
.app-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
}

.brand-logo {
    height: 34px;
    width: auto;
    display: block;
}

/* Header navigation */
.nav-link {
    border-radius: var(--mantine-radius-md);
    padding: 6px 12px;
    font-weight: 500;
}

.nav-link[data-active] {
    font-weight: 700;
}

/* Home page */
.hero {
    background:
        radial-gradient(circle at 15% 20%, rgba(32, 201, 151, 0.18), transparent 45%),
        radial-gradient(circle at 85% 80%, rgba(42, 120, 214, 0.14), transparent 50%),
        linear-gradient(135deg, #ffffff 0%, #f1fbf7 100%);
}

.hero-logo-box {
    flex-shrink: 0;
    width: 160px;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #ffffff;
}

.hero-logo {
    width: 100%;
    height: auto;
}

@media (max-width: 600px) {
    .hero-logo-box {
        width: 96px;
        padding: 12px;
    }
}

.feature-card {
    display: block;
    height: 100%;
    text-decoration: none;
    color: inherit;
    transition: transform 150ms ease, box-shadow 150ms ease, border-color 150ms ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--mantine-shadow-md);
    border-color: var(--mantine-color-teal-3);
}

.feature-card .feature-arrow {
    transition: transform 150ms ease;
}

.feature-card:hover .feature-arrow {
    transform: translateX(-4px);
}

.stat-value {
    font-variant-numeric: tabular-nums;
    direction: ltr;
    unicode-bidi: isolate;
    /* LTR keeps "MW"/"%" after the number, but the value still lines up with the RTL label */
    text-align: right;
}

.hero-stat {
    width: 240px;
}

/* Charts: Plotly draws LTR internally even inside an RTL page */
.js-plotly-plot, .dash-graph {
    direction: ltr;
}

.chip-scroller {
    row-gap: 8px;
}

/* Mantine centres slider mark labels with an LTR-only transform; mirror it so labels sit under their marks */
[dir="rtl"] .year-slider .mantine-RangeSlider-markLabel {
    transform: translate(calc(50% - var(--slider-size) / 2), calc(var(--mantine-spacing-xs) / 2));
}

.chip-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chip-emoji {
    font-size: 15px;
    line-height: 1;
    font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
}

/* Switches that pick between two equal views: same track colour whether on or off */
.choice-switch .mantine-Switch-track {
    background-color: var(--switch-color);
    border-color: var(--switch-color);
}
