/* RTB gift card redeem form on cart and checkout only. 1.0.4.
   Nit A: The checkout submit (#pwgc-redeem-button) has no .button class, so it
   misses the site tokens that already style the cart APPLY button
   (input#pwgc-redeem-button.button). Reuse those tokens; do not invent chrome.
   Checkout input is locked to the same box as the cart input (width:auto,
   inline-block) so the two fields stay twins. Colors stay with the live
   cart/checkout skin (Night pack / Day preview).
   Nit B: PW sets #pwgc-redeem-error to CSS red (#ff0000), which is 4.69:1 on
   the #121212 cart-totals / order-review card (barely 4.5, muddy on Night)
   and only ~4.00:1 on a white Day card. Night uses the site's Night accent
   ring #ff4d67; Day uses the site accent #c8102e. !important beats the
   checkout inline style="color: red;". */

/* Same tokens the live cart APPLY already gets from .button + additional CSS:
   background #c8102e, hover/press #a00d26, radius 12px, 44px tap, 12px 22px
   padding, 600 / uppercase / 0.04em letter-spacing, 16px (computed on cart). */
body.woocommerce-cart #pwgc-redeem-gift-card-form #pwgc-redeem-button,
body.woocommerce-checkout #pwgc-redeem-gift-card-form #pwgc-redeem-button {
  --rtb-radius: 12px;
  background: var(--rtb-accent, #c8102e) !important;
  background-color: #c8102e !important;
  color: #ffffff !important;
  border: 0 !important;
  border-radius: var(--rtb-radius, 12px) !important;
  box-shadow: none !important;
  font-weight: 600;
  font-size: 16px;
  line-height: 16px;
  min-height: 44px;
  padding: 12px 22px !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  display: inline-block !important;
  box-sizing: border-box;
  vertical-align: middle;
  margin-top: 0;
}

body.woocommerce-cart #pwgc-redeem-gift-card-form #pwgc-redeem-button:hover,
body.woocommerce-cart #pwgc-redeem-gift-card-form #pwgc-redeem-button:focus,
body.woocommerce-checkout #pwgc-redeem-gift-card-form #pwgc-redeem-button:hover,
body.woocommerce-checkout #pwgc-redeem-gift-card-form #pwgc-redeem-button:focus {
  background: #a00d26 !important;
  background-color: #a00d26 !important;
  color: #ffffff !important;
}

/* Checkout input: same box as the cart input (PW cart sets width:auto).
   Fill, border, and text color stay on the live cart/checkout input skin. */
body.woocommerce-cart #pwgc-redeem-gift-card-form #pwgc-redeem-gift-card-number,
body.woocommerce-checkout #pwgc-redeem-gift-card-form #pwgc-redeem-gift-card-number {
  width: auto;
  display: inline-block;
  vertical-align: middle;
  box-sizing: border-box;
}

/* Night default (live cart/checkout pack is Night). #ff4d67 on #121212 is 5.81:1. */
body.woocommerce-cart #pwgc-redeem-gift-card-form #pwgc-redeem-error,
body.woocommerce-checkout #pwgc-redeem-gift-card-form #pwgc-redeem-error {
  color: #ff4d67 !important;
}

/* Day: #c8102e is 5.88:1 on white / 5.53:1 on #f7f8f9. #ff4d67 fails on white. */
html[data-rl-theme="day"] body.woocommerce-cart #pwgc-redeem-gift-card-form #pwgc-redeem-error,
html[data-rl-theme="day"] body.woocommerce-checkout #pwgc-redeem-gift-card-form #pwgc-redeem-error {
  color: #c8102e !important;
}
