/* assets/css/checkout-block.css */

/* Bloqueio do formulário de checkout quando há erros críticos */
body.woocommerce-checkout.nac-has-errors form.checkout {
    pointer-events: none;
    opacity: 0.5;
    filter: grayscale(1);
}

/* Estilização para o checkbox de termos customizados */
.nac-mandatory-term-container.nac-term-box {
    display: flex;
    align-items: center;
    margin: 15px 0;
    padding: 5px 10px;
    border: 1px solid #e0e0e0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    font-size: 15px !important;
    line-height: 1.6;
    color: #444;
    transition: all 0.3s ease;
}

.nac-term-box p, .nac-mandatory-term-container p {
    margin: 0px !important;
    padding: 0px !important;
}
.nac-mandatory-term-container.nac-term-box:hover {
    border-color: #235b1c;
    box-shadow: 0 4px 15px rgba(35, 91, 28, 0.08);
}

.nac-mandatory-term-container .woocommerce-form__label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    padding: 0;
    font-weight: 500;
}

.nac-mandatory-term-container input[type="checkbox"] {
    margin: 0 15px 0 0 !important;
    min-width: 20px !important;
    width: 20px !important;
    height: 20px !important;
    cursor: pointer;
    border: 2px solid #ddd !important;
    border-radius: 20px !important;
    transition: all 0.2s ease;
}

.nac-mandatory-term-container input[type="checkbox"]:checked {
    background-color: #235b1c !important;
    border-color: #235b1c !important;
}

/* Ajustes de fonte para avisos padrão do WooCommerce quando o plugin atua */
.woocommerce-info, .woocommerce-message, .woocommerce-error {
    font-size: 15px !important; /* Aumentado como solicitado para avisos */
}

/* Ajustes SweetAlert2 (Fontes reduzidas conforme solicitado) */
.nac-swal-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #e67e22 !important;
}

.nac-swal-html {
    font-size: 16px !important;
    line-height: 1.5 !important;
    color: #555 !important;
}

.swal2-confirm, .nac-swal-confirm-button {
    font-size: 16px !important;
    padding: 12px 30px !important;
    border-radius: 4px !important;
    background-color: #235b1c !important;
    border: none !important;
    color: #fff !important;
    box-shadow: none !important;
    font-weight: 600 !important;
}

/* Correção visual do Select2 no Admin (injecção via PHP mas replicado aqui por segurança) */
.select2-selection__choice__remove {
    border-right: 1px solid #ddd !important;
    padding: 0 8px !important;
    margin-right: 5px !important;
}

/* Tag de conflito no nome do produto no carrinho */
.nac-conflict-tag {
    display: block;
    color: #d32f2f;
    font-size: 11px;
    font-weight: bold;
    margin-top: 5px;
    background: #fffafa;
    padding: 4px 10px;
    border-radius: 4px;
    border: 1px solid #ffebeb;
    width: fit-content;
    line-height: 1.2;
}

/* Container de avisos - dentro da tabela entre subtotal e shipping */
.nac-warnings-row {
    border: none !important;
}

.nac-warnings-row td {
    border: none !important;
    padding: 0 !important;
}

.nac-warnings-box {
    margin: 15px 0;
    padding: 0;
    background: transparent;
}

.nac-warnings-box > .woocommerce-info > div {
    justify-items: start;
}

.nac-warnings-box > .woocommerce-info > div > div {
    font-weight: 500;
}

.nac-warnings-box > .woocommerce-info::before {
    display: none !important;
}

/* Cartões de frete no checkout, no mesmo formato da loja antiga. */
body.woocommerce-cart #order_review #shipping_method,
body.woocommerce-checkout #order_review #shipping_method {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px 0 16px !important;
    list-style: none !important;
}

body.woocommerce-cart #order_review #shipping_method li,
body.woocommerce-checkout #order_review #shipping_method li {
    position: relative;
    display: block !important;
    width: 100% !important;
    box-sizing: border-box;
    margin: 0 0 5px !important;
    padding: 0 !important;
    border: 1px solid #d9d9d9 !important;
    border-radius: 0 !important;
    background: #fff !important;
    text-align: left !important;
}

body.woocommerce-cart #order_review #shipping_method li label,
body.woocommerce-checkout #order_review #shipping_method li label {
    display: block !important;
    box-sizing: border-box;
    width: 100% !important;
    margin: 0 !important;
    padding: 15px 12px 15px 40px !important;
    color: #111 !important;
    font-size: 14px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    cursor: pointer;
}

body.woocommerce-cart #order_review #shipping_method li input[type="radio"],
body.woocommerce-checkout #order_review #shipping_method li input[type="radio"] {
    position: absolute !important;
    top: 19px !important;
    left: 21px !important;
    margin: 0 !important;
}

/* Destaque a opção de cadastro para clientes que ainda não entraram. */
body.woocommerce-cart form.checkout .woocommerce-account-fields .create-account label,
body.woocommerce-checkout form.checkout .woocommerce-account-fields .create-account label {
    font-weight: 700 !important;
}
