/* =========================================================
   MS PROVINCES MAP — R8 / V1
   Isolated from frozen home page.
   ========================================================= */

:root {
    --ms-navy: #071d35;
    --ms-blue: #0b4778;
    --ms-blue-2: #1164a3;
    --ms-yellow: #f7c42c;
    --ms-white: #ffffff;
    --ms-soft: #f4f7fa;
    --ms-text: #152334;
    --ms-muted: #687789;
    --ms-line: rgba(7,29,53,.13);
}

.ms-provinces-page {
    margin: 0;
    background: var(--ms-soft);
    color: var(--ms-text);
}

.ms-provinces-header {
    min-height: 82px;
    padding: 13px clamp(22px,5vw,76px);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    border-bottom: 1px solid var(--ms-line);
    position: relative;
    z-index: 1001;
}

.ms-provinces-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--ms-navy);
    text-decoration: none;
}

.ms-provinces-brand img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

.ms-provinces-brand span {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.ms-provinces-brand strong {
    font-size: 17px;
    font-weight: 900;
}

.ms-provinces-brand small {
    margin-top: 5px;
    color: var(--ms-muted);
    font-size: 11px;
    letter-spacing: .035em;
}

.ms-back-home {
    padding: 10px 15px;
    border: 1px solid var(--ms-line);
    border-radius: 999px;
    color: var(--ms-blue);
    text-decoration: none;
    font-weight: 800;
    font-size: 13px;
}

.ms-map-hero {
    min-height: 370px;
    display: flex;
    align-items: center;
    padding: 60px clamp(22px,8vw,130px);
    color: #fff;
    background:
        radial-gradient(
            circle at 80% 20%,
            rgba(17,100,163,.45),
            transparent 38%
        ),
        linear-gradient(
            130deg,
            #06182e 0%,
            #092b4d 60%,
            #0c4e81 100%
        );
}

.ms-map-hero-copy {
    max-width: 810px;
}

.ms-map-eyebrow {
    display: inline-block;
    margin-bottom: 13px;
    color: var(--ms-yellow);
    text-transform: uppercase;
    letter-spacing: .11em;
    font-size: 12px;
    font-weight: 900;
}

.ms-map-hero h1 {
    margin: 0;
    max-width: 810px;
    font-size: clamp(40px,5vw,70px);
    line-height: .98;
    letter-spacing: -.04em;
    font-weight: 900;
}

.ms-map-hero h1 span {
    display: block;
    margin-top: 8px;
    color: #dceafb;
}

.ms-map-hero p {
    max-width: 690px;
    margin: 23px 0 0;
    color: rgba(255,255,255,.82);
    font-size: 17px;
    line-height: 1.65;
}

.ms-map-search-shell {
    position: relative;
    max-width: 600px;
    margin-top: 31px;
}

.ms-map-search-shell > label {
    display: block;
    margin-bottom: 7px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .09em;
    font-weight: 900;
    color: rgba(255,255,255,.68);
}

.ms-map-search {
    min-height: 58px;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 0 18px;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 14px 45px rgba(0,0,0,.18);
}

.ms-map-search > span {
    font-size: 28px;
    color: var(--ms-blue);
}

.ms-map-search input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--ms-text);
    font: inherit;
    font-size: 16px;
}

.ms-search-results {
    position: absolute;
    z-index: 1500;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: 330px;
    overflow: auto;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 55px rgba(0,0,0,.24);
    padding: 7px;
}

.ms-search-result {
    width: 100%;
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 13px;
    background: transparent;
    border: 0;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
}

.ms-search-result:hover,
.ms-search-result:focus {
    background: var(--ms-soft);
}

.ms-search-result strong {
    color: var(--ms-navy);
}

.ms-search-result small {
    color: var(--ms-muted);
}

.ms-map-workspace {
    max-width: 1450px;
    margin: -44px auto 0;
    padding: 0 clamp(18px,4vw,58px) 70px;
    display: grid;
    grid-template-columns: minmax(0,1fr) minmax(280px,355px);
    gap: 22px;
    position: relative;
    z-index: 20;
}

.ms-map-stage,
.ms-province-panel {
    background: #fff;
    border-radius: 22px;
    border: 1px solid var(--ms-line);
    box-shadow: 0 18px 55px rgba(7,29,53,.10);
    overflow: hidden;
}

.ms-map-toolbar {
    min-height: 58px;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    border-bottom: 1px solid var(--ms-line);
    font-size: 13px;
    font-weight: 800;
}

.ms-map-toolbar > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ms-map-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--ms-yellow);
}

.ms-map-toolbar button {
    border: 0;
    background: var(--ms-soft);
    color: var(--ms-blue);
    padding: 9px 13px;
    border-radius: 999px;
    font-weight: 800;
    cursor: pointer;
}

#msRdcMap {
    height: min(68vh,700px);
    min-height: 540px;
    background: #dce7ef;
}

