/**
 * Search Suggestions CSS
 * Styles for autocomplete search suggestions
 */

/* Search Suggestions Container */
.hme-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    z-index: 10000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: 2px;
    display: none;
}

.mobile-search-section .hme-search-suggestions {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    border-radius: 0 0 8px 8px;
}

/* Loading State */
.hme-search-loading {
    padding: 20px;
    text-align: center;
    color: #666;
}

.hme-search-loading svg {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* No Results */
.hme-search-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-family: 'Cairo', sans-serif;
}

/* Suggestions List */
.hme-suggestions-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Section Header */
.hme-suggestion-section {
    padding: 10px 15px;
    background: #f8f9fa;
    font-weight: 600;
    font-size: 0.85em;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e0e0e0;
    font-family: 'Cairo', sans-serif;
}

/* Suggestion Item */
.hme-suggestion-item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
}

.hme-suggestion-item:last-child {
    border-bottom: none;
}

.hme-suggestion-item a {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s ease;
    gap: 12px;
}

.hme-suggestion-item:hover,
.hme-suggestion-item.selected {
    background-color: #f8f9fa;
}

.hme-suggestion-item.selected a {
    background-color: rgba(212, 175, 55, 0.1);
    color: #a67c00;
}

/* Suggestion Image */
.hme-suggestion-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.hme-suggestion-location svg {
    width: 20px;
    height: 20px;
    color: #d4af37;
    flex-shrink: 0;
}

/* Suggestion Content */
.hme-suggestion-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.hme-suggestion-title {
    font-weight: 600;
    font-size: 0.95em;
    color: #333;
    line-height: 1.4;
    font-family: 'Cairo', sans-serif;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hme-suggestion-item.selected .hme-suggestion-title {
    color: #a67c00;
}

.hme-suggestion-price {
    font-size: 0.85em;
    color: #d4af37;
    font-weight: 700;
    font-family: 'Cairo', sans-serif;
}

.hme-suggestion-meta {
    font-size: 0.8em;
    color: #666;
    font-family: 'Cairo', sans-serif;
}

/* Trip Suggestions */
.hme-suggestion-trip .hme-suggestion-content {
    gap: 6px;
}

/* Post Suggestions */
.hme-suggestion-post .hme-suggestion-content {
    gap: 4px;
}

/* Location Suggestions */
.hme-suggestion-location .hme-suggestion-content {
    gap: 4px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hme-search-suggestions {
        max-height: 300px;
    }
    
    .hme-suggestion-item a {
        padding: 10px 12px;
        gap: 10px;
    }
    
    .hme-suggestion-item img {
        width: 40px;
        height: 40px;
    }
    
    .hme-suggestion-title {
        font-size: 0.9em;
    }
}

/* RTL Support */
html[dir="rtl"] .hme-search-suggestions {
    left: auto;
    right: 0;
}

html[dir="rtl"] .hme-suggestion-item a {
    flex-direction: row-reverse;
}

/* Scrollbar Styling */
.hme-search-suggestions::-webkit-scrollbar {
    width: 6px;
}

.hme-search-suggestions::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.hme-search-suggestions::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 3px;
}

.hme-search-suggestions::-webkit-scrollbar-thumb:hover {
    background: #a67c00;
}
