/* Frontend CSS - 60/40 split, full viewport, no horizontal scrollbar */
html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.csm-frontend-wrapper {
    display: flex;
    width: 100%;           /* changed from 100vw to avoid scrollbar issues */
    height: 100vh;
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Map container: 60% width, no padding/margin */
.csm-map-container {
    flex: 0 0 60%;
    position: relative;
    background: #f5f5f5;
    cursor: grab;
    overflow: hidden;
}
.csm-map-container:active {
    cursor: grabbing;
}
/* SVG shape hover effect */
.csm-svg-shape {
    transition: fill 0.2s ease;
}
/* Description panel: 40% width, static, scrollable */
.csm-description-panel {
    flex: 0 0 40%;
    background: #ffffff;
    overflow-y: auto;
    padding: 30px 25px;
    box-shadow: -2px 0 12px rgba(0,0,0,0.05);
    border-left: 1px solid #eaeef2;
}

/* Fade-in from bottom for the description content */
.csm-desc-content {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Typography inside description panel */
#csm-desc-title {
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 20px;
    color: #1e3a8a;
    border-bottom: 3px solid #e2e8f0;
    padding-bottom: 12px;
}

#csm-desc-text {
    line-height: 1.6;
    font-size: 16px;
    color: #2c3e50;
    margin-bottom: 25px;
}

.csm-desc-video-btn {
    display: inline-block;
    background: #2271b1;
    color: white;
    padding: 10px 20px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    margin-top: 10px;
}
.csm-desc-video-btn:hover {
    background: #135e96;
}

/* Empty state placeholder */
.csm-description-panel .empty-state {
    text-align: center;
    color: #94a3b8;
    padding-top: 40px;
    font-size: 18px;
}

/* Zoom controls stay on map */
.csm-map-header {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 100;
}
.csm-zoom-controls {
    display: flex;
    gap: 8px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    padding: 6px 12px;
    border-radius: 40px;
}
.csm-zoom-controls button {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: white;
    color: #1e293b;
    font-size: 20px;
    cursor: pointer;
    font-weight: bold;
    transition: 0.2s;
}
.csm-zoom-controls button:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

/* SVG container inside the map area */
#csm-svg-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}
#csm-svg-container svg {
    width: 100%;
    height: 100%;
    transition: transform 0.2s ease;
    cursor: crosshair;
}

/* Marker styles */
.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%;
    object-fit: contain;
    border-radius: 50%;
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

/* Video popup (hover) */
.csm-video-popup {
    position: fixed;
    width: 300px;
    height: 300px;
    background: black;
    border-radius: 12px;
    overflow: hidden;
    z-index: 10000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    border: 2px solid white;
}
.csm-video-popup iframe,
.csm-video-popup video {
    width: 100%;
    height: 100%;
}
/* Focus mode: dimmed other regions */
.csm-svg-shape.dimmed {
    filter: grayscale(0.8);
    opacity: 0.5;
    transition: filter 0.2s, opacity 0.2s;
}

/* Responsive: stack on small screens */
@media (max-width: 768px) {
    .csm-frontend-wrapper {
        flex-direction: column;
    }
    .csm-map-container,
    .csm-description-panel {
        flex: 0 0 50%;
    }
    .csm-description-panel {
        padding: 20px;
    }
}