/*
 * Wholesale Plus – Frontend Styles
 * Clean, minimal styles for customer-facing features.
 */

:root {
    --wsp-primary: #0073e6;
    --wsp-primary-hover: #005bb5;
    --wsp-accent: #00b4d8;
    --wsp-success: #10b981;
    --wsp-radius: 10px;
    --wsp-radius-sm: 6px;
    --wsp-transition: 150ms cubic-bezier(0.4, 0, 0.2, 1);

    --wsp-surface: #ffffff;
    --wsp-border: #e2e8f0;
    --wsp-border-light: #f1f5f9;
    --wsp-text: #1e293b;
    --wsp-text-secondary: #64748b;
    --wsp-text-muted: #94a3b8;
    --wsp-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* ===== Price Labels (retail + wholesale for B2B) ===== */
.wsp-price-wrap {
    line-height: 1.55;
}

.wsp-price-wrap--dual {
    display: inline-block;
    text-align: left;
}

.wsp-price-label {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wsp-price-label--wholesale {
    color: var(--wsp-success, #10b981);
}

.wsp-price-label--retail {
    color: var(--wsp-text-muted, #94a3b8);
}

.wsp-price-wrap .wsp-price-retail,
.wsp-price-wrap del.wsp-price-retail {
    color: var(--wsp-text-muted, #94a3b8);
    opacity: 0.9;
}

.wsp-price-wrap .wsp-price-wholesale,
.wsp-price-wrap .wsp-price-wholesale .amount {
    font-weight: 600;
    color: var(--wsp-text, inherit);
}

.wsp-price-range-sep {
    margin: 0 0.2em;
}

/* Keep tier UI readable under dual labels */
.wsp-price-wrap--with-tiers .wsp-tiered-price-display,
.wsp-price-wrap--with-tiers .wsp-tiered-price-combo {
    display: inline;
}

.wsp-hidden-price {
    font-style: italic;
    color: #64748b;
    text-decoration: none;
}

.wsp-hidden-price:hover {
    color: var(--wsp-primary, #0073e6);
    text-decoration: underline;
}

/* Guest Request a Quote mode */
body.wsp-guest-quote-mode .wsp-guest-quote-single {
    margin-top: 12px;
}

body.wsp-guest-quote-mode .wsp-guest-quote-add-btn,
body.wsp-guest-quote-mode .wsp-guest-request-quote-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 14px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.3;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
}

body.wsp-guest-quote-mode.single-product .wsp-guest-quote-single,
body.wsp-guest-quote-mode.single-product .wsp-guest-quote-single--variable {
    display: block;
    width: 100%;
    clear: both;
    margin-top: 16px;
}

body.wsp-guest-quote-mode.single-product .wsp-guest-quote-add-btn,
body.wsp-guest-quote-mode.single-product .wsp-guest-quote-btn--full {
    width: 100%;
}

body.wsp-guest-quote-mode.woocommerce-cart .wsp-guest-request-quote-btn {
    min-width: 220px;
    padding: 14px 32px !important;
}

body.wsp-guest-quote-mode .wsp-guest-quote-single--variable {
    margin-top: 16px;
}

/* Elessi theme: hide extra single-product purchase CTAs (Buy Now, Compare, sticky bar) */
body.wsp-guest-quote-mode.single-product .nasa-buy-now,
body.wsp-guest-quote-mode.single-product .btn-buy-now,
body.wsp-guest-quote-mode.single-product .nasa-compare,
body.wsp-guest-quote-mode.single-product .btn-compare,
body.wsp-guest-quote-mode.single-product .nasa-sticky-add-to-cart,
body.wsp-guest-quote-mode.single-product .nasa-sticky-atc,
body.wsp-guest-quote-mode.single-product form.cart .single_add_to_cart_button,
body.wsp-guest-quote-mode.single-product form.cart button[type="submit"]:not(.wsp-guest-quote-add-btn) {
    display: none !important;
}

body.wsp-guest-quote-mode .woocommerce-cart-form .product-price,
body.wsp-guest-quote-mode .woocommerce-cart-form .product-subtotal,
body.wsp-guest-quote-mode .cart_totals .amount,
body.wsp-guest-quote-mode .cart-subtotal,
body.wsp-guest-quote-mode .order-total {
    visibility: hidden;
}

.wsp-guest-login-form {
    max-width: 520px;
    margin: 24px auto;
    padding: 24px;
    background: var(--wsp-surface, #fff);
    border: 1px solid var(--wsp-border, #e2e8f0);
    border-radius: var(--wsp-radius, 10px);
    box-shadow: var(--wsp-shadow);
}

.wsp-guest-login-form--centered {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 48px auto;
    float: none;
    clear: both;
}

/* Require Login to View Products — site-wide gate */
body.wsp-require-login-site-wide:not(.woocommerce-account) .site-main > *:not(.wsp-site-login-gate):not(:has(.wsp-site-login-gate)),
body.wsp-require-login-site-wide:not(.woocommerce-account) #primary > *:not(.wsp-site-login-gate):not(:has(.wsp-site-login-gate)),
body.wsp-require-login-site-wide:not(.woocommerce-account) .content-area > *:not(.wsp-site-login-gate):not(:has(.wsp-site-login-gate)),
body.wsp-require-login-site-wide:not(.woocommerce-account) .woocommerce > *:not(.wsp-site-login-gate):not(:has(.wsp-site-login-gate)),
body.wsp-require-login-site-wide:not(.woocommerce-account) .entry-content > *:not(.wsp-site-login-gate):not(:has(.wsp-site-login-gate)),
body.wsp-require-login-site-wide:not(.woocommerce-account) .page-content > *:not(.wsp-site-login-gate):not(:has(.wsp-site-login-gate)) {
    display: none !important;
}

body.wsp-require-login-site-wide .wsp-site-login-gate,
body.wsp-require-login-site-wide .wsp-site-login-gate--fallback {
    display: block;
    width: 100%;
    clear: both;
}

body.wsp-require-login-site-wide .wsp-site-login-gate--fallback {
    max-width: 520px;
    margin: 48px auto;
    padding: 0 16px;
}

body.wsp-require-login-archives .woocommerce-no-products-found,
body.wsp-require-login-archives .woocommerce-info,
body.wsp-require-login-archives .woocommerce-result-count,
body.wsp-require-login-archives ul.products {
    display: none !important;
}

body.wsp-require-login-single .product > *:not(.wsp-site-login-gate):not(:has(.wsp-site-login-gate)),
body.wsp-require-login-single .woocommerce-tabs,
body.wsp-require-login-single .related.products,
body.wsp-require-login-single .upsells.products,
body.wsp-require-login-single .product_meta,
body.wsp-require-login-single .woocommerce-product-gallery,
body.wsp-require-login-single .summary.entry-summary,
body.wsp-require-login-single .entry-summary,
body.wsp-require-login-single .price,
body.wsp-require-login-single .woocommerce-Price-amount,
body.wsp-require-login-single .variations_form,
body.wsp-require-login-single form.cart,
body.wsp-require-login-single .single-product__title,
body.wsp-require-login-single .product_title.entry-title {
    display: none !important;
}

body.wsp-require-login-single.single-product .entry-header,
body.wsp-require-login-single.single-product .page-title,
body.wsp-require-login-single.single-product .product-page-header {
    display: none !important;
}

body.wsp-require-login-single .product {
    display: block;
    width: 100%;
}

body.wsp-require-login-products .wsp-guest-login-form {
    position: relative;
    z-index: 2;
}

/* ===== Tax display toggle (B2B incl / excl) ===== */
.wsp-tax-display-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 10px 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--wsp-border, #e2e8f0);
    border-radius: var(--wsp-radius, 10px);
    background: var(--wsp-surface, #fff);
}

.wsp-tax-display-toggle__heading {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wsp-text-muted, #64748b);
}

.wsp-tax-display-toggle__control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wsp-tax-display-toggle__side {
    font-size: 13px;
    color: var(--wsp-text-muted, #94a3b8);
    transition: color 0.15s ease;
}

.wsp-tax-display-toggle__side.is-active {
    color: var(--wsp-text, #1e293b);
    font-weight: 600;
}

.wsp-tax-display-toggle.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.wsp-tax-display-toggle--cart {
    margin-bottom: 16px;
}

.wsp-tax-display-toggle--account {
    margin: 0 0 20px;
}

/* ===== Tax display toggle (B2B incl / excl) ===== */
.wsp-tax-display-toggle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
    margin: 10px 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--wsp-border, #e2e8f0);
    border-radius: var(--wsp-radius, 10px);
    background: var(--wsp-surface, #fff);
}

.wsp-tax-display-toggle__heading {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wsp-text-muted, #64748b);
}

.wsp-tax-display-toggle__control {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.wsp-tax-display-toggle__side {
    font-size: 13px;
    color: var(--wsp-text-muted, #94a3b8);
    transition: color 0.15s ease;
}

.wsp-tax-display-toggle__side.is-active {
    color: var(--wsp-text, #1e293b);
    font-weight: 600;
}

.wsp-tax-display-toggle.is-loading {
    opacity: 0.65;
    pointer-events: none;
}

.wsp-tax-display-toggle--cart {
    margin-bottom: 16px;
}

.wsp-tax-display-toggle--account {
    margin: 0 0 20px;
}

.wsp-tax-suffix {
    color: #94a3b8;
    font-size: 11px;
}

/*
 * Tiered price: product boxes = band only at full price size; single product = unit row + reduced pill/strike.
 */
.price.wsp-tiered-price-combo {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: 100%;
}

.price.wsp-tiered-price-combo--range-only.wsp-tiered-price-combo--product-box .wsp-tiered-price-range--primary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.12em;
    font-size: inherit;
    line-height: inherit;
    font-weight: inherit;
    color: inherit;
}

/* PDP: volume band secondary to main unit — half size, neutral grey */
.wsp-tiered-price-combo--single-product .wsp-tiered-price-range--primary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.12em;
    font-size: 0.5em;
    line-height: 1.25;
    font-weight: inherit;
    color: #6b7280;
}

.wsp-tiered-price-combo--single-product .wsp-tiered-price-range--primary + .wsp-tiered-price-combo__unit {
    margin-top: 0.2em;
}

.wsp-tiered-price-combo .wsp-tiered-price-combo__unit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.65em;
    row-gap: 0.2em;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

.wsp-tiered-price-combo .wsp-tiered-saved-badge {
    display: inline-block;
    flex-shrink: 0;
    padding: 0.25em 0.65em;
    background: #16b47c;
    color: #fff;
    border-radius: 9999px;
    font-size: max(0.62em, 11px);
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
    vertical-align: middle;
    box-sizing: border-box;
}

.wsp-tiered-price-combo del.wsp-tiered-strikethrough-price,
.wsp-tiered-price-combo .wsp-tiered-strikethrough-price {
    display: inline-block;
    flex-shrink: 0;
    margin: 0 0 0 5px;
    padding: 0;
    border: 0;
    background: none;
    font-size: 20px;
    font-weight: inherit;
    line-height: 1.2;
    color: #9ca3af;
    opacity: 1;
    text-decoration: line-through;
    vertical-align: middle;
}

/* Single product PDP — exact pill / strike treatment */
.wsp-tiered-price-combo--single-product .wsp-tiered-saved-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #10b981;
    color: #ffffff;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    margin-left: 8px;
    line-height: 1.25;
    white-space: nowrap;
    vertical-align: middle;
    box-sizing: border-box;
    flex-shrink: 0;
}

/* ===== Tiered Pricing Table ===== */
.wsp-tiered-pricing {
    margin: 20px 0;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: var(--wsp-radius);
}

/* Strikethrough reference in non-combo price display */
.wsp-tiered-price-display .price:not(.wsp-tiered-price-combo) .wsp-tiered-strikethrough-price {
    font-size: 0.85em;
    display: inline-block;
}

/* Section 7: Force strikethrough price font-size to 12px in product table. */
.wsp-tiered-price-table-frontend .wsp-tiered-strikethrough-price,
.wsp-tiered-table-frontend .wsp-tiered-strikethrough-price {
    font-size: 12px !important;
}

/* Section 6: Cart/checkout price display - strikethrough at 14px, badge visible. */
.wsp-cart-tiered-price .wsp-tiered-strikethrough-price,
.wsp-cart-checkout-strikethrough,
.woocommerce-cart-form .wsp-tiered-strikethrough-price,
.woocommerce-checkout .wsp-tiered-strikethrough-price {
    font-size: 14px !important;
}

.wsp-cart-tiered-price .wsp-tiered-strikethrough-price {
    display: inline-block;
}

.wsp-tiered-pricing h4 {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 600;
}

.wsp-tiered-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.wsp-tiered-table th {
    text-align: left;
    padding: 8px 12px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.wsp-tiered-table td {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f5f9;
}

.wsp-tiered-table tr:last-child td {
    border-bottom: none;
}

/* ===== CSV Order Upload ===== */
.wsp-csv-order {
    display: block;
    width: 100%;
    max-width: 520px;
    margin: 48px auto;
    padding: 0 16px;
    float: none;
    clear: both;
    box-sizing: border-box;
}

.wsp-csv-order--denied {
    text-align: center;
    padding: 32px 28px;
    background: var(--wsp-surface, #fff);
    border: 1px solid var(--wsp-border, #e2e8f0);
    border-radius: var(--wsp-radius, 10px);
    box-shadow: var(--wsp-shadow);
}

.wsp-csv-order--denied p {
    margin: 0;
    color: var(--wsp-text-secondary, #64748b);
}

.wsp-csv-order__card {
    padding: 32px 28px;
    text-align: center;
    background: var(--wsp-surface, #fff);
    border: 1px solid var(--wsp-border, #e2e8f0);
    border-radius: var(--wsp-radius, 10px);
    box-shadow: var(--wsp-shadow);
}

.wsp-csv-order__card .woocommerce-notices-wrapper,
.wsp-csv-order__card .woocommerce-message,
.wsp-csv-order__card .woocommerce-error,
.wsp-csv-order__card .woocommerce-info {
    margin-bottom: 1.25rem;
    text-align: left;
}

.wsp-csv-order__form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin: 0;
}

.wsp-csv-order__label {
    margin: 0;
    max-width: 100%;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--wsp-text-secondary, #64748b);
}

.wsp-csv-order__field {
    width: 100%;
    margin: 0;
}

.wsp-csv-order__file {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.wsp-csv-order__actions {
    width: 100%;
    margin: 0;
}

.wsp-csv-order__submit {
    min-width: 160px;
    min-height: 44px;
    padding: 12px 28px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
}

/* ===== Bulk Order Form ===== */
.wsp-bulk-order {
    max-width: 900px;
}

.wsp-myaccount-section.wsp-myaccount-bulk-order .wsp-bulk-order {
    max-width: 100%;
}

/* My Account → Bulk Order: lead line aligns with endpoint title; avoid double-wide gaps */
.wsp-myaccount-bulk-order__lead {
    margin: 0 0 1.25rem;
    padding: 0;
    max-width: 42rem;
    font-size: 0.9375rem;
    line-height: 1.55;
    color: var(--wsp-text-muted, #64748b);
}

/* —— Classic (search-first) —— */
.wsp-bulk-order--theme-classic {
    max-width: 960px;
}

.wsp-bulk-classic__search-card {
    margin-bottom: 1.5rem;
    padding: 1.25rem 1.35rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wsp-bulk-classic__search-label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    margin-bottom: 0.5rem;
}

.wsp-bulk-classic__search.wsp-bulk-order__search {
    margin-bottom: 0;
}

.wsp-bulk-classic__search .wsp-bulk-search {
    width: 100%;
    margin: 0;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    font-size: 1rem;
    line-height: 1.4;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    background: #f8fafc;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.wsp-bulk-classic__search .wsp-bulk-search:hover {
    background: #fff;
}

.wsp-bulk-classic__search .wsp-bulk-search:focus {
    outline: none;
    border-color: var(--wsp-primary, #0073e6);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.15);
}

.wsp-bulk-classic__search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
}

.wsp-bulk-order__search {
    position: relative;
    margin-bottom: 20px;
}

.wsp-bulk-classic__search.wsp-bulk-order__search {
    position: relative;
}

.wsp-bulk-order__results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
    max-height: min(320px, 50vh);
    overflow-y: auto;
    z-index: 200;
}

.wsp-bulk-result {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
    transition: background var(--wsp-transition);
    border-bottom: 1px solid #f1f5f9;
}

.wsp-bulk-result:last-child {
    border-bottom: none;
}

.wsp-bulk-result:hover,
.wsp-bulk-result:focus {
    background: #f0f7ff;
    outline: none;
}

.wsp-bulk-result__ph {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    border-radius: 6px;
    background: #e2e8f0;
}

.wsp-bulk-result img {
    width: 36px;
    height: 36px;
    object-fit: cover;
    border-radius: 6px;
    flex-shrink: 0;
}

.wsp-bulk-result__info {
    flex: 1;
    min-width: 0;
}

.wsp-bulk-result__name {
    font-weight: 600;
    font-size: 0.9375rem;
    color: #0f172a;
    line-height: 1.3;
}

.wsp-bulk-result__sku {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 2px;
}

.wsp-bulk-result__price {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--wsp-primary, #0073e6);
    flex-shrink: 0;
}

.wsp-bulk-classic__table-wrap {
    overflow-x: auto;
    margin-bottom: 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    -webkit-overflow-scrolling: touch;
}

.wsp-bulk-order__table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 0;
    min-width: 560px;
}

.wsp-bulk-classic__table.wsp-bulk-order__table {
    margin-bottom: 0;
}

.wsp-bulk-order__table th {
    text-align: left;
    padding: 12px 14px;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    white-space: nowrap;
}

.wsp-bulk-order__table td {
    padding: 12px 14px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 0.9375rem;
}

.wsp-bulk-classic__tfoot-row td {
    background: #f8fafc;
    border-bottom: none;
    padding-top: 14px;
    padding-bottom: 14px;
}

.wsp-bulk-classic__tfoot-label {
    text-align: right;
    color: #475569;
}

.wsp-bulk-classic__tfoot-total {
    font-size: 1.05rem;
    color: #0f172a;
}

.wsp-bulk-col-qty {
    width: 6.5rem;
}

.wsp-bulk-col-remove {
    width: 3rem;
}

.wsp-bulk-order__table input[type="number"] {
    width: 100%;
    max-width: 5rem;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    text-align: center;
    font-size: 0.9375rem;
}

.wsp-bulk-order__table input[type="number"]:focus {
    outline: none;
    border-color: var(--wsp-primary, #0073e6);
    box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.12);
}

.wsp-bulk-order__actions {
    text-align: right;
    padding-top: 0.25rem;
}

@media (max-width: 600px) {
    .wsp-bulk-classic__search-card {
        padding: 1rem;
    }

    .wsp-bulk-result__price {
        display: none;
    }
}

.wsp-bulk-order--theme-indigo,
.wsp-bulk-order--theme-cream {
    max-width: none;
}

.wsp-bulk-order--theme-indigo {
    --wsp-bulk-bg: #111d2b;
    --wsp-bulk-surface: rgba(0, 0, 0, 0.22);
    --wsp-bulk-text: #f8fafc;
    --wsp-bulk-muted: rgba(248, 250, 252, 0.72);
    --wsp-bulk-border: rgba(255, 255, 255, 0.08);
    --wsp-bulk-thumb-bg: #ffffff;
    background: var(--wsp-bulk-bg);
    color: var(--wsp-bulk-text);
    padding: 20px;
    border-radius: 12px;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-order__table thead th {
    /* Override base .wsp-bulk-order__table th (#f8fafc + slate text) so headers stay on-theme */
    background: rgba(0, 0, 0, 0.32);
    color: var(--wsp-bulk-text);
    font-weight: 600;
    font-size: 0.8125rem;
    letter-spacing: 0.04em;
    text-transform: none;
    border-bottom: 1px solid var(--wsp-bulk-border);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-table thead th {
    background: rgba(0, 0, 0, 0.38);
}

.wsp-bulk-order--theme-indigo .wsp-bulk-order__table td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    vertical-align: middle;
    padding-top: 1.1rem;
    padding-bottom: 1.1rem;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-table .wsp-bulk-indigo-th-qty,
.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-table .wsp-bulk-indigo-th-sub,
.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-table .wsp-bulk-indigo-th-cart {
    text-align: center;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-catalog__search {
    margin-bottom: 1rem;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-catalog__search .wsp-input {
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
    background: var(--wsp-bulk-surface);
    border: 1px solid var(--wsp-bulk-border);
    color: var(--wsp-bulk-text);
    padding: 0.65rem 0.9rem;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-catalog__search .wsp-input::placeholder {
    color: var(--wsp-bulk-muted);
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-catalog__search .wsp-input:focus {
    outline: 2px solid rgba(129, 140, 248, 0.45);
    outline-offset: 1px;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-td-product {
    min-width: 8rem;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-name {
    display: block;
    font-size: 0.9375rem;
    line-height: 1.35;
    color: var(--wsp-bulk-text);
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-td-img {
    width: 64px;
    padding-right: 0.35rem;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    background: var(--wsp-bulk-thumb-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 3px;
    box-sizing: border-box;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 4px;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-thumb-ph {
    display: block;
    width: 70%;
    height: 70%;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.06);
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-td-qty,
.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-sub,
.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-td-cart {
    text-align: center;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-qty {
    width: 4.5rem;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 0.35rem 0.4rem;
    box-sizing: border-box;
    border-radius: 6px;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-sub {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-add {
    appearance: none;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    font: inherit;
    color: var(--wsp-bulk-text);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 0.2em;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-add:hover {
    color: #e0e7ff;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-add:focus-visible {
    outline: 2px solid rgba(129, 140, 248, 0.65);
    outline-offset: 2px;
    border-radius: 2px;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-indigo-add:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wsp-bulk-order--theme-indigo .wsp-input,
.wsp-bulk-order--theme-indigo .wsp-bulk-order__table input[type="number"] {
    background: var(--wsp-bulk-surface);
    border-color: var(--wsp-bulk-border);
    color: var(--wsp-bulk-text);
}

.wsp-bulk-order--theme-indigo .wsp-bulk-order__results {
    background: var(--wsp-bulk-surface);
    border-color: var(--wsp-bulk-border);
}

.wsp-bulk-order--theme-indigo .wsp-bulk-catalog__footer .wsp-btn--primary {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--wsp-bulk-text);
}

.wsp-bulk-order--theme-indigo .wsp-bulk-catalog__footer .wsp-btn--primary:hover {
    background: rgba(255, 255, 255, 0.18);
}

.wsp-bulk-order--theme-indigo .wsp-bulk-catalog__footer .wsp-btn--ghost {
    color: var(--wsp-bulk-muted);
    border-color: var(--wsp-bulk-border);
}

/**
 * Cream theme = B2B quick-order layout (neutral chrome, not a “warm cream” palette).
 */
.wsp-bulk-order--theme-cream {
    --wsp-bulk-bg: #f4f4f5;
    --wsp-bulk-surface: #ffffff;
    --wsp-bulk-text: #18181b;
    --wsp-bulk-muted: #71717a;
    --wsp-bulk-border: #e4e4e7;
    --wsp-bulk-toolbar-h: 52px;
    background: var(--wsp-bulk-bg);
    color: var(--wsp-bulk-text);
    padding: 0;
    border-radius: var(--wsp-radius);
    border: 1px solid var(--wsp-bulk-border);
    overflow: hidden;
}

.wsp-bulk-order--theme-cream .wsp-bulk-order__table th {
    color: var(--wsp-bulk-muted);
    border-bottom-color: var(--wsp-bulk-border);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
}

.wsp-bulk-order--theme-cream .wsp-bulk-order__table td {
    border-bottom-color: var(--wsp-bulk-border);
    vertical-align: middle;
}

.wsp-bulk-order--theme-cream .wsp-input,
.wsp-bulk-order--theme-cream .wsp-bulk-order__table input[type="number"] {
    background: var(--wsp-bulk-surface);
    border-color: var(--wsp-bulk-border);
    color: var(--wsp-bulk-text);
}

.wsp-bulk-cream-shell {
    display: flex;
    flex-direction: column;
    min-height: 320px;
}

.wsp-bulk-cream-toolbar {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: var(--wsp-bulk-toolbar-h);
    background: var(--wsp-bulk-surface);
    border-bottom: 1px solid var(--wsp-bulk-border);
}

.wsp-bulk-cream-toolbar__filters {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 16px;
    border: none;
    border-right: 1px solid var(--wsp-bulk-border);
    background: transparent;
    color: var(--wsp-bulk-text);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    min-height: var(--wsp-bulk-toolbar-h);
}

.wsp-bulk-cream-toolbar__filters:hover {
    background: var(--wsp-bulk-bg);
}

.wsp-bulk-cream-filters-dot {
    position: absolute;
    top: 10px;
    left: 10px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #18181b;
    border: 2px solid var(--wsp-bulk-surface, #fff);
    box-shadow: 0 0 0 1px rgba(24, 24, 27, 0.15);
    opacity: 0;
    transform: scale(0);
    transition: opacity 0.15s ease, transform 0.15s ease;
    pointer-events: none;
}

.wsp-bulk-cream-filters--active .wsp-bulk-cream-filters-dot {
    opacity: 1;
    transform: scale(1);
}

.wsp-bulk-cream-filters-panel {
    padding: 0;
    background: #fafafa;
    border-bottom: 1px solid var(--wsp-bulk-border);
}

.wsp-bulk-cream-filters-panel__title {
    margin: 0;
    padding: 12px 18px 8px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--wsp-bulk-muted);
    font-weight: 600;
}

.wsp-bulk-cream-filters-panel__inner {
    max-height: min(45vh, 280px);
    overflow-y: auto;
    padding: 0 18px 14px;
    -webkit-overflow-scrolling: touch;
}

.wsp-bulk-cream-cats {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wsp-bulk-cream-cats--panel {
    flex-flow: row wrap;
    gap: 8px;
}

.wsp-bulk-cream-cat {
    display: block;
    width: 100%;
    text-align: left;
    padding: 8px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--wsp-bulk-text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.wsp-bulk-cream-cats--panel .wsp-bulk-cream-cat {
    width: auto;
}

.wsp-bulk-cream-cat:hover {
    background: var(--wsp-bulk-bg);
}

.wsp-bulk-cream-cat.is-active {
    background: #18181b;
    color: #fff;
    font-weight: 600;
}

.wsp-bulk-cream-toolbar__search {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    min-width: 0;
}

.wsp-bulk-cream-toolbar__search-icon {
    color: var(--wsp-bulk-muted);
    flex-shrink: 0;
}

.wsp-bulk-cream-toolbar__search .wsp-input {
    flex: 1;
    border: none;
    box-shadow: none;
    padding: 12px 8px;
    background: transparent;
}

.wsp-bulk-cream-toolbar__search .wsp-input:focus {
    outline: none;
    box-shadow: none;
}

.wsp-bulk-cream-cart-widget {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    border-left: 1px solid var(--wsp-bulk-border);
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
    transition: background 0.15s ease;
}

.wsp-bulk-cream-cart-widget:hover {
    background: var(--wsp-bulk-bg);
}

.wsp-bulk-cream-cart-widget__icon {
    display: inline-flex;
    color: var(--wsp-bulk-text);
    flex-shrink: 0;
}

.wsp-bulk-cream-cart-widget__icon-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wsp-bulk-cream-cart-widget__badge {
    position: absolute;
    top: -7px;
    right: -10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #18181b;
    color: #fff;
    font-size: 0.625rem;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
}

.wsp-bulk-cream-cart-widget__badge.is-empty {
    display: none;
}

.wsp-bulk-cream-cart-widget__checkout-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    line-height: 1.2;
}

.wsp-bulk-cream-cart-widget__checkout-label {
    font-weight: 700;
    font-size: 0.875rem;
    color: var(--wsp-bulk-text);
}

.wsp-bulk-cream-cart-widget--mode-checkout {
    white-space: normal;
}

.wsp-bulk-cream-cart-widget__meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    line-height: 1.2;
}

.wsp-bulk-cream-cart-total {
    font-weight: 700;
    font-size: 0.9375rem;
}

.wsp-bulk-cream-cart-count {
    font-size: 0.75rem;
    color: var(--wsp-bulk-muted);
}

.wsp-bulk-cream-main {
    display: block;
    flex: 1;
    min-height: 0;
}

.wsp-bulk-cream-content {
    min-width: 0;
    padding: 16px;
    background: var(--wsp-bulk-bg);
}

.wsp-bulk-cream-table-scroll.wsp-bulk-catalog__scroll {
    margin-bottom: 8px;
    background: var(--wsp-bulk-surface);
    border: 1px solid var(--wsp-bulk-border);
    border-radius: 8px;
}

.wsp-bulk-cream-footer.wsp-bulk-catalog__footer {
    padding-top: 4px;
}

.wsp-bulk-cream-product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wsp-bulk-cream-thumb-wrap {
    position: relative;
    width: 56px;
    height: 56px;
    flex-shrink: 0;
}

.wsp-bulk-cream-thumb-wrap img {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--wsp-bulk-border);
}

.wsp-bulk-cream-thumb-ph {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    background: #e4e4e7;
}

.wsp-bulk-cream-thumb-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #18181b;
    color: #fff;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 22px;
    text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.wsp-bulk-cream-product-name {
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1.35;
}

.wsp-bulk-cream-stepper {
    display: inline-flex;
    align-items: stretch;
    border: 1px solid var(--wsp-bulk-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--wsp-bulk-surface);
}

.wsp-bulk-cream-step {
    width: 36px;
    padding: 0;
    border: none;
    background: #f4f4f5;
    color: var(--wsp-bulk-text);
    font-size: 1.125rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.12s ease;
}

.wsp-bulk-cream-step:hover {
    background: #e4e4e7;
}

.wsp-bulk-cream-stepper .wsp-bulk-qty {
    width: 3.25rem;
    max-width: 3.75rem;
    margin: 0;
    border: none;
    border-left: 1px solid var(--wsp-bulk-border);
    border-right: 1px solid var(--wsp-bulk-border);
    border-radius: 0;
    text-align: center;
}

.wsp-btn--dark {
    background: #18181b;
    color: #fff;
    border: none;
    padding: 8px 16px;
    font-size: 0.8125rem;
    border-radius: 6px;
}

.wsp-btn--dark:hover {
    background: #27272a;
    color: #fff;
}

.wsp-bulk-cream-col-cart {
    width: 1%;
    white-space: nowrap;
}

.wsp-bulk-cream-cart-cell {
    padding-left: 8px;
    padding-right: 8px;
}

.wsp-bulk-cream-cart-cell .wsp-btn--dark,
.wsp-bulk-cream-cart-cell .wsp-bulk-cream-row-add {
    padding: 4px 10px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 4px;
}

.wsp-btn--outline-cream,
button.wsp-bulk-cream-toggle-vars {
    background: #f4f4f5 !important;
    color: #18181b !important;
    border: 2px solid #3f3f46 !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.75) inset, 0 1px 2px rgba(0, 0, 0, 0.08);
    padding: 5px 14px;
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.wsp-btn--outline-cream:hover,
button.wsp-bulk-cream-toggle-vars:hover {
    background: #e4e4e7 !important;
    border-color: #18181b !important;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wsp-bulk-cream-cell-dash {
    text-align: center;
    color: var(--wsp-bulk-muted);
}

.wsp-bulk-cream-dash {
    font-size: 1.125rem;
    line-height: 1;
}

.wsp-bulk-cream-variation {
    background: #fafafa;
}

.wsp-bulk-cream-variation .wsp-bulk-cream-variation-label {
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--wsp-bulk-text);
}

.wsp-bulk-cream-product-cell--variation {
    padding-left: 0.75rem;
    border-left: 3px solid var(--wsp-bulk-border);
}

@media (max-width: 900px) {
    .wsp-bulk-cream-toolbar__filters {
        padding: 0 12px;
    }

    .wsp-bulk-cream-cart-widget--mode-cart_icon_total .wsp-bulk-cream-cart-widget__meta {
        display: none;
    }

    .wsp-bulk-cream-cart-widget--mode-checkout .wsp-bulk-cream-cart-widget__meta {
        display: none;
    }
}

.wsp-bulk-cream-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    margin: -8px -8px 16px;
    background: var(--wsp-bulk-surface, #fff);
    border-radius: var(--wsp-radius);
    border: 1px solid var(--wsp-bulk-border, #e4e4e7);
    flex-wrap: wrap;
}

.wsp-bulk-cream-bar__cart-icon {
    color: var(--wsp-bulk-text);
}

.wsp-bulk-multiselect--sticky {
    position: sticky;
    bottom: 0;
    z-index: 20;
    padding: 12px 16px;
    margin: 16px -12px -12px;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--wsp-border, #e2e8f0);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: flex-end;
}

.wsp-bulk-order--theme-indigo .wsp-bulk-multiselect--sticky {
    background: rgba(17, 29, 43, 0.97);
    border-top-color: var(--wsp-bulk-border);
    box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
}

.wsp-bulk-order--theme-cream .wsp-bulk-multiselect--sticky {
    background: rgba(244, 244, 245, 0.98);
    border-top-color: var(--wsp-bulk-border);
}

.wsp-bulk-catalog__scroll {
    max-height: 70vh;
    overflow: auto;
    margin-bottom: 12px;
}

.wsp-bulk-catalog__footer {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wsp-bulk-order__denied {
    padding: 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--wsp-radius);
    color: #991b1b;
}

/* ===== Frontend Buttons ===== */
.wsp-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--wsp-radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--wsp-transition);
    text-decoration: none;
}

.wsp-btn--primary {
    background: var(--wsp-primary);
    color: #fff;
}
.wsp-btn--primary:hover {
    background: var(--wsp-primary-hover, #005bb5);
    color: #fff;
}

.wsp-offer-card-footer .wsp-btn--primary,
.wsp-offer-footer-actions .wsp-btn--primary {
    background: #2fb002;
}
.wsp-offer-card-footer .wsp-btn--primary:hover,
.wsp-offer-footer-actions .wsp-btn--primary:hover {
    background: #299603;
}

.wsp-btn--accent {
    background: var(--wsp-accent);
    color: #fff;
}
.wsp-btn--accent:hover {
    background: #0096b7;
    color: #fff;
}

.wsp-btn--ghost {
    background: transparent;
    color: #64748b;
    border: 1px solid #e2e8f0;
}
.wsp-btn--ghost:hover {
    background: #f8fafc;
    color: #1e293b;
}

.wsp-btn--sm {
    padding: 6px 14px;
    font-size: 12px;
}

/* ===== Frontend Forms ===== */
.wsp-input, .wsp-select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: var(--wsp-radius);
    font-size: 14px;
    transition: border-color var(--wsp-transition);
}

.wsp-input:focus, .wsp-select:focus {
    outline: none;
    border-color: var(--wsp-primary);
    box-shadow: 0 0 0 3px rgba(0, 115, 230, 0.1);
}

.wsp-field {
    margin-bottom: 16px;
}

.wsp-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
}

.wsp-form-row {
    display: flex;
    gap: 16px;
}

.wsp-field--half {
    flex: 1;
}

/* ===== My Account Sections ===== */
.wsp-myaccount-section {
    margin-bottom: 30px;
}

.wsp-myaccount-section h3 {
    margin: 0 0 16px;
}

.wsp-myaccount-actions {
    margin-bottom: 16px;
}

#wsp-my-subaccounts .wsp-text-muted,
.wsp-subaccounts__intro,
.wsp-subaccounts-new__note {
    color: var(--wsp-text-secondary);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px;
    max-width: 42rem;
}

.wsp-subaccounts__title {
    margin: 0 0 8px;
}

.wsp-subaccounts-new__heading {
    margin: 0 0 16px;
    font-size: 1.05rem;
}

.wsp-subaccounts-new {
    margin-top: 20px;
    padding: 20px 22px;
}

.wsp-subaccounts-table-wrap {
    margin-top: 8px;
    border: 1px solid var(--wsp-border);
    border-radius: var(--wsp-radius);
    background: var(--wsp-surface);
    box-shadow: var(--wsp-shadow);
    overflow: hidden;
}

.wsp-subaccounts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wsp-subaccounts-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--wsp-text-secondary);
    background: #f8fafc;
    border-bottom: 1px solid var(--wsp-border);
}

.wsp-subaccounts-table__actions,
.wsp-subaccounts-table__act {
    text-align: right;
    white-space: nowrap;
    width: 1%;
}

.wsp-subaccounts-table td {
    padding: 16px;
    border-bottom: 1px solid var(--wsp-border-light);
    vertical-align: top;
}

.wsp-subaccounts-table__main td {
    border-bottom: 1px solid var(--wsp-border-light);
}

.wsp-subaccounts-table tbody tr.wsp-subaccounts-table__edit td {
    padding: 0;
    background: #fafbfc;
    border-bottom: 1px solid var(--wsp-border);
}

.wsp-subaccounts-user {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.wsp-subaccounts-user__name {
    font-size: 15px;
}

.wsp-subaccounts-user__email {
    font-size: 13px;
    color: var(--wsp-text-secondary);
}

.wsp-subaccounts-perm-summary {
    color: var(--wsp-text);
    font-size: 13px;
    line-height: 1.4;
}

.wsp-subaccounts-editor {
    padding: 20px 22px 22px;
}

.wsp-subaccounts-editor__title {
    margin: 0 0 16px;
    font-size: 1rem;
}

.wsp-subaccounts-perms {
    border: 0;
    margin: 0 0 16px;
    padding: 0;
}

.wsp-subaccounts-perms legend {
    padding: 0;
    margin-bottom: 8px;
}

.wsp-subaccounts-perms__row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    font-size: 14px;
    cursor: pointer;
}

.wsp-subaccounts-perms__row input {
    margin: 0;
    flex-shrink: 0;
}

.wsp-subaccounts-editor__btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.wsp-subaccounts-empty {
    padding: 20px 22px;
    color: var(--wsp-text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* ===== Messages / Conversations (My Account) ===== */
.wsp-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 10px;
    border-radius: 999px;
    line-height: 1.2;
}

.wsp-badge--green {
    background: #dcfce7;
    color: #166534;
}

.wsp-badge--gray {
    background: #f1f5f9;
    color: #64748b;
}

.wsp-badge--attention {
    background: #ffedd5;
    color: #c2410c;
}

.wsp-conv-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--wsp-border);
    border-radius: var(--wsp-radius);
    background: var(--wsp-surface);
    box-shadow: var(--wsp-shadow);
}

.wsp-conv-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wsp-conv-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wsp-text-secondary);
    background: #f8fafc;
    border-bottom: 1px solid var(--wsp-border);
}

.wsp-conv-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--wsp-border-light);
    vertical-align: middle;
}

.wsp-conv-table tr:last-child td {
    border-bottom: none;
}

.wsp-conv-table__row {
    cursor: pointer;
    transition: background-color var(--wsp-transition);
}

.wsp-conv-table__row:hover {
    background: #f8fafc;
}

.wsp-conv-table__subject {
    font-weight: 500;
    color: var(--wsp-text);
}

.wsp-conv-table__subject--unread {
    font-weight: 700;
}

.wsp-conv-unread-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wsp-primary);
    margin-right: 8px;
    vertical-align: middle;
}

.wsp-conv-table__date {
    color: var(--wsp-text-secondary);
    font-size: 13px;
    white-space: nowrap;
}

.wsp-conv-table__action {
    text-align: right;
    white-space: nowrap;
}

.wsp-conv-chevron {
    display: inline-block;
    font-size: 18px;
    font-weight: 600;
    color: var(--wsp-primary);
    margin-right: 6px;
    vertical-align: middle;
}

.wsp-conv-view-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--wsp-primary);
}

.wsp-conv-empty {
    color: var(--wsp-text-secondary);
    margin: 0;
    padding: 24px;
    text-align: center;
}

.wsp-conversation-thread {
    margin-top: 8px;
}

.wsp-conversation-thread__head {
    margin: 16px 0;
}

.wsp-conversation-thread__subject {
    margin: 0 0 6px;
    font-size: 18px;
}

.wsp-conversation-thread__meta {
    margin: 0;
    font-size: 13px;
    color: var(--wsp-text-secondary);
}

.wsp-conversation-thread__messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    background: #f1f5f9;
    border-radius: var(--wsp-radius);
    border: 1px solid var(--wsp-border);
    max-height: 420px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.wsp-thread-bubble {
    max-width: 88%;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 14px;
    line-height: 1.55;
}

.wsp-thread-bubble--customer {
    align-self: flex-end;
    margin-left: auto;
    background: #dbeafe;
    border: 1px solid #93c5fd;
    border-bottom-right-radius: 4px;
}

.wsp-thread-bubble--staff {
    align-self: flex-start;
    background: #e2e8f0;
    border: 1px solid #cbd5e1;
    border-bottom-left-radius: 4px;
}

.wsp-thread-bubble__meta {
    font-size: 11px;
    font-weight: 600;
    color: var(--wsp-text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wsp-thread-bubble__body {
    word-break: break-word;
}

.wsp-thread-bubble__files {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.wsp-thread-bubble__files a {
    font-size: 12px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.85);
    border-radius: 6px;
    border: 1px solid var(--wsp-border);
    text-decoration: none;
    color: var(--wsp-primary);
}

.wsp-thread-bubble__time {
    display: block;
    margin-top: 8px;
    font-size: 11px;
    color: var(--wsp-text-muted);
}

.wsp-conversation-thread__closed-notice {
    padding: 12px 16px;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: var(--wsp-radius-sm);
    color: #92400e;
    font-size: 14px;
}

.wsp-new-conversation-form {
    margin-top: 20px;
    padding: 20px;
}

.wsp-new-conversation-form__title {
    margin: 0 0 16px;
    font-size: 16px;
}

.wsp-file-drop {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border: 2px dashed var(--wsp-border);
    border-radius: var(--wsp-radius-sm);
    background: #f8fafc;
    cursor: pointer;
    transition: border-color var(--wsp-transition), background var(--wsp-transition);
}

.wsp-file-drop:hover {
    border-color: var(--wsp-primary);
    background: #f0f7ff;
}

.wsp-file-drop input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.wsp-file-drop__icon {
    flex-shrink: 0;
    color: var(--wsp-primary);
}

.wsp-file-drop__text {
    font-size: 13px;
    color: var(--wsp-text-secondary);
}

.wsp-file-queue {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.wsp-file-queue__item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 12px;
    background: #f1f5f9;
    border: 1px solid var(--wsp-border);
    border-radius: var(--wsp-radius-sm);
    font-size: 13px;
}

.wsp-file-queue__name {
    flex: 1 1 160px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 500;
}

.wsp-file-queue__size {
    color: var(--wsp-text-muted);
    font-size: 12px;
}

.wsp-file-queue__remove {
    margin-left: auto;
    border: none;
    background: transparent;
    color: var(--wsp-text-muted);
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: var(--wsp-radius-sm);
}

.wsp-file-queue__remove:hover {
    color: #b91c1c;
    background: rgba(185, 28, 28, 0.08);
}

.wsp-upload-field-error {
    margin: 8px 0 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #b91c1c;
    font-weight: 500;
}

.wsp-upload-field-error[hidden] {
    display: none !important;
}

.wsp-field-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.wsp-field--actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 8px;
}

.wsp-quote-hint {
    font-size: 13px;
    margin: 0 0 10px;
}

.wsp-quote-line {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--wsp-border-light);
}

.wsp-quote-line__search {
    position: relative;
    flex: 1 1 200px;
    min-width: 180px;
}

.wsp-quote-line .wsp-quote-line-qty {
    width: 100px;
    flex-shrink: 0;
}

.wsp-quote-results {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    z-index: 20;
    margin: 4px 0 0;
    padding: 4px 0;
    list-style: none;
    background: var(--wsp-surface);
    border: 1px solid var(--wsp-border);
    border-radius: var(--wsp-radius-sm);
    box-shadow: var(--wsp-shadow);
    max-height: 220px;
    overflow-y: auto;
}

.wsp-quote-results li {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
}

.wsp-quote-results li:hover {
    background: #f0f7ff;
}

.wsp-char-counter {
    font-size: 12px;
    color: var(--wsp-text-muted);
    margin-top: 6px;
}

/* ===== Purchase Lists ===== */
.wsp-purchase-lists,
.wsp-purchase-lists #wsp-lists-container {
    overflow: visible;
}

.wsp-purchase-lists__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.wsp-purchase-lists__header-actions {
    display: flex;
    gap: 8px;
}

.wsp-purchase-lists__header--editor {
    flex-direction: column;
    align-items: stretch;
}

.wsp-purchase-lists__back {
    font-size: 14px;
    color: var(--wsp-primary, #2563eb);
    text-decoration: none;
    margin-bottom: 8px;
    display: inline-block;
}

.wsp-purchase-lists__title-input {
    font-size: 1.25rem;
    font-weight: 600;
    max-width: 480px;
}

.wsp-purchase-lists__type {
    margin-top: 8px;
}

.wsp-pl-table-wrap {
    overflow: visible;
}

.wsp-pl-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.wsp-pl-table tbody,
.wsp-pl-table tr,
.wsp-pl-table__actions {
    overflow: visible;
}

.wsp-pl-table th,
.wsp-pl-table td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--wsp-border, #e2e8f0);
    text-align: left;
    vertical-align: middle;
}

.wsp-pl-table th {
    font-weight: 600;
    color: var(--wsp-text-muted, #64748b);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.wsp-pl-table__actions {
    width: 1%;
    text-align: right !important;
    vertical-align: middle;
}

.wsp-pl-actions {
    position: relative;
    display: inline-block;
}

.wsp-pl-actions__toggle {
    white-space: nowrap;
    min-width: 0;
    padding: 6px 10px !important;
    font-size: 13px !important;
}

.wsp-pl-actions__caret {
    font-size: 10px;
    opacity: 0.7;
}

.wsp-pl-actions__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 4px);
    z-index: 100;
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--wsp-border, #e2e8f0);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
    padding: 4px 0;
    text-align: left;
}

.wsp-pl-actions__item {
    display: block;
    width: 100%;
    padding: 8px 14px;
    font-size: 13px;
    line-height: 1.35;
    color: var(--wsp-text, #1e293b);
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
}

.wsp-pl-actions__item:hover,
.wsp-pl-actions__item:focus {
    background: var(--wsp-bg-muted, #f8fafc);
    color: var(--wsp-primary, #2563eb);
}

.wsp-pl-actions__item--danger {
    color: #dc2626;
}

.wsp-pl-actions__item--danger:hover,
.wsp-pl-actions__item--danger:focus {
    background: #fef2f2;
    color: #b91c1c;
}

.wsp-pl-empty {
    color: var(--wsp-text-muted, #64748b);
    padding: 24px 0;
}

.wsp-bulk-order--list-mode .wsp-bulk-order__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wsp-save-cart-as-list-btn {
    margin-left: 8px;
}

/* ===== Frontend Modal ===== */
.wsp-modal--frontend {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wsp-modal--frontend .wsp-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.4);
}

.wsp-modal--frontend .wsp-modal__content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,.15);
    width: 90%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
}

.wsp-modal--frontend .wsp-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 0;
}

.wsp-modal--frontend .wsp-modal__header h3 {
    margin: 0;
    font-size: 18px;
}

.wsp-modal--frontend .wsp-modal__close {
    background: none;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #94a3b8;
}

.wsp-modal--frontend .wsp-modal__body {
    padding: 20px 24px;
}

.wsp-modal--frontend .wsp-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px 20px;
    border-top: 1px solid #f1f5f9;
}

/* ===== Notifications ===== */
.wsp-notice {
    padding: 12px 16px;
    border-radius: var(--wsp-radius);
    margin-bottom: 16px;
    font-size: 14px;
}

.wsp-notice--success {
    background: #dcfce7;
    color: #15803d;
    border: 1px solid #bbf7d0;
}

.wsp-notice--error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

/* ===== Credit Balance ===== */
.wsp-credit-balance {
    background: #f0f7ff;
    padding: 12px;
    border-radius: var(--wsp-radius);
    border: 1px solid #dbeafe;
}

/* ===== Gateway Fields ===== */
.wsp-gateway-fields {
    border: none;
    padding: 0;
    margin: 0;
}

.wsp-gateway-fields .form-row {
    margin-bottom: 10px;
}

/* ===== Loading ===== */
.wsp-loading {
    color: #94a3b8;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

/* ===== Registration Fields ===== */
.wsp-reg-field {
    transition: opacity var(--wsp-transition);
}

.wsp-reg-field--hidden {
    display: none;
}

.wsp-reg-field--html {
    margin-bottom: 16px;
}

.wsp-reg-section-header {
    margin-top: 20px;
    margin-bottom: 8px;
    clear: both;
}

.wsp-reg-section-header:first-child {
    margin-top: 0;
}

.wsp-reg-section-title {
    margin: 0 0 8px;
    font-size: 1.1em;
    font-weight: 600;
    color: var(--wsp-primary, #0073e6);
}

.wsp-reg-field--location .form-row-wide {
    margin-bottom: 16px;
}

.wsp-reg-field--location .form-row-wide:last-child {
    margin-bottom: 0;
}

.wsp-field-help {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #64748b;
}

.wsp-radio-group label,
.wsp-checkbox-group label {
    display: inline-block;
    margin-right: 16px;
    margin-bottom: 4px;
}

.wsp-radio-group input,
.wsp-checkbox-group input {
    margin-right: 6px;
}

select[multiple].input-text {
    min-height: 80px;
}

/* ===== Status Banners ===== */
.wsp-status-banner {
    width: 100%;
    padding: 15px 20px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    position: relative;
    z-index: 999;
}
.wsp-status-banner--blue {
    background-color: #3498db;
    color: #ffffff;
}
.wsp-status-banner--red {
    background-color: #e74c3c;
    color: #ffffff;
}
.wsp-status-banner--more-info strong {
    display: block;
    margin-bottom: 6px;
}
.wsp-status-banner--more-info p {
    margin: 0;
    font-weight: 400;
}

/* ===== Offer Accordion Cards (wsp-settings-form style) ===== */
.wsp-offers-empty {
    color: var(--wsp-text-secondary);
    padding: 20px 0;
}

.wsp-offer-accordion {
    margin-bottom: 12px;
    background: var(--wsp-surface);
    border: 1px solid var(--wsp-border);
    border-radius: var(--wsp-radius);
    overflow: hidden;
    box-shadow: var(--wsp-shadow);
}

.wsp-offer-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    cursor: pointer;
    transition: background var(--wsp-transition);
}

.wsp-offer-card-header:hover {
    background: var(--wsp-border-light);
}

.wsp-offer-card-header__main {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    flex: 1;
}

.wsp-offer-header-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--wsp-primary);
}

.wsp-offer-header-icon svg {
    width: 20px;
    height: 20px;
}

.wsp-offer-card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--wsp-text);
}

.wsp-offer-countdown-wrap {
    font-size: 13px;
    color: var(--wsp-text-secondary);
}

.wsp-offer-countdown-wrap .wsp-offer-countdown-badge {
    margin-left: 2px;
}

.wsp-offer-countdown-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    background: var(--wsp-border-light);
    border: 1px solid var(--wsp-border);
    border-radius: var(--wsp-radius-sm);
    font-size: 0.85em;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--wsp-text-secondary);
}

.wsp-offer-countdown--expired {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

/* Offer status badges (Expired, Claimed, Complete Your Purchase, Fully Claimed) */
.wsp-offer-status-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 4px 10px;
    border-radius: var(--wsp-radius-sm);
    font-size: 0.8em;
    font-weight: 600;
}
.wsp-offer-status-badge--expired {
    background: #fef2f2;
    color: #dc2626;
}
.wsp-offer-status-badge--claimed {
    background: #f3f4f6;
    color: #6b7280;
}
.wsp-offer-status-badge--max-cart {
    background: #ecfdf5;
    color: #059669;
}
.wsp-offer-status-badge--fully-claimed {
    background: #fef2f2;
    color: #dc2626;
}

/* Urgency badges (Available Now, Limited Availability, etc.) */
.wsp-offer-urgency-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 4px 10px;
    border-radius: var(--wsp-radius-sm);
    font-size: 0.75em;
    font-weight: 600;
}
.wsp-offer-urgency-badge--available_now {
    background: #ecfdf5;
    color: #059669;
}
.wsp-offer-urgency-badge--limited_availability {
    background: #fef9c3;
    color: #a16207;
}
.wsp-offer-urgency-badge--selling_fast {
    background: #fed7aa;
    color: #c2410c;
}
.wsp-offer-urgency-badge--almost_gone {
    background: #fecaca;
    color: #dc2626;
}
.wsp-offer-urgency-badge--fully_claimed {
    background: #fef2f2;
    color: #dc2626;
}

.wsp-offer-disabled-msg {
    display: inline-block;
    padding: 10px 16px;
    font-size: 14px;
    color: var(--wsp-text-secondary);
    background: var(--wsp-border-light);
    border-radius: var(--wsp-radius-sm);
}

.wsp-offer-toggle-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") center no-repeat;
    transition: transform 0.2s;
}

.wsp-offer-card--expanded .wsp-offer-toggle-icon {
    transform: rotate(180deg);
}

.wsp-offer-card-body {
    display: none;
    padding: 0 20px 20px;
    border-top: 1px solid var(--wsp-border-light);
}

.wsp-offer-card--expanded .wsp-offer-card-body {
    display: block;
}

.wsp-offer-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 16px;
}

.wsp-offer-items-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wsp-text-secondary);
    background: var(--wsp-border-light);
    border-bottom: 1px solid var(--wsp-border);
}

.wsp-offer-items-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--wsp-border-light);
    vertical-align: middle;
}

