/**
 * Checkout / cart (Blocks) — must load AFTER wc-blocks-packages-style & wc-blocks-style
 * so these rules override WooCommerce’s floating-label CSS.
 */

/* Block notices (country errors, etc.) — match theme .woocommerce-error / .woocommerce-message */
body.woocommerce-checkout .wc-block-components-notice-banner.is-error,
body.woocommerce-cart .wc-block-components-notice-banner.is-error {
    background: #fff6df !important;
    color: #000 !important;
    border: 1px solid #e64e01 !important;
    border-radius: 5px !important;
    padding: 12px 16px !important;
    margin: 0 0 24px !important;
    font-size: 14px;
    font-weight: 500;
}

body.woocommerce-checkout .wc-block-components-notice-banner:not(.is-error),
body.woocommerce-cart .wc-block-components-notice-banner:not(.is-error) {
    background: #ecf8f0 !important;
    color: #0d1f14 !important;
    border: 1px solid #2f8f54 !important;
    border-radius: 5px !important;
    padding: 12px 16px !important;
    margin: 0 0 24px !important;
    font-size: 14px;
}

/* ── Text inputs: kill floating labels, label above field ── */
body.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input,
body.woocommerce-checkout .wc-block-checkout .wc-block-components-text-input,
body.woocommerce-cart .wc-block-components-form .wc-block-components-text-input {
    line-height: 1.45 !important;
    white-space: normal !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    padding-bottom: 18px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

body.woocommerce-checkout .wc-block-components-text-input > .wc-block-components-text-input__wrapper,
body.woocommerce-cart .wc-block-components-text-input > .wc-block-components-text-input__wrapper {
    order: 2 !important;
    width: 100% !important;
}

body.woocommerce-checkout .wc-block-components-text-input > label,
body.woocommerce-cart .wc-block-components-text-input > label {
    order: 1 !important;
}

body.woocommerce-checkout .wc-block-components-text-input > .wc-block-components-validation-error,
body.woocommerce-cart .wc-block-components-text-input > .wc-block-components-validation-error {
    order: 3 !important;
    width: 100% !important;
}

body.woocommerce-checkout .wc-block-components-text-input .wc-block-components-text-input__wrapper,
body.woocommerce-cart .wc-block-components-text-input .wc-block-components-text-input__wrapper {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

body.woocommerce-checkout .wc-block-components-text-input .wc-block-components-text-input__wrapper > label,
body.woocommerce-cart .wc-block-components-text-input .wc-block-components-text-input__wrapper > label {
    order: 1 !important;
}

body.woocommerce-checkout .wc-block-components-text-input .wc-block-components-text-input__wrapper > :is(input, textarea),
body.woocommerce-cart .wc-block-components-text-input .wc-block-components-text-input__wrapper > :is(input, textarea) {
    order: 2 !important;
}

body.woocommerce-checkout .wc-block-components-text-input .wc-block-components-text-input__wrapper > .wc-block-components-validation-error,
body.woocommerce-cart .wc-block-components-text-input .wc-block-components-text-input__wrapper > .wc-block-components-validation-error {
    order: 3 !important;
}

body.woocommerce-checkout .wc-block-components-form .wc-block-components-text-input label,
body.woocommerce-checkout .wc-block-checkout .wc-block-components-text-input label,
body.woocommerce-cart .wc-block-components-text-input label {
    position: static !important;
    display: block !important;
    transform: none !important;
    inset: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    margin: 0 0 8px !important;
    max-width: none !important;
    line-height: 1.35 !important;
    cursor: default !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #d4d4d4 !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

body.woocommerce-checkout .wc-block-components-text-input.is-active label,
body.woocommerce-checkout .wc-block-components-text-input.has-error label,
body.woocommerce-cart .wc-block-components-text-input.is-active label,
body.woocommerce-cart .wc-block-components-text-input.has-error label {
    position: static !important;
    transform: none !important;
    font-size: 14px !important;
    color: #d4d4d4 !important;
}

body.woocommerce-checkout .wc-block-components-text-input :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="password"]),
body.woocommerce-cart .wc-block-components-text-input :is(input[type="text"], input[type="email"], input[type="tel"], input[type="url"], input[type="number"], input[type="password"]) {
    padding: 12px 16px !important;
    min-height: 48px;
}

body.woocommerce-checkout .wc-block-components-text-input textarea,
body.woocommerce-cart .wc-block-components-text-input textarea {
    padding: 12px 16px !important;
    min-height: 100px;
    line-height: 1.45 !important;
    white-space: normal !important;
}

/* ── Selects (Country, etc.): label above, not inside ── */
body.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__container,
body.woocommerce-cart .wc-blocks-components-select .wc-blocks-components-select__container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    line-height: 1.45 !important;
}

