/* WC Variations Table – wcvt.css */

.wcvt-wrap {
    margin: 1.5rem 0;
    font-family: inherit;
}

/* ── Table shell ── */
.wcvt-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    font-size: 14px;
}

/* ── Head ── */
.wcvt-table thead tr {
    background: #f7f7f7;
}
.wcvt-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: #444;
    border-bottom: 1px solid #e0e0e0;
    white-space: nowrap;
}
.wcvt-table th:not(:first-child) {
    text-align: center;
}

/* ── Body rows ── */
.wcvt-table tbody tr {
    border-bottom: 1px solid #ececec;
    transition: background 0.12s;
}
.wcvt-table tbody tr:last-child {
    border-bottom: none;
}
.wcvt-table tbody tr:hover {
    background: #fafafa;
}
.wcvt-table td {
    padding: 11px 16px;
    vertical-align: middle;
    color: #333;
}
.wcvt-table td:not(:first-child) {
    text-align: center;
}

/* ── Pack name ── */
.wcvt-pack {
    color: #0073aa;
    font-weight: 500;
}

/* ── Price ── */
.wcvt-price .woocommerce-Price-amount {
    font-weight: 600;
    color: #333;
}

/* ── Unit price ── */
.wcvt-unit {
    color: #666;
    font-size: 13px;
}

/* ── Out of stock row ── */
.wcvt-row.wcvt-oos {
    opacity: 0.55;
}
.wcvt-badge-oos {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 7px;
    background: #fde8e8;
    color: #b91c1c;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
}
.wcvt-oos-text {
    color: #999;
    font-size: 13px;
}

/* ── Quantity select ── */
.wcvt-qty {
    padding: 5px 8px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    min-width: 62px;
    color: #333;
}
.wcvt-qty:focus {
    outline: 2px solid #0073aa;
    outline-offset: 1px;
}
.wcvt-qty-na {
    color: #aaa;
}

/* ── Add to cart button ── */
.wcvt-atc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 8px 16px;
    /* colour set via inline style from PHP / JS */
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: filter 0.15s, transform 0.1s;
    white-space: nowrap;
}
.wcvt-atc-btn svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
}
.wcvt-atc-btn:hover {
    filter: brightness(1.1);
}
.wcvt-atc-btn:active {
    transform: scale(0.97);
}
.wcvt-atc-btn.wcvt-loading {
    opacity: 0.7;
    cursor: wait;
}
.wcvt-atc-btn.wcvt-done {
    filter: brightness(0.95);
}

/* ── Notice bar ── */
.wcvt-notice {
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
}
.wcvt-notice.wcvt-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}
.wcvt-notice.wcvt-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ── Responsive: hide unit column on mobile ── */
@media (max-width: 560px) {
    .wcvt-col-unit {
        display: none;
    }
    .wcvt-table th,
    .wcvt-table td {
        padding: 10px 10px;
        font-size: 13px;
    }
    .wcvt-atc-btn {
        padding: 8px 10px;
    }
    .wcvt-btn-text {
        display: none;
    }
}

/* ── Options button ── */
.wcvt-options-btn-wrap { margin-bottom: 12px; }
.wcvt-options-btn {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
}
.wcvt-options-btn:hover { background: #f5f5f5; }

/* ── Filter ── */
.wcvt-filter-wrap { margin-bottom: 10px; }
.wcvt-filter-input {
    width: 100%;
    max-width: 340px;
    padding: 7px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

/* ── Thumbnail column ── */
.wcvt-col-thumb { width: 56px; text-align: center !important; }
.wcvt-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: 4px; display: block; margin: 0 auto; }

/* ── SKU / Stock ── */
.wcvt-sku, .wcvt-stock { color: #555; font-size: 13px; }

/* ── Loader spin animation ── */
@keyframes wcvt-spin { to { transform: rotate(360deg); } }
.wcvt-icon-spin { animation: wcvt-spin 0.7s linear infinite; }

/* ── Hidden rows (filter) ── */
.wcvt-row-hidden { display: none; }
