/* =============================================================================
   World Map — Data Coverage Explorer
   ============================================================================= */

.wm-filterbar .wm-layer-btn {
    font-weight: 500;
}

.wm-search-wrap {
    max-width: 280px;
    flex: 1 1 220px;
}

/* Tri-state Banknotes/Coins filter chip on the Cash CIC map — cycles
   any -> has -> only -> any on click; "only" means this type present AND
   the other type absent, "has" means this type present regardless of the
   other. */
.wm-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    border: 1px solid #ccc;
    background: #fff;
    color: #495057;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.wm-type-chip:hover {
    border-color: var(--cash-accent);
}

.wm-type-chip[data-state="has"] {
    background-color: var(--cash-accent);
    border-color: var(--cash-accent);
    color: #fff;
}

.wm-type-chip[data-state="only"] {
    background-color: #b45309;
    border-color: #b45309;
    color: #fff;
}

.wm-type-chip-state {
    font-size: 0.68rem;
    font-weight: 400;
    opacity: 0.9;
}

.wm-type-chip-state:not(:empty)::before {
    content: '\2014';
    margin-right: 0.3rem;
    opacity: 0.6;
}

.wm-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    background: #fff;
    border: 1px solid rgba(11, 11, 11, 0.12);
    border-radius: 0.375rem;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    margin-top: 2px;
    max-height: 260px;
    overflow-y: auto;
    display: none;
}

.wm-search-results.show {
    display: block;
}

.wm-search-result {
    padding: 0.4rem 0.75rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.wm-search-result:hover,
.wm-search-result.active {
    background: #f1f3f5;
}

.wm-statsbar {
    background: #fff;
    border: 1px solid rgba(11, 11, 11, 0.08);
    border-radius: 0.5rem;
    padding: 0.65rem 1rem;
}

.wm-stat-total {
    font-size: 0.95rem;
    font-weight: 600;
    color: #343a40;
    white-space: nowrap;
}

.wm-legend-row {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #495057;
    user-select: none;
    white-space: nowrap;
    background: #f8f9fa;
}

.wm-legend-row:hover {
    background: #f1f3f5;
}

.wm-legend-row.wm-dim {
    opacity: 0.4;
}

.wm-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex: none;
    border: 1px solid rgba(11, 11, 11, 0.15);
}

.wm-legend-count {
    font-variant-numeric: tabular-nums;
    color: #6c757d;
}

.wm-legend-locked-note {
    font-size: 0.8rem;
    color: #868e96;
    white-space: nowrap;
}

.wm-map-frame {
    position: relative;
    width: 100%;
    background: #f8fafc;
    border: 1px solid rgba(11, 11, 11, 0.08);
    border-radius: 0.5rem;
    overflow: hidden;
}

.wm-map {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 360 / 145;
    cursor: grab;
}

.wm-map.wm-panning {
    cursor: grabbing;
}

.wm-country {
    stroke: #d7dce2;
    stroke-width: 0.4;
    fill: none;
    transition: fill 150ms ease, opacity 150ms ease;
}

.wm-country.wm-has-fill {
    stroke: #ffffff;
    stroke-width: 0.35;
}

.wm-country.wm-locked {
    stroke-dasharray: 1.2 1;
    fill-opacity: 0.5;
}

.wm-country.wm-dim {
    opacity: 0.25;
}

.wm-marker {
    fill: #ffffff;
    stroke: #6c757d;
    stroke-width: 0.5;
    cursor: pointer;
    transition: r 120ms ease;
}

.wm-marker:hover,
.wm-marker.wm-marker-active {
    stroke: #343a40;
    stroke-width: 0.7;
}

.wm-leader {
    stroke: #6c757d;
    stroke-width: 0.35;
    fill: none;
    opacity: 0.7;
}

.wm-zoom {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(11, 11, 11, 0.12);
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 15;
}

.wm-zoom button {
    width: 32px;
    height: 32px;
    border: none;
    background: #fff;
    color: #495057;
    border-bottom: 1px solid rgba(11, 11, 11, 0.08);
}

.wm-zoom button:last-child {
    border-bottom: none;
}

.wm-zoom button:hover {
    background: #f1f3f5;
}

/* Organigram callout */
.wm-callout {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 20;
    display: none;
}

.wm-callout.show {
    display: block;
}

