/* AJAX Search Styles */
.rom1-ajax-search-container {
    position: relative;
    display: inline-block;
    width: 100%;
}

.rom1-ajax-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 16px;
    outline: none;
    transition: all 0.3s ease;
    background: #fff;
}

.rom1-ajax-search-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.rom1-ajax-search-loader {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

.rom1-ajax-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    display: none;
    margin-top: 5px;
}

.rom1-ajax-search-container.active .rom1-ajax-search-results {
    display: block;
}

.rom1-search-results-list {
    padding: 0;
    margin: 0;
}

.rom1-search-result-item {
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
}

.rom1-search-result-item:last-child {
    border-bottom: none;
}

.rom1-search-result-item:hover,
.rom1-search-result-item.active {
    background-color: #f8f9fa;
}

.rom1-search-result-link {
    display: block;
    padding: 15px;
    text-decoration: none;
    color: inherit;
}

.rom1-search-result-content {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.rom1-search-result-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    background: #f0f0f0;
}

.rom1-search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rom1-search-result-text {
    flex: 1;
    min-width: 0;
}

.rom1-search-result-title {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1.3;
}

.rom1-search-result-title mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
}

.rom1-search-result-excerpt {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.rom1-search-result-excerpt mark {
    background-color: #fff3cd;
    color: #856404;
    padding: 0 2px;
    border-radius: 2px;
}

.rom1-search-result-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
    color: #888;
}

.rom1-search-result-category {
    background: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.rom1-search-result-price {
    color: #28a745;
    font-weight: 600;
}

.rom1-search-result-date {
    color: #6c757d;
}

.rom1-no-results {
    padding: 20px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.rom1-search-error {
    padding: 15px;
    text-align: center;
    color: #dc3545;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 10px;
}

.rom1-search-more {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.rom1-search-more a {
    color: #007cba;
    text-decoration: none;
    font-weight: 500;
}

.rom1-search-more a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .rom1-ajax-search-container {
        max-width: 100%;
    }
    
    .rom1-ajax-search-results {
        max-height: 300px;
    }
    
    .rom1-search-result-content {
        gap: 10px;
    }
    
    .rom1-search-result-image {
        width: 50px;
        height: 50px;
    }
    
    .rom1-search-result-title {
        font-size: 15px;
    }
    
    .rom1-search-result-excerpt {
        font-size: 13px;
    }
}

/* WooCommerce Product Search Specific Styles */
.rom1-search-result-item[data-post-type="product"] .rom1-search-result-price {
    font-size: 14px;
    font-weight: 700;
    color: #28a745;
}

.rom1-search-result-item[data-post-type="product"] .rom1-search-result-category {
    background: #d4edda;
    color: #155724;
}

/* Loading State */
.rom1-ajax-search-container.loading .rom1-ajax-search-input {
    background-color: #f8f9fa;
}

/* Focus States */
.rom1-ajax-search-container:focus-within .rom1-ajax-search-results {
    border-color: #007cba;
}

/* Custom Scrollbar */
.rom1-ajax-search-results::-webkit-scrollbar {
    width: 6px;
}

.rom1-ajax-search-results::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.rom1-ajax-search-results::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.rom1-ajax-search-results::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 