/**
 * Recherche instantanée.
 * Les couleurs passent par des variables : à surcharger dans le thème enfant
 * plutôt que dans ce fichier, pour survivre aux mises à jour du module.
 */

:root {
    --olsearch-bg: #ffffff;
    --olsearch-border: #dcdfe3;
    --olsearch-text: #1f2328;
    --olsearch-muted: #6b7280;
    --olsearch-hover: #f4f6f8;
    --olsearch-accent: #1b9ac6;
    --olsearch-radius: 3px;
}

.olsearch-panel {
    position: fixed;
    z-index: 9999;
    overflow-y: auto;
    overscroll-behavior: contain;
    background: var(--olsearch-bg);
    border: 1px solid var(--olsearch-border);
    border-radius: var(--olsearch-radius);
    box-shadow: 0 10px 28px rgba(15, 23, 32, 0.14);
    font-size: 14px;
    line-height: 1.35;
    color: var(--olsearch-text);
    -webkit-overflow-scrolling: touch;
}

.olsearch-panel[hidden] {
    display: none;
}

.olsearch-group-title {
    padding: 10px 14px 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--olsearch-muted);
    border-top: 1px solid var(--olsearch-border);
}

.olsearch-group-title:first-child {
    border-top: 0;
}

.olsearch-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 14px;
    color: inherit;
    text-decoration: none;
}

.olsearch-item:hover,
.olsearch-item.is-active {
    background: var(--olsearch-hover);
    text-decoration: none;
    color: inherit;
}

.olsearch-item:focus-visible {
    outline: 2px solid var(--olsearch-accent);
    outline-offset: -2px;
}

.olsearch-thumb {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    object-fit: contain;
    background: #fff;
    border: 1px solid var(--olsearch-border);
}

.olsearch-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1 1 auto;
}

.olsearch-name {
    color: #293647;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
}

.olsearch-meta {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: var(--olsearch-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.olsearch-price {
    flex: 0 0 auto;
    margin-left: auto;
    padding-left: 8px;
    color: #1b9ac6;
    font-weight: 700;
    white-space: nowrap;
}

.olsearch-mark {
    background: transparent;
    color: inherit;
    font-weight: 700;
    padding: 0;
}

.olsearch-message {
    padding: 14px;
    color: var(--olsearch-muted);
}

.olsearch-footer {
    display: block;
    padding: 11px 14px;
    border-top: 1px solid var(--olsearch-border);
    color: var(--olsearch-accent);
    font-weight: 600;
    text-decoration: none;
}

.olsearch-footer:hover,
.olsearch-footer.is-active {
    background: var(--olsearch-hover);
    color: var(--olsearch-accent);
    text-decoration: none;
}

@media (max-width: 575px) {
    .olsearch-thumb {
        width: 36px;
        height: 36px;
    }

    .olsearch-item {
        padding: 10px 12px;
    }
}
