/* ==================== VARIANTS LISTING WIDGET - COMPLETE ==================== */

.variants-listing-widget {
    width: 100%;
    max-width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.variants-listing-container {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 100%;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    background-color: white;
    padding: 0;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    height: max-content;
    max-height: 100%;
    min-height: 0;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.variants-listing-container::-webkit-scrollbar {
    display: none;
}

.variant-item {
    width: 100%;
    max-width: 100%;
    flex-shrink: 0;
    padding: 1.5rem;
    transition: all 0.2s ease;
    box-sizing: border-box;
    overflow: hidden;
}

    .variant-item:not(:last-child) {
        border-bottom: 1px solid #e5e7eb;
    }

.variant-item:hover {
    background-color: #f9fafb;
}


.variant-item:last-child {
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* ==================== EMPTY STATE ==================== */

.variants-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    min-height: 300px;
}

.variants-empty-icon {
    font-size: 4rem;
    color: #d1d5db;
    margin-bottom: 1rem;
}

.variants-empty-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #374151;
    margin: 0 0 0.5rem 0;
    font-family: 'PlusJakartaSans', sans-serif;
}

.variants-empty-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
    font-family: 'PlusJakartaSans', sans-serif;
}

/* ==================== LOADING STATE ==================== */

.variants-loading-state {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
}

.variants-loading-item {
    width: 100%;
    height: 120px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 8px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ==================== MOBILE RESPONSIVE (max-width: 768px) ==================== */

@media (max-width: 768px) {
    .variants-listing-widget {
        overflow: visible;
    }

    .variants-listing-container {
        border: none;
        border-radius: 0;
        background-color: transparent;
        overflow-y: visible;
        overflow-x: hidden;
        height: auto;
        max-height: none;
        padding: 0;
    }

    .variant-item {
        padding: 1rem;
        background-color: white;
        margin-bottom: 1rem;
        max-width: 100%;
        overflow: hidden;
    }

    .variant-item:not(:last-child) {
        border-bottom: 1px solid #e5e7eb;
    }

    
    .variant-item:last-child {
        border-radius: 12px;
    }

    .variant-item:hover {
        background-color: white;
    }

    .variants-empty-state {
        padding: 2rem 1rem;
        min-height: 200px;
    }

    .variants-empty-icon {
        font-size: 3rem;
    }

    .variants-empty-title {
        font-size: 1rem;
    }

    .variants-empty-description {
        font-size: 0.8125rem;
    }

    .variants-loading-state {
        padding: 0;
        gap: 1rem;
    }

    .variants-loading-item {
        height: 100px;
        border-radius: 12px;
    }
}

/* ==================== SMALL MOBILE (max-width: 480px) ==================== */

@media (max-width: 480px) {
    .variant-item {
        padding: 0.875rem;
        margin-bottom: 0.875rem;
    }

    .variants-empty-state {
        padding: 1.5rem 0.875rem;
        min-height: 180px;
    }

    .variants-empty-icon {
        font-size: 2.5rem;
    }

    .variants-empty-title {
        font-size: 0.9375rem;
    }

    .variants-empty-description {
        font-size: 0.75rem;
    }

    .variants-loading-item {
        height: 90px;
    }
}

/* ==================== ACCESSIBILITY ==================== */

@media (prefers-contrast: high) {
    .variants-listing-container {
        border-width: 2px;
        border-color: #000;
    }

    .variant-item:not(:last-child) {
        border-bottom-width: 2px;
        border-bottom-color: #000;
    }

    .variants-empty-title {
        color: #000;
    }
}

@media (prefers-reduced-motion: reduce) {
    .variants-listing-container {
        scroll-behavior: auto;
    }

    .variant-item {
        transition: none;
    }

    .variants-loading-item {
        animation: none;
        background: #f0f0f0;
    }
}

/* ==================== PRINT STYLES ==================== */

@media print {
    .variants-listing-container {
        border: none;
        overflow: visible;
        height: auto;
        max-height: none;
    }

    .variant-item {
        page-break-inside: avoid;
    }

    .variant-item:hover {
        background-color: white;
    }
}
