[data-payment-chooser] {
    border: 0;
    margin: 0 0 1rem;
    padding: 0;
    min-width: 0;
    width: 100%;
}

[data-payment-chooser][data-payment-theme="dark"] legend { color: inherit; background: transparent; padding-left: 0; }
[data-payment-theme="dark"] .payment-choice { background: #151617; color: #f2f2ef; border-color: #424748; }
[data-payment-theme="dark"] .payment-choice.is-selected { border-color: var(--green, #70dfbd); box-shadow: 0 0 0 1px var(--green, #70dfbd); }
[data-payment-theme="dark"] .payment-choice-label input[type="radio"] { accent-color: var(--green, #70dfbd); }
#landingPaymentNotice { white-space: pre-line; overflow-wrap: anywhere; }
#step7 .successWebsiteRow, #step7 .successBackofficeRow, #step7 .successUsernameRow { overflow-wrap: anywhere; }
[data-payment-chooser] legend {
    float: none;
    width: auto;
    margin: 0 0 1rem;
    color: #17212b;
    background: #fff;
    border-radius: .35rem;
    padding: .15rem .35rem;
    font-size: 1.15rem;
    font-weight: 600;
}
.payment-choices {
    display: grid;
    gap: .75rem;
    width: 100%;
}
.payment-choice {
    min-width: 0;
    overflow: hidden;
    border: 1px solid #cbd5df;
    border-radius: .65rem;
    background: #fff;
    color: #17212b;
}
.payment-choice.is-selected {
    border-color: #29583e;
    box-shadow: 0 0 0 1px #29583e;
}
.payment-choice-label {
    display: flex !important;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-height: 3.5rem;
    margin: 0 !important;
    padding: 1rem;
    color: inherit !important;
    cursor: pointer;
    line-height: 1.4;
}
.payment-choice-label input[type="radio"] {
    position: static !important;
    flex: 0 0 1.15rem;
    width: 1.15rem;
    height: 1.15rem;
    margin: 0 !important;
    appearance: auto !important;
    opacity: 1 !important;
    accent-color: #29583e;
}
.payment-choice-title {
    overflow-wrap: anywhere;
    font-weight: 600;
}
.payment-choice:focus-within {
    outline: 2px solid #176ac4;
    outline-offset: 3px;
}
.payment-choice-panel {
    padding: 0 1rem 1rem;
    min-width: 0;
}
.payment-choice-panel > [data-payment-panel] {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}
.payment-choice-panel > [data-payment-panel="split"] {
    margin-bottom: 0;
    border: 0;
    box-shadow: none;
}
.payment-choice-panel [data-payment-panel-heading] { display: none; }
.payment-choice-panel [data-payment-panel="split"] > .row { margin: 0; }
.payment-choice-panel [data-payment-panel="split"] .form-input { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
.payment-choice-cards { margin-bottom: 1rem; width: 100%; }
.payment-choice-panel .alert { overflow-wrap: anywhere; }
.payment-choice-panel .card, .payment-choice-panel .card-body { background-color: #fff !important; color: #17212b !important; }
.payment-choice-panel .billing-address { min-height: 0 !important; }
.payment-choice-panel .card h5, .payment-choice-panel .card p { color: #17212b !important; }
.payment-choice-panel .card .text-muted { color: #52616c !important; }
.payment-choice-panel[hidden], .payment-choice[hidden], [data-payment-chooser] > p[hidden], [data-payment-select-fallback][hidden], #multiPaymentsRowTop[hidden] { display: none !important; }
@media (max-width: 575px) {
    table.checkout-order-summary, #autoshipCart table { width: 100%; table-layout: fixed; }
    table.checkout-order-summary th, table.checkout-order-summary td, #autoshipCart table th, #autoshipCart table td { padding: .5rem; font-size: .8125rem; white-space: normal; overflow-wrap: anywhere; }
    #autoshipCart table th[colspan] { width: auto !important; }
    table.checkout-order-summary thead th:first-child { width: 24% !important; }
    table.checkout-order-summary thead th:last-child { width: 96px; }
    table.checkout-order-summary td:last-child { text-align: right; }
    table.checkout-order-summary td:last-child:not([colspan]), #autoshipCart table td:last-child:not([colspan]) { white-space: nowrap; overflow-wrap: normal; }
    table.checkout-order-summary .retailChargeNote { display: block; white-space: normal; overflow-wrap: normal; }
    table.checkout-order-summary img, #autoshipCart table img { width: 3.5rem !important; max-width: 100%; height: auto; }
    table.checkout-order-summary h5, table.checkout-order-summary h5 a, #autoshipCart table h5 { font-size: .875rem !important; line-height: 1.4; }
    table.checkout-order-summary p, #autoshipCart table p { font-size: .8125rem; }
    .checkout-payment-accordion { padding-left: 0 !important; padding-right: 0 !important; }
    .checkout-payment-page { padding-left: 1rem !important; padding-right: 1rem !important; }
    .payment-choice-label { padding: .875rem; }
    .payment-choice-panel { padding: 0 .875rem .875rem; }
    .payment-choice-panel .card-body { padding: 1rem; }
    .payment-choice-panel [data-payment-panel="split"] .card-body { padding: .5rem 0 0; }
    .payment-choice-panel #checkout-multipaymentinfo-collapsee .col-6 { flex: 0 0 100%; max-width: 100%; }
}

/* Keep payment recovery readable across backoffice themes and below fixed headers. */
#checkoutPaymentRecovery, #checkoutChangedNotice { scroll-margin-top: 140px; color: #664d03 !important; background: #fff3cd !important; border-color: #ffecb5 !important; }
#checkoutPaymentRecovery .btn, #checkoutChangedNotice .btn { color: #212529 !important; background: #fff !important; border: 1px solid #212529 !important; }
#checkoutPaymentRecovery .btn:hover, #checkoutPaymentRecovery .btn:focus-visible, #checkoutChangedNotice .btn:hover, #checkoutChangedNotice .btn:focus-visible { color: #fff !important; background: #212529 !important; }
#checkoutChangedNotice .btn { min-height: 44px; white-space: normal; }
#checkoutChangedNotice .btn[hidden] { display: none !important; }

[data-checkout-apple-pay][hidden], [data-checkout-apple-pay] [hidden] { display: none !important; }
[data-checkout-apple-pay] { width: 100%; }
[data-checkout-apple-pay] iframe { width: 100%; height: 80px; min-height: 80px; border: 0; }
[data-checkout-apple-pay] [data-apple-notice] { overflow-wrap: anywhere; }
[data-checkout-apple-pay] button { white-space: normal; max-width: 100%; }

/* Keep wallet actions readable inside both light and dark backoffice themes. */
[data-checkout-apple-pay] [data-apple-prepare] { color: #fff !important; background: #17212b !important; border: 1px solid #17212b !important; }
[data-checkout-apple-pay] [data-apple-status] { color: #17212b !important; background: #fff !important; border: 1px solid #17212b !important; }
[data-checkout-apple-pay] [data-apple-status]:hover, [data-checkout-apple-pay] [data-apple-status]:focus-visible { color: #fff !important; background: #17212b !important; }

/* Reuse the retail layout's assurance-card placement without covering mobile payment fields. */
@media (max-width: 640px) {
    body.checkout-payment-active #widget-preview.ac-widget {
        margin: 24px auto;
        position: static;
        right: auto;
        top: auto;
        transform: none;
    }
}
[data-checkout-apple-pay] button:focus-visible { outline: 2px solid #176ac4; outline-offset: 3px; }
[data-checkout-apple-pay] [data-apple-signin] { height: auto !important; min-height: 44px; max-width: 100%; white-space: normal; line-height: 1.5; overflow-wrap: anywhere; overflow: visible; color: #17212b !important; background: #fff !important; border: 1px solid #17212b !important; text-decoration: underline; }
[data-checkout-apple-pay] [data-apple-signin]:focus-visible { outline: 2px solid #176ac4 !important; outline-offset: 3px; }

[data-checkout-apple-pay][data-surface="landing"] [data-apple-signin] { display: block; width: 100%; margin-top: 8px; padding: 8px 12px; text-align: center; box-sizing: border-box; border-radius: 6px; }

/* Contain the existing retail footer decoration on the saved-payment receipt. */
body.checkout-card-recovery-active .footer .container::before { right: 0; }
body.checkout-card-recovery-active .page-title-box { background: #fff; color: #212529; padding: .75rem 1rem; border-radius: .75rem; }
body.checkout-card-recovery-active .page-title-box h4 { color: #212529 !important; margin: 0; }
#checkoutPaymentRecovery p { color: inherit !important; }
