/* @override 
	https://chilternxc.gtdabtesting.co.uk/modules/custom/course_map/css/course-map.css?thdvqr */

.course #main-content {
	padding: 0px !important;
	height: 0px;
}

/* @override 
	https://chilternxc.gtdabtesting.co.uk/modules/custom/course_map/css/course-map.css?thdvqr */

/* ==========================================================================
   1. SCOPED MODULE LAYOUT & CONTAINERS
   ========================================================================== */
.course-container {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin: 20px 0;
    box-sizing: border-box;
	margin: 0px !important;
}

/* --- MAP WORKSPACE --- */
.map-wrapper {
    position: relative !important;
    width: 100% !important;
    height: auto !important; /* Dynamically scales down on mobile */
    background-color: #eaeaea;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

.map-container {
    position: relative !important; 
    width: 100% !important;
    height: auto !important;
    /* FIX: Locks the container boundary exactly to the map image dimensions on mobile */
    aspect-ratio: 4 / 5 !important; 
    display: block !important;
}

.map-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    display: block !important;
	background-color: #cfd2c4;
	border-radius: 0px !important;
}




/* ==========================================================================
   2. INTERACTIVE MAP PINS (MOBILE FIRST)
   ========================================================================== */
.pin {
    position: absolute !important;
    width: 24px !important;       
    height: 24px !important;      
    border-radius: 50% !important;
    border: 1.5px solid #fff !important; 
    color: #fff !important;
    font-weight: bold !important;
    font-size: 10px !important;   
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transform: translate(-50%, -50%) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3) !important;
    transition: transform 0.2s !important;
    z-index: 10 !important;
}

.pin.capsule {
    width: auto !important;
    height: 22px !important;
    padding: 0 6px !important;
    border-radius: 11px !important;
    font-size: 9px !important;
}

.pin:hover {
    transform: translate(-50%, -50%) scale(1.15) !important;
    z-index: 20 !important;
}

/* --- COURSE COLOR SCHEMES --- */
.pin.purple { background-color: #8E44AD !important; }
.pin.orange { background-color: #E67E22 !important; }
.pin.blue-capsule { 
    background-color: #fff !important; 
    color: #2C3E50 !important;
    border: 1.5px solid #2980B9 !important;
}

/* ==========================================================================
   3. DESKTOP PREVIEW PANEL (SIDE-BY-SIDE SIDEBAR)
   ========================================================================== */
.preview-panel {
    display: none;
    background: #fafafa;
    padding: 20px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-left: 1px solid #eee;
    box-sizing: border-box;
}

.preview-placeholder-text {
    color: #777;
    font-style: italic;
    text-align: center;
}

#desktop-preview-img {
    max-width: 100%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 6px;
    display: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

#desktop-preview-title {
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

/* ==========================================================================
   4. MOBILE BOTTOM SHEET (MODAL DRAWER - HORIZONTAL 50/50 SPLIT)
   ========================================================================== */
.bottom-sheet {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: auto !important;
    max-height: 42vh !important;
    background: white !important;
    border-top-left-radius: 20px !important;
    border-top-right-radius: 20px !important;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.2) !important;
    transform: translateY(100%) !important;
    transition: transform 0.3s ease-out !important;
    z-index: 9999 !important;
    padding: 12px 16px 20px 16px !important;
    box-sizing: border-box;
}

.bottom-sheet.open {
    transform: translateY(0) !important;
}

.bottom-sheet-handle {
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 3px;
    margin: 0 auto 12px auto;
    flex-shrink: 0;
}

.bottom-sheet-content {
    display: flex !important;
    flex-direction: row !important;
    gap: 16px !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
}

.bottom-sheet-img {
    width: 50% !important;
    max-width: 50% !important;
    aspect-ratio: 4 / 3 !important;
    object-fit: cover !important;
    border-radius: 8px !important;
    background-color: #eaeaea;
    flex-shrink: 0 !important;
}

.bottom-sheet-info {
    width: 50% !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    gap: 8px !important;
}

.bottom-sheet-meta-wrapper {
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
}

.bottom-sheet-info h3 {
    margin: 0 !important;
    font-size: 1.1rem !important;
    font-weight: bold !important;
    color: #333 !important;
    line-height: 1.2 !important;
}

.bottom-sheet-info p {
    margin: 0 !important;
    font-size: 0.85rem !important;
    color: #666 !important;
}

.close-sheet {
    margin-top: 4px !important;
    background: #eee !important;
    border: none !important;
    padding: 10px !important;
    border-radius: 6px !important;
    width: 100% !important;
    cursor: pointer !important;
    font-weight: 500 !important;
    color: #333 !important;
    font-size: 0.9rem !important;
}

/* ==========================================================================
   5. RESPONSIVE DESKTOP LAYOUT OVERRIDES (MIN-WIDTH: 768px)
   ========================================================================== */
@media (min-width: 768px) {
    .course-container { 
        flex-direction: row !important;
        height: calc(100vh - 180px) !important;
        max-height: 800px !important;
		margin: 0px;
    }
    
    .map-wrapper { 
        width: 50% !important;
        height: 100% !important;
		background-color: #cfd2c4;
	}
    
    .map-container {
        width: auto !important;
        height: 100% !important;
        max-height: 100% !important;
        aspect-ratio: 4 / 5 !important;
		
    }
    
    .map-image {
        width: auto !important;
        height: 100% !important;
        max-height: 100% !important;
    }

    /* Restores original standard pin sizing exclusively on desktop viewports */
    .pin {
        width: 32px !important;
        height: 32px !important;
        font-size: 13px !important;
        border-width: 2px !important;
    }
    
    .pin.capsule {
        height: 28px !important;
        padding: 0 10px !important;
        border-radius: 14px !important;
        font-size: 12px !important;
    }
    
    .pin.blue-capsule {
        border-width: 2px !important;
    }
    
    .preview-panel { 
        width: 50% !important;
        height: 100% !important; 
        display: flex !important;
    }
    
    .bottom-sheet { 
        display: none !important; 
    }
}