/**
 * MV Search by SKU - Live Search Dropdown Styles (Text & SKU Focused)
 * Designed for international export e-commerce: ultra-fast, lightweight, responsive.
 */

/* Main Dropdown Container */
.mv-sku-dropdown {
    position: absolute;
    z-index: 999999;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.12), 0 8px 10px -6px rgba(15, 23, 42, 0.05);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    animation: mvSkuDropdownFadeIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.mv-sku-dropdown * {
    box-sizing: border-box;
}

@keyframes mvSkuDropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scrollable Item List */
.mv-sku-scrollable-list {
    max-height: 380px;
    overflow-y: auto;
    overscroll-behavior: contain;
    margin: 0;
    padding: 4px 0;
    list-style: none;
}

/* Custom Sleek Scrollbar */
.mv-sku-scrollable-list::-webkit-scrollbar {
    width: 6px;
}
.mv-sku-scrollable-list::-webkit-scrollbar-track {
    background: #f8fafc;
}
.mv-sku-scrollable-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 9999px;
}
.mv-sku-scrollable-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Single Item Row */
.mv-sku-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    gap: 12px;
    text-decoration: none;
    color: #1e293b;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.12s ease;
    cursor: pointer;
}

.mv-sku-item:last-child {
    border-bottom: none;
}

.mv-sku-item:hover,
.mv-sku-item.is-active {
    background-color: #f1f5f9;
    text-decoration: none;
    color: #0f172a;
}

/* Text Container */
.mv-sku-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

/* Primary Header: SKU / Model */
.mv-sku-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Enlarged SKU / Model typography - Elegant Forest/Emerald Green */
.mv-sku-code {
    font-size: 15px;
    font-weight: 700;
    color: #047857; /* Refined emerald/forest green, natural and easy on the eyes */
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    letter-spacing: 0.4px;
    display: inline-block;
}

/* Variation Indicator Badge */
.mv-sku-type-badge {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 4px;
    background-color: #ecfdf5;
    color: #047857;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Sub-line: Product Title */
.mv-sku-product-title {
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
    line-height: 1.35;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mv-sku-item:hover .mv-sku-product-title,
.mv-sku-item.is-active .mv-sku-product-title {
    color: #334155;
}

/* Arrow indicator on the right */
.mv-sku-arrow {
    flex-shrink: 0;
    color: #cbd5e1;
    font-size: 14px;
    transition: transform 0.15s ease, color 0.15s ease;
}

.mv-sku-item:hover .mv-sku-arrow,
.mv-sku-item.is-active .mv-sku-arrow {
    color: #047857;
    transform: translateX(3px);
}

/* Matched Term Highlight - Soft mint background with deep green font */
.mv-sku-highlight {
    background-color: #dcfce7;
    color: #14532d;
    font-weight: 800;
    padding: 0 2px;
    border-radius: 3px;
}

/* Loading State */
.mv-sku-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 16px;
    gap: 10px;
    color: #64748b;
    font-size: 13px;
}

.mv-sku-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #e2e8f0;
    border-top-color: #047857;
    border-radius: 50%;
    animation: mvSkuSpin 0.65s linear infinite;
}

@keyframes mvSkuSpin {
    to {
        transform: rotate(360deg);
    }
}

/* Empty State */
.mv-sku-empty {
    padding: 22px 16px;
    text-align: center;
    color: #64748b;
    font-size: 13px;
}

/* Footer Section */
.mv-sku-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 16px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: #64748b;
}

.mv-sku-view-all {
    color: #047857;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
}

.mv-sku-view-all:hover {
    color: #065f46;
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 640px) {
    .mv-sku-item {
        padding: 9px 12px;
    }
    .mv-sku-code {
        font-size: 14px;
    }
    .mv-sku-product-title {
        font-size: 12px;
    }
}
