/* =============================================================================
   WDR Variation Discount Tiers — Stylesheet
   Tuned to match the Salient theme's green palette visible on the product page.
   ============================================================================= */

/* ── Live price display ────────────────────────────────────────────────────── */
.wdr-vt-live-price {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    margin: 20px 0 6px;       /* 20px top = breathing room from Add to Cart */
    padding: 13px 16px;
    background: #f4fbf5;
    border-left: 3px solid #4CAF50;
    border-radius: 3px;
    font-size: 0.95em;
    line-height: 1.5;
    color: #333;
}

.wdr-vt-original-price {
    color: #999;
    text-decoration: line-through;
    font-size: 0.88em;
}

/* Strip WooCommerce's own del/ins formatting inside price spans */
.wdr-vt-original-price del,
.wdr-vt-new-price del,
.wdr-vt-table del {
    text-decoration: line-through;
    color: #999;
    opacity: 1;
}
.wdr-vt-original-price ins,
.wdr-vt-new-price ins,
.wdr-vt-table ins {
    text-decoration: none;
    font-weight: inherit;
    background: none;
}

.wdr-vt-arrow {
    color: #bbb;
    font-size: 0.85em;
    margin: 0 2px;
}

.wdr-vt-new-price {
    font-weight: 700;
    font-size: 1.1em;
    color: #2e7d32;
}

.wdr-vt-save-badge {
    padding: 2px 10px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    white-space: nowrap;
}

/* ── Table wrapper ─────────────────────────────────────────────────────────── */
.wdr-vt-table-wrap {
    margin: 22px 0 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Table base ────────────────────────────────────────────────────────────── */
.wdr-vt-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88em;
    line-height: 1.5;
    color: #333;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
}

/* ── Header ────────────────────────────────────────────────────────────────── */
.wdr-vt-table thead tr {
    background: #333;
    color: #fff;
}

.wdr-vt-table thead th {
    padding: 11px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.82em;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    white-space: nowrap;
    border: none;
    /* Override any theme th styling */
    background: #333 !important;
    color: #fff !important;
}

/* ── Body rows ─────────────────────────────────────────────────────────────── */
.wdr-vt-table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.12s ease;
}

.wdr-vt-table tbody tr:last-child {
    border-bottom: none;
}

.wdr-vt-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.wdr-vt-table tbody tr:hover {
    background: #f5f5f5;
}

/* ── Active / highlighted tier row ────────────────────────────────────────── */
.wdr-vt-table tbody tr.wdr-vt-row--active {
    background: #e8f5e9 !important;
}

.wdr-vt-table tbody tr.wdr-vt-row--active td:first-child {
    border-left: 3px solid #4CAF50;
    padding-left: 11px;
    font-weight: 700;
}

/* ── Cells ─────────────────────────────────────────────────────────────────── */
.wdr-vt-table td {
    padding: 12px 16px;
    vertical-align: middle;
    border: none;
    background: transparent;
}

/* Savings column */
.wdr-vt-table td.wdr-vt-saving {
    color: #2e7d32;
    font-weight: 600;
}

/* Discount % column — green to match theme */
.wdr-vt-table td.wdr-vt-pct {
    font-weight: 700;
    color: #2e7d32;
}

/* Strip WooCommerce amount wrapper formatting inside table cells */
.wdr-vt-table .woocommerce-Price-amount {
    font-weight: inherit;
    color: inherit;
}

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 480px) {
    .wdr-vt-table thead th,
    .wdr-vt-table td {
        padding: 7px 10px;
        font-size: 0.82em;
    }

    .wdr-vt-live-price {
        font-size: 0.9em;
        padding: 9px 12px;
    }
}
