/* Location Suggestions Overlay - Modern Grid Layout */

/* Fullscreen overlay for location suggestions */
.location-suggestions-overlay {
    position: fixed !important;
    inset: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.5) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
    z-index: 9999 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    padding: 1rem !important;
}

.location-suggestions-overlay.is-visible {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.location-suggestions-overlay__backdrop {
    position: absolute;
    inset: 0;
    cursor: pointer;
}

.location-suggestions-overlay__panel {
    position: relative;
    width: min(920px, calc(100% - 2rem));
    max-height: 85vh;
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 32px 80px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
    z-index: 10000;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.location-suggestions-overlay__header {
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-shrink: 0;
}

.location-suggestions-overlay__title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #4CAF50;
    margin: 0;
    flex: 1;
}

.location-suggestions-overlay__term {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 500;
    margin-top: 0.25rem;
}

.location-suggestions-overlay__close {
    background: rgba(76, 175, 80, 0.1);
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4CAF50;
    transition: all 0.2s ease;
    cursor: pointer;
    flex-shrink: 0;
}

.location-suggestions-overlay__close:hover,
.location-suggestions-overlay__close:focus {
    background: rgba(76, 175, 80, 0.2);
    transform: scale(1.1);
    outline: none;
}

.location-suggestions-overlay__body {
    padding: 1.25rem 1.75rem 1.75rem 1.75rem;
    overflow-y: auto;
}

/* Grid layout for suggestions */
.location-suggestions-overlay__list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 0.75rem;
}

.location-suggestions-overlay__list .location-suggestion-item {
    padding: 1rem 1.25rem;
    border-radius: 16px;
    border: 2px solid #f1f3f5;
    background: #ffffff;
    transition: all 0.25s ease;
    cursor: pointer;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.location-suggestions-overlay__list .location-suggestion-item:hover {
    transform: translateY(-3px);
    border-color: #4CAF50;
    background: rgba(76, 175, 80, 0.05);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.15);
}

.location-suggestions-overlay__list .location-suggestion-item:active {
    transform: translateY(-1px);
}

body.location-suggestions-overlay-open {
    overflow: hidden;
}

/* Scrollbar styling for overlay */
.location-suggestions-overlay__body::-webkit-scrollbar {
    width: 8px;
}

.location-suggestions-overlay__body::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 10px;
}

.location-suggestions-overlay__body::-webkit-scrollbar-thumb {
    background: rgba(76, 175, 80, 0.3);
    border-radius: 10px;
}

.location-suggestions-overlay__body::-webkit-scrollbar-thumb:hover {
    background: rgba(76, 175, 80, 0.5);
}

/* Responsive adjustments for overlay */
@media (max-width: 768px) {
    .location-suggestions-overlay__panel {
        width: calc(100% - 1rem);
        max-height: 90vh;
        border-radius: 20px;
    }

    .location-suggestions-overlay__header {
        padding: 1.25rem 1.25rem 0.85rem 1.25rem;
    }

    .location-suggestions-overlay__title {
        font-size: 1.1rem;
    }

    .location-suggestions-overlay__body {
        padding: 1rem 1.25rem 1.25rem 1.25rem;
    }

    .location-suggestions-overlay__list {
        grid-template-columns: 1fr;
        gap: 0.6rem;
    }

    .location-suggestions-overlay__list .location-suggestion-item {
        padding: 0.9rem 1rem;
    }
}

@media (min-width: 1200px) {
    .location-suggestions-overlay__list {
        grid-template-columns: repeat(3, 1fr);
    }
}