/* AirReps design polish: overrides on top of hc.css and the payment plugins' own styles.
   Loaded after hc.css by mu-plugins/airreps-design-polish.php (design audit 2026-11-17).
   Dark mode follows the theme's two paths: html[data-theme="dark"] and the system preference. */

/* F03 Jenny home hero: white products on near-white tiles. Same surface as the product cards. */
.hc-herotile{background:var(--alt)}

/* F04 payment rows: card-brand, bank and local-method logo tiles (40x26 art, shown like the Kakobuy row's tiles). */
.ar-paytiles{display:inline-flex;align-items:center;gap:5px;flex:0 0 auto;line-height:0}
.ar-paytiles img{display:block;width:32px;height:21px;max-height:none;border-radius:0}
.hc-checkout #payment ul.payment_methods>li label span.ar-paytiles img{width:32px;height:21px;border-radius:0}
.hc-gw-icon .ar-paytiles{vertical-align:middle}
.hc-gw-icon .ar-paytiles img{width:32px;height:21px;max-height:none;border-radius:0}

/* Card rows (owner 2026-11-18: the old icon's fade back, made with the sharp tiles): one tile slot. Visa and
   Mastercard are stacked and the Mastercard tile fades in and out on top; both have the same white box, so
   only the marks change. About 3 s per brand, 8 s a loop. With "reduce motion" on, the two tiles stay side
   by side as before. The Kakobuy row's own tiles are not part of this. */
@media (prefers-reduced-motion:no-preference){
  .ar-paytiles.ar-paytiles--fade{display:inline-grid;gap:0}
  .ar-paytiles.ar-paytiles--fade>img{grid-area:1/1}
  .ar-paytiles.ar-paytiles--fade>img+img{opacity:0;animation:ar-paytile-fade 8s ease-in-out infinite}
}
@keyframes ar-paytile-fade{0%,40%{opacity:0}50%,90%{opacity:1}100%{opacity:0}}

/* Caravel Pay card row (owner 2026-11-18: card, Apple Pay and Google Pay): Visa, Mastercard, Apple Pay,
   Google Pay in one slot, 3 s each, 12 s a loop. Visa is the opaque base; each next brand fades in on top of
   the one before (0.75 s), and the covered tile is dropped only once it is fully hidden, so the white box never
   thins out mid-fade. Google Pay fades out to reveal Visa again. Every animation is pinned to the page clock
   (airreps-paytile-clock), so a checkout redraw doesn't restart it. With "reduce motion" on: Visa and
   Mastercard side by side. */
@media (prefers-reduced-motion:no-preference){
  .ar-paytiles.ar-paytiles--fade4>img:nth-child(2){animation:ar-paytile-mc 12s ease-in-out infinite}
  .ar-paytiles.ar-paytiles--fade4>img:nth-child(3){opacity:0;animation:ar-paytile-apple 12s ease-in-out infinite}
  .ar-paytiles.ar-paytiles--fade4>img:nth-child(4){opacity:0;animation:ar-paytile-google 12s ease-in-out infinite}
}
@media (prefers-reduced-motion:reduce){
  .ar-paytiles.ar-paytiles--fade4>img:nth-child(n+3){display:none}
}
@keyframes ar-paytile-mc{0%,25%{opacity:0}31.25%,56.25%{opacity:1}56.3%,100%{opacity:0}}
@keyframes ar-paytile-apple{0%,50%{opacity:0}56.25%,81.25%{opacity:1}81.3%,100%{opacity:0}}
@keyframes ar-paytile-google{0%,75%{opacity:0}81.25%,93.75%{opacity:1}100%{opacity:0}}

/* F08 order page: the Wise wordmark is dark green, unreadable on the dark card. Same flip as the checkout icon. */
html[data-theme="dark"] .hc-gw-logo>img[alt="Wise"]{filter:brightness(0) invert(1)}
@media(prefers-color-scheme:dark){html:not([data-theme="light"]) .hc-gw-logo>img[alt="Wise"]{filter:brightness(0) invert(1)}}

