/**
 * Location Picker Styles
 * 
 * This file contains styling for the location picker feature including:
 * - Map modal styling
 * - Search functionality 
 * - Location selection interface
 * - Interactive map components
 */

/* Modal container styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    background-image: linear-gradient(to bottom right, rgba(0,0,50,0.1), transparent);
    overflow-y: auto;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: #fefefe;
    padding: 20px;
    border: 1px solid #888;
    width: 90%;
    max-width: 900px;
    border-radius: 8px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

@media (min-width: 768px) {
    .modal-body {
        flex-direction: row;
    }
    
    .search-column {
        width: 40%;
    }
    
    .map-column {
        width: 60%;
    }
}

.search-column {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.map-column {
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

#map {
    height: 350px;
    width: 100%;
    border-radius: 4px;
    border: 1px solid #ddd;
    z-index: 1;
    position: relative;
    background-color: #f8f8f8;
}

.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 0;
}

#locationSearch {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#searchResults {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 0;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.search-result-item {
    padding: 8px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.search-result-item:hover {
    background-color: #f5f5f5;
}

.search-result-item.selected {
    background-color: #e8f4ff;
    border-left: 4px solid #4CAF50;
    font-weight: 500;
}

.modal-footer {
    margin-top: 15px;
}

#confirmLocation {
    width: 100%;
    padding: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.8;
}

#confirmLocation:hover {
    background-color: #45a049;
    opacity: 1;
}

#confirmLocation.active {
    background-color: #45a049;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    opacity: 1;
    transform: translateY(-2px);
}

.location-preview {
    margin: 10px 0;
}

.location-bubble {
    display: inline-flex;
    align-items: center;
    background-color: #f0f2f5;
    padding: 6px 12px;
    border-radius: 16px;
    gap: 8px;
}

.location-icon {
    font-size: 16px;
}

.btn-remove-location {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
}

.btn-remove-location:hover {
    color: #000;
}