.ms-map-source {
    padding: 10px 16px;
    color: var(--ms-muted);
    background: #fff;
    font-size: 11px;
    border-top: 1px solid var(--ms-line);
}

.ms-province-panel {
    min-height: 480px;
    padding: 28px;
}

.ms-panel-number {
    width: 78px;
    height: 78px;
    display: grid;
    place-items: center;
    background: var(--ms-yellow);
    color: var(--ms-navy);
    border-radius: 20px;
    font-size: 32px;
    font-weight: 950;
}

.ms-province-panel h2 {
    margin: 22px 0 9px;
    color: var(--ms-navy);
    font-size: 32px;
    line-height: 1.05;
}

.ms-province-panel p {
    color: var(--ms-muted);
    line-height: 1.65;
}

.ms-panel-kicker {
    color: var(--ms-blue-2);
    text-transform: uppercase;
    letter-spacing: .1em;
    font-size: 11px;
    font-weight: 900;
}

.ms-province-fact {
    margin-top: 25px;
    padding: 17px;
    background: var(--ms-soft);
    border-radius: 14px;
}

.ms-province-fact span {
    display: block;
    margin-bottom: 4px;
    color: var(--ms-muted);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 10px;
    font-weight: 900;
}

.ms-province-fact strong {
    color: var(--ms-navy);
    font-size: 18px;
}

.ms-panel-description {
    margin-top: 19px;
}

.ms-explore-button {
    width: 100%;
    margin-top: 18px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-radius: 13px;
    background: var(--ms-navy);
    color: #fff;
    font-weight: 850;
    cursor: pointer;
}

.ms-province-directory {
    max-width: 1320px;
    margin: 0 auto;
    padding: 10px clamp(20px,4vw,56px) 90px;
}

.ms-directory-heading {
    max-width: 650px;
    margin-bottom: 30px;
}

.ms-directory-heading h2 {
    margin: 0;
    color: var(--ms-navy);
    font-size: clamp(34px,4vw,52px);
    letter-spacing: -.035em;
}

.ms-directory-heading p {
    color: var(--ms-muted);
    line-height: 1.6;
}

.ms-province-grid {
    display: grid;
    grid-template-columns:
        repeat(
            auto-fit,
            minmax(220px,1fr)
        );
    gap: 12px;
}

.ms-province-card {
    min-height: 92px;
    padding: 17px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--ms-line);
    border-radius: 15px;
    cursor: pointer;
    text-align: left;
    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.ms-province-card:hover {
    transform: translateY(-2px);
    border-color: rgba(11,71,120,.42);
    box-shadow: 0 10px 25px rgba(7,29,53,.08);
}

.ms-province-card.is-active {
    border-color: var(--ms-blue);
    box-shadow: 0 0 0 2px rgba(11,71,120,.10);
}

.ms-province-card strong {
    color: var(--ms-navy);
    font-size: 16px;
}

.ms-province-card span {
    margin-top: 5px;
    color: var(--ms-muted);
    font-size: 12px;
}

.ms-provinces-footer {
    padding: 35px clamp(22px,6vw,90px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: var(--ms-navy);
    color: rgba(255,255,255,.74);
}

.ms-provinces-footer > div {
    display: flex;
    align-items: center;
    gap: 13px;
}

.ms-provinces-footer img {
    width: 45px;
}

.ms-provinces-footer div div {
    display: flex;
    flex-direction: column;
}

.ms-provinces-footer strong {
    color: #fff;
}

.ms-provinces-footer span {
    font-size: 12px;
}


/* Leaflet */
.leaflet-container {
    font-family: inherit;
}

.ms-map-label {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    color: #082744 !important;
    font-size: 10px !important;
    font-weight: 900 !important;
    text-shadow:
        0 1px 0 rgba(255,255,255,.95),
        1px 0 0 rgba(255,255,255,.95),
        0 -1px 0 rgba(255,255,255,.95),
        -1px 0 0 rgba(255,255,255,.95);
}

.ms-map-label::before {
    display: none !important;
}


@media (max-width: 980px) {

    .ms-map-workspace {
        grid-template-columns: 1fr;
    }

    .ms-province-panel {
        min-height: auto;
    }

}


@media (max-width: 700px) {

    .ms-provinces-header {
        min-height: 70px;
        padding: 9px 16px;
    }

    .ms-provinces-brand img {
        width: 43px;
        height: 43px;
    }

    .ms-provinces-brand small {
        display: none;
    }

    .ms-back-home {
        font-size: 11px;
    }

    .ms-map-hero {
        min-height: 330px;
        padding: 45px 20px 75px;
    }

    .ms-map-hero h1 {
        font-size: 42px;
    }

    .ms-map-workspace {
        margin-top: -35px;
        padding-left: 12px;
        padding-right: 12px;
    }

    #msRdcMap {
        min-height: 490px;
        height: 62vh;
    }

    .ms-map-toolbar {
        align-items: flex-start;
        flex-direction: column;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .ms-provinces-footer {
        align-items: flex-start;
        flex-direction: column;
    }

}

/* =========================================================
   MS PROVINCES — VISUAL R9A
   ========================================================= */

.ms-map-label {
    min-width: 48px;
    text-align: center !important;
    line-height: 1.05 !important;
    letter-spacing: -.015em;
    white-space: nowrap;
}

.ms-map-label span {
    text-align: center;
}

#msRdcMap {
    background:
        linear-gradient(
            180deg,
            #dce9f2 0%,
            #e8f0f5 100%
        );
}

