/* pages/static/pages/css/search.css */

.search-wrapper {
    flex: 1;
    position: relative;
    display: flex;
}

.search-input {
    flex: 1;
    padding: 0.6rem 1rem;
    border: 2px solid #ddd;
    border-right: none;
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    outline: none;
    width: 100%;
}

.search-input:focus {
    border-color: #ff9900;
}

.search-button {
    padding: 0.6rem 1.2rem;
    background-color: #ff9900;
    border: 2px solid #ff9900;
    border-radius: 0 8px 8px 0;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    flex-shrink: 0;
    transition: background-color 0.2s;
}

.search-button:hover {
    background-color: #e68900;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 500px;
    overflow-y: auto;
}

/* Стили для элементов выпадающего списка */
.search-suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s;
    cursor: pointer;
}

.search-suggestion-item:hover,
.search-suggestion-item.highlighted {
    background: #f8f9fa;
    border-left: 3px solid #ff9900;
}

.suggestion-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-right: 12px;
    flex-shrink: 0;
    background: #f8f9fa;
    border-radius: 8px;
}

.suggestion-content {
    flex: 1;
}

.suggestion-name {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 4px;
    line-height: 1.3;
}

/* Стили для подсветки совпадений */
.suggestion-name mark {
    background: #fff3cd;
    padding: 0 2px;
    color: #856404;
    border-radius: 2px;
    font-weight: 600;
}

.suggestion-brand {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.suggestion-price {
    font-size: 14px;
    font-weight: bold;
    color: #B12704;
}

/* Разделители между типами результатов */
.suggestion-type {
    padding: 8px 16px;
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ecef;
}

.suggestion-divider {
    height: 1px;
    background: #e9ecef;
    margin: 4px 0;
}

/* Футер с подсказками */
.search-suggestion-footer {
    padding: 10px 16px;
    background: #f8f9fa;
    font-size: 12px;
    color: #6c757d;
    text-align: center;
    border-top: 1px solid #e9ecef;
    position: sticky;
    bottom: 0;
}

/* Стили для скроллбара */
.search-dropdown::-webkit-scrollbar {
    width: 6px;
}

.search-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.search-dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Адаптивность */
@media (max-width: 768px) {
    .search-dropdown {
        max-height: 400px;
    }
    
    .suggestion-icon {
        width: 32px;
        height: 32px;
        font-size: 18px;
        margin-right: 10px;
    }
    
    .suggestion-name {
        font-size: 13px;
    }
    
    .suggestion-price {
        font-size: 12px;
    }
    
    .suggestion-type {
        font-size: 11px;
        padding: 6px 12px;
    }
    
    .search-suggestion-footer {
        font-size: 10px;
        padding: 8px 12px;
    }
}

/* Стили для отсутствия результатов */
.search-no-results {
    padding: 40px 20px;
    text-align: center;
}

.no-results-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: 0.5;
}

.no-results-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 8px;
}

.no-results-hint {
    font-size: 13px;
    color: #999;
}

/* Стили для дополнительной информации */
.suggestion-brand {
    font-size: 12px;
    color: #666;
    margin-bottom: 2px;
}

.suggestion-category {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.suggestion-count {
    font-size: 11px;
    color: #999;
    margin-top: 2px;
}

.suggestion-price {
    font-size: 14px;
    font-weight: bold;
    color: #B12704;
    margin-top: 2px;
}

.suggestion-arrow {
    margin-left: 8px;
    color: #ccc;
    font-size: 16px;
    transition: transform 0.2s;
}

.search-suggestion-item:hover .suggestion-arrow {
    transform: translateX(3px);
    color: #ff9900;
}

/* Разделители */
.suggestion-type {
    padding: 10px 16px;
    background: #f8f9fa;
    font-size: 12px;
    font-weight: 600;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    top: 0;
    z-index: 1;
}

.suggestion-divider {
    height: 1px;
    background: linear-gradient(to right, #e9ecef, transparent);
    margin: 4px 16px;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .suggestion-type {
        padding: 8px 12px;
        font-size: 11px;
    }
    
    .search-no-results {
        padding: 30px 16px;
    }
    
    .no-results-icon {
        font-size: 36px;
    }
    
    .no-results-text {
        font-size: 14px;
    }
    
    .suggestion-arrow {
        display: none;
    }
}