/* F09 order page: card (Caravel Pay) and crypto (BTCPay) status boxes drawn as the theme's inner card. */
section.caravel-pay-state,
section.woocommerce-order-payment-status{background:var(--alt);border:1px solid var(--border);border-radius:14px;padding:16px 18px;margin:0}
section.caravel-pay-state .caravel-pay-state__title,
section.woocommerce-order-payment-status .woocommerce-order-payment-status-title{font-size:18px;font-weight:600;line-height:1.3;letter-spacing:-.01em;color:var(--text);margin:0 0 4px}
section.caravel-pay-state p,
section.woocommerce-order-payment-status p{margin:0;font-size:14px;line-height:1.55;color:var(--dim)}
section.woocommerce-order-payment-status p strong{font-weight:500;color:var(--text)}
section.caravel-pay-state p.caravel-pay-state__actions{margin:14px 0 0}
section.caravel-pay-state p.caravel-pay-state__actions[hidden]{display:none}
section.caravel-pay-state p.caravel-pay-state__meta{margin:10px 0 0;font-size:13px;opacity:1}
/* the box's one action ("Complete payment", while a card payment is still open) is the page's primary button */
section.caravel-pay-state .caravel-pay-state__actions a.button{display:flex;align-items:center;justify-content:center;font-size:16px;font-weight:500;line-height:1.2;color:#fff;text-decoration:none;padding:14px 28px;border-radius:980px;background:linear-gradient(180deg,color-mix(in srgb,var(--coral) 90%,#fff),var(--coral) 58%,color-mix(in srgb,var(--coral) 90%,#000));border:1px solid color-mix(in srgb,var(--coral) 72%,#000);box-shadow:inset 0 1px 0 rgba(255,255,255,.42),inset 0 -2px 2px rgba(0,0,0,.10),0 2px 3px rgba(0,0,0,.12),0 8px 18px -8px color-mix(in srgb,var(--coral) 42%,transparent);transition:transform .15s ease,opacity .15s ease}
section.caravel-pay-state .caravel-pay-state__actions a.button:hover{opacity:.88}
section.caravel-pay-state .caravel-pay-state__actions a.button:active{transform:scale(.98)}

/* F14 dark mode: the how-to videos are drawn on light paper. In the dark boxes they sit on a dark base
   (no light flash while loading) and are dimmed a little so they stop glaring. */
html[data-theme="dark"] .hc-modal .akv,
html[data-theme="dark"] #airreps-ardm .ardm-video,
html[data-theme="dark"] #airreps-apm .apm-video{background:#0c0c0e}
html[data-theme="dark"] .hc-modal .akv video,
html[data-theme="dark"] #airreps-ardm .ardm-video video,
html[data-theme="dark"] #airreps-apm .apm-video video{background:#0c0c0e;filter:brightness(.8)}
@media(prefers-color-scheme:dark){
  html:not([data-theme="light"]) .hc-modal .akv,
  html:not([data-theme="light"]) #airreps-ardm .ardm-video,
  html:not([data-theme="light"]) #airreps-apm .apm-video{background:#0c0c0e}
  html:not([data-theme="light"]) .hc-modal .akv video,
  html:not([data-theme="light"]) #airreps-ardm .ardm-video video,
  html:not([data-theme="light"]) #airreps-apm .apm-video video{background:#0c0c0e;filter:brightness(.8)}
}

/* F15 small: the theme's own buttons take the page font (the quantity minus and plus fell back to the
   browser's default), and the mini-cart pills use the primary button's weight. */
button.hc-cta{font-family:inherit}
.hc-minicart a.hc-cta{font-weight:500!important}

/* F14 follow-up (owner: do all): the how-to video on the order page (Wise, PayPal, AliPay) is drawn on light paper
   too; in dark mode it sits on a dark base at 80% brightness, like the checkout boxes. The theme sets the wrapper's
   light background inline, hence !important. */
html[data-theme="dark"] .hc-card div:has(> video){background:#0c0c0e !important}
html[data-theme="dark"] .hc-card div:has(> video) > video{filter:brightness(.8)}
@media (prefers-color-scheme:dark){
  html:not([data-theme="light"]) .hc-card div:has(> video){background:#0c0c0e !important}
  html:not([data-theme="light"]) .hc-card div:has(> video) > video{filter:brightness(.8)}
}
