/* Tiered Pricing Table Styling */
.wc-tiered-pricing-table-wrapper {
    background: #fff;
    border-radius: 12px;
    border: none;
    box-shadow: none;
}

.wc-tiered-pricing-table-wrapper .wc-tiered-pricing-description {
    margin: 0 0 16px 0;
    font-size: 13px;
    color: #76766F;
}

/* JS overlay voor hover-border om tr */
.wc-tiered-pricing-table-wrapper .wc-tiered-pricing-row-border {
    z-index: 1;
    opacity: 0;
    transition: opacity 0.2s ease-out;
}
.wc-tiered-pricing-table-wrapper .wc-tiered-pricing-row-border.is-visible {
    opacity: 1;
}

.wc-tiered-pricing-table-wrapper .wc-tiered-pricing-footer {
    margin: 16px 0 0 0;
    font-size: 13px;
    color: #76766F;
}

.wc-tiered-pricing-vpe-notice {
    margin: 12px 0 0;
    padding: 12px 16px;
    border-radius: var(--radius-md, 8px);
    background: #F2F2EF;
    border: 1px solid #e2e8f0;
    color: #76766F;
    font-size: 13px;
    line-height: 1.5;
}

.wc-tiered-pricing-vpe-notice__text {
    display: block;
    margin-bottom: 4px;
}

.wc-tiered-pricing-vpe-notice__text::before {
    content: '!';
    display: inline-block;
    margin-right: 6px;
    color: #dc2626;
    font-weight: 700;
}

.wc-tiered-pricing-vpe-notice__actions {
    display: block;
}

.wc-tiered-pricing-vpe-notice__adjust {
    appearance: none;
    border: 0;
    background: none;
    padding: 0;
    margin: 0;
    color: #252524;
    font: inherit;
    font-size: 13px;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
}

.wc-tiered-pricing-vpe-notice__adjust:hover,
.wc-tiered-pricing-vpe-notice__adjust:focus {
    color: #000;
    text-decoration: none;
}

.wc-tiered-pricing-vpe-notice__or {
    color: #76766F;
    margin: 0 4px;
}

table.wc-tiered-pricing-table {
    width: 100%;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    border-width: 0 !important;
}

table.wc-tiered-pricing-table {
    thead {
        th {
            border: unset;
            font-size: 15px;
            background: var(--color-black);
            font-weight: normal;
            text-transform: none;
            padding: 10px 0px;
            &:first-child {
                border-top-left-radius: var(--radius-md);
                border-bottom-left-radius: var(--radius-md);
                padding-left: 16px;
            }
            &:last-child {
                border-top-right-radius: var(--radius-md);
                border-bottom-right-radius: var(--radius-md);
                padding-right: 16px;
                text-align: right !important;
            }
        }
    }
    tbody {
        tr {
            &:nth-child(odd) {
                td {
                    background: var(--color-white);
                }
            }
            &:nth-child(even) {
                td {
                    background: #F2F2EF;
                }
            }
            td {
                border: unset;
                font-size: 15px;
                font-weight: normal;
                &:first-child {
                    border-top-left-radius: var(--radius-md);
                    border-bottom-left-radius: var(--radius-md);
                    padding-left: 16px !important;
                }
                &:last-child {
                    border-top-right-radius: var(--radius-md);
                    border-bottom-right-radius: var(--radius-md);
                    padding-right: 16px !important;
                    text-align: right !important;
                }
            }
        }
    }
}

table.wc-tiered-pricing-table thead th {
    text-align: left;
    padding: 12px 16px;
    color: #fff;
    font-weight: 600;
    font-size: 0.85em;
    background: #475569;
    text-transform: uppercase;
    line-height: 180% !important;
}

table.wc-tiered-pricing-table thead th:first-child {
    border-top-left-radius: 8px;
    border-left: 1px solid #fff !important;
}

table.wc-tiered-pricing-table thead th:last-child {
    border-top-right-radius: 8px;
    border-right: 1px solid #fff !important;
}

table.wc-tiered-pricing-table tbody td {
    padding: 10px 16px;
    color: #76766F;
    background: #f8fafc;
    border: 1px solid #fff;
    transition: background-color 0.25s ease, border-color 0.25s ease, border-width 0.2s ease;
    line-height: 180% !important;
}

