/*
 * ============================================================
 * BLOODMOON GRID
 * World Map
 * ============================================================
 *
 * Version : 2026-09-08 16:40
 */


.world-map-page {
    min-height: 70vh;
    background:
        linear-gradient(
            180deg,
            #f7f8fa 0%,
            #ffffff 34%,
            #f8f8f6 100%
        );
}


.world-map-container {
    width: min(
        1380px,
        calc(100% - 40px)
    );
    margin: 0 auto;
}


/* ============================================================
   HERO
============================================================ */

.world-map-hero {
    padding: 28px 0 46px;
    border-bottom: 1px solid #eadedb;
    background:
        radial-gradient(
            circle at 82% 18%,
            rgba(158, 29, 55, 0.085),
            transparent 34%
        ),
        linear-gradient(
            135deg,
            #ffffff 0%,
            #fff1ee 58%,
            #f8f8f7 100%
        );
}


.world-map-topbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}


.world-map-language-switch {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid #ead7d3;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}


.world-map-language-switch a {
    min-width: 42px;
    padding: 7px 11px;
    border-radius: 999px;
    text-align: center;
    text-decoration: none;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    color: #737986;
}


.world-map-language-switch a:hover {
    color: #9e1d37;
}


.world-map-language-switch a.is-active {
    background: #9e1d37;
    color: #ffffff;
}


.world-map-kicker,
.world-map-section-kicker {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: #9e1d37;
}


.world-map-hero h1 {
    margin: 0;
    font-size: clamp(
        2.3rem,
        5vw,
        4rem
    );
    line-height: 1.02;
    color: #202632;
}


.world-map-subtitle {
    max-width: 820px;
    margin: 15px 0 0;
    font-size: 1rem;
    line-height: 1.65;
    color: #6d7583;
}


/* ============================================================
   STATS
============================================================ */

.world-map-stats {
    display: grid;
    grid-template-columns:
        130px
        150px
        130px
        minmax(
            220px,
            1fr
        );
    gap: 10px;
    max-width: 820px;
    margin-top: 24px;
}


.world-map-stat {
    padding: 11px 13px;
    border: 1px solid #f0dad5;
    border-radius: 13px;
    background: rgba(255, 241, 238, 0.82);
}


.world-map-stat strong,
.world-map-stat span {
    display: block;
}


.world-map-stat strong {
    font-size: 0.95rem;
    color: #303642;
}


.world-map-stat span {
    margin-top: 3px;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #858b96;
}


.world-map-stat-uri strong {
    overflow-wrap: anywhere;
}


/* ============================================================
   MAIN
============================================================ */

.world-map-section {
    padding: 32px 0 58px;
}


/* ============================================================
   ALERTS
============================================================ */

.world-map-alert {
    margin: 16px 0;
    padding: 13px 15px;
    border-radius: 12px;
    font-size: 0.83rem;
    line-height: 1.5;
}


.world-map-alert-success {
    border: 1px solid #cfe8da;
    background: #eff9f3;
    color: #256444;
}


.world-map-alert-warning {
    border: 1px solid #eadbb9;
    background: #fff9ea;
    color: #796028;
}


.world-map-alert-error {
    border: 1px solid #ebcfd4;
    background: #fff4f6;
    color: #8f273b;
}


/* ============================================================
   CONTROLS
============================================================ */

.world-map-controls-card {
    padding: 20px;
    border: 1px solid #e5e2df;
    border-radius: 19px;
    background: #fbfaf8;
    box-shadow:
        0 10px 28px
        rgba(
            28,
            34,
            46,
            0.04
        );
}


.world-map-controls-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}


.world-map-controls-heading strong {
    font-size: 0.8rem;
    color: #737a87;
}


.world-map-controls-grid {
    display: grid;
    grid-template-columns:
        auto
        minmax(
            390px,
            0.9fr
        )
        minmax(
            300px,
            1fr
        );
    align-items: end;
    gap: 16px;
}


.world-map-pan {
    display: flex;
    gap: 6px;
}


.world-map-pan a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid #dfe2e7;
    border-radius: 10px;
    background: #ffffff;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 900;
    color: #555e6d;
}


.world-map-pan a:hover {
    border-color: #d4aeb6;
    background: #fff7f5;
    color: #9e1d37;
}


.world-map-pan a.is-center {
    border-color: #f0dad5;
    background: #fff1ee;
    color: #9e1d37;
}


.world-map-coordinate-form {
    display: grid;
    grid-template-columns:
        auto
        1fr
        1fr
        auto;
    align-items: end;
    gap: 8px;
}


