html {
  overflow-x: hidden;
}

.payment-page {
  min-height: 100vh;
  overflow-x: hidden;
}

.payment-header {
  border-bottom: 1px solid var(--line);
}

.payment-security {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #597567;
  font-size: 12px;
  letter-spacing: .04em;
}

.payment-security span {
  color: var(--gold);
  font-size: 17px;
}

.payment-main {
  max-width: 1180px;
  margin: auto;
  padding: 42px 28px 88px;
}

.payment-back {
  display: inline-block;
  margin-bottom: 27px;
  color: #687174;
  font-size: 13px;
  text-decoration: none;
}

.payment-back:hover {
  color: var(--terracotta);
}

.payment-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 35px;
  margin-bottom: 32px;
}

.payment-heading .eyebrow {
  margin-bottom: 8px;
}

.payment-heading h1 {
  margin: 0;
  font: 500 clamp(34px, 4vw, 48px)/1.25 var(--serif);
  letter-spacing: .035em;
}

.payment-heading > div > p:last-child {
  margin: 10px 0 0;
  color: #59636a;
  font-size: 14px;
}

.payment-steps {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0;
  color: #8a9090;
  font-size: 11px;
  list-style: none;
  white-space: nowrap;
  counter-reset: step;
}

.payment-steps li {
  display: flex;
  align-items: center;
  counter-increment: step;
}

.payment-steps li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-right: 7px;
  border: 1px solid #b7b8b3;
  border-radius: 50%;
  font: 500 11px var(--sans);
}

.payment-steps li:not(:last-child)::after {
  content: "";
  width: 30px;
  height: 1px;
  margin: 0 10px;
  background: #d5d2c8;
}

.payment-steps li[aria-current="step"] {
  color: var(--terracotta);
}

.payment-steps li[aria-current="step"]::before {
  border-color: var(--terracotta);
  background: var(--terracotta);
  color: #fff;
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .75fr);
  gap: 22px;
  align-items: start;
}

.payment-form-panel,
.payment-summary {
  padding: 29px;
  border: 1px solid var(--line);
  background: #fffdf8;
}

.payment-form-panel {
  border-top: 2px solid var(--terracotta);
}

.payment-form-panel h2,
.payment-summary h2 {
  margin: 0;
  font: 500 24px/1.4 var(--serif);
  letter-spacing: .025em;
}

.payment-section-note {
  margin: 7px 0 25px;
  color: #687174;
  font-size: 12px;
}

.payment-field {
  display: grid;
  gap: 7px;
  margin-top: 20px;
}

.payment-field[hidden], #invoice-company-fields[hidden] { display: none; }

.payment-label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}

.payment-field > small {
  color: #788082;
  font-size: 11px;
}

.payment-input {
  width: 100%;
  min-height: 48px;
  box-sizing: border-box;
  padding: 11px 13px;
  border: 1px solid #aeb7ba;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 500 13px/1.45 var(--sans);
}

.payment-input:focus-visible {
  outline: 3px solid rgba(201, 155, 89, .5);
  outline-offset: 2px;
}

.promotion-entry, .invoice-validation-entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.promotion-entry input, .invoice-validation-entry input {
  min-width: 0;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid #aeb7ba;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: 500 14px var(--sans);
  text-transform: uppercase;
}

.promotion-entry button, .invoice-validation-entry button {
  min-width: 78px;
  border: 0;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font: 600 12px var(--sans);
}