@media (min-width: 1100px) {
    .ms-map-workspace {
        grid-template-columns:
            minmax(0, 1fr)
            minmax(285px, 320px);
    }
}




/* MS-PROVINCES-COLORS-R10B
   Requested visual accents:
   - national map status dot: red
   - 26 badge: red
   - directory eyebrow only: red
*/

.ms-map-status-dot {
    background: #ef2b10;
}

.ms-panel-number {
    background: #ef2b10;
    color: #071d35;
}

.ms-directory-heading .ms-map-eyebrow {
    color: #ef2b10 !important;
}

/* END MS-PROVINCES-COLORS-R10B */


/* =========================================================
   MS PROVINCES — SUBDIVISIONS R11A
   ========================================================= */

#msRdcMap.is-subdivision-mode .ms-map-label {
    display: none !important;
}

.ms-subdivision-box {
    margin-top: 22px;
}

.ms-subdivision-summary {
    padding: 16px;
    border-radius: 14px;
    background: #f4f7fa;
    border: 1px solid rgba(7,29,53,.10);
}

.ms-subdivision-summary strong {
    display: block;
    margin-top: 4px;
    color: #071d35;
    font-size: 17px;
}

.ms-subdivision-summary small {
    display: block;
    margin-top: 7px;
    color: #687789;
    line-height: 1.45;
}

.ms-subdivision-back {
    width: 100%;
    margin: 12px 0 18px;
    padding: 11px 14px;
    border-radius: 11px;
    border: 1px solid rgba(7,29,53,.13);
    background: #fff;
    color: #0b4778;
    font-weight: 850;
    cursor: pointer;
}

.ms-subdivision-groups {
    display: grid;
    gap: 18px;
}

.ms-subdivision-groups section h3 {
    margin: 0 0 9px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #071d35;
    font-size: 15px;
}

.ms-subdivision-groups section h3 span {
    min-width: 27px;
    height: 27px;
    padding: 0 7px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #edf3f8;
    color: #0b4778;
    font-size: 11px;
}

.ms-subdivision-list {
    display: grid;
    gap: 7px;
    max-height: 245px;
    overflow: auto;
    padding-right: 3px;
}

.ms-subdivision-item {
    width: 100%;
    min-height: 47px;
    padding: 9px 11px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    border-radius: 10px;
    border: 1px solid rgba(7,29,53,.11);
    background: #fff;
    color: #071d35;
    text-align: left;
    cursor: pointer;
}

.ms-subdivision-item:hover {
    border-color: #0b4778;
    background: #f5f9fc;
}

.ms-subdivision-item span {
    font-weight: 850;
}

.ms-subdivision-item small {
    margin-top: 3px;
    color: #0b4778;
    font-size: 10px;
}

.ms-subdivision-item.is-unmapped {
    cursor: default;
    opacity: .62;
}

.ms-subdivision-item.is-unmapped small {
    color: #7c8794;
}


/* =========================================================
   MS PROVINCES — RECONCILIATION R11B
   ========================================================= */

.ms-subdivision-item.is-source-pending {
    opacity: 1;
    border-style: dashed;
    border-color: rgba(184, 125, 28, .45);
    background: #fffaf0;
}

.ms-subdivision-item.is-source-pending small {
    color: #9a6718;
    font-weight: 750;
}

/* END MS PROVINCES — RECONCILIATION R11B */

/* MS-R36M-D2-LEAFLET-FOCUS */
#msRdcMap .leaflet-interactive:focus {
    outline: none !important;
}


/* MS-R36M-I-G2 — honor hidden state for province explore button */
.ms-explore-button[hidden] {
    display: none !important;
}

/* MS PROVINCES — CHEF-LIEU SYMBOL LEGEND */
.ms-capital-legend {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 7px 10px;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(7, 54, 95, .16);
    border-radius: 9px;
    color: #07365f;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(7, 54, 95, .08);
}

.ms-capital-legend[hidden] {
    display: none !important;
}

.ms-capital-legend__symbol {
    display: inline-block;
    width: 12px;
    height: 12px;
    flex: 0 0 12px;
    border: 2px solid #f7c42c;
    border-radius: 50%;
    background: #07365f;
}
