/* Frontend CSS – 60/40 split, no horizontal scroll, marker animation, button icons only */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.csm-frontend-wrapper {
    display: flex;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.csm-map-container {
    flex: 0 0 60%;
    position: relative;
    background: #f5f5f5;
    cursor: grab;
    overflow: hidden;
}
.csm-map-container:active {
    cursor: grabbing;
}
/* Region shape hover */
.csm-svg-shape {
    transition: fill 0.2s ease;
}
.csm-description-panel {
    flex: 0 0 40%;
    background: #ffffff;
    overflow-y: auto;
    padding: 20px 25px;
    box-shadow: -2px 0 12px rgba(0,0,0,0.05);
    border-left: 1px solid #eaeef2;
    color:#000000;
}
/* Marker popup animation */
.csm-marker {
    position: absolute;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
    cursor: pointer;
    transition: transform 0.2s;
    pointer-events: auto;
    z-index: 20;
}

.csm-marker:hover {
    transform: translate(-50%, -50%) scale(1.2);
    filter: drop-shadow(0 0 8px rgba(0,0,0,0.3));
}
.csm-marker img {
    width: 100%;
    height: 100% !important;
    object-fit: cover;
    border-radius: 50% !important;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
/* Zoom controls – right side, circle background only */
.csm-map-header {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 100;
}
.csm-zoom-controls {
    display: flex;
    gap: 8px;
    background: transparent;
    padding: 0;
}
.csm-zoom-controls button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: #03A9F4;
    backdrop-filter: blur(4px);
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.csm-zoom-controls button i {
    font-size: 18px;
}
.csm-zoom-controls button:hover {
    background: #2271b1;
    transform: scale(1.05);
}

/* Video popup */
.csm-video-popup {
    position: fixed;
    width: 360px;
    max-width:400px;
    background: #000000;
    border-radius: 12px;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border: 2px solid #ffffff;
    aspect-ratio: 16 / 9; 
}
.csm-video-popup iframe,
.csm-video-popup video {
    width: 100%;
    height: 100%;
    display: block;
    border: none;
}
/* Responsive */
@media (max-width: 768px) {
    .csm-frontend-wrapper {
        flex-direction: column;
    }
    .csm-map-container, .csm-description-panel {
        flex: 0 0 50%;
    }
}
/* Add to the end of the file */
.csm-description-panel .csm-desc-content {
    animation: slideUpFade 0.3s ease-out;
}

@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Description panel spacing */
.csm-description-panel .csm-desc-content h2 {
    margin-bottom: 50px;   /* 50px gap between title and description */
}

.csm-description-panel .csm-desc-content p {
    margin-bottom: 1.2em;  /* comfortable space between paragraphs */
}

.csm-description-panel .csm-desc-content p:last-child,
.csm-description-panel .csm-desc-content :last-child {
    margin-bottom: 0;      /* avoid extra space at the very end */
}

/* Also space out other possible elements (lists, blockquotes, etc.) */
.csm-description-panel .csm-desc-content ul,
.csm-description-panel .csm-desc-content ol,
.csm-description-panel .csm-desc-content blockquote {
    margin-bottom: 1.2em;
}

/* Video Modal Overlay */
.csm-video-modal {
    display: none;
    position: fixed;
    z-index: 100000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    align-items: center;
    justify-content: center;
}

.csm-video-modal-content {
    position: relative;
    background: #000;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.csm-video-modal-close {
    position: absolute;
    top: 10px;
    right: 20px;
    font-size: 32px;
    font-weight: bold;
    color: white;
    cursor: pointer;
    z-index: 10;
    text-shadow: 0 0 5px black;
}

.csm-video-modal-close:hover {
    color: #ccc;
}

.csm-video-modal-body {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    background: #000;
}

.csm-video-modal-body iframe,
.csm-video-modal-body video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Description panel buttons */
.csm-desc-buttons {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.csm-desc-video-btn,
.csm-desc-tour-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.csm-desc-video-btn:hover:not(:disabled),
.csm-desc-tour-btn:hover:not(:disabled) {
    transform: scale(1.02);
}

.csm-desc-video-btn:disabled,
.csm-desc-tour-btn:disabled {
    cursor: not-allowed;
}

/* Region indicator dot – appears when zoomed in */
.csm-region-indicator {
    position: absolute;
    width: 24px;
    height: 24px;
    background: rgba(255, 80, 40, 0.85);
    border-radius: 50%;
    border: 2px solid white;
    box-shadow: 0 0 4px rgba(0,0,0,0.5);
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: white;
    transition: transform 0.1s;
}
.csm-region-indicator:hover {
    transform: translate(-50%, -50%) scale(1.2);
    background: #ff5500;
}
.csm-region-indicator span {
    display: block;
    margin-top: -1px;
}
/* Blink animation for regions that have markers */
.csm-region-blink {
    animation: regionBlink 0.3s ease-in-out 2;
}
@keyframes regionBlink {
    0% { fill: inherit; }
    50% { fill: #ffaa00; stroke: #ffaa00; }
    100% { fill: inherit; }
}

/* Completely hide native video controls (including the brief flash) */
.csm-video-popup video::-webkit-media-controls {
    display: none !important;
}
.csm-video-popup video::-webkit-media-controls-enclosure {
    display: none !important;
}