.wm-callout-name {
    position: absolute;
    background: #212529;
    color: #fff;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
    border-radius: 0.35rem;
    white-space: nowrap;
    pointer-events: auto;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.wm-callout-name:hover,
.wm-callout-name:focus-visible {
    background: #0d6efd;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.35);
}

.wm-callout-name::after {
    content: '\2192';
    margin-left: 0.4rem;
    opacity: 0.65;
}

.wm-callout-card {
    position: absolute;
    background: #fff;
    border: 1px solid rgba(11, 11, 11, 0.1);
    border-radius: 0.4rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.78rem;
    white-space: nowrap;
    pointer-events: auto;
    text-decoration: none;
    color: #212529;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    border-left: 3px solid var(--wm-card-color, #adb5bd);
    cursor: pointer;
    transition: transform 120ms ease, box-shadow 120ms ease, background-color 120ms ease, border-left-width 120ms ease;
}

.wm-callout-card:hover,
.wm-callout-card:focus-visible {
    background-color: color-mix(in srgb, var(--wm-card-color, #adb5bd) 18%, white);
    color: #212529;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.22);
    border-left-width: 5px;
}

.wm-callout-card.wm-locked-card {
    color: #868e96;
    cursor: not-allowed;
}

.wm-callout-card.wm-locked-card:hover {
    background-color: #fff;
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    border-left-width: 3px;
}

.wm-callout-card .wm-card-label {
    display: block;
}

/* Popover-with-scrollable-list callout (list-page map views) — a single
   country marker can hold anywhere from 1 to hundreds of items, unlike the
   coverage map's fixed 4-domain cards, so this is a scrollable list inside
   one card rather than a cascade of many small cards. */
.wm-popover {
    width: 260px;
    max-width: 80vw;
    white-space: normal;
    padding: 0;
    cursor: default;
}

.wm-popover:hover {
    /* The popover container itself isn't a link — cancel the generic
       .wm-callout-card hover lift/tint so only its inner links look clickable. */
    background-color: #fff;
    transform: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
    border-left-width: 3px;
}

.wm-popover-title {
    font-weight: 600;
    font-size: 0.82rem;
    padding: 0.55rem 0.7rem 0.4rem;
    border-bottom: 1px solid rgba(11, 11, 11, 0.08);
}

.wm-popover-count {
    font-weight: 500;
    color: #6c757d;
    font-size: 0.75rem;
}

.wm-popover-columns {
    display: flex;
    justify-content: space-between;
    padding: 0.35rem 0.7rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #adb5bd;
    border-bottom: 1px solid rgba(11, 11, 11, 0.06);
}

.wm-popover-list {
    max-height: 260px;
    overflow-y: auto;
    padding: 0.3rem 0;
}

.wm-popover-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
    color: #212529;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
}

.wm-popover-denom {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wm-popover-year {
    flex-shrink: 0;
    color: #868e96;
    font-variant-numeric: tabular-nums;
}

.wm-popover-item:hover,
.wm-popover-item:focus-visible {
    background-color: color-mix(in srgb, var(--wm-card-color, #adb5bd) 16%, white);
}

.wm-popover-more {
    display: block;
    text-align: center;
    padding: 0.5rem 0.7rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #fff;
    background: var(--wm-card-color, #495057);
    text-decoration: none;
    border-radius: 0 0 0.4rem 0.4rem;
    cursor: pointer;
    transition: filter 120ms ease;
}

.wm-popover-more:hover,
.wm-popover-more:focus-visible {
    filter: brightness(1.1);
    color: #fff;
}

.wm-callout-card .wm-card-lock {
    font-size: 0.7rem;
    opacity: 0.7;
    margin-left: 0.25rem;
}

/* Two-section (Banknotes / Coins) popover for the Cash CIC map — each
   section is a fixed Year + Volume/Value block rather than the scrollable
   N-item list of .wm-popover-list, so it gets its own lightweight layout
   instead of reusing .wm-popover-columns/.wm-popover-item (2-column
   denom/year). */
.wm-cash-section {
    padding-bottom: 0.2rem;
}

.wm-cash-section + .wm-cash-section {
    border-top: 1px solid rgba(11, 11, 11, 0.06);
}

.wm-cash-section-title {
    padding: 0.5rem 0.7rem 0.15rem;
    font-size: 0.72rem;
    font-weight: 700;
    color: #495057;
}

.wm-cash-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.6rem;
    padding: 0.1rem 0.7rem;
    font-size: 0.8rem;
}

.wm-cash-label {
    color: #868e96;
    flex-shrink: 0;
}

.wm-cash-metric {
    font-weight: 600;
    color: #212529;
    text-align: right;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wm-cash-unit {
    font-weight: 400;
    color: #adb5bd;
    font-size: 0.72rem;
}

.wm-cash-empty {
    padding: 0 0.7rem 0.5rem;
    font-size: 0.78rem;
    color: #adb5bd;
    font-style: italic;
}
