/* File: static/css/live-search.css */

.search-results-container {
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
    max-height: calc(100vh - 140px)
}

.search-results-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-result-item {
    border-bottom: 1px solid #eee;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item a {
    display: block;
    padding: 10px;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s;
}

.search-result-item a:hover {
    background-color: #f5f5f5;
}

.result-content {
    display: flex;
    align-items: center;
}

.result-image {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
    margin-right: 10px;
    background-color: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 4px;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
}

.result-details {
    flex-grow: 1;
}

.result-name {
    font-weight: bold;
    margin-bottom: 3px;
}

.result-category {
    font-size: 0.8em;
    color: #777;
    margin-bottom: 3px;
}

.result-price {
    font-weight: bold;
    color: #d35400;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #777;
}

.search-wrapper {
    position: relative;
}

/* Add these styles to your existing live-search.css file */

.search-loading {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.search-error {
    padding: 15px;
    text-align: center;
    color: #e74c3c;
}

.no-results {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Make sure the results container has a proper z-index and background */


/* Debug info styling */
.debug-info {
    position: absolute;
    left: 0;
    right: 0;
    background: #f8f9fa;
    border: 1px solid #ddd;
    padding: 8px;
    font-size: 12px;
    color: #666;
    white-space: pre-wrap;
    font-family: monospace;
    z-index: 999;
}

/* Add these styles to your live-search.css file to make the product name more prominent */

/* Enhance result item styling */
.search-result-item {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #f8f8f8;
}

.search-result-item a {
    display: block;
    padding: 12px;
    color: #333;
    text-decoration: none;
}

/* Make the content layout better */
.result-content {
    display: flex;
    align-items: center;
}

/* Improve image container */
.result-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    margin-right: 15px;
    border-radius: 6px;
    overflow: hidden;
    background-color: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Improve result details appearance */
.result-details {
    flex-grow: 1;
}

/* Make product name stand out more */
.result-name {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
    color: #222;
}

.result-category {
    font-size: 13px;
    color: #666;
    margin-bottom: 4px;
}

.result-price {
    font-weight: 600;
    color: #e74c3c;
    font-size: 14px;
}

/* No image placeholder */
.no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #aaa;
    font-size: 20px;
}
