/**
 * SearchLiveAjax Styles voor OpenCart 4
 * Bootstrap 5 compatible styling
 */

#search {
    position: relative;
}

.searchliveajax-dropdown {
    position: absolute;
    top: 34px;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.175);
    max-height: 500px;
    overflow-y: auto;
    z-index: 1050;
    margin-top: 0.5rem;
    display: none;
    border-radius: 20px 0px 0px 20px !important;
}

.searchliveajax-loading,
.searchliveajax-error,
.searchliveajax-no-results {
    padding: 1rem;
    text-align: center;
    color: #6c757d;
}

.searchliveajax-error {
    color: #dc3545;
}

.searchliveajax-section {
    border-bottom: 1px solid #e9ecef;
    border-radius: 15px;
}

.searchliveajax-section:last-child {
    border-bottom: none;
}

.searchliveajax-section-title {
    padding: 0.75rem 1rem;
    background: #e9ecef;
    font-weight: 600;
    font-size: 0.875rem;
    color: #212529;
    text-transform: none;
    border-bottom: 1px solid #dee2e6;
}

.searchliveajax-section-title i {
    margin-right: 0.5rem;
    color: #6c757d;
}

.searchliveajax-suggestion {
    display: block;
    padding: 0.6rem 1rem;
    color: #212529;
    text-decoration: none;
    border-bottom: 1px solid #f1f3f5;
    transition: background-color 0.15s ease-in-out;
    font-size: 0.95rem;
    cursor: pointer;
}

.searchliveajax-suggestion:hover {
    background-color: #f8f9fa;
    color: #212529;
}

.searchliveajax-suggestion i {
    margin-right: 0.75rem;
    color: #adb5bd;
    font-size: 0.85rem;
}

.searchliveajax-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #212529;
    text-decoration: none;
    border-bottom: 1px solid #f8f9fa;
    transition: background-color 0.15s ease-in-out;
    position: relative;
}

.searchliveajax-item:hover {
    background-color: #f8f9fa;
    color: #1f3255;
}

.searchliveajax-item:last-child {
    border-bottom: none;
}

.searchliveajax-category {
    font-size: 0.95rem;
    font-weight: 500;
}

.searchliveajax-category i {
    display: none;
}

.searchliveajax-product {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
}

.searchliveajax-product:hover {
    background-color: #f8f9fa;
}

.searchliveajax-product-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
}

.searchliveajax-product-image {
    flex-shrink: 0;
}

.searchliveajax-product-image img {
    max-width: 60px;
    max-height: 60px;
    border-radius: 0.25rem;
    border: 1px solid #e9ecef;
}

.searchliveajax-product-info {
    flex: 1;
    min-width: 0;
}

.searchliveajax-product-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #212529;
    font-size: 0.95rem;
}

.searchliveajax-product-model {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
}

.searchliveajax-product-description {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 0.25rem;
    line-height: 1.4;
}

.searchliveajax-product-price {
    font-weight: 600;
    margin-top: 0.25rem;
}

.searchliveajax-price-old {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 0.9rem;
    margin-right: 0.5rem;
}

.searchliveajax-price-new {
    color: #dc3545;
    font-size: 1.1rem;
}

.searchliveajax-view-all {
    display: block;
    padding: 0.75rem 1rem;
    text-align: center;
    background: #ffffff;
    color: #212529;
    font-weight: 400;
    text-decoration: underline;
    border-top: 1px solid #dee2e6;
    transition: background-color 0.15s ease-in-out;
}

.searchliveajax-view-all:hover {
    background: #e9ecef;
    color: #0a58ca;
}

/* Responsive aanpassingen */
@media (max-width: 768px) {
    .searchliveajax-dropdown {
        max-height: 400px;
    }

    .searchliveajax-product {
        flex-direction: column;
    }
}

/* Scrollbar styling */
.searchliveajax-dropdown::-webkit-scrollbar {
    width: 8px;
}

.searchliveajax-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.searchliveajax-dropdown::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.searchliveajax-dropdown::-webkit-scrollbar-thumb:hover {
    background: #555;
}
