/* ============================================
   TrafficMasters — WooCommerce Block Cart
   Targets the React block cart (wc-block-cart)
   ============================================ */

/* --- Override WP font size presets used throughout block cart --- */
.wp-block-woocommerce-cart {
    --wp--preset--font-size--small: 15px;
    --wp--preset--font-size--medium: 18px;
    font-size: 15px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 80px;
    box-sizing: border-box;
}

/* Force all text inside the cart block to inherit a sane base size */
.wp-block-woocommerce-cart *,
.wc-block-cart *,
.wc-block-cart-items * {
    font-size: inherit;
}

/* --- Cart table --- */
table.wc-block-cart-items {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #e8edf5 !important;
    border-radius: 12px !important;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 41, 0.06);
    margin-bottom: 24px;
}

/* --- Table header --- */
table.wc-block-cart-items .wc-block-cart-items__header {
    background: #f5f8ff;
}

table.wc-block-cart-items .wc-block-cart-items__header th {
    padding: 12px 16px !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #6b7a99;
    border-bottom: 1px solid #e8edf5 !important;
    background: #f5f8ff;
}

/* --- Table rows --- */
.wc-block-cart__main .wc-block-cart-items td {
    border-top: 1px solid #f0f3f9 !important;
    padding: 20px 16px !important;
    vertical-align: top;
}

.wc-block-cart__main .wc-block-cart-items th:last-child,
.wc-block-cart__main .wc-block-cart-items td:last-child {
    padding-right: 20px !important;
}

/* Row hover */
table.wc-block-cart-items .wc-block-cart-items__row:hover td {
    background: #fafbff;
}

/* Remove default bottom border on table */
.wc-block-cart__main .wc-block-cart-items {
    border-bottom: none !important;
}

/* --- Product name --- */
.wc-block-cart-items__row .wc-block-components-product-name {
    font-weight: 600;
    font-size: 16px !important;
    color: #0f1729;
    text-decoration: none;
    line-height: 1.4 !important;
}

.wc-block-cart-items__row .wc-block-components-product-name:hover {
    color: #2563eb;
}

/* --- Product meta details (Traffic Type, Website, etc.) --- */
.wc-block-components-product-details,
ul.wc-block-components-product-details {
    margin: 8px 0 0 !important;
}

.wc-block-components-product-details li,
ul.wc-block-components-product-details li,
.wc-block-cart-items .wc-block-components-product-details li,
table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-details li {
    font-size: 14px !important;
    color: #6b7a99 !important;
    line-height: 1.7 !important;
    margin-left: 0 !important;
}

.wc-block-components-product-details__name {
    font-weight: 600 !important;
    color: #4a5568;
}

.wc-block-components-product-details__value {
    color: #6b7a99;
}

/* --- Product metadata --- */
.wc-block-components-product-metadata,
.wc-block-cart-items .wc-block-components-product-metadata,
table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-metadata {
    font-size: 14px !important;
    color: #6b7a99 !important;
    margin-top: 6px !important;
}

/* --- Quantity selector --- */
.wc-block-components-quantity-selector {
    border: 1px solid #d1d9ec !important;
    border-radius: 8px !important;
    width: 100px !important;
    background: #f9fafc;
    margin-top: 8px;
}

.wc-block-components-quantity-selector:focus-within {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
    background: #fff;
}

.wc-block-components-quantity-selector__input {
    font-size: 15px !important;
    font-weight: 500;
    color: #0f1729 !important;
}

.wc-block-components-quantity-selector__button {
    color: #6b7a99 !important;
    opacity: 1 !important;
    font-size: 1rem !important;
    transition: color 0.15s;
}

.wc-block-components-quantity-selector__button:hover {
    color: #2563eb !important;
    opacity: 1 !important;
}

/* --- Remove link --- */
.wc-block-cart-item__remove-link {
    font-size: 0.8rem !important;
    color: #8a96b0 !important;
    text-decoration: none !important;
    display: inline-block;
    margin-top: 6px;
    padding: 3px 8px;
    border-radius: 20px;
    background: #f0f3f9;
    transition: background 0.2s, color 0.2s;
}

.wc-block-cart-item__remove-link:hover {
    background: #ffe8e8 !important;
    color: #e53935 !important;
    text-decoration: none !important;
}

/* --- Item price / total --- */
.wc-block-cart-items__row .wc-block-cart-item__total {
    font-weight: 600;
    color: #0f1729;
    font-size: 15px;
}

.wc-block-cart-items__row .wc-block-cart-item__prices {
    font-size: 14px !important;
    color: #6b7a99;
}