body.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__label,
body.woocommerce-cart .wc-blocks-components-select .wc-blocks-components-select__label {
    position: static !important;
    transform: none !important;
    order: 1 !important;
    margin: 0 0 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #d4d4d4 !important;
    max-width: none !important;
}

body.woocommerce-checkout .wc-blocks-components-select .wc-blocks-components-select__select,
body.woocommerce-cart .wc-blocks-components-select .wc-blocks-components-select__select {
    order: 2 !important;
}

body.woocommerce-checkout .wc-blocks-components-select,
body.woocommerce-cart .wc-blocks-components-select {
    margin-top: 0 !important;
    margin-bottom: 18px !important;
}

/* Step panels */
body.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step {
    padding: 20px 24px !important;
    border: 1px solid #2a2a2a !important;
    border-radius: 12px !important;
    background: rgba(14, 14, 14, 0.55) !important;
    margin-bottom: 24px !important;
}

body.woocommerce-checkout .wc-block-checkout__main .wc-block-components-checkout-step .wc-block-components-checkout-step__heading {
    margin-bottom: 16px !important;
}

/*
 * Classic shortcode checkout — match My Account / cart: gradient card panels,
 * .default-input fields (via PHP filter), order tables like order-details / orders list.
 */

/* Row 2: address column + aside (order notes & payment) — order summary is full width above */
@media (min-width: 1024px) {
    body.woocommerce-checkout .amalgam-checkout-layout__aside {
        position: sticky;
        top: 1.25rem;
        align-self: start;
    }
}

body.woocommerce-checkout form.checkout.amalgam-checkout .amalgam-checkout-layout__aside .woocommerce-additional-fields {
    margin-bottom: 0;
}

