/* Home — elite distribution map by province */

.home-elite-map {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgb(226 232 240);
}

.home-elite-map__title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.375rem, 4vw, 2rem);
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -0.02em;
    color: rgb(15 23 42);
    text-wrap: balance;
}

.home-elite-map__title::after {
    content: "";
    display: block;
    width: 2.5rem;
    height: 0.3rem;
    margin-top: 0.5rem;
    border-radius: 0.25rem;
    background-color: rgba(42, 71, 164, 0.82);
}

.home-elite-map__subtitle {
    margin: 0 0 1.25rem;
    max-width: 42rem;
    font-size: clamp(0.875rem, 2.4vw, 1rem);
    line-height: 1.85;
    color: rgb(71 85 105);
}

.home-elite-map__legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    margin-bottom: 1.25rem;
}

.home-elite-map__legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: rgb(51 65 85);
}

.home-elite-map__legend-item::before {
    content: "";
    width: 1rem;
    height: 1rem;
    border-radius: 0.2rem;
    border: 1px solid rgb(109 110 113);
}

.home-elite-map__legend-item--with-elites::before {
    background-color: #90ee90;
}

.home-elite-map__legend-item--without-elites::before {
    background-color: #f1f2f2;
}

.home-elite-map__layout {
    display: grid;
    gap: 1.5rem;
    align-items: start;
}

.home-elite-map__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.home-elite-map__province {
    position: relative;
    padding: 1.25rem 0.5rem 0.625rem;
    border: 1px solid rgb(203 213 225);
    border-radius: 0.375rem;
    text-align: center;
    font-size: 0.75rem;
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease;
}

.home-elite-map__province.has-elites {
    background-color: rgb(220 252 231);
}

.home-elite-map__province.is-map-only {
    border-style: dashed;
}

.home-elite-map__province.is-highlighted {
    border-color: rgb(11 70 99);
    box-shadow: 0 0 0 2px rgba(11, 70, 99, 0.15);
}

.home-elite-map__province-name {
    display: block;
    color: rgb(15 23 42);
}

.home-elite-map__province.no-elites .home-elite-map__province-name {
    color: rgb(100 116 139);
}

.home-elite-map__province-badge {
    position: absolute;
    top: -0.625rem;
    left: -0.625rem;
    max-width: 6.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    font-size: 0.625rem;
    line-height: 1.3;
    white-space: nowrap;
}

.home-elite-map__province.has-elites .home-elite-map__province-badge {
    background-color: rgb(22 163 74);
    color: white;
}

.home-elite-map__province.no-elites .home-elite-map__province-badge {
    background-color: rgb(190 183 183);
    color: white;
}

.home-elite-map__map-wrap {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.home-elite-map__svg {
    width: 100%;
    max-width: 50rem;
}

.home-elite-map__svg svg {
    display: block;
    width: 100%;
    height: auto;
}

.home-elite-map__svg [data-key] {
    stroke: #6d6e71;
    stroke-width: 0.01rem;
    transition: fill 200ms ease;
}

.home-elite-map__svg .has-elites-map-province {
    fill: #90ee90 !important;
}

.home-elite-map__svg .no-elites-map-province {
    fill: #f1f2f2 !important;
}

.home-elite-map__svg [data-key].is-map-highlight {
    fill: #fbb040 !important;
}

.home-elite-map__svg .home-elite-map__province-label {
    font-family: inherit;
    font-weight: 800;
    fill: rgb(11 70 99);
    paint-order: stroke fill;
    stroke: rgba(255, 255, 255, 0.9);
    stroke-width: 4px;
    stroke-linejoin: round;
    pointer-events: none;
    user-select: none;
}

.home-elite-map__svg .home-elite-map__province-label.is-zero {
    fill: rgb(100 116 139);
    font-weight: 600;
}

.home-elite-map__svg .home-elite-map__province-label.is-map-highlight {
    fill: rgb(120 53 15);
}

@media (min-width: 640px) {
    .home-elite-map__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .home-elite-map__layout {
        grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
        gap: 2rem;
    }

    .home-elite-map__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1280px) {
    .home-elite-map__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}
