/* The payment methods strip, the Klarna statement and the Klarna badge.
   ──────────────────────────────────────────────────────────────────────────
   These three partials are included from two template trees that do not share
   a stylesheet. The public pages extend applications/public_base.html, which
   loads site.css and its --text-muted / --border / --accent tokens. The
   enrolment wizard extends applications/base.html, which loads dais.css and
   its --dais-muted / --dais-border tokens instead. That is why all three
   partials were written in style attributes with hard-coded fallbacks: an
   inline colour is the one thing that works under either base.

   This sheet is the answer instead. It carries its own tokens, so it reads
   the same under both bases, and both bases load it. Nothing here refers to a
   token defined elsewhere.

   Every ratio below was measured on 29 October 2026 against the ground named.

   The sizes are all at or above the 13px floor the public pages hold
   (website/test_public_text_is_readable.py). The Klarna terms used to be
   11.2px, which is the smallest type on the page on the one paragraph a
   regulator would read. */

:root {
  /* Brand grounds. These sit outside the themes on purpose: a card scheme's
     mark is supplied for a white chip and Klarna's is supplied on its own
     pink, so neither may be recoloured by a theme without breaking the
     nominative-use position recorded in
     static/images/payments/PAYMENT-LOGO-PROVENANCE.txt. */
  --paychip-ground:   #FFFFFF;
  --paychip-edge:     #E3E6EA;
  --paychip-ink:      #0A2240;       /* 15.96:1 on the white chip */
  --klarna-ground:    #FFB3C7;
  --klarna-edge:      #F4A1B6;

  /* The caption and terms where the strip sits on a light ground: the fees
     page, the checkout, the Klarna statement on the home page. */
  --pay-ink:          #6B5E52;       /* 5.53:1 on parchment, 6.27:1 on white */
  --pay-card:         #FFFFFF;
  --pay-edge:         #D8D0C3;
  --pay-lead-ink:     #0A2240;       /* 15.96:1 on the white card */

  /* The strip in the navy footer. The footer is navy in both themes, so this
     one does not change with the theme. */
  --pay-ink-on-navy:  #B4C4DA;       /* 9.01:1 on #0A2240, 10.89:1 on #080E1A */
}

html[data-theme="dark"] {
  --pay-ink:          #8DA3BE;       /* 6.30:1 on #112038, 7.07:1 on #0C1524 */
  --pay-card:         #112038;
  --pay-edge:         #1E3A5E;
  --pay-lead-ink:     #E6EDF7;       /* 13.84:1 on #112038 */
}

/* site.css follows the system preference when the reader has chosen neither
   theme, so this sheet has to as well, or the strip stays light on a dark
   page. dais.css has no system block, and the wizard does not follow the
   system preference; this rule is correct under both, because an unset
   data-theme on the wizard means the light values stay. */
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --pay-ink:        #8DA3BE;
    --pay-card:       #112038;
    --pay-edge:       #1E3A5E;
    --pay-lead-ink:   #E6EDF7;
  }
}

.dais-paylogos {
  margin: 1.25rem 0;
}
.dais-paylogos-caption {
  font-size: 0.82rem;
  margin: 0 0 0.55rem;
  text-align: center;
  color: var(--pay-ink);
}
.dais-paylogos-terms {
  font-size: 0.82rem;
  margin: 0.5rem 0 0;
  text-align: center;
  color: var(--pay-ink);
}
.dais-paylogos--on-dark .dais-paylogos-caption,
.dais-paylogos--on-dark .dais-paylogos-terms {
  color: var(--pay-ink-on-navy);
}
.dais-paylogos-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}
.dais-paychip {
  background: var(--paychip-ground);
  border: 1px solid var(--paychip-edge);
  border-radius: 6px;
  height: 38px;
  min-width: 56px;
  padding: 0 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.dais-paychip img {
  height: 22px;
  width: 22px;
  display: block;
}
.dais-paychip--klarna {
  background: var(--klarna-ground);
  border-color: var(--klarna-edge);
}
.dais-paychip--klarna img {
  height: 21px;
  width: 21px;
}
.dais-paychip--text {
  min-width: 0;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--paychip-ink);
  white-space: nowrap;
}

.dais-klarna-statement {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin: 1.75rem auto 0;
  padding: 0.85rem 1.25rem;
  max-width: 640px;
  background: var(--pay-card);
  border: 1px solid var(--pay-edge);
  border-radius: 10px;
}
.dais-klarna-mark {
  background: var(--klarna-ground);
  border-radius: 5px;
  padding: 3px 7px;
  display: inline-flex;
  align-items: center;
}
.dais-klarna-mark img {
  height: 14px;
  width: 14px;
  display: block;
}
.dais-klarna-lead {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--pay-lead-ink);
}
.dais-klarna-note {
  font-size: 0.88rem;
  color: var(--pay-ink);
}

.dais-klarna-badge {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.5rem 0 0;
}
.dais-klarna-badge .dais-klarna-mark {
  border-radius: 4px;
  padding: 2px 5px;
}
.dais-klarna-badge .dais-klarna-mark img {
  height: 12px;
  width: 12px;
}
.dais-klarna-badge-text {
  font-size: 0.82rem;
  color: var(--pay-ink);
}