.wsp-offer-items-table tr:last-child td {
    border-bottom: none;
}

.wsp-offer-item-cell {
    min-width: 0;
}

.wsp-offer-item-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.wsp-offer-item-thumb {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--wsp-radius-sm);
    flex-shrink: 0;
}

.wsp-offer-item-name {
    font-weight: 500;
    color: var(--wsp-text);
}

.wsp-offer-moq-label {
    font-weight: 600;
    color: var(--wsp-text-secondary);
}

.wsp-offer-qty-input {
    width: 72px;
    padding: 8px 10px;
    text-align: center;
    border: 1px solid var(--wsp-border);
    border-radius: var(--wsp-radius-sm);
}

.wsp-offer-card-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    padding: 16px 24px;
    margin-top: 16px;
    background: #f8fafc;
    border-top: 1px solid var(--wsp-border);
    border-radius: 0 0 var(--wsp-radius) var(--wsp-radius);
}

.wsp-offer-desc {
    flex: 0 0 100%;
    margin: 0 0 12px;
    font-size: 13px;
    color: var(--wsp-text-muted);
}

.wsp-offer-footer-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.wsp-offer-total-wrap {
    margin-left: auto;
    text-align: right;
}

.wsp-offer-total-label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wsp-text-secondary);
}

.wsp-offer-total-amount {
    font-size: 1.25em;
    font-weight: 700;
    color: var(--wsp-text);
}