table.wc-tiered-pricing-table tbody tr.active-tier td {
    padding: 10px 16px;
    color: #252524;
    font-weight: 500;
}


table.wc-tiered-pricing-table tbody tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    border-left: 1px solid transparent !important;
}

table.wc-tiered-pricing-table tbody tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-right: 1px solid transparent !important;
}

/* Korting in groen */
table.wc-tiered-pricing-table .wc-tiered-discount {
    color: #00B87A !important;
    font-weight: 500 !important;
}

tr.wc-tiered-pricing-tr td {
    &:first-of-type {
        font-weight: 500;
        color: #252524;
    }
}

/* Actieve rij: witte achtergrond, rand alleen links en rechts */
tr.wc-tiered-pricing-tr.active-tier td {
    background-color: #fff;
    border: none;
    font-weight: 500;
    border-top: 2px solid #1a202c !important;
    border-bottom: 2px solid #1a202c !important;
    transition: background-color 0.25s ease, border-color 0.25s ease;
}
tr.wc-tiered-pricing-tr.active-tier td:first-child {
    border-left: 2px solid #1a202c !important;
}
tr.wc-tiered-pricing-tr.active-tier td:last-child {
    border-right: 2px solid #1a202c !important;
}

tr.wc-tiered-pricing-tr.active-tier td .wc-tiered-discount {
    color: #00B87A;
}

tr.wc-tiered-pricing-tr.active-tier td .wc-tiered-total {
    font-weight: 700;
}

/* Hover voor niet-actieve rijen (border via JS overlay, hier alleen achtergrond) */
tr.wc-tiered-pricing-tr:not(.active-tier):not(.wc-tiered-custom-row):hover td {
    background-color: #fff;
    cursor: pointer;
}

/* Zelf invoeren rij — verticaal centreren (overschrijf tbody line-height 180%) */
tr.wc-tiered-pricing-tr.wc-tiered-custom-row td {
    background: #f8fafc;
    vertical-align: middle !important;
    line-height: normal !important;
    padding-top: 14px !important;
    padding-bottom: 14px !important;
}

tr.wc-tiered-pricing-tr.wc-tiered-custom-row.active-tier td {
    line-height: normal !important;
    vertical-align: middle !important;
}

tr.wc-tiered-pricing-tr.wc-tiered-custom-row .wc-tiered-custom-qty {
    box-sizing: border-box;
    width: 100%;
    min-width: 110px;
    max-width: 120px;
    margin-left: -7px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    font-size: 0.95em;
    line-height: 1.3;
    vertical-align: middle;
}

/* Pijltjes verbergen: placeholder blijft volledig leesbaar; aantal typen kan nog steeds */
tr.wc-tiered-pricing-tr.wc-tiered-custom-row input.wc-tiered-custom-qty[type="number"]::-webkit-outer-spin-button,
tr.wc-tiered-pricing-tr.wc-tiered-custom-row input.wc-tiered-custom-qty[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

tr.wc-tiered-pricing-tr.wc-tiered-custom-row input.wc-tiered-custom-qty[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

tr.wc-tiered-pricing-tr.wc-tiered-custom-row .wc-tiered-custom-qty::placeholder {
    color: #94a3b8;
}

tr.wc-tiered-pricing-tr.wc-tiered-custom-row .wc-tiered-custom-qty:focus {
    outline: none;
    border-color: #252524;
}

tr.wc-tiered-pricing-tr.wc-tiered-custom-row.wc-tiered-custom-row--invalid td {
    border-top: none !important;
    border-bottom: none !important;
}

tr.wc-tiered-pricing-tr.wc-tiered-custom-row.wc-tiered-custom-row--invalid td:first-child,
tr.wc-tiered-pricing-tr.wc-tiered-custom-row.wc-tiered-custom-row--invalid td:last-child {
    border-left: none !important;
    border-right: none !important;
}

tr.wc-tiered-pricing-tr.wc-tiered-custom-row.wc-tiered-custom-row--invalid .wc-tiered-custom-qty {
    border-color: #dc2626;
    background: #fff;
    box-shadow: 0 0 0 1px #dc2626;
}