/* Sale badge */
.wc-block-components-product-sale-badge {
    background: #eef4ff !important;
    color: #2563eb !important;
    border-color: #c7d9ff !important;
    font-size: 0.75rem !important;
    border-radius: 20px !important;
    padding: 3px 10px !important;
}

/* ============================================
   Order Summary / Totals Sidebar
   ============================================ */

/* Sidebar card */
.wc-block-cart .wc-block-components-sidebar {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 4px rgba(15, 23, 41, 0.06);
    box-sizing: border-box;
}

/* Sidebar title */
.wc-block-cart .wc-block-cart__totals-title {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.08em;
    text-transform: uppercase !important;
    color: #6b7a99 !important;
    padding: 0 0 14px !important;
    border-bottom: 1px solid #f0f3f9;
    margin-bottom: 4px;
}

/* Order summary inner padding */
.wc-block-cart .wp-block-woocommerce-cart-order-summary-block .wc-block-components-totals-item,
.wc-block-cart .wp-block-woocommerce-cart-order-summary-block .wc-block-components-panel,
.wc-block-cart .wp-block-woocommerce-cart-order-summary-block .wc-block-components-totals-coupon {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Totals rows */
.wc-block-components-totals-item {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.wc-block-components-totals-item__label {
    font-size: 15px;
    color: #6b7a99;
    font-weight: 400;
}

.wc-block-components-totals-item__value {
    font-size: 15px;
    font-weight: 600;
    color: #0f1729;
}

/* Footer total row */
.wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0f1729 !important;
}

/* Divider above total */
.wp-block-woocommerce-cart-order-summary-totals-block {
    border-top: 1px solid #e8edf5 !important;
    padding-top: 4px;
}

/* --- Coupon panel --- */
.wc-block-components-panel__button {
    font-size: 14px !important;
    color: #6b7a99 !important;
    font-weight: 500;
    padding-top: 12px !important;
}

.wc-block-components-panel__button:hover {
    color: #2563eb !important;
}

.wc-block-components-totals-coupon__input .wc-block-components-text-input input,
.wc-block-components-totals-coupon__input input {
    border: 1px solid #d1d9ec !important;
    border-radius: 8px !important;
    background: #f9fafc !important;
    font-size: 14px;
    color: #0f1729;
    padding: 9px 14px !important;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wc-block-components-totals-coupon__input .wc-block-components-text-input input:focus,
.wc-block-components-totals-coupon__input input:focus {
    border-color: #2563eb !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12) !important;
    background: #fff !important;
    outline: none;
}

.wc-block-components-totals-coupon__button {
    border-radius: 8px !important;
    border: 1px solid #d1d9ec !important;
    background: #fff !important;
    color: #4a5568 !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    transition: all 0.2s !important;
}

.wc-block-components-totals-coupon__button:hover {
    border-color: #2563eb !important;
    color: #2563eb !important;
    background: #f5f8ff !important;
}

/* --- Proceed to Checkout button --- */
.wc-block-cart__submit-button {
    background: #2563eb !important;
    color: #fff !important;
    border-radius: 10px !important;
    border: none !important;
    font-weight: 700 !important;
    font-size: 16px !important;
    padding: 14px 24px !important;
    width: 100% !important;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3) !important;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s !important;
    min-height: 0 !important;
}

.wc-block-cart__submit-button:hover:not(:disabled) {
    background: #1d4ed8 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38) !important;
}

.wc-block-cart__submit-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25) !important;
}

/* --- Express payment "or" divider --- */
.wc-block-components-express-payment-continue-rule--cart {
    color: #a0aec0;
    font-size: 0.75rem !important;
}

/* --- Discount value colour --- */
.wc-block-components-totals-discount .wc-block-components-totals-item__value {
    color: #16a34a !important;
}

/* --- Notices --- */
.wc-block-components-notice-banner.is-info,
.wc-block-components-notice-banner.is-success {
    background: #eef4ff;
    color: #1e40af;
    border-left: 4px solid #2563eb;
    border-radius: 10px;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.wc-block-components-notice-banner.is-error {
    background: #fff5f5;
    color: #c53030;
    border-left: 4px solid #e53935;
    border-radius: 10px;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

/* --- Empty cart --- */
.wc-block-cart__empty-cart__title {
    color: #6b7a99;
    font-size: 1.1rem !important;
    font-weight: 500;
}

/* ============================================
   Responsive
   ============================================ */
@container (max-width: 699px) {
    .wc-block-cart .wc-block-components-sidebar {
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 24px;
    }
}
