/* sanctionssearch.info - shared theme
   Palette sampled from the site badge. Neon is for action and focus only;
   red stays reserved for sanctioned/wanted results. */

:root {
    --void: #000000;
    --panel: #0A100A;
    --panel-raised: #111A11;
    --line: #1F2E1F;
    --line-strong: #2E472E;
    --signal: #8CF82C;
    --signal-deep: #5FB51C;
    --signal-wash: rgba(140, 248, 44, 0.08);
    --text: #E4EEE2;
    --muted: #93A591;
    --faint: #647563;
    --alert: #FF4B4B;
    --alert-strong: #E02424;
    --alert-wash: rgba(255, 75, 75, 0.1);
    --caution: #F2B33D;

    --font-body: "Saira", "Segoe UI", system-ui, sans-serif;
    --font-display: "Saira Semi Condensed", "Saira", "Segoe UI", system-ui, sans-serif;

    --radius: 8px;
    --radius-small: 5px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    color-scheme: dark;
}

body {
    font-family: var(--font-body);
    font-size: 15px;
    background: var(--void);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

::selection {
    background: var(--signal);
    color: var(--void);
}

a {
    color: var(--signal);
}

:focus-visible {
    outline: 2px solid var(--signal);
    outline-offset: 2px;
}

/* ---------- Header ---------- */

.header {
    position: relative;
    background: var(--void);
    padding: 18px 24px;
    border-bottom: 1px solid var(--line);
}

/* The circuit trace: one neon line that draws in on load */
.header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg, var(--signal) 0%, var(--signal) 55%, transparent 100%);
    box-shadow: 0 0 12px rgba(140, 248, 44, 0.55);
    transform-origin: left center;
    animation: trace-in 900ms cubic-bezier(0.2, 0.7, 0.2, 1) 150ms both;
}

@keyframes trace-in {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    min-width: 0;
}

.brand-badge {
    width: 88px;
    height: 88px;
    flex-shrink: 0;
    filter: drop-shadow(0 0 14px rgba(140, 248, 44, 0.18));
}

.brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--text);
}

.subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-top: 4px;
}

.nav-links {
    display: flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--panel);
    flex-shrink: 0;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 7px 18px;
    border-radius: 999px;
    transition: color 0.15s, background 0.15s;
}

.nav-link:hover {
    color: var(--text);
    background: var(--panel-raised);
}

.nav-link.active {
    background: var(--signal);
    color: var(--void);
    font-weight: 600;
}

/* ---------- Shared controls ---------- */

.search-input {
    width: 100%;
    padding: 11px 12px;
    background: var(--void);
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-small);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input::placeholder {
    color: var(--faint);
}

.search-input:focus {
    outline: none;
    border-color: var(--signal);
    box-shadow: 0 0 0 3px var(--signal-wash);
}

select.search-input option {
    background: var(--panel);
}

.search-button,
.button {
    padding: 11px 22px;
    background: var(--signal);
    color: var(--void);
    border: 1px solid var(--signal);
    border-radius: var(--radius-small);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
}

.search-button {
    width: 100%;
}

.search-button:hover,
.button:hover {
    background: #A6FF5A;
    border-color: #A6FF5A;
}

.search-button:active,
.button:active {
    background: var(--signal-deep);
    border-color: var(--signal-deep);
}

.button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.button-secondary {
    background: transparent;
    color: var(--text);
    border-color: var(--line-strong);
}

.button-secondary:hover {
    background: var(--panel-raised);
    border-color: var(--muted);
}

.disclaimer {
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--caution);
    padding: 14px 16px;
    border-radius: var(--radius-small);
}

.disclaimer-title {
    color: var(--caution);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.disclaimer-text {
    font-size: 12px;
    color: var(--muted);
    line-height: 1.55;
}

.support-button {
    display: block;
    width: fit-content;
    margin: 32px auto;
    padding: 10px 22px;
    background: transparent;
    color: var(--signal);
    border: 1px solid var(--signal);
    text-decoration: none;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: background 0.15s, color 0.15s;
}

.support-button:hover {
    background: var(--signal);
    color: var(--void);
}

.spinner {
    border: 3px solid var(--line-strong);
    border-top-color: var(--signal);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 0.9s linear infinite;
}

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

/* ---------- Scrollbars ---------- */

* {
    scrollbar-color: var(--line-strong) transparent;
}

::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--line-strong);
    border-radius: 10px;
    border: 2px solid var(--void);
}

/* ---------- Leaflet on dark ---------- */

.leaflet-container {
    background: var(--void);
    font-family: var(--font-body);
}

/* Standard OpenStreetMap tiles (no API key), darkened to match the theme.
   Only the tile layer is filtered, so markers and circles keep their colors. */
.leaflet-tile-pane {
    filter: invert(1) hue-rotate(180deg) brightness(0.85) contrast(0.9) saturate(0.35);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--panel-raised);
    color: var(--text);
    border: 1px solid var(--line-strong);
    box-shadow: none;
}

.leaflet-container a.leaflet-popup-close-button {
    color: var(--muted);
}

.leaflet-bar a,
.leaflet-bar a:hover {
    background: var(--panel-raised);
    color: var(--text);
    border-bottom-color: var(--line);
}

.leaflet-control-attribution {
    background: rgba(0, 0, 0, 0.7) !important;
    color: var(--faint);
}

.leaflet-control-attribution a {
    color: var(--muted);
}

/* ---------- Small screens and motion ---------- */

@media (max-width: 720px) {
    .header {
        padding: 14px 16px;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .brand-badge {
        width: 64px;
        height: 64px;
    }

    .title {
        font-size: 24px;
    }

    .subtitle {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-delay: 0ms !important;
        transition-duration: 0.01ms !important;
    }

    .spinner {
        animation-duration: 1.5s !important;
    }

    .header::after {
        animation: none;
    }
}