.world-map-coordinate-form > span,
.world-map-region-form > label {
    display: block;
    margin-bottom: 7px;
    font-size: 0.72rem;
    font-weight: 800;
    color: #4a515e;
}


.world-map-coordinate-form > span {
    align-self: center;
    margin: 0 5px 0 0;
}


.world-map-coordinate-form label {
    display: flex;
    align-items: center;
    gap: 6px;
}


.world-map-coordinate-form b {
    font-size: 0.72rem;
    color: #777e8b;
}


.world-map-coordinate-form input,
.world-map-region-form input {
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    padding: 9px 10px;
    border: 1px solid #dde1e6;
    border-radius: 10px;
    background: #ffffff;
    font: inherit;
    font-size: 0.82rem;
    color: #303642;
    outline: none;
}


.world-map-coordinate-form input:focus,
.world-map-region-form input:focus {
    border-color: #c98794;
    box-shadow:
        0 0 0 3px
        rgba(
            158,
            29,
            55,
            0.08
        );
}


.world-map-coordinate-form button,
.world-map-region-form button {
    min-height: 40px;
    padding: 8px 13px;
    border: 0;
    border-radius: 10px;
    background: #9e1d37;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    color: #ffffff;
    cursor: pointer;
}


.world-map-coordinate-form button:hover,
.world-map-region-form button:hover {
    background: #86182e;
}


.world-map-region-form > div {
    display: grid;
    grid-template-columns:
        minmax(
            0,
            1fr
        )
        auto;
    gap: 7px;
}


/* ============================================================
   MAP LAYOUT
============================================================ */

.world-map-layout {
    display: grid;
    grid-template-columns:
        minmax(
            0,
            1fr
        )
        285px;
    align-items: start;
    gap: 18px;
    margin-top: 18px;
}


.world-map-card,
.world-map-details-card {
    border: 1px solid #e5e7eb;
    border-radius: 20px;
    background: #ffffff;
    box-shadow:
        0 12px 32px
        rgba(
            29,
            35,
            47,
            0.045
        );
}


.world-map-card {
    min-width: 0;
    padding: 20px;
}


.world-map-card-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 15px;
}


.world-map-card-heading h2 {
    margin: 0;
    font-size: 1.05rem;
    color: #303642;
}


.world-map-card-heading p {
    max-width: 500px;
    margin: 0;
    text-align: right;
    font-size: 0.74rem;
    line-height: 1.5;
    color: #858c98;
}


/* ============================================================
   MAP GRID
============================================================ */

.world-map-scroll {
    overflow: auto;
    max-width: 100%;
    padding: 0 0 7px;
    border: 1px solid #e1e4e8;
    border-radius: 15px;
    background: #f4f6f8;
    outline: none;
}


.world-map-scroll:focus {
    box-shadow:
        0 0 0 3px
        rgba(
            158,
            29,
            55,
            0.08
        );
}


.world-map-grid {
    display: grid;
    grid-template-columns:
        57px
        repeat(
            var(--map-columns),
            var(--map-cell-size)
        );
    grid-auto-rows: var(--map-cell-size);
    gap: 2px;
    width: max-content;
    min-width: 100%;
    padding: 8px;
    box-sizing: border-box;
}


.world-map-axis,
.world-map-axis-corner {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    background: #ffffff;
    font-size: 0.61rem;
    font-weight: 800;
    color: #818895;
    box-shadow:
        0 1px 2px
        rgba(
            28,
            34,
            46,
            0.04
        );
}


.world-map-axis-x {
    position: sticky;
    top: 8px;
    z-index: 2;
}


.world-map-axis-y {
    position: sticky;
    left: 8px;
    z-index: 3;
}


.world-map-axis-corner {
    position: sticky;
    top: 8px;
    left: 8px;
    z-index: 5;
    color: #9e1d37;
}


.world-map-cell {
    position: relative;
    display: block;
    width: var(--map-cell-size);
    height: var(--map-cell-size);
    padding: 0;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    transition:
        transform 120ms ease,
        box-shadow 120ms ease,
        filter 120ms ease;
}


.world-map-cell:hover,
.world-map-cell:focus-visible {
    z-index: 4;
    transform: scale(1.13);
    box-shadow:
        0 5px 12px
        rgba(
            25,
            31,
            43,
            0.18
        );
    outline: none;
}


.world-map-cell.is-selected {
    box-shadow:
        0 0 0 3px #ffffff,
        0 0 0 5px #9e1d37;
    z-index: 5;
}


.world-map-cell-free {
    background: #8fc7d2;
}


