/**
 * Yoda Smart Search - Supermarket Widget Styles
 *
 * Clean, minimal text-only suggestions
 *
 * @package    YodaSearch
 * @author     Yoda
 * @license    GNU General Public License version 3
 */

/* Container override for Supermarket layout */
.yodasearch-container.yodasearch-supermarket {
    min-width: 300px;
    max-width: 450px;
    padding: 8px 0;
}

/* Section */
.yodasearch-sm-section {
    margin-bottom: 8px;
}

.yodasearch-sm-section:last-child {
    margin-bottom: 0;
}

/* Section header (for history) */
.yodasearch-sm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 15px;
}

/* Section title */
.yodasearch-sm-title {
    display: block;
    padding: 6px 15px;
    font-size: 11px;
    font-weight: 600;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.yodasearch-sm-header .yodasearch-sm-title {
    padding: 0;
}

/* Clear button */
.yodasearch-sm-clear {
    background: none;
    border: none;
    padding: 0;
    font-size: 12px;
    color: #007bff;
    cursor: pointer;
}

.yodasearch-sm-clear:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* List */
.yodasearch-sm-list {
    margin: 0;
    padding: 0;
}

/* Item - base styles */
.yodasearch-sm-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.1s;
    cursor: pointer;
}

.yodasearch-sm-item:hover {
    background-color: #f5f5f5;
    text-decoration: none;
    color: #333;
}

/* Icon */
.yodasearch-sm-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: #999;
}

.yodasearch-sm-item:hover .yodasearch-sm-icon {
    color: #666;
}

/* Text */
.yodasearch-sm-text {
    flex: 1;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.yodasearch-sm-text strong {
    font-weight: 600;
    color: #000;
}

/* Count badge */
.yodasearch-sm-count {
    flex-shrink: 0;
    margin-left: 10px;
    font-size: 12px;
    color: #999;
}

/* History items */
.yodasearch-sm-history .yodasearch-sm-icon {
    color: #aaa;
}

/* Suggestion items */
.yodasearch-sm-suggest .yodasearch-sm-icon,
.yodasearch-sm-correction .yodasearch-sm-icon {
    color: #5bc0de;
}

/* Product items */
.yodasearch-sm-product {
    color: #555;
}

.yodasearch-sm-product .yodasearch-sm-icon {
    color: #28a745;
}

.yodasearch-sm-product .yodasearch-sm-text {
    font-size: 13px;
}

/* Popular items */
.yodasearch-sm-popular .yodasearch-sm-icon {
    color: #fd7e14;
}

/* Category items */
.yodasearch-sm-category {
    color: #555;
}

.yodasearch-sm-category .yodasearch-sm-icon {
    color: #6c757d;
}

/* Divider between sections */
.yodasearch-sm-section + .yodasearch-sm-section {
    border-top: 1px solid #f0f0f0;
    padding-top: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .yodasearch-container.yodasearch-supermarket {
        min-width: auto;
        max-width: none;
    }

    .yodasearch-sm-item {
        padding: 12px 15px;
    }

    .yodasearch-sm-text {
        font-size: 15px;
    }
}

/* Dark theme support */
.dark-theme .yodasearch-sm-item,
[data-theme="dark"] .yodasearch-sm-item {
    color: #eee;
}

.dark-theme .yodasearch-sm-item:hover,
[data-theme="dark"] .yodasearch-sm-item:hover {
    background-color: #3d3d3d;
}

.dark-theme .yodasearch-sm-icon,
[data-theme="dark"] .yodasearch-sm-icon {
    color: #888;
}
