/* CSS for Country Slideshow Map Plugin */

/* Map wrapper styling */
.csm-map-wrapper {
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: none; /* Removed shadow */
    overflow: hidden;
    background-color: #ffffff;
    border: none; /* Removed border */
}

/* Active Country Styling */
path.csm-active-country {
    fill: #000000 !important;
    cursor: pointer !important;
    transition: fill 0.2s ease;
}

path.csm-active-country:hover {
    fill: #333333 !important; /* Slightly lighter on hover */
}

/* Modal styling (Glassmorphism effect) */
.csm-modal {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.csm-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
}

.csm-modal-content {
    background: #ffffff;
    padding: 0;
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 0;
    box-shadow: none;
    position: relative;
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
    display: flex;
    flex-direction: column;
}

.csm-modal.show .csm-modal-content {
    transform: scale(1);
    opacity: 1;
}

#csm-country-title {
    margin: 0;
    padding: 20px 0;
    color: #333;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-weight: 700;
    text-align: center;
    font-size: 28px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    z-index: 2;
}

/* Close Button */
.csm-close {
    color: #999;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
    z-index: 10;
}

.csm-close:hover,
.csm-close:focus {
    color: #333;
    text-decoration: none;
}

/* Content Wrapper styling */
.csm-content-wrapper {
    width: 100%;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    background: #fcfcfc;
}

/* Elementor might bring its own max-width, ensure it fits */
.csm-content-wrapper .elementor-section {
    max-width: 100%;
}

.csm-error, .csm-not-found {
    text-align: center;
    padding: 40px 20px;
    color: #444;
    font-family: sans-serif;
    background: #f9f9f9;
    border-radius: 8px;
}

/* Loading spinner placeholder */
.csm-slide-loading {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    color: #666;
    font-family: sans-serif;
}

.csm-slide-loading::after {
    content: "";
    width: 30px;
    height: 30px;
    border: 3px solid #ccc;
    border-top-color: #333;
    border-radius: 50%;
    animation: csm-spin 1s linear infinite;
    margin-top: 10px;
}

@keyframes csm-spin {
    to {
        transform: rotate(360deg);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .csm-map-wrapper {
        margin-top: 20px;
        margin-bottom: 20px;
        border-radius: 0;
        /* Force full viewport width by breaking out of container padding */
        width: 100vw;
        margin-left: calc(-50vw + 50%);
    }
}
