/* Advance Checkout CY 1.0.36 - payment methods */
#codFormModal .cyco-form-section-payment {
    margin-top: 12px;
}

#codFormModal .cyco-payment-methods-list {
    list-style: none;
    margin: 0;
    padding: 0;
    border-top: 1px solid #e5e7eb;
}

#codFormModal .cyco-payment-method-item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #e5e7eb;
}

#codFormModal .cyco-payment-method-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 0;
    margin: 0;
    cursor: pointer;
    color: #222;
    font-size: 14px;
    line-height: 1.35;
}

#codFormModal .cyco-payment-method-label input.input-radio {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    margin: 0 2px 0 0;
}

#codFormModal .cyco-payment-title {
    flex: 1 1 auto;
    min-width: 0;
}

#codFormModal .cyco-payment-icon {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    max-width: 42%;
}

#codFormModal .cyco-payment-icon img {
    display: block;
    max-height: 22px;
    max-width: 110px;
    width: auto;
    height: auto;
}

#codFormModal .cyco-payment-box {
    margin: 0 0 10px 22px;
    padding: 12px;
    background: #fff;
    border: 1px solid #eceff3;
    border-radius: 6px;
    font-size: 13px;
    line-height: 1.5;
}

#codFormModal .cyco-payment-description > :first-child {
    margin-top: 0;
}

#codFormModal .cyco-payment-description > :last-child {
    margin-bottom: 0;
}

#codFormModal .cyco-payment-redirect-note {
    margin-top: 6px;
    color: #59636f;
}

#codFormModal .cyco-gateway-payment-fields > :first-child {
    margin-top: 0;
}

#codFormModal .cyco-gateway-payment-fields > :last-child {
    margin-bottom: 0;
}

#codFormModal .cyco-payment-empty {
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #606770;
}

#codFormModal .cyco-payment-loading {
    opacity: .6;
    pointer-events: none;
}

#codFormModal .cyco-payment-method-item.cyco-payment-selected .cyco-payment-method-label {
    font-weight: 600;
}

#codFormModal .cyco-payment-fallback {
    display: inline-block;
    margin-top: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: underline;
}

@media (max-width: 480px) {
    #codFormModal .cyco-payment-method-label {
        font-size: 14px;
    }

    #codFormModal .cyco-payment-box {
        margin-left: 22px;
        padding: 10px;
    }

    #codFormModal .cyco-payment-icon {
        max-width: 35%;
    }
}

#codFormModal .cyco-payment-placeholder {
    padding: 12px;
    border: 1px solid #eceff3;
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.45;
}

#codFormModal .cyco-payment-container.is-invalid {
    border: 1px solid #d63638;
    border-radius: 6px;
    padding: 4px;
}


/* Keep Mercado Pago inside the same structural context used by WooCommerce.
 * The official provider CSS is scoped around #payment / checkout markup. */
#codFormModal #payment.cyco-native-payment-shell {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

#codFormModal #payment.cyco-native-payment-shell ul.wc_payment_methods {
    margin: 0;
    padding: 0;
}

#codFormModal #payment .payment_method_woo-mercado-pago-basic img,
#codFormModal #payment .payment_method_woo-mercado-pago-pse img {
    max-width: 100%;
}

/* Accepted-card logos are provider content, not the gateway icon. Do not let
 * the store/theme's generic img { width:100% } make them enormous. */
#codFormModal #payment .payment_method_woo-mercado-pago-basic img[src*="visa"],
#codFormModal #payment .payment_method_woo-mercado-pago-basic img[src*="master"],
#codFormModal #payment .payment_method_woo-mercado-pago-basic img[src*="american"],
#codFormModal #payment .payment_method_woo-mercado-pago-basic img[src*="diners"],
#codFormModal #payment .payment_method_woo-mercado-pago-basic img[src*="discover"] {
    width: auto !important;
    max-width: 58px !important;
    max-height: 34px !important;
    object-fit: contain;
}


/* 1.0.38: the modal is a gateway selector, not a provider checkout. */
.cyco-modal-payment-selector .cyco-payment-methods-list { margin: 0; padding: 0; list-style: none; }
.cyco-modal-payment-selector .cyco-payment-method-item { overflow: hidden; }
.cyco-modal-payment-selector .cyco-payment-method-label { display: flex; align-items: center; gap: 10px; width: 100%; }
.cyco-modal-payment-selector .cyco-payment-icon { margin-left: auto; display: inline-flex; align-items: center; max-width: 120px; max-height: 28px; overflow: hidden; }
.cyco-modal-payment-selector .cyco-payment-icon img { max-width: 100%; max-height: 28px; width: auto; height: auto; object-fit: contain; }
.cyco-modal-payment-selector .cyco-payment-box { padding: 10px 12px 12px; }
.cyco-modal-payment-selector .cyco-payment-online-note { display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.45; }
.cyco-modal-payment-selector .cyco-payment-local-note { font-size: 13px; line-height: 1.45; }


