/* ====== BASE STYLES ====== */
html,
body {
    margin: 0;
    padding: 0;
    font-family: "Montserrat", sans-serif;
    background-color: #ffffff;
    height: 100%;
    overflow: hidden;
}

/* ====== PAGE TITLE ====== */
.map-title-container {
    width: 100%;
    text-align: center;
    padding-top: 2rem;
}

.map-title {
    font-size: 2.2rem;
    color: #2c2c2c;
    margin: 0;
    padding: 1.5rem 0;
    font-weight: 600;
}

.underlined-word {
    position: relative;
    display: inline-block;
}

.underlined-word::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #b1001c;
    border-radius: 2px;
}

/* ====== MAIN LAYOUT (MAP + CONTENT) ====== */
.map-layout {}

.map-left {
    position: relative;
    z-index: 1;
}

#us-map {
    width: 100%;
    height: 580px;
    max-height: 580px;
    overflow: hidden;
    background-color: #ffffff;
}





/* Background balance image (visible behind text/logo) */
.balance-bg {
    position: absolute;
    bottom: 60px;
    right: 190px;
    width: 700px;
    height: 700px;
    background-image: url("https://stewart-files.s3.amazonaws.com/interactive-map/balance-bg.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.05;
    z-index: 1;
    pointer-events: none;
}

/* ====== INFO TEXT + LOGO ====== */
.map-info-text {
    padding: 1rem 2rem;
    font-size: 1.1rem;
    color: #000;
    max-width: 290px;
    margin-bottom: 1rem;
}

.stewart-link {
    background-color: #b1001c;
    color: #fff;
    padding: 2px 6px;
    text-decoration: none;
    border-radius: 3px;
    font-weight: 500;
}

.logo-container {
    display: none;
    text-align: center;
}

.stewart-logo {
    height: 50px;
    object-fit: contain;
}

/* ====== MODALS (STATE + DISCLAIMER) ====== */
.disclaimer-overlay,
.state-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.disclaimer-overlay.hidden,
.state-modal.hidden {
    display: none;
}

.disclaimer-modal,
.state-modal-content {
    background-color: #fff;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    max-width: 600px;
    width: 90%;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #333;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.state-modal-content {
    max-width: 650px;
    padding: 10px 20px;
    max-height: 75vh;
    overflow-y: auto;
}

.disclaimer-close,
.state-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.8rem;
    font-weight: bold;
    color: #333;
    background: transparent;
    border: none;
    cursor: pointer;
}

.disclaimer-close {
    font-size: 1.25rem;
    color: #00495b;
}

.state-modal-close:hover {
    color: #b1001c;
}

/* ====== FOOTER ====== */
.footer-disclaimer {
    display: none;
    font-size: 0.75rem;
    text-align: left;
    padding: 1rem 2rem;
    color: #555;
}

.footer-disclaimer a {
    color: #555;
    text-decoration: underline;
    cursor: pointer;
}

/* ====== LEAFLET TOOLTIP ====== */
.leaflet-tooltip {
    background-color: #333;
    color: #fff;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.leaflet-control-attribution {
    display: none !important;
}

path.leaflet-interactive:focus {
    outline: none;
}

/* ====== STATE MODAL GRID CONTENT ====== */
.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 30px;
    row-gap: 10px;
}

.modal-grid div {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #222;
}

.modal-title {
    font-size: 1rem;
    color: #b1001c;
    margin: 10px 0;
}

.modal-grid strong {
    display: block;
    margin-bottom: 2px;
    font-weight: 600;
    color: #000;
}

/* ====== STATE LABELS ====== */
.state-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #00495b;
    text-align: center;
    pointer-events: none;
}

.state-label-small {
    font-size: 0.65rem;
    font-weight: 600;
    color: #00495b;
    text-align: center;
    pointer-events: none;
}


/* ====== RESPONSIVE STYLES (MOBILE) ====== */


@media (max-width: 1024px) {
    #us-map {
        height: 450px;
        max-height: 450px;
    }

    .state-label {
        font-size: 0.8rem;
    }

    .state-label-small {
        font-size: 0.5rem;
    }
}

@media (max-width: 768px) {
    #us-map {
        height: 350px;
        max-height: 350px;
    }

    .map-title {
        font-size: 1.7rem;
    }

    .state-label {
        font-size: 0.7rem;
    }

    .state-label-small {
        font-size: 0.4rem;
    }
}

@media (max-width: 480px) {
    #us-map {
        height: 250px;
        max-height: 250px;
    }
}