.promotion-entry button:disabled, .invoice-validation-entry button:disabled { opacity: .55; cursor: not-allowed; }
#promotion-message[data-type="success"] { color: #287452; }
#promotion-message[data-type="error"] { color: #a94f43; }
.invoice-validation-message[data-type="success"] { color: #287452; }
.invoice-validation-message[data-type="error"] { color: #a94f43; }
#summary-list-price { color: #788082; text-decoration: line-through; }
#summary-discount { color: #287452; }

.payment-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 14px;
  background: var(--cream);
}

.payment-account > span {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.payment-account small {
  color: #788082;
  font-size: 10px;
}

.payment-account strong {
  overflow: hidden;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
}

.payment-account b {
  flex: none;
  color: #597567;
  font-size: 11px;
  font-weight: 600;
}

.payment-select {
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid var(--blue);
  border-radius: 0;
  outline-color: var(--gold);
  background-color: var(--blue);
  color: #fff;
  color-scheme: dark;
  cursor: pointer;
  font: 500 13px/1.45 var(--sans);
}

.payment-select:hover {
  background-color: #1d4b62;
}

.payment-select:focus-visible {
  outline: 3px solid rgba(201, 155, 89, .5);
  outline-offset: 2px;
}

.payment-select:disabled {
  border-color: #59636a;
  background: #59636a;
  color: #e8eeee;
  cursor: not-allowed;
  opacity: .7;
}

.payment-select option {
  background: var(--blue);
  color: #fff;
}

.payment-provider-note {
  display: flex;
  gap: 9px;
  margin: 14px 0 0;
  color: #687174;
  font-size: 11px;
}

.payment-provider-note span {
  flex: none;
  color: #597567;
  font-weight: 700;
}

.payment-summary {
  position: sticky;
  top: 20px;
}

.payment-summary dl {
  display: grid;
  gap: 15px;
  margin: 22px 0 24px;
}

.payment-summary dl > div {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.payment-summary dt {
  color: #687174;
  font-size: 12px;
}

.payment-summary dd {
  max-width: 190px;
  margin: 0;
  font: 500 13px/1.55 var(--sans);
  text-align: right;
}

.payment-summary [hidden] {
  display: none;
}

.payment-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.payment-total span {
  font-size: 13px;
  font-weight: 600;
}

.payment-total strong {
  color: var(--terracotta);
  font: 500 27px var(--sans);
}

.payment-once {
  margin: 3px 0 18px;
  color: #788082;
  font-size: 10px;
  text-align: right;
}

.payment-submit {
  width: 100%;
  min-height: 50px;
  padding: 13px 18px;
  border: 0;
  background: var(--blue);
  color: #fff;
  cursor: pointer;
  font: 600 13px var(--sans);
  transition: background .2s, transform .2s;
}

.payment-submit:hover:not(:disabled) {
  background: var(--terracotta);
  transform: translateY(-1px);
}

.payment-submit:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 3px;
}

.payment-submit:disabled {
  background: #8a9090;
  cursor: not-allowed;
}

.payment-message {
  min-height: 20px;
  margin: 11px 0 0;
  color: #597567;
  font-size: 11px;
  text-align: center;
}

.payment-message[data-type="error"] {
  color: #a94f43;
}

.payment-consent {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 16px;
  color: #788082;
  font-size: 11px;
  line-height: 1.7;
}

.payment-consent input {
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  accent-color: var(--terracotta);
  flex: none;
}

.payment-consent a {
  color: inherit;
  text-decoration-color: #b7b8b3;
}

.payment-assurance {
  display: grid;
  gap: 8px;
  margin: 20px 0 0;
  padding: 17px 0 0;
  border-top: 1px solid var(--line);
  color: #687174;
  font-size: 11px;
  list-style: none;
}

.payment-assurance li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.payment-assurance span {
  color: var(--gold);
  font-weight: 700;
}

.payment-footer {
  border-top: 1px solid var(--line);
}

@media (max-width: 850px) {
  .payment-header nav {
    display: none;
  }

  .payment-main {
    padding-top: 32px;
  }

  .payment-heading {
    display: block;
  }

  .payment-steps {
    margin-top: 22px;
  }

  .payment-layout {
    grid-template-columns: 1fr;
  }

  .payment-summary {
    position: static;
  }

  .payment-form-panel,
  .payment-summary {
    padding: 25px;
  }

  .payment-footer {
    padding: 22px 28px;
  }
}

@media (max-width: 520px) {
  .payment-header {
    height: 68px;
    padding: 0 18px;
  }

  .payment-header .brand {
    font-size: 19px;
  }

  .payment-header .brand small {
    display: none;
  }

  .payment-security {
    font-size: 0;
  }

  .payment-security span {
    font-size: 20px;
  }

  .payment-main {
    padding: 25px 16px 55px;
  }

  .payment-back {
    margin-bottom: 22px;
  }

  .payment-heading {
    margin-bottom: 24px;
  }

  .payment-heading h1 {
    font-size: 34px;
  }

  .payment-heading > div > p:last-child {
    font-size: 13px;
  }

  .payment-steps {
    width: 100%;
    justify-content: space-between;
  }

  .payment-steps li {
    font-size: 10px;
  }

  .payment-steps li:not(:last-child)::after {
    width: 12px;
    margin: 0 6px;
  }

  .payment-form-panel,
  .payment-summary {
    padding: 21px 17px;
  }

  .payment-form-panel h2,
  .payment-summary h2 {
    font-size: 22px;
  }

  .payment-account {
    align-items: flex-start;
  }

  .payment-select {
    min-height: 50px;
    padding: 12px;
    font-size: 16px;
  }

  .payment-summary dd {
    max-width: 170px;
  }

  .payment-submit {
    min-height: 52px;
    font-size: 14px;
  }

  .payment-footer {
    display: grid;
    grid-template-columns: 1fr auto;
    padding: 24px 18px;
  }

  .payment-footer > span {
    grid-column: 1 / -1;
  }

  .payment-footer .brand {
    font-size: 18px;
  }

  .payment-footer .footer-legal {
    gap: 13px;
  }
}
