/* ===================================================
   1. Mapbox Container & Overall Layout
   =================================================== */

/* Container that holds the entire Mapbox display and POI list */
.mapbox-clearph-container {
    position: relative;
    margin: 0 auto;
}

/* ===================================================
   2. POI List & Filters Section
   =================================================== */

/* POI List: positioned over the map to display POIs */
.poi-list {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #000;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
    max-width: 300px;
    max-height: calc(100% - 20px);
    display: flex;
    flex-direction: column;
    z-index: 1;
}

@media (max-width: 767px) {
    .poi-list {
        display: none !important;
    }
}

/* POI Filters: container for filter options */
.poi-filters {
    flex-shrink: 0;
    margin-bottom: 15px;
}

/* Filter header with dropdown and toggle button */
.filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

/* Style for select field inside POI filters */
.poi-filters select {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #CFAE5F;
    border-radius: 4px;
    color: #CFAE5F;
}

/* Toggle button for POI list */
.poi-toggle-btn {
    background-color: #CFAE5F;
    border: none;
    color: #000;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.poi-toggle-btn.expanded i {
    transform: rotate(180deg);
}

/* ===================================================
   3. Category Sections & Scrollbar Styling
   =================================================== */

/* Container for category sections within the POI list */
.category-sections-container {
    flex-grow: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* Custom scrollbar for Webkit browsers */
.category-sections-container::-webkit-scrollbar {
    width: 4px;
}

.category-sections-container::-webkit-scrollbar-track {
    background: rgba(207, 174, 95, 0.1);
    border-radius: 2px;
}

.category-sections-container::-webkit-scrollbar-thumb {
    background: #CFAE5F;
    border-radius: 2px;
}

/* Each category section wrapper */
.category-section {
    margin-bottom: 20px;
}

/* Category title styling */
.category-title {
    color: #CFAE5F;
    font-size: 16px;
    margin: 0 0 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #CFAE5F;
}

/* Container for the items within each category section */
.category-items {
    margin-left: 10px;
}

/* ===================================================
   4. POI Items Styling
   =================================================== */

/* Container for the POI items list within a category */
.poi-items {
    flex: 1;
    overflow-y: auto;
    scroll-behavior: smooth;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 400px;
    opacity: 1;
}

/* Collapsed state for POI items */
.poi-items.collapsed {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    margin-bottom: 0;
}

/* Individual POI item styling */
.poi-item {
    padding: 8px;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* Hover state for a POI item */
.poi-item:hover {
    background-color: rgba(207, 174, 95, 0.1);
}

/* POI name styling, including an icon gap */
.poi-name {
    font-weight: 500;
    font-size: 14px;
    color: #f5efdf;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===================================================
   5. Custom Marker & Marker Label
   =================================================== */

.image-marker {
    filter: drop-shadow(2px 2px 7px rgba(255, 2550, 255, 0.8));
}

/* Custom marker styling for map markers */
.custom-marker {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    cursor: pointer;
}

/* Icon style within the custom marker */
.custom-marker i {
    color: #f5efdf;
    font-size: 18px;
}

/* Label attached to markers */
.marker-label {
    display: none;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
    background: #f5efdf;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, 0);
    margin-top: 5px;
    pointer-events: none;
}

/* ===================================================
   6. Mapbox Popup Styling
   =================================================== */

/* Popup tip adjustments for popups anchored at the top */
.mapboxgl-popup-anchor-top .mapboxgl-popup-tip {
    border-bottom-color: #000;
}

/* Popup content background for POI popups */
.mapboxgl-popup-content {
    background: #000;
}

/* Popup tip adjustments for popups anchored at the bottom */
.mapboxgl-popup-anchor-bottom .mapboxgl-popup-tip {
    border-top-color: #000;
}

/* Additional styling for headings within POI popups */
.poi-popup h5 {
    margin: 0 0 8px;
    /* Use responsive line height */
    line-height: max(18px, 1.5vw) !important;
}

.poi-popup p {
    font-size: max(12px, .8vw) !important;
    line-height: max(14px, 1.2vw) !important;
    margin-bottom: 18px !important;
    color: #F5EFDF !important;
    padding-bottom: 0;
}