.wsp-offer-original {
    text-decoration: line-through;
    color: var(--wsp-text-muted);
    margin-right: 6px;
}

.wsp-offer-save {
    color: var(--wsp-success);
    font-size: 0.85em;
}

.wsp-btn-icon {
    opacity: 0.9;
}

.wsp-offer-teaser {
    padding: 16px 20px;
    background: var(--wsp-surface);
    border: 1px solid var(--wsp-border);
    border-radius: var(--wsp-radius);
}

.wsp-offer-teaser .wsp-offer-card-header {
    cursor: default;
    padding: 0;
}

.wsp-offer-teaser .wsp-offer-card-header:hover {
    background: transparent;
}

.wsp-offer-teaser-msg {
    margin: 8px 0 0;
    color: var(--wsp-text-muted);
    font-size: 14px;
}

/* ===== Responsive ===== */
@media (max-width: 600px) {
    .wsp-form-row {
        flex-direction: column;
    }

    .wsp-bulk-order__table {
        font-size: 12px;
    }

    .wsp-offer-footer-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .wsp-offer-total-wrap {
        margin-left: 0;
        margin-top: 8px;
    }

    .wsp-offer-items-table {
        font-size: 12px;
    }
}

/* ===== Product Information Table (Custom Fields) ===== */
.wsp-information-table {
    width: 100%;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    border-collapse: collapse;
}
.wsp-information-table thead th {
    background: #f9fafb;
    border-bottom: 2px solid #e5e7eb;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}
.wsp-information-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid #f3f4f6;
    color: #1f2937;
    vertical-align: top;
}
.wsp-information-table tbody tr:last-child td {
    border-bottom: 0;
}
.wsp-information-table tbody td:first-child {
    font-weight: 500;
    width: 42%;
}

