/**
 * CONS Hartă ACoR v4.0 — CSS
 * BIG-MEDIA / Anton Ștefan Daniel PFA
 */

/* ── Wrapper ── */
.cons-harta-wrap {
    display: block;
    width: 100%;
    background: var(--ch-bg, transparent);
    box-sizing: border-box;
}

/* ── Harta SVG ── */
.ch-map-wrap {
    width: 100%;
    line-height: 0;
}

.ch-svg {
    display: block;
    width: 100%;
    height: auto;
}

/* ── Județe — stare implicită ── */
.cons-jud {
    fill: var(--ch-inactiv, #c8d4e0);
    stroke: var(--ch-stroke, #ffffff);
    stroke-width: 0.8px;
    cursor: default;
    transition:
        fill var(--ch-fade, 400ms) ease,
        opacity var(--ch-fade, 400ms) ease;
}

/* Inactiv explicit (după reset sau înainte de activare) */
.cons-jud.ch-inactiv {
    fill: var(--ch-inactiv, #c8d4e0);
}

/* Activ */
.cons-jud.ch-activ {
    fill: var(--ch-activ, #1a56db);
    cursor: pointer;
}

/* Evidențiat */
.cons-jud.ch-hl {
    fill: var(--ch-hl, #c9a84c) !important;
    cursor: pointer;
}

/* Hover */
.cons-jud:hover {
    fill: var(--ch-hover, #3b82f6);
    opacity: 0.88;
}

/* Label județe (text cod) */
.cons-jud-label {
    font-family: sans-serif;
    font-size: 5px;
    fill: rgba(255,255,255,0.55);
    pointer-events: none;
    user-select: none;
    font-weight: 600;
    letter-spacing: 0.02em;
}

/* ── Slider ── */
.ch-slider-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 24px 8px;
    box-sizing: border-box;
    width: 100%;
}

.ch-year-display {
    font-size: 2rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--ch-year-txt, #0d1b2a);
    line-height: 1;
    letter-spacing: -0.02em;
    min-width: 4ch;
    text-align: center;
}

.ch-slider-track-wrap {
    width: 100%;
    position: relative;
}

/* Range input — cross-browser */
.ch-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 4px;
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    /* Track via gradient pentru fill dinamic */
    background: linear-gradient(
        to right,
        var(--ch-fill, #1a56db) 0%,
        var(--ch-fill, #1a56db) var(--ch-pct, 0%),
        var(--ch-track, #d1d5db) var(--ch-pct, 0%),
        var(--ch-track, #d1d5db) 100%
    );
    transition: background 0.05s;
}

/* Thumb — Webkit */
.ch-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ch-thumb, #1a56db);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.ch-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Thumb — Firefox */
.ch-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--ch-thumb, #1a56db);
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
    cursor: pointer;
}

.ch-slider:focus-visible::-webkit-slider-thumb {
    box-shadow: 0 0 0 3px rgba(26,86,219,0.35);
}

/* Limite ani */
.ch-year-limits {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.75rem;
    color: #9ca3af;
    padding: 0 2px;
    box-sizing: border-box;
}

/* ── Tooltip ── */
.ch-tooltip {
    position: fixed;
    z-index: 99999;
    background: rgba(13,27,42,0.92);
    color: #e2e8f0;
    font-size: 12px;
    font-family: sans-serif;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    pointer-events: none;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    backdrop-filter: blur(4px);
}

.ch-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}
