/* ==========================================================================
   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;

    transform-box: fill-box;
    transform-origin: center;

    transition:
        transform .16s ease,
        filter .16s ease;
}

.arms-atlas-map polygon {
    fill-opacity: var(--map-hex-opacity);
}


/* ==========================================================================
   Solid Hexes
   ========================================================================== */

.arms-atlas-map .hex-fill {
    fill: #e9ecef;

    stroke: rgba(255, 255, 255, .38);
    stroke-width: 1.5;
    stroke-linejoin: round;

    transition:
        fill .15s ease,
        filter .15s ease,
        stroke .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: rgba(255, 255, 255, .38);
    stroke-width: 1.5;
    stroke-linejoin: round;

    pointer-events: none;

    transition:
        stroke .15s ease;
}


/* ==========================================================================
   Map Interaction
   ========================================================================== */

/*
 * Classification colors are supplied dynamically by the selected topic.
 *
 * Hover and selected effects modify brightness, scale, position and shadow
 * only. They do not replace the classification fill color.
 */

.arms-atlas-map .state:hover,
.arms-atlas-map .state.is-selected {
    transform: translateY(-3px) scale(1.045);

    filter:
        drop-shadow(0 2px 1px rgba(0, 0, 0, .9))
        drop-shadow(0 8px 6px rgba(0, 0, 0, .8));
}

.arms-atlas-map .state:hover .hex-fill,
.arms-atlas-map .state:hover .hex-wedge,
.arms-atlas-map .state.is-selected .hex-fill,
.arms-atlas-map .state.is-selected .hex-wedge,
.arms-atlas-map .state:focus .hex-fill,
.arms-atlas-map .state:focus .hex-wedge {
    filter:
        brightness(1.12)
        saturate(1.06);
}

.arms-atlas-map .state:hover .hex-fill,
.arms-atlas-map .state:hover .hex-outline,
.arms-atlas-map .state.is-selected .hex-fill,
.arms-atlas-map .state.is-selected .hex-outline {
    stroke: rgba(255, 255, 255, .7);
}

.arms-atlas-map .state:focus {
    outline: none;
}


/* ==========================================================================
   State Labels
   ========================================================================== */

.arms-atlas-map .state text {
    text-anchor: middle;
    dominant-baseline: central;

    font-size: 20px;
    font-weight: 600;

    pointer-events: none;
    user-select: none;
}
