/* 1.4.8. Native classic checkout coupon only. No checkout/login/payment form
 * replacement. Inline display:none and WooCommerce's show/hide toggle still win.
 * display:contents promotes the existing p wrappers' children into the grid;
 * the original label, input, button and native error parents remain in the DOM.
 */
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
    gap: 10px 12px;
    align-items: stretch;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 600px !important;
    min-width: 0 !important;
    float: none !important;
    margin: 20px 0 !important;
    padding: 18px !important;
    border: 1px solid #d3e1e4;
    border-radius: 12px;
    background: #fff;
    text-align: start !important;
}
/* Native float-clearing pseudo-elements would otherwise become empty grid cells. */
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon::before,
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon::after {
    content: none !important;
    display: none !important;
}
/* Reveal the EXISTING translated, associated label, not a duplicate pseudo-label. */
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon label[for="coupon_code"] {
    grid-column: 1 / -1;
    display: block !important;
    position: static !important;
    width: auto !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    clip: auto !important;
    clip-path: none !important;
    overflow: visible !important;
    white-space: normal !important;
    color: #33464b !important;
    -webkit-text-fill-color: #33464b !important;
    font-family: inherit !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon input[name="coupon_code"] {
    display: block !important;
    box-sizing: border-box !important;
    float: none !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 48px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 11px 14px !important;
    border: 1px solid #a6b7bc !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #25383e !important;
    -webkit-text-fill-color: #25383e !important;
    box-shadow: none !important;
    font-family: inherit !important;
    font-size: 16px !important;
    font-weight: 400 !important;
    line-height: 1.5 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon input[name="coupon_code"]::placeholder {
    color: #6a787e !important;
    -webkit-text-fill-color: #6a787e !important;
    opacity: 1 !important;
}
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon :is(button, input[type="submit"])[name="apply_coupon"] {
    box-sizing: border-box !important;
    float: none !important;
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    min-height: 48px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 11px 16px !important;
    border: 1px solid #0eaaa6 !important;
    border-radius: 8px !important;
    background: #fff !important;
    color: #087f7c !important;
    -webkit-text-fill-color: #087f7c !important;
    box-shadow: none !important;
    text-shadow: none !important;
    font-family: inherit !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    text-align: center !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    letter-spacing: normal !important;
    text-transform: none !important;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon :is(button, input[type="submit"])[name="apply_coupon"]:is(:hover, :focus, :active):not(:disabled):not([aria-disabled="true"]) {
    background: #0eaaa6 !important;
    border-color: #0eaaa6 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon input[name="coupon_code"]:focus {
    border-color: #087f7c !important;
    outline: 2px solid #087f7c !important;
    outline-offset: 2px !important;
}
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon :is(button, input[type="submit"])[name="apply_coupon"]:focus-visible {
    outline: 2px solid #087f7c !important;
    outline-offset: 3px !important;
}
/* Only reflect a disabled state set by WooCommerce/extensions; never set it here. */
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon :is(button, input[type="submit"])[name="apply_coupon"]:is(:disabled, [aria-disabled="true"]) {
    background: #eef1f2 !important;
    border-color: #cdd6d9 !important;
    color: #66747a !important;
    -webkit-text-fill-color: #66747a !important;
    cursor: not-allowed;
}
/* Preserve WooCommerce's actual error and ARIA association across AJAX refresh. */
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon input[name="coupon_code"].has-error,
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon input[name="coupon_code"][aria-invalid="true"] {
    border-color: #b32d2e !important;
}
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon input[name="coupon_code"][aria-invalid="true"]:focus {
    outline-color: #b32d2e !important;
}
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon .coupon-error-notice {
    grid-column: 1 / -1;
    float: none !important;
    clear: both !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #b32d2e !important;
    -webkit-text-fill-color: #b32d2e !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    text-align: start !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
}
@media (max-width: 480px) {
    body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon { grid-template-columns: minmax(0, 1fr); max-width: 100% !important; }
}
@media (prefers-reduced-motion: reduce) {
    body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon :is(button, input[type="submit"])[name="apply_coupon"] { transition: none !important; }
}
@media (forced-colors: active) {
    body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon input[name="coupon_code"] {
        background: Canvas !important;
        color: CanvasText !important;
        -webkit-text-fill-color: CanvasText !important;
        border-color: CanvasText !important;
        outline-color: Highlight !important;
    }
    body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon input[name="coupon_code"]::placeholder,
    body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon label[for="coupon_code"],
    body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon .coupon-error-notice {
        color: CanvasText !important;
        -webkit-text-fill-color: CanvasText !important;
    }
    body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon :is(button, input[type="submit"])[name="apply_coupon"],
    body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon :is(button, input[type="submit"])[name="apply_coupon"]:is(:hover, :focus, :active):not(:disabled):not([aria-disabled="true"]) {
        background: ButtonFace !important;
        color: ButtonText !important;
        -webkit-text-fill-color: ButtonText !important;
        border-color: ButtonText !important;
        outline-color: Highlight !important;
    }
    body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon :is(button, input[type="submit"])[name="apply_coupon"]:is(:disabled, [aria-disabled="true"]) {
        color: GrayText !important;
        -webkit-text-fill-color: GrayText !important;
        border-color: GrayText !important;
    }
}

body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon > .form-row {
    display: contents !important;
    float: none !important;
    padding: 0 !important;
    margin: 0 !important;
}
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon > .clear {
    display: none !important;
}
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon input[name="coupon_code"] { grid-column: 1; grid-row: 2; }
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon [name="apply_coupon"] { grid-column: 2; grid-row: 2; }
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon label[for="coupon_code"] { grid-row: 1; }
@media (max-width: 480px) {
    body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon [name="apply_coupon"] { grid-column: 1; grid-row: 3; }
}
/* A local status does not inherit WooCommerce's page-wide notice layout. */
body.hprc-commerce-page.woocommerce-cart .woocommerce form.woocommerce-cart-form table.cart td.actions > .coupon > .hprc-coupon-feedback,
body.hprc-commerce-page.woocommerce-checkout .woocommerce form.checkout_coupon > .hprc-coupon-feedback {
    display: block;
    grid-column: 1 / -1;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    margin: 0;
    padding: 2px 0;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    text-align: start;
    white-space: pre-line;
    overflow-wrap: anywhere;
    color: #24685d;
    -webkit-text-fill-color: #24685d;
}
body.hprc-commerce-page.woocommerce-cart .woocommerce form.woocommerce-cart-form table.cart td.actions > .coupon > .hprc-coupon-feedback.is-coupon-error,
body.hprc-commerce-page.woocommerce-checkout .woocommerce form.checkout_coupon > .hprc-coupon-feedback.is-coupon-error {
    color: #b32d2e;
    -webkit-text-fill-color: #b32d2e;
}
@media (forced-colors: active) {
    body.hprc-commerce-page .woocommerce form.woocommerce-cart-form .coupon .hprc-coupon-feedback,
    body.hprc-commerce-page .woocommerce form.checkout_coupon .hprc-coupon-feedback {
        color: CanvasText !important;
        -webkit-text-fill-color: CanvasText !important;
    }
}
/* Native float-clearing pseudo-elements on display:contents wrappers must not
   become empty grid rows between the controls and the local feedback. */
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon > .form-row::before,
body.hprc-commerce-page.woocommerce-checkout:not(.woocommerce-cart) .woocommerce form.checkout_coupon > .form-row::after {
    content: none !important;
    display: none !important;
}