/* ===== Product Variations Table (cream bulk layout) ===== */
.wsp-variations-table-product-wrap {
    width: 100%;
    max-width: min(1200px, 100%);
    margin-left: auto;
    margin-right: auto;
    clear: both;
    float: none;
    box-sizing: border-box;
    padding-left: var(--wsp-product-gutter, 16px);
    padding-right: var(--wsp-product-gutter, 16px);
}

.single-product .wsp-variations-table-product-wrap {
    clear: both;
}

/* Align with common WooCommerce / theme product content areas */
.woocommerce .wsp-variations-table-product-wrap,
.single-product .site-main .wsp-variations-table-product-wrap,
.single-product .content-area .wsp-variations-table-product-wrap,
.single-product .entry-content .wsp-variations-table-product-wrap {
    max-width: min(1200px, 100%);
    margin-inline: auto;
}

.wsp-bulk-order--variations-table {
    width: 100%;
    max-width: 100%;
    margin-top: 1.25em;
    margin-bottom: 1.25em;
    margin-left: auto;
    margin-right: auto;
    clear: both;
    float: none;
    box-sizing: border-box;
    padding-bottom: 4px;
}
.wsp-bulk-order--variations-table .wsp-bulk-cream-toolbar,
.wsp-bulk-order--variations-table .wsp-bulk-cream-filters-panel,
.wsp-bulk-order--variations-table .wsp-bulk-cream-footer,
.wsp-bulk-order--variations-table .wsp-bulk-cream-cart-widget {
    display: none !important;
}
.wsp-bulk-order--variations-table.wsp-bulk-order--theme-cream {
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: visible;
}
.wsp-bulk-order--variations-table .wsp-bulk-cream-shell {
    padding: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    min-height: 0;
}
.wsp-bulk-order--variations-table .wsp-bulk-cream-main,
.wsp-bulk-order--variations-table .wsp-bulk-cream-content {
    padding: 0;
    width: 100%;
    max-width: 100%;
}
.wsp-bulk-order--variations-table .wsp-bulk-cream-table-scroll.wsp-bulk-catalog__scroll {
    width: 100%;
    max-width: 100%;
    max-height: min(480px, 55vh);
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}
.wsp-variations-table-count {
    margin: 0 0 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #71717a;
}
.wsp-bulk-order--variations-table .wsp-bulk-cream-table-scroll {
    width: 100%;
    max-width: 100%;
}
.wsp-bulk-order--variations-table .wsp-bulk-cream-table,
.wsp-bulk-order--variations-table .wsp-bulk-order__table {
    width: 100%;
    table-layout: auto;
}
.wsp-bulk-order--variations-table .wsp-bulk-cream-col-cb {
    width: 36px;
    text-align: center;
}
.wsp-bulk-order--variations-table .wsp-bulk-cream-variation-price {
    margin-top: 4px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #18181b;
    line-height: 1.3;
}
.wsp-bulk-order--variations-table .wsp-bulk-cream-variation-price .price {
    margin: 0;
    font-size: inherit;
    font-weight: inherit;
}
.wsp-bulk-order--variations-table .wsp-bulk-cream-variation-price del {
    opacity: 0.55;
    font-weight: 400;
    margin-right: 4px;
}
.wsp-bulk-order--variations-table .wsp-price-wrap--compact {
    font-size: 0.875rem;
    line-height: 1.45;
}
.wsp-bulk-order--variations-table .wsp-price-wrap--compact .wsp-price-label {
    font-size: 10px;
}
.wsp-bulk-order--variations-table .wsp-bulk-multiselect--variations-table {
    width: 100%;
    max-width: 100%;
    margin-top: 12px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    box-sizing: border-box;
    position: sticky;
    bottom: 0;
    z-index: 100;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
}
.wsp-bulk-order--variations-table .wsp-bulk-multiselect--variations-table .wsp-bulk-add-selected {
    flex: 1 1 auto;
    min-width: 140px;
    text-align: center;
}
.wsp-bulk-order--variations-table-nameqty .wsp-bulk-cream-col-subtotal,
.wsp-bulk-order--variations-table-nameqty .wsp-bulk-cream-col-cart,
.wsp-bulk-order--variations-table-nameqty .wsp-bulk-subtotal,
.wsp-bulk-order--variations-table-nameqty .wsp-bulk-cream-cart-cell {
    display: none !important;
}
.wsp-bulk-order--variations-table-nameqty .wsp-bulk-cream-col-product {
    width: auto;
}
.wsp-bulk-order--variations-table-nameqty .wsp-bulk-cream-col-qty {
    width: 160px;
    white-space: nowrap;
}