.world-map-cell-occupied.is-single {
    background: #8fbe5c;
}


.world-map-cell-occupied.is-variable {
    background: #5d913d;
}


.world-map-cell.is-central {
    background: #bd3b56;
}


.world-map-cell span {
    position: absolute;
    inset: 6px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 4px;
}


/* ============================================================
   LEGEND
============================================================ */

.world-map-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 18px;
    margin-top: 15px;
    font-size: 0.72rem;
    color: #737b87;
}


.world-map-legend-title {
    font-weight: 900;
    color: #404754;
}


.world-map-legend > span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}


.world-map-legend-swatch {
    width: 14px;
    height: 14px;
    border-radius: 4px;
}


.world-map-legend-swatch.is-free {
    background: #8fc7d2;
}


.world-map-legend-swatch.is-central {
    background: #bd3b56;
}


.world-map-legend-swatch.is-single {
    background: #8fbe5c;
}


.world-map-legend-swatch.is-variable {
    background: #5d913d;
}


/* ============================================================
   DETAILS
============================================================ */

.world-map-details-card {
    position: sticky;
    top: 78px;
    padding: 21px;
}


.world-map-detail-symbol {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin: 10px 0 13px;
    border-radius: 14px;
    background: #fff1ee;
    font-size: 1.2rem;
    font-weight: 900;
    color: #9e1d37;
}


#map_detail_empty p,
.world-map-detail-content p {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.58;
    color: #7a818e;
}


.world-map-detail-status {
    display: inline-flex;
    margin: 9px 0 9px;
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef7e8;
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
    color: #577d3e;
}


.world-map-detail-status.is-free {
    background: #eaf5f7;
    color: #4d7f89;
}


.world-map-detail-content h2 {
    margin: 0 0 15px;
    font-size: 1.1rem;
    line-height: 1.25;
    color: #292f3b;
}


.world-map-detail-content dl {
    margin: 0;
}


.world-map-detail-content dl > div {
    padding: 10px 0;
    border-top: 1px solid #eceef1;
}


.world-map-detail-content dt {
    margin-bottom: 3px;
    font-size: 0.65rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #999fa8;
}


.world-map-detail-content dd {
    margin: 0;
    overflow-wrap: anywhere;
    font-size: 0.79rem;
    line-height: 1.45;
    font-weight: 700;
    color: #505866;
}


#map_detail_free_coordinate {
    display: block;
    margin: 4px 0 12px;
    font-size: 1rem;
    color: #39414e;
}


/* ============================================================
   CREDIT
============================================================ */

.world-map-credit {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    margin-top: 16px;
    font-size: 0.66rem;
    color: #9a9fa8;
}


.world-map-credit a {
    color: #777e8a;
}


/* ============================================================
   RESPONSIVE
============================================================ */

@media (max-width: 1120px) {

    .world-map-controls-grid {
        grid-template-columns:
            auto
            minmax(
                0,
                1fr
            );
    }


    .world-map-region-form {
        grid-column: 1 / -1;
    }


    .world-map-layout {
        grid-template-columns: 1fr;
    }


    .world-map-details-card {
        position: static;
    }

}


@media (max-width: 760px) {

    .world-map-stats {
        grid-template-columns:
            repeat(
                2,
                minmax(
                    0,
                    1fr
                )
            );
    }


    .world-map-controls-grid {
        grid-template-columns: 1fr;
    }


    .world-map-region-form {
        grid-column: auto;
    }


    .world-map-coordinate-form {
        grid-template-columns:
            auto
            1fr
            1fr
            auto;
    }


    .world-map-card-heading {
        align-items: flex-start;
        flex-direction: column;
    }


    .world-map-card-heading p {
        text-align: left;
    }

}


@media (max-width: 540px) {

    .world-map-container {
        width: min(
            100% - 28px,
            1380px
        );
    }


    .world-map-hero {
        padding: 22px 0 37px;
    }


    .world-map-section {
        padding: 24px 0 44px;
    }


    .world-map-stats {
        grid-template-columns: 1fr 1fr;
    }


    .world-map-stat-uri {
        grid-column: 1 / -1;
    }


    .world-map-controls-card,
    .world-map-card {
        padding: 16px;
        border-radius: 16px;
    }


    .world-map-pan {
        flex-wrap: wrap;
    }


    .world-map-coordinate-form {
        grid-template-columns:
            1fr
            1fr;
    }


    .world-map-coordinate-form > span {
        grid-column: 1 / -1;
    }


    .world-map-coordinate-form button {
        grid-column: 1 / -1;
    }

}
