/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    background-color: var(--container-bg);
    margin: 5% auto;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalFadeIn 0.3s;
}

.modal-header {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.5rem;
    color: var(--text-color);
    padding-right: 40px; /* Make room for close button */
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: var(--text-color);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-modal:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#weather-map, #content-container {
    width: 100%;
    height: 500px;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

/* Content Modal Styles */
.modal-overlay-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    backdrop-filter: blur(4px);
}

.modal-button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    display: inline-block;
}

.modal-button:hover {
    background-color: var(--brand-accent);
    text-decoration: none;
}

[data-theme="dark"] .modal-button {
    background-color: var(--brand-accent);
}

[data-theme="dark"] .modal-button:hover {
    background-color: #1565C0;
}

.image-container, .video-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #000;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.video-container video,
.video-container iframe {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