/* Checkout error notices + per-field validation (classic form) */
body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-NoticeGroup-checkout {
    padding-top: 8px;
    margin-bottom: 16px;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-NoticeGroup-checkout ul.woocommerce-error {
    list-style: none;
    margin: 0;
    padding: 12px 16px !important;
    background: rgba(185, 28, 28, 0.25) !important;
    color: #fecaca !important;
    border: 1px solid #ef4444 !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: left !important;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-NoticeGroup-checkout ul.woocommerce-error li {
    color: inherit !important;
    margin: 0 0 8px;
    padding: 0;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-NoticeGroup-checkout ul.woocommerce-error li:last-child {
    margin-bottom: 0;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-NoticeGroup-checkout ul.woocommerce-error a {
    color: #fecaca !important;
    text-decoration: underline;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-NoticeGroup-checkout > .woocommerce-error:not(ul) {
    padding: 12px 16px !important;
    background: rgba(185, 28, 28, 0.25) !important;
    color: #fecaca !important;
    border: 1px solid #ef4444 !important;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: left !important;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .checkout-inline-error-message {
    color: #f87171;
    font-size: 13px;
    font-weight: 500;
    padding-top: 8px;
    margin: 0;
    line-height: 1.45;
}

/* Cortex Cloud User ID holding an email address — flagged live while typing. */
body.woocommerce-checkout form.checkout.amalgam-checkout .form-row.amalgam-cortex-cloud-invalid input.input-text {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 1px #ef4444;
}

/* Coupon — same gradient panel as billing / additional fields (checkout + cart sidebar) */
body.woocommerce-checkout form.checkout.amalgam-checkout .amalgam-checkout-coupon,
body.woocommerce-cart .amalgam-checkout-coupon {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 28px;
    background:
        linear-gradient(#0e0e0e, #0e0e0e) padding-box,
        linear-gradient(90deg, #3f3f3f 0%, #ea5924 100%) border-box;
    color: #fff;
    margin-bottom: 0;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .amalgam-checkout-coupon-heading,
body.woocommerce-cart .amalgam-checkout-coupon-heading {
    margin: 0 0 16px;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .amalgam-checkout-coupon-form .form-row,
body.woocommerce-cart .amalgam-checkout-coupon-form .form-row {
    margin-bottom: 12px;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .amalgam-checkout-coupon-form .form-row:last-child,
body.woocommerce-cart .amalgam-checkout-coupon-form .form-row:last-child {
    margin-bottom: 0;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .amalgam-checkout-coupon-submit .button.button-primary,
body.woocommerce-cart .amalgam-checkout-coupon-submit .button.button-primary {
    min-width: 0;
    width: 100%;
    margin: 0;
    padding: 12px 20px;
    font-size: 16px;
    text-transform: uppercase;
    font-weight: 500;
    border-radius: 5px;
    border: none;
    background: var(--orange, #ea5924);
    color: #000;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .amalgam-checkout-coupon-submit .button.button-primary:hover,
body.woocommerce-cart .amalgam-checkout-coupon-submit .button.button-primary:hover {
    box-shadow: 2px 1px 15.5px -2px #ea5924, 0 1px 1.5px 0 rgba(0, 0, 0, 0.25);
}

body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-billing-fields,
body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-shipping-fields,
body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-additional-fields,
body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-account-fields {
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 28px;
    background:
        linear-gradient(#0e0e0e, #0e0e0e) padding-box,
        linear-gradient(90deg, #3f3f3f 0%, #ea5924 100%) border-box;
    color: #fff;
    margin-bottom: 24px;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-billing-fields .amalgam-checkout-section + .amalgam-checkout-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #2a2a2a;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .amalgam-checkout-section__title,
body.woocommerce-cart .amalgam-checkout-section__title {
    margin: 0 0 16px;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--orange, #ea5924);
}

body.woocommerce-checkout form.checkout.amalgam-checkout .form-row label {
    position: static !important;
    display: block;
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: #e5e5e5;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .form-row .woocommerce-input-wrapper {
    display: block;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .form-row {
    margin-bottom: 16px;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .amalgam-checkout-field-stack .form-row:last-child {
    margin-bottom: 0;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .form-row-first,
body.woocommerce-checkout form.checkout.amalgam-checkout .form-row-last {
    display: inline-block;
    width: calc(50% - 8px);
    vertical-align: top;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .form-row-first {
    margin-right: 16px;
}

@media (max-width: 639px) {
    body.woocommerce-checkout form.checkout.amalgam-checkout .form-row-first,
    body.woocommerce-checkout form.checkout.amalgam-checkout .form-row-last {
        display: block;
        width: 100%;
        margin-right: 0;
    }
}

/* Ship to different address — match section tone */
body.woocommerce-checkout form.checkout.amalgam-checkout #ship-to-different-address {
    margin: 0 0 16px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
}

body.woocommerce-checkout form.checkout.amalgam-checkout #ship-to-different-address label {
    cursor: pointer;
}

body.woocommerce-checkout form.checkout.amalgam-checkout .shipping_address {
    padding-top: 4px;
}

/* Additional information heading (when shown) */
body.woocommerce-checkout form.checkout.amalgam-checkout .woocommerce-additional-fields > h3 {
    margin: 0 0 16px;
    text-transform: uppercase;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
    color: var(--orange, #ea5924);
}

/* Your order — same bar + panel as .order-section-title + .woocommerce-table--order-details */
body.woocommerce-checkout #order_review_heading.amalgam-checkout-order-heading {
    text-transform: uppercase;
    font-weight: 700;
    color: var(--orange, #ea5924);
    font-size: 13px;
    letter-spacing: 0.5px;
    margin: 0;
    padding: 16px 18px;
    background: #161616;
    border-radius: 12px 12px 0 0;
    border-bottom: 2px solid var(--orange, #ea5924);
}

/* Order summary (table only — top of form) */
body.woocommerce-checkout .amalgam-checkout-order-review--summary {
    background: #171717;
    border-radius: 0 0 12px 12px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

/* Payment + place order (bottom) */
body.woocommerce-checkout #order_review.amalgam-checkout-order-review--payment {
    background: #171717;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 0;
    font-size: 15px;
    color: #fff;
    background: transparent;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th {
    text-transform: uppercase;
    font-weight: 700;
    background: #161616;
    color: var(--orange, #ea5924);
    font-size: 13px;
    letter-spacing: 0.5px;
    padding: 16px 18px;
    border-bottom: 2px solid var(--orange, #ea5924);
    text-align: left;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th.product-total {
    text-align: right;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody td,
body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody th {
    padding: 16px 18px;
    border-bottom: 1px solid #232323;
    vertical-align: top;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody .product-total {
    text-align: right;
    white-space: nowrap;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot th,
body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot td {
    padding: 12px 18px;
    border-bottom: 1px solid #232323;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot th {
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: #aaa;
    text-align: left;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot td {
    text-align: right;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot tr:last-child th,
body.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot tr:last-child td {
    border-bottom: none;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total th,
body.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.order-total td {
    color: var(--orange, #ea5924);
    font-weight: 700;
    font-size: 17px;
    padding-top: 16px;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table tr.cart-discount td {
    color: #4ade80;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table a {
    color: var(--orange, #ea5924);
    text-decoration: none;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table a:hover {
    text-decoration: underline;
}

/* Capture version under line items — muted, inline (not title-sized) */
body.woocommerce-checkout table.woocommerce-checkout-review-order-table .product-name dl.variation {
    margin: 6px 0 0 !important;
    padding: 0 !important;
    border: 0 !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    letter-spacing: 0.02em;
    line-height: 1.35 !important;
    color: rgba(255, 255, 255, 0.42) !important;
    text-transform: none !important;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table .product-name dl.variation dt,
body.woocommerce-checkout table.woocommerce-checkout-review-order-table .product-name dl.variation dd {
    display: inline !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: none !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    line-height: inherit !important;
    color: inherit !important;
    text-transform: none !important;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table .product-name dl.variation dd {
    color: rgba(255, 255, 255, 0.55) !important;
}

body.woocommerce-checkout table.woocommerce-checkout-review-order-table .product-name dl.variation dd p {
    display: inline !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: inherit !important;
    font-weight: inherit !important;
    color: inherit !important;
}

/* Payment */
body.woocommerce-checkout #order_review #payment {
    background: transparent;
    border-top: none;
    padding: 20px 18px 8px;
}

body.woocommerce-checkout #payment ul.payment_methods {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

body.woocommerce-checkout #payment ul.payment_methods li {
    margin: 0 0 12px;
    padding: 14px 16px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

/*
 * With a single gateway the row naming it is pure duplication: the title
 * repeats the panel it already sits in, and the card-brand strip repeats the
 * method icons Stripe draws on its own accordion rows a few pixels below.
 *
 * Removing it leaves the <li> with nothing to hold but its own border — and
 * that border is the outermost of the boxes stacked around the card fields.
 * So it goes too, and Stripe's accordion rows become the first ring instead of
 * the third. Everything from .payment_box inward is already transparent.
 *
 * Scoped to :only-child deliberately. Enable a second gateway and the label is
 * the only thing telling the rows apart, so both the label and the card around
 * it come straight back with no edit here.
 */
body.woocommerce-checkout #payment ul.payment_methods li:only-child > label {
    display: none;
}

body.woocommerce-checkout #payment ul.payment_methods li:only-child {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

body.woocommerce-checkout #payment ul.payment_methods label {
    cursor: pointer;
    color: #fff;
    font-weight: 500;
}

/* Checkout checkboxes + payment radios — brand orange (not browser blue) */
body.woocommerce-checkout form.checkout input[type="checkbox"],
body.woocommerce-checkout #payment input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    margin: 0 8px 0 0;
    border: 1px solid var(--orange, #ea5924);
    background: transparent;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

body.woocommerce-checkout form.checkout input[type="checkbox"] {
    border-radius: 3px;
}

body.woocommerce-checkout #payment input[type="radio"] {
    border-radius: 50%;
}

body.woocommerce-checkout form.checkout input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 4px;
    height: 9px;
    border: solid var(--orange, #ea5924);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

body.woocommerce-checkout #payment input[type="radio"]:checked::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--orange, #ea5924);
    transform: translate(-50%, -50%);
}

body.woocommerce-checkout form.checkout input[type="checkbox"]:focus-visible,
body.woocommerce-checkout #payment input[type="radio"]:focus-visible {
    outline: 2px solid var(--orange, #ea5924);
    outline-offset: 2px;
}

/*
 * The gateway's <li> above already draws the card that groups this, and Stripe
 * draws its own field container inside it. A third border here just nests boxes
 * three deep, so this is a padded region, not a panel of its own.
 */
body.woocommerce-checkout #payment div.payment_box {
    background: transparent !important;
    border: none !important;
    color: #ddd !important;
    margin-top: 12px;
    padding: 12px 0 2px !important;
}

body.woocommerce-checkout #payment div.payment_box::before {
    display: none;
}

body.woocommerce-checkout #payment .place-order {
    margin: 0;
    padding: 8px 0 20px;
}

body.woocommerce-checkout #payment #place_order {
    width: 100%;
    min-width: 0;
    margin: 0;
    padding: 14px 20px;
    font-weight: 500;
    font-size: 16px;
    text-transform: uppercase;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    background: var(--orange, #ea5924);
    color: #000;
    transition: box-shadow 0.3s ease;
}

body.woocommerce-checkout #payment #place_order:hover {
    box-shadow: 2px 1px 15.5px -2px #ea5924, 0 1px 1.5px 0 rgba(0, 0, 0, 0.25);
}

body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper,
body.woocommerce-checkout .woocommerce-privacy-policy-text {
    font-size: 14px;
    color: #bbb;
    margin-bottom: 16px;
}

body.woocommerce-checkout .woocommerce-terms-and-conditions-wrapper a,
body.woocommerce-checkout .woocommerce-privacy-policy-text a {
    color: var(--orange, #ea5924);
}

/* Digital withdrawal consent — match payment method rows + site checkbox control */
body.woocommerce-checkout .amalgam-digital-withdrawal-consent {
    margin: 0 0 16px;
    padding: 14px 16px;
    background: #141414;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
}

body.woocommerce-checkout form.checkout .amalgam-digital-withdrawal-consent label.woocommerce-form__label-for-checkbox.checkbox {
    display: block !important;
    margin: 0;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: #ddd;
}

body.woocommerce-checkout form.checkout .amalgam-digital-withdrawal-consent .input-checkbox {
    appearance: none;
    -webkit-appearance: none;
    display: inline;
    float: left;
    width: 18px;
    height: 18px;
    margin: 2px 8px 0 0 !important;
    border: 1px solid var(--orange, #ea5924);
    border-radius: 3px;
    background: transparent;
    cursor: pointer;
    position: relative;
    vertical-align: middle;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

body.woocommerce-checkout .amalgam-digital-withdrawal-consent .input-checkbox:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 3px;
    width: 4px;
    height: 9px;
    border: solid var(--orange, #ea5924);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

body.woocommerce-checkout .amalgam-digital-withdrawal-consent .input-checkbox:focus-visible {
    outline: 2px solid var(--orange, #ea5924);
    outline-offset: 2px;
}

body.woocommerce-checkout .amalgam-digital-withdrawal-consent .woocommerce-form__label-for-checkbox:hover .input-checkbox {
    box-shadow: 0 0 0 1px rgba(234, 89, 36, 0.35);
}

body.woocommerce-checkout .amalgam-digital-withdrawal-consent__text {
    display: inline;
}

body.woocommerce-checkout .amalgam-digital-withdrawal-consent__text a {
    color: var(--orange, #ea5924);
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

body.woocommerce-checkout .amalgam-digital-withdrawal-consent__text a:hover {
    color: var(--orange, #ea5924);
    text-decoration: underline;
}

body.woocommerce-checkout .amalgam-digital-withdrawal-consent .required {
    color: var(--orange, #ea5924);
    text-decoration: none;
    border: 0;
    font-weight: 700;
}

/* Express consent gate: the same card as the Place order checkbox — it carries the
   .amalgam-digital-withdrawal-consent class so every rule above applies — plus the few
   things only the gate needs. The star is an <abbr>, which browsers underline with a
   dotted rule by default; the shared .required rule above already clears that. */
body.woocommerce-checkout .amalgam-express-consent[hidden] {
    display: none !important;
}

body.woocommerce-checkout .amalgam-express-consent {
    margin-top: 16px;
}

body.woocommerce-checkout .amalgam-express-consent__hint {
    margin: 8px 0 0;
    font-size: 13px;
    color: #9a9a9a;
}

/* Locked until consent is given. The block sits on the plugin's wrapper, never on the
   button: Apple Pay and Google Pay need a real gesture on the genuine element. */
body.woocommerce-checkout #wspa-express-checkout-wrapper.amalgam-express-locked {
    pointer-events: none;
    opacity: 0.45;
    filter: grayscale(1);
}

/* Placeholder for the express row while Stripe decides which wallets to offer
   (resources/js/wspa-express-checkout.js). Same footprint as the real thing so
   nothing moves when it swaps: Stripe's iframe is 48px per row — 40px buttons
   (the plugin's button height setting) plus 4px above and below, 8px between
   rows — inside a container with -4px margins top and bottom, which the
   flow-root below keeps inside the button area: 40px for one row, 88px for
   two. Three buttons to a row, two in a phone-width
   column. The button area is a flow-root in every state: otherwise that -4px
   bottom margin collapses through it once loaded, but not while min-height is
   pinned, and the form steps 4px at the swap.

   While .amalgam-express-loading is on the wrapper, the button area is held at
   that height and the placeholder is laid over it: Stripe's iframe loads at
   2px, then 8px, then animates to full height, all of which would otherwise
   push the consent gate and the form around. `top: 1.5em` is the plugin's
   inline padding-top on the wrapper. */
body.woocommerce-checkout #wspa-express-checkout-wrapper.amalgam-express-loading {
    position: relative;
}

body.woocommerce-checkout #wspa-express-checkout-button {
    display: flow-root;
}

body.woocommerce-checkout .amalgam-express-loading #wspa-express-checkout-button {
    min-height: 40px;
}

body.woocommerce-checkout .amalgam-express-placeholder {
    position: absolute;
    top: 1.5em;
    left: 0;
    right: 0;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 40px;
    gap: 8px 12px;
}

@media (max-width: 639px) {
    body.woocommerce-checkout .amalgam-express-loading #wspa-express-checkout-button {
        min-height: 88px;
    }

    body.woocommerce-checkout .amalgam-express-placeholder {
        grid-template-columns: repeat(2, 1fr);
    }
}

body.woocommerce-checkout .amalgam-express-placeholder span {
    border-radius: 8px;
    background: linear-gradient(90deg, #1c1c1c 0%, #2a2a2a 50%, #1c1c1c 100%);
    background-size: 200% 100%;
    animation: amalgam-express-placeholder 1.2s ease-in-out infinite;
}

@keyframes amalgam-express-placeholder {
    from { background-position: 100% 0; }
    to { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
    body.woocommerce-checkout .amalgam-express-placeholder span {
        animation: none;
        background: #222;
    }
}

/* Free gift: Configure your product → product page link under item title */
body.woocommerce-cart a.amalgam-configure-free-product,
body.woocommerce-checkout a.amalgam-configure-free-product {
    display: block;
    color: var(--orange, #ea5924);
    font-size: 1.02em;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.15em;
    cursor: pointer;
    margin-top: 0.25em;
}

body.woocommerce-cart a.amalgam-configure-free-product:hover,
body.woocommerce-checkout a.amalgam-configure-free-product:hover,
body.woocommerce-cart a.amalgam-configure-free-product:focus,
body.woocommerce-checkout a.amalgam-configure-free-product:focus {
    color: #d14a1a;
    text-decoration: underline;
}

/* Free gift: Change gift → opens the picker modal.
   Borrows the border + radius of the .version-tag sitting directly above it in
   the same cell, so the control reads as part of this row rather than bolted
   on. Deliberately quieter than the product title: an action, not a heading. */
body.woocommerce-cart button.amalgam-change-free-gift,
body.woocommerce-checkout button.amalgam-change-free-gift {
    display: inline-flex;
    align-items: center;
    appearance: none;
    background: rgba(234, 89, 36, 0.12);
    border: 1px solid rgba(234, 89, 36, 0.55);
    border-radius: 5px;
    padding: 8px 14px;
    margin-top: 14px;
    font-family: inherit;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--orange, #ea5924);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

body.woocommerce-cart button.amalgam-change-free-gift:hover,
body.woocommerce-checkout button.amalgam-change-free-gift:hover,
body.woocommerce-cart button.amalgam-change-free-gift:focus-visible,
body.woocommerce-checkout button.amalgam-change-free-gift:focus-visible {
    background: rgba(234, 89, 36, 0.2);
    border-color: var(--orange, #ea5924);
    text-decoration: none;
}

body.woocommerce-checkout form.checkout.amalgam-checkout textarea.default-input {
    min-height: 100px;
    line-height: 1.45;
}
