/* ==========================================================================
   Map Page Layout
   ========================================================================== */

.map-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 94px);
}

.map-page-layout {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

.map-content {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding-block: 1rem;
}


/* ==========================================================================
   Map Container
   ========================================================================== */

#map-section {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
}

.map-container {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin-inline: auto;
}


/* ==========================================================================
   SVG Map
   ========================================================================== */

.arms-atlas-map {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 260px);
    margin-inline: auto;
}

.arms-atlas-map .state {
    cursor: pointer;
}

.arms-atlas-map polygon {
    fill-opacity: var(--map-hex-opacity);
}


/* ==========================================================================
   Solid Hexes
   ========================================================================== */

.arms-atlas-map .hex-fill {
    fill: #e9ecef;
    stroke: #495057;
    stroke-width: 1.5;
    transition:
        fill .15s ease,
        filter .15s ease;
}


/* ==========================================================================
   Segmented Hexes
   ========================================================================== */

.arms-atlas-map .hex-wedge {
    stroke: none;
    transition:
        fill .15s ease,
        filter .15s ease;
}

.arms-atlas-map .hex-outline {
    fill: none;
    stroke: #495057;
    stroke-width: 1.5;
}


/* ==========================================================================
   Map Interaction
   ========================================================================== */

/*
 * Do not change the fill on hover.
 *
 * Classification colors are supplied dynamically by the selected topic.
 */

.arms-atlas-map .state:hover .hex-fill,
.arms-atlas-map .state:hover .hex-wedge,
.arms-atlas-map .state:focus .hex-fill,
.arms-atlas-map .state:focus .hex-wedge {
    filter: brightness(1.12);
}

.arms-atlas-map .state:focus {
    outline: none;
}

.arms-atlas-map .state text {
    text-anchor: middle;
    dominant-baseline: central;
    font-size: 20px;
    font-weight: 600;
    pointer-events: none;
    user-select: none;
}
