/* Nuv Checkout Elementor v4.5.0 */

/* ── Tabela de pedido ─────────────────────────────────────────────────────── */
div#order_review { width:100% !important; float:none; }

table.shop_table.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: collapse;
}

/* Oculta o tfoot nativo — substituído pelo bloco nce-order-summary */
#order_review table.shop_table thead th:last-child,
#order_review table.shop_table tfoot,
#order_review table.shop_table tfoot tr,
#order_review table.shop_table tfoot td,
#order_review table.shop_table tfoot th {
    display: none !important;
    visibility: hidden !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* ── Bloco de Resumo ─────────────────────────────────────────────────────── */
.nce-order-summary {
    margin-top: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    overflow: hidden;
}

.nce-order-summary__row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid #f0f0f0;
    font-size: .95em;
}

.nce-order-summary__row:last-child {
    border-bottom: none;
}

.nce-order-summary__label {
    color: #555;
}

.nce-order-summary__value {
    font-weight: 500;
    text-align: right;
}

/* Linha de desconto (cupom) em verde */
.nce-order-summary__discount .nce-order-summary__label,
.nce-order-summary__discount .nce-order-summary__value {
    color: #2e7d32;
}

/* Linha total em destaque */
.nce-order-summary__total {
    background: #f8f8f8;
    border-top: 2px solid #ddd;
    padding: 14px 16px;
}

.nce-order-summary__total .nce-order-summary__label,
.nce-order-summary__total .nce-order-summary__value {
    font-weight: 700;
    font-size: 1.05em;
}

/* ── Campos billing ───────────────────────────────────────────────────────── */
.nce-billing input.input-text,
.nce-billing select,
.nce-billing textarea { width:100%; display:block; box-sizing:border-box; }
.woocommerce-billing-fields h3 { display:none; }

/* ── Cupom ────────────────────────────────────────────────────────────────── */
.nce-coupon__row { display:flex; gap:8px; align-items:center; }
.nce-coupon__field { flex:1; }
.nce-coupon__feedback { margin-top:8px; padding:8px 12px; border-radius:4px; font-size:.9em; }
.nce-coupon__feedback.nce-msg-ok  { background:#d4edda; color:#155724; }
.nce-coupon__feedback.nce-msg-err { background:#f8d7da; color:#721c24; }

/* ── Frete ────────────────────────────────────────────────────────────────── */
.nce-shipping__none,
.nce-shipping__loading { color:#888; font-style:italic; margin:0; }

/* ── Linha de frete oculta na tabela (gerenciada pelo widget Frete) ────────── */
#order_review tr.woocommerce-shipping-totals.nce-hidden td,
#order_review tr.woocommerce-shipping-totals.nce-hidden th {
    padding: 0 !important;
    line-height: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
    border: 0 !important;
}
#order_review tr.woocommerce-shipping-totals.nce-hidden {
    visibility: hidden;
}

/* ── Responsividade ──────────────────────────────────────────────────────── */
@media (max-width:768px) {
    .nce-billing .woocommerce-billing-fields__field-wrapper .form-row {
        width:100% !important; float:none !important; padding:0 !important;
    }
    .nce-coupon__row { flex-direction:column; }
    .nce-coupon__field, .nce-coupon__btn { width:100%; }
}

/* ── Foco ────────────────────────────────────────────────────────────────── */
.nce-billing input:focus,
.nce-billing select:focus,
.nce-coupon__field:focus {
    outline:2px solid var(--theme-palette-color-1, #4285f4);
    outline-offset:1px;
}

/* ── Reset de posicionamento (evita sticky do tema/Elementor) ──────────────── */
.elementor-widget-nce_order,
.elementor-widget-nce_order .elementor-widget-container,
.nce-order,
#nce-order-summary {
    position: static !important;
    top: auto !important;
    z-index: auto !important;
}
