/*
 * Seller Price Comparison Plugin — Theme-Consistent Overrides
 * Plugin: marketplace-seller-price-comparison-for-woocommerce
 *
 * Replaces the plugin's default blue/green palette with the parent
 * theme's modern design tokens (colors, radius, shadows, spacing).
 *
 * NOTE: The plugin's HTML renders .wkmpspc-seller-list-content (table)
 * as a SIBLING of .wkmpspc-seller-list-container (header), not nested
 * inside it. Selectors are scoped accordingly.
 */

/* ─── Outer Container — header wrapper (matches theme page layout) ── */
.wkmpspc-seller-list-container {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 30px;
    margin-top: 24px;
    border-bottom: none;
}

/* ─── Content Container — table wrapper ─────────────────────────────── */
.wkmpspc-seller-list-content {
    max-width: 1340px;
    margin: 0 auto;
    padding: 0 30px;
}

@media (max-width: 768px) {

    .wkmpspc-seller-list-container,
    .wkmpspc-seller-list-content {
        padding: 0 15px;
    }
}

/* ─── Section Header ──────────────────────────────────────────────── */
.wkmpspc-seller-list-container .wkmpspc-seller-list-header {
    background-color: transparent !important;
    border-left: none !important;
    border-radius: 0 !important;
    border-bottom: 2px solid #101f31 !important;
    color: #101f31 !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    padding: 0 0 12px 0 !important;
    margin-bottom: 0 !important;
}

/* ─── Table Container (card treatment) ────────────────────────────── */
.wkmpspc-seller-list-content .wkmpspc-spctable {
    border-radius: 12px !important;
    border: 1px solid #d3d6dc !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    margin: 16px 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.assign-product-listing .wkmpspc-spctable {
    border-radius: 12px !important;
    border: 1px solid #d3d6dc !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
    overflow: hidden !important;
    margin: 16px 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
}

.assign-product-listing .wkmpspc-spctable th {
    background-color: #ffffff !important;
}


.assign-product-listing .wkmpspc-sell-pro {
    background-color: #ffffff !important;
    background-color: #101f31 !important;
    color: #ffffff !important;
    border: 1px solid #101f31 !important;
    border-radius: 30px !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}

/* ─── Table Header ────────────────────────────────────────────────── */
.wkmpspc-seller-list-content .wkmpspc-spctable th {
    display: table-cell !important;
    background-color: #f8fafc !important;
    color: #666c7a !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.05em !important;
    padding: 14px 20px !important;
    border-bottom: 1px solid #d3d6dc !important;
    white-space: nowrap !important;
}

/* ─── Table Rows ──────────────────────────────────────────────────── */
.wkmpspc-seller-list-content .wkmpspc-spctable tr {
    background-color: #ffffff !important;
    transition: background-color 0.15s ease;
}

.wkmpspc-seller-list-content .wkmpspc-spctable tbody tr:hover {
    background-color: #f8fafc !important;
}

.wkmpspc-seller-list-content .wkmpspc-spctable tbody tr:not(:last-child) td {
    border-bottom: 1px solid #f1f5f9 !important;
}

/* ─── Table Cells ─────────────────────────────────────────────────── */
.wkmpspc-seller-list-content .wkmpspc-spctable td {
    padding: 14px 20px !important;
    color: #101f31 !important;
    font-size: 14px !important;
    vertical-align: middle !important;
    max-width: none !important;
    background-color: inherit !important;
}

/* Price styling */
.wkmpspc-seller-list-content .wkmpspc-spctable td .woocommerce-Price-amount {
    font-weight: 700 !important;
    font-size: 16px !important;
    color: #101f31 !important;
}

/* ─── Add to Cart Button (pill style) ─────────────────────────────── */
.wkmpspc-seller-list-content .wkmpspc-form-css button,
.wkmpspc-seller-list-content .wkmpspc-form-css .button {
    background-color: #101f31 !important;
    color: #ffffff !important;
    border: 1px solid #101f31 !important;
    border-radius: 30px !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.3s ease;
    white-space: nowrap !important;
    line-height: 1.4 !important;
}

.wkmpspc-seller-list-content .wkmpspc-form-css button:hover,
.wkmpspc-seller-list-content .wkmpspc-form-css .button:hover {
    background-color: #ffffff !important;
    color: #101f31 !important;
}

/* View Variations trigger button */
.wkmpspc-seller-list-content .wkmpspc-trigger {
    background-color: #101f31 !important;
    color: #ffffff !important;
    border: 1px solid #101f31 !important;
    border-radius: 30px !important;
    padding: 10px 24px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.3s ease;
}

.wkmpspc-seller-list-content .wkmpspc-trigger:hover {
    background-color: #ffffff !important;
    color: #101f31 !important;
}

.wkmpspc-main-container.wkmpspc_products {
    .wkmpspc-search-wrapper {
        .search_assign_item {
            width: max-content !important;
        }

        input[type=submit] {
            margin-left: 0px !important;
            width: max-content !important;
        }
    }
}

/* ─── Mobile: horizontal scroll for assign-product table ──────────── */
@media (max-width: 768px) {
    .assign-product-listing {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .assign-product-listing .wkmpspc-spctable {
        min-width: 600px !important;
        width: max-content !important;
    }

    .assign-product-listing .wkmpspc-spctable th,
    .assign-product-listing .wkmpspc-spctable td {
        white-space: nowrap !important;
    }

    /* Keep product name wrapping so it doesn't stretch too wide */
    .assign-product-listing .wkmpspc-spctable td:nth-child(2) {
        white-space: normal !important;
        min-width: 120px !important;
    }
}