/* 1.0.39 — softer payment copy inside the modal */
#codFormModal .cyco-payment-box {
    margin: 0 0 9px 22px;
    padding: 7px 0 9px;
    background: transparent;
    border: 0;
    border-radius: 0;
    color: #667085;
    font-size: 12px;
    line-height: 1.4;
}
#codFormModal .cyco-payment-description { display: none; }
#codFormModal .cyco-payment-online-note,
#codFormModal .cyco-payment-local-note {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #667085;
    font-size: 12px;
    line-height: 1.35;
    padding: 2px 0;
}
#codFormModal .cyco-payment-note-icon {
    flex: 0 0 auto;
    width: 17px;
    height: 17px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f2f4f7;
    color: #667085;
    font-size: 10px;
}
#codFormModal .cyco-payment-online-note .cyco-payment-note-icon {
    color: #475467;
}
#codFormModal .cyco-payment-method-item.cyco-payment-selected .cyco-payment-box {
    border-top: 0;
}

/* 1.0.39 — the final total becomes visually confirmed once shipping is known. */
#codFormModal .subtotal-total {
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease;
}
#codFormModal .subtotal-total.cyco-total-ready {
    background: #effaf3 !important;
    border-color: #b7e4c7 !important;
    box-shadow: 0 2px 10px rgba(22, 101, 52, .06);
}
#codFormModal .subtotal-total.cyco-total-ready .total-amount,
#codFormModal .subtotal-total.cyco-total-ready .total-amount .woocommerce-Price-amount {
    color: #16834a !important;
}
#codFormModal .subtotal-total.cyco-total-ready .total .cyco-total-label::before {
    content: '✓';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 17px;
    height: 17px;
    margin-right: 5px;
    border-radius: 50%;
    background: #d9f4e2;
    color: #16834a;
    font-size: 10px;
    vertical-align: -2px;
}


/* 1.0.40 — trust note with gateway branding, without a white box */
#codFormModal .cyco-payment-online-note { width: 100%; box-sizing: border-box; }
#codFormModal .cyco-payment-note-copy { display:flex; flex-direction:column; gap:1px; flex:1 1 auto; min-width:0; }
#codFormModal .cyco-payment-note-copy strong { color:#475467; font-size:12px; font-weight:600; }
#codFormModal .cyco-payment-note-copy span { color:#98a2b3; font-size:11px; }
#codFormModal .cyco-payment-note-brand { margin-left:auto; display:inline-flex; align-items:center; justify-content:center; max-width:92px; max-height:22px; opacity:.82; }
#codFormModal .cyco-payment-note-brand img { max-width:92px !important; max-height:22px !important; width:auto !important; height:auto !important; object-fit:contain; }

/* 1.0.40 — confirmed payable total between shipping and payment */
#codFormModal .cyco-total-payable-card[hidden] { display:none !important; }
#codFormModal .cyco-total-payable-card { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px 0 12px; padding:13px 16px; border:1px solid #b7e4c7; border-radius:10px; background:#effaf3; box-shadow:0 2px 8px rgba(22,101,52,.05); }
#codFormModal .cyco-total-payable-label { color:#176b3a; font-size:13px; font-weight:700; }
#codFormModal .cyco-total-payable-value { color:#15803d; font-size:19px; font-weight:800; white-space:nowrap; }
@media (max-width:480px) { #codFormModal .cyco-payment-note-brand, #codFormModal .cyco-payment-note-brand img { max-width:76px !important; } #codFormModal .cyco-total-payable-card { padding:12px 13px; } #codFormModal .cyco-total-payable-value { font-size:17px; } }


/* Advance Checkout CY 1.0.41 — payment trust block and ready CTA */
#codFormModal .cyco-payment-online-note {
    width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    padding: 3px 0;
}
#codFormModal .cyco-payment-note-lock {
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f0fdf4;
    color: #15803d;
    font-size: 12px;
}
#codFormModal .cyco-payment-note-copy {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 1px;
}
#codFormModal .cyco-payment-note-copy strong {
    color: #344054;
    font-size: 12px;
    font-weight: 700;
}
#codFormModal .cyco-payment-note-copy span {
    color: #667085;
    font-size: 11px;
    line-height: 1.35;
}
#codFormModal .cyco-payment-note-brand {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: 110px;
    min-height: 26px;
    padding: 3px 7px;
    border: 1px solid #e4e7ec;
    border-radius: 7px;
    background: #fff;
    box-sizing: border-box;
}
#codFormModal .cyco-payment-note-brand img {
    display: block !important;
    width: auto !important;
    max-width: 96px !important;
    max-height: 22px !important;
    height: auto !important;
    object-fit: contain !important;
}
#codFormModal .cyco-payment-method-item.cyco-payment-selected .cyco-payment-note-brand {
    border-color: #d0d5dd;
}

/* The confirmed payable card must sit immediately before payment methods. */
#codFormModal .cyco-total-payable-card {
    position: relative;
    z-index: 2;
}
#codFormModal .cyco-total-payable-card.hidden,
#codFormModal .cyco-total-payable-card[hidden] { display: none !important; }

