/* ----------------------------------------------------------------
 * Quote Cart — storefront.
 *
 * Enqueued by QuoteCart::enqueue_assets on product pages and My Account.
 * Moved out of thv_bundle.css, which only loads in wp-admin. The --thv-*
 * colour variables are admin-palette variables and are not defined on the
 * shop, so every colour falls back to the theme's own text colour.
 * ---------------------------------------------------------------- */

.thv-add-to-quote-btn {
    margin-left: 10px;
}

#thv-quote-cart-wrap .thv-hidden {
    display: none !important;
}
.thv-quote-cart-items {
    border: 1px solid var(--thv-border-light, color-mix(in srgb, currentColor 20%, transparent));
    margin-bottom: 16px;
    overflow-x: auto;
}
.thv-quote-cart-row {
    display: grid;
    grid-template-columns: 2fr 1fr 0.9fr 0.7fr 0.9fr 0.8fr;
    align-items: center;
    padding: 8px 10px;
    border-bottom: 1px solid var(--thv-border-faint, color-mix(in srgb, currentColor 10%, transparent));
    gap: 8px;
    min-width: min-content;
}
.thv-quote-cart-row:nth-child(even) {
    background: var(--thv-bg-alt, color-mix(in srgb, currentColor 4%, transparent));
}
.thv-quote-cart-row:last-child {
    border-bottom: none;
}
.thv-quote-cart-qty input {
    width: 60px;
}
.thv-quote-cart-total {
    text-align: right;
    font-size: 1.1em;
    padding: 10px 0;
}
.thv-quote-cart-notes {
    margin: 16px 0;
}
.thv-quote-cart-notes textarea {
    width: 100%;
    max-width: 37.5rem;
}
.thv-quote-cart-actions {
    margin-top: 12px;
}

/* Card-stack on phones. The 6-column row becomes a labelled card; labels come
   from each cell's data-label (QuoteCart::render_quote_cart_page). */
@media (max-width: 48rem) {
    .thv-quote-cart-row {
        display: block;
        padding: 12px 10px;
    }
    .thv-quote-cart-row > div { padding: 3px 0; }
    .thv-quote-cart-name { font-weight: var(--thv-weight-strong, 600); font-size: 1.05em; margin-bottom: 4px; }
    .thv-quote-cart-sku[data-label]::before,
    .thv-quote-cart-price[data-label]::before,
    .thv-quote-cart-qty[data-label]::before,
    .thv-quote-cart-line[data-label]::before {
        content: attr(data-label) ': ';
        font-weight: var(--thv-weight-strong, 600);
        color: var(--thv-text-label, inherit);
        margin-right: 6px;
    }
    .thv-quote-cart-qty { display: flex; align-items: center; }
    .thv-quote-cart-qty input { width: 80px; }
    .thv-quote-cart-remove { margin-top: 6px; }
    .thv-quote-cart-remove .button { width: 100%; }
}
