/**
 * Nova Search Suggest — styles
 * Aligned with ProSource MRO design tokens.
 *
 * @since 3.0.44
 */

.nova-ss-wrap {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.nova-ss-wrap > input {
    flex: 1 1 auto;
    min-width: 0;
}

/* Force parent containers to allow dropdown overflow */
.ncat-search-bar,
.ncat-search-form,
.ncat-header__right,
.ncat-header,
.nova-catalog-header-search,
.nova-catalog-header-search__form,
.nova-catalog-header-search__bar {
    overflow: visible !important;
}

.nova-ss-dd {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 999999;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.08), 0 4px 10px -3px rgba(0,0,0,0.04);
    max-height: 480px;
    overflow-y: auto;
    overflow-x: hidden;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.4;
    color: #111827;
    min-width: 320px;
}

.nova-ss-msg {
    padding: 16px;
    color: #6b7280;
    text-align: center;
    font-size: 13px;
}

.nova-ss-item {
    display: flex !important;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    text-decoration: none !important;
    color: inherit !important;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.12s ease;
    cursor: pointer;
}

.nova-ss-item:last-of-type { border-bottom: none; }

.nova-ss-item:hover,
.nova-ss-item.is-active {
    background: #f9fafb;
}

.nova-ss-thumb {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 6px;
    object-fit: cover;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.nova-ss-thumb-ph {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

.nova-ss-meta {
    flex: 1 1 auto;
    min-width: 0;
}

.nova-ss-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.nova-ss-title mark {
    background: #fef08a;
    color: #111827;
    padding: 0 1px;
    border-radius: 2px;
}

.nova-ss-sub {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
    font-size: 12px;
    color: #6b7280;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nova-ss-brand {
    font-weight: 600;
    color: #2563eb;
}

.nova-ss-sku {
    color: #6b7280;
    font-variant-numeric: tabular-nums;
}

.nova-ss-typ {
    flex-shrink: 0;
    display: inline-block;
    padding: 1px 6px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    border-radius: 3px;
    line-height: 1.5;
}

.nova-ss-typ-woo  { background: #dbeafe; color: #1d4ed8; }
.nova-ss-typ-nova { background: #e0e7ff; color: #4338ca; }

.nova-ss-all {
    display: block;
    padding: 10px 14px;
    background: #f9fafb;
    color: #2563eb !important;
    font-weight: 500;
    font-size: 13px;
    text-align: center;
    text-decoration: none !important;
    border-top: 1px solid #e5e7eb;
}

.nova-ss-all:hover {
    background: #eff6ff;
    color: #1d4ed8 !important;
}

@media (max-width: 640px) {
    .nova-ss-dd { max-height: 70vh; }
    .nova-ss-thumb { flex: 0 0 36px; width: 36px; height: 36px; }
    .nova-ss-title { font-size: 13px; }
}

.nova-ss-dd::-webkit-scrollbar { width: 8px; }
.nova-ss-dd::-webkit-scrollbar-track { background: transparent; }
.nova-ss-dd::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 4px; }
