/* Existing styles above remain unchanged */
#lender-map {
    width: 900px !important;
    height: 600px !important;
    max-width: 100%;
    position: relative;
    overflow: hidden;
}

#lender-map svg {
    width: 100% !important;
    height: 100% !important;
}

.lender-list {
    margin-top: 20px;
    clear: both;
    position: relative;
    z-index: 1;
    font-size: 1rem; /* ~14px */
}

.lender-list li {
    margin-bottom: 15px;
    list-style: none;
}

ul.lender-list li p {
    margin-bottom: 15px;
    list-style: none;
    font-size: 1rem; /* ~14px */
}

.lender-list strong {
    font-size: 1.125rem; /* ~18px */
}

.certified {
    background-color: #E76F34;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.9em;
    margin-left: 10px;
    display: inline-block; /* Shrinks to fit text content */
    margin-top: 5px; /* Maintains spacing above the label */
}

h2 {
    margin-top: 20px;
    clear: both;
    font-size: 1.5rem; /* ~24px */
}

/* Ensure pill labels are visible and interactive */
#lender-map .usmapLabel {
    fill: #000000 !important;
    font-size: 14px !important;
    pointer-events: auto !important;
    opacity: 1 !important;
}

#lender-map .usmapLabel:hover {
    opacity: 1 !important;
    cursor: pointer;
}

/* Hide SimpleMaps dropdowns */
#lender-map select {
    display: none !important;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    #lender-map {
        width: 100% !important;
        height: 400px !important;
    }

    .lender-list {
        font-size: 0.875rem; /* ~14px */
    }

    .lender-list strong {
        font-size: 1rem; /* ~16px */
    }

    .certified {
        font-size: 0.75rem; /* ~12px */
        padding: 1px 4px;
    }

    h2 {
        font-size: 1.25rem; /* ~20px */
    }

    #lender-map .usmapLabel {
        font-size: 12px !important;
    }
}

@media (max-width: 480px) {
    #lender-map {
        height: 300px !important;
    }

    .lender-list {
        font-size: 0.75rem; /* ~12px */
    }

    .lender-list strong {
        font-size: 0.875rem; /* ~14px */
    }

    .certified {
        font-size: 0.625rem; /* ~10px */
        padding: 1px 3px;
    }

    h2 {
        font-size: 1rem; /* ~16px */
    }

    #lender-map .usmapLabel {
        font-size: 10px !important;
    }
}

/* Styles for the 203k Lender Map frontend */
.lender-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.lender-list li {
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 3px 3px 5px rgba(0, 0, 0, 0.1);
    padding: 15px;
    border-radius: 5px;
}

.lender-list li strong {
    font-size: 1.1em;
    display: block;
    margin-bottom: 10px;
}

.certified {
    background-color: #E76F34;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.9em;
    margin-left: 10px;
}

.lender-list li a {
    color: #0073aa;
    text-decoration: none;
}

.lender-list li a:hover {
    text-decoration: underline;
}

.lender-list li p {
    margin: 10px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .lender-list {
        grid-template-columns: 1fr; /* Single column on smaller screens */
    }

    .lender-list li {
        margin-left: 10px;
        margin-right: 10px;
    }
}
