/* Stripe sheets and their outgoing card use the storefront's selected palette. */
:root {
  --winter-pay-card: #17181a;
  --winter-pay-glaze: #292a2c;
  --winter-pay-ink: #f6f6f4;
  --winter-pay-muted: #cfceca;
  --winter-pay-line: #ffffff24;
  --winter-pay-frost: #e4edf12b;
  --winter-pay-foil: #cbb28545;
  --winter-pay-shadow: #0006;
  --winter-pay-field: #212124;
  --winter-pay-button: #f0eee8;
  --winter-pay-button-hover: #fffdf8;
  --winter-pay-button-ink: #252525;
  --winter-pay-grain: .36;
  --winter-pay-error: #ffbdb7;
}

:root[data-store-theme="light"] {
  --winter-pay-card: #f4f4f2;
  --winter-pay-glaze: #fff;
  --winter-pay-ink: #212124;
  --winter-pay-muted: #55555a;
  --winter-pay-line: #25252a25;
  --winter-pay-frost: #8ca9b44a;
  --winter-pay-foil: #ba945227;
  --winter-pay-shadow: #20202520;
  --winter-pay-field: #fff;
  --winter-pay-button: #252527;
  --winter-pay-button-hover: #3a3a3d;
  --winter-pay-button-ink: #fff;
  --winter-pay-grain: .24;
  --winter-pay-error: #a32732;
}

.resx-card-sheet.resx-card-inline {
  color: var(--winter-pay-ink);
}

:is(.resx-card-sheet .resx-pay-visual, .resx-pay-visual[data-pay-flight]) {
  color: var(--winter-pay-ink);
  background:
    radial-gradient(circle at 88% 7%, var(--winter-pay-frost) 1px, transparent 2.1px),
    radial-gradient(circle at 93% 14%, var(--winter-pay-frost) 1.6px, transparent 3px),
    radial-gradient(circle at 96% 8%, var(--winter-pay-frost) 1px, transparent 2px),
    radial-gradient(ellipse 40% 20% at 91% 0, var(--winter-pay-foil), transparent 90%),
    linear-gradient(155deg, var(--winter-pay-glaze), var(--winter-pay-card) 65%);
  box-shadow: inset 0 0 0 1px var(--winter-pay-line), 0 18px 44px var(--winter-pay-shadow);
}

:is(.resx-card-sheet .resx-pay-visual, .resx-pay-visual[data-pay-flight])::before {
  opacity: var(--winter-pay-grain);
}

:is(.resx-card-sheet .resx-pay-visual, .resx-pay-visual[data-pay-flight]) .resx-card-brand span {
  position: relative;
}

:is(.resx-card-sheet .resx-pay-visual, .resx-pay-visual[data-pay-flight]) .resx-card-brand span::before {
  content: "";
  position: absolute;
  left: -.32em;
  top: -.55em;
  width: .89em;
  height: .62em;
  background: url("/assets/market-winter-hat.webp") center / contain no-repeat;
  pointer-events: none;
}

:is(.resx-card-sheet .resx-pay-visual, .resx-pay-visual[data-pay-flight]) .resx-card-brand i {
  background:
    linear-gradient(90deg, transparent 28%, #81745f 29% 31%, transparent 32% 68%, #81745f 69% 71%, transparent 72%),
    linear-gradient(0deg, transparent 46%, #857660 48% 51%, transparent 53%),
    linear-gradient(130deg, #a99b84, #e6dac2 37%, #b2a082 68%, #d6cab3);
}

.resx-card-sheet :is(.resx-pay-method span, .resx-pay-handoff, .resx-pay-status) {
  color: var(--winter-pay-muted);
}

.resx-card-sheet.resx-card-inline .resx-pay-error {
  color: var(--winter-pay-error);
}

.resx-card-sheet .resx-pay-email input {
  background: var(--winter-pay-field);
  color: var(--winter-pay-ink);
  box-shadow: inset 0 0 0 1px var(--winter-pay-line);
}

.resx-card-sheet :is(.resx-pay-submit, .resx-pay-continue, .resx-pay-retry) {
  background: var(--winter-pay-button);
  color: var(--winter-pay-button-ink);
}

.resx-card-sheet :is(.resx-pay-submit:hover:enabled, .resx-pay-continue:hover, .resx-pay-retry:hover:enabled) {
  background: var(--winter-pay-button-hover);
}

.resx-card-sheet :is(.resx-pay-continue, .resx-pay-retry):focus-visible,
.resx-card-sheet.resx-card-inline :is(.resx-pay-submit, .resx-pay-email input):focus-visible {
  outline-color: var(--winter-pay-muted);
}