/* Mobile: card layout with price, subtotal, and per-row add */
@media (max-width: 640px) {
    .wsp-variations-table-product-wrap {
        padding-left: 12px;
        padding-right: 12px;
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .wsp-bulk-order--variations-table,
    .wsp-bulk-order--variations-table .wsp-bulk-cream-shell {
        max-width: 100%;
        overflow-x: hidden;
        box-sizing: border-box;
    }

    .wsp-bulk-order--variations-table {
        padding-bottom: 80px;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-table-scroll.wsp-bulk-catalog__scroll {
        max-height: min(420px, 50vh);
        overflow-y: auto;
        overflow-x: hidden;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #ffffff;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-table--variations {
        border-collapse: separate;
        border-spacing: 0 10px;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-table--variations thead {
        display: none;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-table--variations,
    .wsp-bulk-order--variations-table .wsp-bulk-cream-table--variations tbody {
        display: block;
        width: 100%;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-row-variation {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 8px 10px;
        padding: 14px 10px 10px;
        margin: 0 0 10px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background: #ffffff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
        box-sizing: border-box;
        max-width: 100%;
        overflow: visible;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-row-variation > td {
        display: block;
        padding: 0;
        border: none;
        width: auto;
        max-width: 100%;
        vertical-align: top;
        box-sizing: border-box;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-col-cb {
        flex: 0 0 24px;
        order: 1;
        align-self: flex-start;
        padding-top: 8px;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-col-product {
        flex: 1 1 calc(100% - 34px);
        order: 2;
        min-width: 0;
        overflow: visible;
        padding-top: 4px;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-product-cell {
        align-items: flex-start;
        min-width: 0;
        overflow: visible;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-thumb-wrap {
        width: 40px;
        height: 40px;
        flex-shrink: 0;
        overflow: visible;
        margin-top: 2px;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-thumb-wrap img,
    .wsp-bulk-order--variations-table .wsp-bulk-cream-thumb-ph {
        width: 40px;
        height: 40px;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-product-name {
        font-size: 0.8125rem;
        line-height: 1.35;
        word-break: break-word;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-variation-price {
        font-size: 0.8125rem;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-col-qty {
        flex: 0 0 auto;
        order: 3;
        display: flex !important;
        align-items: center;
        min-width: 0;
        overflow: hidden;
        margin-left: 34px;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-col-cart,
    .wsp-bulk-order--variations-table .wsp-bulk-cream-cart-cell {
        flex: 0 0 auto;
        order: 3;
        display: flex !important;
        align-items: center;
        min-width: 0;
        max-width: none;
        overflow: hidden;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-col-subtotal {
        display: none !important;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-stepper {
        width: 100%;
        max-width: 110px;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-stepper .wsp-bulk-qty {
        min-width: 0;
        flex: 1;
        width: 32px;
        padding: 4px 2px;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-step {
        min-width: 28px;
        padding: 0 4px;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-cream-cart-cell .wsp-bulk-cream-row-add,
    .wsp-bulk-order--variations-table .wsp-bulk-cream-col-cart .wsp-btn {
        width: auto;
        max-width: none;
        min-width: 0;
        min-height: 44px;
        padding: 12px 20px;
        font-size: 0.8125rem;
        font-weight: 600;
        line-height: 1.25;
        letter-spacing: 0;
        white-space: nowrap;
        text-align: center;
    }

    /* nameqty desktop hides these; cart shown inline with qty on mobile */
    .wsp-bulk-order--variations-table-nameqty .wsp-bulk-cream-col-cart,
    .wsp-bulk-order--variations-table-nameqty .wsp-bulk-cream-cart-cell {
        display: flex !important;
    }

    .wsp-bulk-order--variations-table-nameqty .wsp-bulk-cream-col-subtotal,
    .wsp-bulk-order--variations-table-nameqty .wsp-bulk-subtotal {
        display: none !important;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-multiselect--variations-table {
        margin-top: 8px;
        padding: 10px 12px;
        border-radius: 8px 8px 0 0;
        flex-direction: column;
        align-items: stretch;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-multiselect__summary {
        font-size: 0.875rem;
    }

    .wsp-bulk-order--variations-table .wsp-bulk-multiselect--variations-table .wsp-bulk-add-selected {
        width: 100%;
        margin-top: 4px;
    }
}

/* ===== Tier 3: B2B upgrade, checkout upload, store credit ===== */
.wsp-b2b-upgrade-form {
    max-width: 520px;
}

.wsp-b2b-upgrade-form .form-row {
    margin-bottom: 1rem;
}

.wsp-checkout-upload,
.wsp-checkout-registration {
    margin: 1.25rem 0;
    padding: 1rem;
    border: 1px solid var(--wsp-border);
    border-radius: var(--wsp-radius-sm);
    background: var(--wsp-surface);
}

/* Block checkout placement */
.wc-block-checkout .wsp-checkout-upload,
.wp-block-woocommerce-checkout .wsp-checkout-upload {
    max-width: 700px;
    margin: 1.5rem auto;
}

.wsp-checkout-upload h3 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.wsp-checkout-upload__status {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--wsp-success);
}

.wsp-checkout-upload__status--error {
    color: #dc2626;
}

.wsp-checkout-registration__title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.wc-block-checkout .wsp-checkout-registration,
.wp-block-woocommerce-checkout .wsp-checkout-registration {
    max-width: 700px;
    margin: 1.5rem auto;
}

.wsp-checkout-registration__role {
    margin-top: 0.75rem;
}

.wsp-checkout-reg-fields {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wsp-border);
}

.wsp-checkout-reg-fields .wsp-reg-section-title {
    margin: 0.75rem 0 0.5rem;
    font-size: 0.95rem;
}

.wsp-checkout-reg-file-wrap {
    margin-top: 0.35rem;
}

.wsp-checkout-reg-file__status {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    color: var(--wsp-success, #059669);
}

.wsp-myaccount-store-credit .wsp-store-credit-balance {
    font-size: 1.125rem;
    margin-bottom: 1.25rem;
}

.wsp-store-credit-ledger {
    margin-top: 0.5rem;
}

/* Outline primary buttons (Appearance → Layout) */
body.wsp-btn-style-outline .wsp-btn--primary,
body.wsp-btn-style-outline .wsp-guest-quote-add-btn.wsp-btn--accent {
    background: transparent !important;
    color: var(--wsp-primary) !important;
    border: 2px solid var(--wsp-primary) !important;
}

body.wsp-btn-style-outline .wsp-btn--primary:hover,
body.wsp-btn-style-outline .wsp-guest-quote-add-btn.wsp-btn--accent:hover {
    background: var(--wsp-primary) !important;
    color: #fff !important;
}

/* Checkout VAT validation */
#billing_vat_field .wsp-vat-validate-btn,
.wsp-vat-field-row .wsp-vat-validate-btn,
.wsp-vat-checkout-row .wsp-vat-validate-btn,
.wsp-reg-vat-validate-btn {
    margin-left: 0;
    margin-top: 0;
    vertical-align: middle;
    flex: 0 0 auto;
}

.wsp-vat-status,
.wsp-vat-notice {
    display: block;
    margin-top: 8px;
    font-size: 0.875rem;
    color: var(--wsp-text-secondary, #64748b);
}

.wsp-vat-status--ok,
.wsp-vat-notice.wsp-vat-status--ok {
    color: var(--wsp-success, #10b981);
    font-weight: 600;
}

.wsp-vat-field-help,
.wsp-vat-registration-note {
    margin: 0;
}

.wsp-vat-checkout-footer {
    flex: 0 0 100%;
    width: 100%;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: var(--wsp-surface-muted, #f8fafc);
    border: 1px solid var(--wsp-border, #e2e8f0);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wsp-vat-checkout-footer .wsp-vat-status {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.45;
}

.wsp-vat-checkout-footer .wsp-vat-exemption-toggle {
    margin: 0;
}

.wsp-vat-exemption-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--wsp-border, #e2e8f0);
}

.wsp-vat-exemption-toggle__label {
    font-size: 0.95rem;
    line-height: 1.45;
    color: var(--wsp-text, #1e293b);
    font-weight: 500;
}

.wsp-vat-exemption-toggle__switch {
    flex: 0 0 auto;
}

.wsp-vat-exemption-toggle--disabled {
    opacity: 0.75;
}

.wsp-vat-exemption-toggle--disabled .wsp-vat-exemption-toggle__switch {
    cursor: not-allowed;
}

/* Toggle switch (storefront) */
.wsp-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.wsp-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wsp-switch__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 22px;
    transition: background 0.2s ease;
}

.wsp-switch__slider::before {
    content: '';
    position: absolute;
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
}

.wsp-switch input:checked + .wsp-switch__slider {
    background: var(--wsp-primary, #7c3aed);
}

.wsp-switch input:checked + .wsp-switch__slider::before {
    transform: translateX(18px);
}

.wsp-switch--sm {
    width: 34px;
    height: 18px;
}

.wsp-switch--sm .wsp-switch__slider::before {
    height: 12px;
    width: 12px;
}

.wsp-switch--sm input:checked + .wsp-switch__slider::before {
    transform: translateX(16px);
}

.wsp-vat-checkout-footer .wsp-vat-field-help,
.wsp-vat-checkout-footer .wsp-vat-domestic-note {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.45;
    color: var(--wsp-text-secondary, #64748b);
}

.wsp-vat-domestic-note {
    display: block;
    margin-top: 6px;
    color: #646970;
    font-size: 0.88em;
}

#billing_vat_field .woocommerce-input-wrapper,
.wsp-vat-checkout-row .wsp-vat-input-group,
.wsp-vat-checkout-row .wsp-vat-input-row,
.wsp-vat-checkout-row.wc-block-components-text-input .wsp-vat-input-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 8px;
    width: 100%;
}

#billing_vat_field,
.wsp-vat-checkout-row.wc-block-components-text-input,
.wsp-vat-checkout-row.form-row-wide {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

#billing_vat_field > label,
.wsp-vat-checkout-row.wc-block-components-text-input > label {
    flex: 0 0 100%;
    width: 100%;
}

#billing_vat_field #billing_vat,
.wsp-vat-checkout-row .wsp-vat-input-row input[id*="vat-number"],
.wsp-vat-checkout-row .wsp-vat-input-row input[name*="vat-number"],
.wsp-vat-checkout-row input[id*="vat-number"],
.wsp-vat-checkout-row input[name*="vat-number"] {
    flex: 1 1 auto;
    min-width: 0;
}

.wsp-vat-checkout-row.wc-block-components-text-input {
    flex-direction: column-reverse;
    flex-wrap: nowrap;
}

.wsp-vat-checkout-group {
    width: 100%;
}

.wsp-vat-checkout-group .wsp-vat-checkout-footer {
    margin-top: 0;
}

[data-wsp-vat-shipping-hidden="1"],
.wc-block-components-address-form--shipping .wc-block-components-text-input:has(input[id*="vat-number"]),
.wc-block-components-address-form--shipping .wc-block-components-text-input:has(input[name*="vat-number"]) {
    display: none !important;
}

#billing_vat_field .wsp-vat-checkout-footer {
    flex: 0 0 100%;
    width: 100%;
}

.wsp-vat-notice-live {
    display: block !important;
    width: 100%;
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 0.875rem;
    line-height: 1.4;
    box-sizing: border-box;
}

.wsp-vat-notice-live--ok {
    background: #ecfdf5;
    color: #047857;
    border: 1px solid #10b981;
}

.wsp-vat-notice-live--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #ef4444;
}

.wsp-vat-checkout-row .wsp-vat-notice-live {
    flex: 0 0 100%;
}
