/**
 * Test Strips Map Component Styles
 * 
 * Styles for the test strips map section - based on drug disposal map styling
 */

.test-strips-map {
    padding: 60px 0;
    background-color: #000;
    color: #fff;
    
    
    & .columns-wrapper {
        display: flex;
        flex-wrap: wrap;
        gap: 30px;
        align-items: center;
    }
    
    & .text-column {
        flex: 1;
        width: 33.333%;
        min-width: 300px;
        padding-right: 20px;
    }
    
    & .map-column {
        flex: 2;
        width: 66.666%;
        min-width: 300px;
        position: relative;
    }
    
    & h2 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
        line-height: 1.2;
        font-weight: 700;
        font-family: var(--font-heading-primary);
    }
    
    & p {
        margin-bottom: 1.25rem;
        line-height: 1.6;
        font-family: var(--font-body-primary);
    }
    
    /* Responsive styles */
    @media (max-width: 768px) {
        & .columns-wrapper {
            flex-direction: column;
        }
        
        & .text-column,
        & .map-column {
            width: 100%;
        }
        
        & h2 {
            font-size: 2rem;
        }
    }
}

/* Map styling */
#map {
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius-secondary);
    overflow: hidden;
    position: relative;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
    pointer-events: none;
}

.map-intro {
    position: absolute;
    top: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    padding: 20px;
    border-radius: var(--border-radius-primary);
    z-index: 2;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    
    & .close {
        position: absolute;
        top: 10px;
        right: 15px;
        cursor: pointer;
        font-weight: bold;
    }
    
    & h3 {
        margin-top: 0;
        margin-bottom: 10px;
        color: #000;
        font-family: var(--font-heading-primary);
    }
}

/* Search input styling */
.map-search {
    margin-top: 20px;
    position: relative;
    
    & .search-input-wrapper {
        display: flex;
        margin-bottom: 10px;
        width: 100%;
    }
    
    & #city-zip {
        flex: 1;
        padding: 12px 15px;
        border: 2px solid var(--color-yellow);
        border-radius: var(--border-radius-primary) 0 0 var(--border-radius-primary);
        font-size: 16px;
        background-color: #000;
        color: #fff;
        font-family: var(--font-body-primary);
    }
    
    & #city-zip::placeholder {
        font-weight: bold;
        opacity: 0.7;
    }
    
    & .search-button {
        background-color: var(--color-yellow);
        color: #000;
        border: none;
        padding: 0 15px;
        border-radius: 0 var(--border-radius-primary) var(--border-radius-primary) 0;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    & .clear-search {
        display: block;
        margin-top: 5px;
        color: var(--color-yellow);
        text-decoration: none;
        font-weight: bold;
        text-align: left;
    }
    
    & .clear-search:hover {
        text-decoration: underline;
    }
    
    & .search-error {
        display: none;
        margin-top: 10px;
        padding: 10px;
        background-color: rgba(255, 0, 0, 0.1);
        border-left: 3px solid #ff0000;
        color: #fff;
    }
}

/* Map popup styling */
.mapboxgl-popup {
    max-width: 280px;
    
    & .mapboxgl-popup-content {
        border-radius: 0;
        padding: 15px;
        background-color: #000;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }
    
    & .mapboxgl-popup-close-button {
        color: #fff;
        font-size: 18px;
        padding: 5px 8px;
        right: 5px;
        top: 5px;
        
        &:hover {
            background: transparent;
            color: var(--color-yellow);
        }
    }
    
    & .mapboxgl-popup-tip {
        border-top-color: #000;
        border-bottom-color: #000;
    }
}

.map-popup {
    padding: 0;
    
    & .title {
        font-weight: bold;
        font-size: 18px;
        margin-bottom: 8px;
        color: #fff;
        font-family: var(--font-heading-primary);
    }
    
    & .address,
    & .phone {
        margin-bottom: 5px;
        font-size: 14px;
        color: #fff;
        font-family: var(--font-body-primary);
    }
    
    & .website,
    & .links {
        margin-top: 10px;
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
        
        & a {
            color: var(--color-yellow);
            text-decoration: none;
            font-size: 14px;
            font-family: var(--font-body-primary);
            display: flex;
            align-items: center;
            
            &:hover {
                text-decoration: underline;
            }
            
            &:after {
                content: '>';
                margin-left: 5px;
            }
        }
    }
    
    & .test-strips {
        margin-top: 10px;
        padding: 8px;
        background-color: rgba(255, 255, 255, 0.1);
        border-left: 3px solid var(--color-yellow);
        font-size: 13px;
        font-weight: bold;
        color: #fff;
    }
}

/* Hide map controls */
.test-strips-map .mapboxgl-ctrl-top-right {
    display: none;
}

@media (max-width: 768px) {
    #map {
        height: 350px;
    }
}
