/*!
 * Seekmodo Search — typeahead dropdown styling.
 *
 * All rules are scoped under `.seekmodo-typeahead-dropdown` so they
 * never bleed into the host theme. Visual tokens are exposed as CSS
 * custom properties (`--seekmodo-ta-*`) so a theme can override the
 * look without forking the file:
 *
 *   .seekmodo-typeahead-dropdown {
 *     --seekmodo-ta-bg: #0b0b0c;
 *     --seekmodo-ta-fg: #ffffff;
 *     --seekmodo-ta-accent: #ff7a00;
 *   }
 *
 * Minimum-viable defaults ship a clean white card with a subtle
 * shadow; works on top of every theme tested (Twenty Twenty-* / Astra
 * / Kadence / GeneratePress) without override.
 */

.seekmodo-typeahead-dropdown {
    --seekmodo-ta-bg: #ffffff;
    --seekmodo-ta-fg: #1a1a1a;
    --seekmodo-ta-muted: #6b7280;
    --seekmodo-ta-border: rgba(0, 0, 0, 0.08);
    --seekmodo-ta-row-hover: rgba(0, 0, 0, 0.04);
    --seekmodo-ta-accent: #1f6feb;
    --seekmodo-ta-sale: #d63638;
    --seekmodo-ta-oos: #6b7280;
    --seekmodo-ta-radius: 8px;
    --seekmodo-ta-shadow: 0 12px 32px rgba(15, 23, 42, 0.12), 0 2px 6px rgba(15, 23, 42, 0.08);

    position: absolute;
    z-index: 10000;
    box-sizing: border-box;
    background: var(--seekmodo-ta-bg);
    color: var(--seekmodo-ta-fg);
    border: 1px solid var(--seekmodo-ta-border);
    border-radius: var(--seekmodo-ta-radius);
    box-shadow: var(--seekmodo-ta-shadow);
    overflow: hidden;
    font-size: 14px;
    line-height: 1.4;
    max-height: 480px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.seekmodo-typeahead-dropdown[hidden] {
    display: none !important;
}

.seekmodo-typeahead-dropdown *,
.seekmodo-typeahead-dropdown *:before,
.seekmodo-typeahead-dropdown *:after {
    box-sizing: inherit;
}

.seekmodo-typeahead-rows {
    display: block;
}

.seekmodo-typeahead-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--seekmodo-ta-border);
    transition: background-color 80ms ease;
}

.seekmodo-typeahead-row:last-child {
    border-bottom: 0;
}

.seekmodo-typeahead-row:hover,
.seekmodo-typeahead-row:focus {
    background: var(--seekmodo-ta-row-hover);
    text-decoration: none;
    outline: 0;
}

.seekmodo-typeahead-row-thumb {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--seekmodo-ta-row-hover);
    border-radius: 6px;
    overflow: hidden;
}

.seekmodo-typeahead-row-thumb img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
}

.seekmodo-typeahead-row-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.seekmodo-typeahead-row-title {
    font-weight: 600;
    color: var(--seekmodo-ta-fg);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.seekmodo-typeahead-row-meta {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--seekmodo-ta-muted);
}

.seekmodo-typeahead-row-excerpt {
    font-size: 12px;
    color: var(--seekmodo-ta-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.seekmodo-typeahead-row-price {
    margin-top: 2px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px;
    font-size: 13px;
}

.seekmodo-typeahead-row-price-now {
    color: var(--seekmodo-ta-fg);
    font-weight: 600;
}

.seekmodo-typeahead-row-price-was {
    color: var(--seekmodo-ta-muted);
    text-decoration: line-through;
    font-size: 12px;
}

.seekmodo-typeahead-row-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
    line-height: 1.4;
}

.seekmodo-typeahead-row-badge--sale {
    background: var(--seekmodo-ta-sale);
    color: #fff;
}

.seekmodo-typeahead-row-badge--oos,
.seekmodo-typeahead-row-badge--bo {
    background: var(--seekmodo-ta-oos);
    color: #fff;
}

.seekmodo-typeahead-empty {
    padding: 16px;
    color: var(--seekmodo-ta-muted);
    font-size: 13px;
    text-align: center;
}

.seekmodo-typeahead-empty span {
    color: var(--seekmodo-ta-fg);
    font-weight: 600;
}

.seekmodo-typeahead-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    padding: 6px 14px;
    border-top: 1px solid var(--seekmodo-ta-border);
    background: var(--seekmodo-ta-row-hover);
    font-size: 11px;
    color: var(--seekmodo-ta-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.seekmodo-typeahead-footer-brand {
    color: var(--seekmodo-ta-accent);
    font-weight: 700;
    letter-spacing: 0.04em;
}
