/* ==========================================================================
   WooCommerce Multi-Tier B2B Pricing, Weight Calculator & Decimal Qty CSS
   Matches Konfidi High-Converting B2B Wholesale Product Cards & PDP
   ========================================================================== */

.wc-twp-card-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: #1e293b;
    margin: 12px 0;
    box-sizing: border-box;
    width: 100%;
}

.wc-twp-card-container * {
    box-sizing: border-box;
}

/* 1. Meta Bar (SKU • MOQ • Pk) */
.wc-twp-meta-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 11.5px;
    color: #64748b;
    margin-bottom: 8px;
    line-height: 1.3;
}

.wc-twp-meta-sku {
    font-weight: 700;
    color: #475569;
    letter-spacing: 0.3px;
}

.wc-twp-meta-sep {
    color: #cbd5e1;
}

.wc-twp-meta-moq strong,
.wc-twp-meta-pack strong {
    color: #0f172a;
    font-weight: 800;
}

/* 2. Interactive Variation Attribute Pills (Archive Cards) */
.wc-twp-archive-attributes {
    margin: 10px 0 12px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wc-twp-attr-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.wc-twp-attr-label {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: capitalize;
}

.wc-twp-attr-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.wc-twp-pill-btn {
    appearance: none;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 11.5px;
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
    outline: none;
}

.wc-twp-pill-btn:hover {
    background: #e2e8f0;
    border-color: #cbd5e1;
    color: #0f172a;
}

.wc-twp-pill-btn.is-active {
    background: #fef3c7 !important;
    border-color: #f59e0b !important;
    color: #92400e !important;
    font-weight: 800;
    box-shadow: 0 1px 3px rgba(245, 158, 11, 0.2);
}

/* 3. Tier Discount Table */
.wc-twp-table-wrap {
    margin: 8px 0;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.wc-twp-tier-list {
    display: flex;
    flex-direction: column;
}

.wc-twp-tier-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 12px;
    font-size: 12.5px;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.15s ease;
}

.wc-twp-tier-row:last-child {
    border-bottom: none;
}

.wc-twp-tier-row .wc-twp-row-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.wc-twp-tier-row .wc-twp-range {
    color: #334155;
    font-weight: 600;
}

.wc-twp-tier-row .wc-twp-row-badge {
    font-size: 10px;
    font-weight: 800;
    background: #fee2e2;
    color: #b91c1c;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
}

.wc-twp-tier-row .wc-twp-price {
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.2px;
}

/* Featured Tier Row (Golden background with Star like in screenshot) */
.wc-twp-tier-row.is-featured {
    background: #fef3c7;
    color: #92400e;
}

.wc-twp-tier-row.is-featured .wc-twp-range {
    color: #92400e;
    font-weight: 700;
}

.wc-twp-tier-row.is-featured .wc-twp-price {
    color: #92400e;
    font-weight: 900;
}

/* Active Tier (Currently matching quantity in stepper) */
.wc-twp-tier-row.is-active {
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    font-weight: 700;
}

/* Collapsible Tiers Toggle */
.wc-twp-collapse-toggle {
    background: #fff7ed;
    border-top: 1px solid #ffedd5;
    color: #c2410c;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    padding: 6px;
    cursor: pointer;
    user-select: none;
}

.wc-twp-collapse-toggle:hover {
    background: #ffedd5;
}

.wc-twp-tier-row.is-collapsed {
    display: none;
}

.wc-twp-tier-row.is-collapsed.is-expanded {
    display: flex;
}

/* 4. Weight Calculation Formula Pill (y * x) */
.wc-twp-weight-formula-wrap {
    margin: 6px 0;
    text-align: center;
}

.wc-twp-formula-pill {
    display: inline-block;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 11.5px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    letter-spacing: 0.2px;
}

/* 5. Tax Status Pill */
.wc-twp-tax-row {
    margin: 6px 0;
    text-align: center;
}

.wc-twp-tax-pill {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2.5px 8px;
    border-radius: 4px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.wc-twp-tax-excl {
    background: #e0f2fe;
    color: #0369a1;
}

.wc-twp-tax-incl {
    background: #047857;
    color: #ffffff;
}

/* 6. Cart Status Bar */
.wc-twp-cart-status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #64748b;
    padding: 4px 6px;
    background: #f8fafc;
    border-radius: 4px;
    margin-bottom: 6px;
}

.wc-twp-cart-status-bar strong {
    color: #0f172a;
}

/* 7. Stepper & Add to Cart Action Bar */
.wc-twp-action-bar {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.wc-twp-stepper-wrap {
    display: flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    overflow: hidden;
    height: 38px;
}

.wc-twp-step-btn {
    appearance: none;
    border: none;
    background: #f8fafc;
    color: #334155;
    font-size: 18px;
    font-weight: 700;
    width: 38px;
    height: 100%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    user-select: none;
}

.wc-twp-step-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.wc-twp-step-btn:active {
    background: #cbd5e1;
}

.wc-twp-qty-input {
    flex: 1;
    border: none !important;
    text-align: center;
    font-size: 13.5px;
    font-weight: 800;
    color: #0f172a;
    padding: 0 4px !important;
    height: 100% !important;
    box-shadow: none !important;
    outline: none !important;
    min-width: 50px;
    appearance: textfield;
}

.wc-twp-qty-input::-webkit-outer-spin-button,
.wc-twp-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.wc-twp-unit-tag {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    padding-right: 8px;
    user-select: none;
}

/* 8. Action Cart Buttons */
.wc-twp-cart-btn {
    appearance: none;
    border: none;
    width: 100%;
    background: #09101d;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wc-twp-cart-btn:hover {
    background: #1e293b;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.wc-twp-cart-btn:active {
    transform: translateY(0);
}

/* In-Cart Update Button (Amber like in screenshot Update ₹9,300) */
.wc-twp-cart-btn.is-update {
    background: #f59e0b;
    color: #0f172a;
}

.wc-twp-cart-btn.is-update:hover {
    background: #d97706;
    color: #ffffff;
}

/* Success Added State (e.g. Added • 18 pcs) */
.wc-twp-cart-btn.is-added {
    background: #10b981;
    color: #ffffff;
}

/* Loading State */
.wc-twp-cart-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Single Product Page adjustments */
.wc-twp-context-single {
    max-width: 480px;
    margin: 20px 0;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}

@media (max-width: 480px) {
    .wc-twp-tier-row {
        padding: 6px 8px;
        font-size: 11.5px;
    }
    .wc-twp-cart-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}