/* Advance Checkout CY 1.0.42 — clean provider branding inside the modal. */
#codFormModal .cyco-payment-online-note {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    width: 100%;
    min-height: 56px;
    margin: 2px 0 0;
    padding: 8px 12px;
    box-sizing: border-box;
    border: 1px solid #e4e7ec;
    border-radius: 10px;
    background: rgba(255,255,255,.72);
}
#codFormModal .cyco-payment-note-brand-image {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 142px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    opacity: 1;
}
#codFormModal .cyco-payment-note-brand-image img {
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: 142px !important;
    max-height: 36px !important;
    object-fit: contain !important;
}
#codFormModal .cyco-payment-note-copy {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
#codFormModal .cyco-payment-note-copy strong {
    color: #344054;
    font-size: 12px;
    line-height: 1.3;
    font-weight: 700;
}
#codFormModal .cyco-payment-note-copy span {
    color: #667085;
    font-size: 11px;
    line-height: 1.35;
}
#codFormModal .cyco-payment-method-item.cyco-payment-selected .cyco-payment-online-note {
    border-color: #cfd8e3;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
@media (max-width: 480px) {
    #codFormModal .cyco-payment-online-note { gap: 9px; padding: 7px 9px; }
    #codFormModal .cyco-payment-note-brand-image { width: 112px; height: 32px; }
    #codFormModal .cyco-payment-note-brand-image img { max-width: 112px !important; max-height: 32px !important; }
}


/* Advance Checkout CY 1.0.44 — payment choices read as three distinct options. */
#codFormModal .cyco-payment-methods-list{
    border-top:0!important;
}
#codFormModal .cyco-payment-method-item{
    margin:0 0 6px!important;
    padding:0 9px!important;
    border:1px solid #d9e2ec!important;
    border-radius:8px!important;
    background:rgba(255,255,255,.22)!important;
    box-sizing:border-box!important;
}
#codFormModal .cyco-payment-method-item:last-child{margin-bottom:0!important;}
#codFormModal .cyco-payment-method-label{padding:11px 0!important;}
#codFormModal .cyco-payment-method-item.cyco-payment-selected{background:rgba(255,255,255,.38)!important;}
#codFormModal .cyco-payment-box{
    margin:0 0 8px 22px!important;
    padding:8px 0 10px!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
}
/* Optional uploaded provider logo. If no logo is configured, only the two text lines remain. */
#codFormModal .cyco-payment-online-note{
    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:3px!important;
    min-height:0!important;
    width:100%!important;
    margin:0!important;
    padding:8px 8px!important;
    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    text-align:center!important;
}
#codFormModal .cyco-payment-note-brand-image{
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:auto!important;
    height:auto!important;
    min-height:0!important;
    max-width:180px!important;
    padding:0!important;
    margin:0 0 3px!important;
    border:0!important;
    background:transparent!important;
}
#codFormModal .cyco-payment-note-brand-image img{
    display:block!important;
    width:auto!important;
    height:auto!important;
    max-width:180px!important;
    max-height:38px!important;
    object-fit:contain!important;
}
#codFormModal .cyco-payment-note-copy{
    align-items:center!important;
    text-align:center!important;
}
#codFormModal .cyco-payment-note-copy strong{
    font-size:12px!important;
    line-height:1.3!important;
    color:#344054!important;
}
#codFormModal .cyco-payment-note-copy span{
    font-size:11px!important;
    line-height:1.3!important;
    color:#667085!important;
}
@media (max-width:600px){
    #codFormModal .cyco-payment-method-item{padding:0 8px!important;}
    #codFormModal .cyco-payment-note-brand-image img{max-width:160px!important;max-height:34px!important;}
}

/* Validation dialog for pending variable products. */
#codFormModal .cyco-variation-alert-overlay{
    position:absolute;
    inset:0;
    z-index:10020;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:20px;
    box-sizing:border-box;
    background:rgba(17,24,39,.38);
    backdrop-filter:blur(2px);
}
#codFormModal .cyco-variation-alert{
    width:min(360px,100%);
    padding:22px 20px 18px;
    border-radius:14px;
    background:#fff;
    box-shadow:0 18px 50px rgba(0,0,0,.22);
    text-align:center;
}
#codFormModal .cyco-variation-alert-icon{
    width:42px;height:42px;margin:0 auto 10px;border-radius:50%;
    display:flex;align-items:center;justify-content:center;
    background:#fff4d6;color:#b77900;font-size:21px;
}
#codFormModal .cyco-variation-alert h3{margin:0 0 7px;font-size:18px;line-height:1.25;color:#111827;}
#codFormModal .cyco-variation-alert p{margin:0 0 16px;font-size:13px;line-height:1.5;color:#667085;}
#codFormModal .cyco-variation-alert button{width:100%;border:0;border-radius:8px;padding:11px 14px;background:#1268d9;color:#fff;font-size:14px;font-weight:700;cursor:pointer;}
#codFormModal .cyco-variation-alert-close{position:absolute;top:10px;right:12px;width:30px;height:30px;border:0;background:transparent;color:#667085;font-size:22px;cursor:pointer;}
