.map-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 1050;
    overflow-y: auto;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

.map-modal.is-active {
    display: flex;
}

.map-modal-content {
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    margin: auto;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.map-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #005a60;
    color: white;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}

.map-modal-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.map-modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.map-modal-close:hover,
.map-modal-close:focus {
    background-color: rgba(255, 255, 255, 0.2);
    outline: none;
}

.map-modal-body {
    position: relative;
    flex: 1 1 auto;
    overflow: hidden;
}

.map-iframe {
    width: 100%;
    height: 65vh;
    border: none;
    display: block;
}

.loading-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #005a60;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

body.modal-open {
    overflow: hidden;
    padding-right: 17px;
}

/* Screen reader */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (max-width: 768px) {
    .map-modal-content {
        max-width: 100%;
        max-height: 100%;
        height: 100%;
        margin: 0;
        border-radius: 0;
    }

    .map-iframe {
        height: calc(100vh - 66px);
    }

    .map-modal {
        padding: 0;
    }
}

/* footer */
.map-modal-footer {
    padding: 12px 20px;
    background-color: #f5f5f5;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.map-external-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #005a60;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.map-external-link:hover,
.map-external-link:focus {
    background-color: #e0e0e0;
    color: #003a40;
    text-decoration: underline;
}

.map-external-link i {
    margin-right: 6px;
}

/* accessibility */
.map-modal-close:focus,
.map-iframe:focus,
.map-external-link:focus {
    outline: 3px solid #006c72;
    outline-offset: 2px;
}