@font-face {
  font-family: "Rethink Sans";
  src: url("../fonts/rethink-sans-latin-vf.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --pay-blue: #223983;
  --pay-teal: #00706a;
  --pay-green: #6aa84f;
  --pay-green-dark: #5b9443;
  --pay-lime: #80c342;
  --pay-text: #3e3e3e;
  --pay-muted: #6b7280;
  --pay-border: #e3e3e3;
  --pay-link: #1a73e8;
  --pay-font: "Rethink Sans", "Open Sans", Arial, Helvetica, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--pay-font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--pay-text);
  background: #f6f6f6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
p {
  margin: 0;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid rgba(128, 195, 66, 0.9);
  outline-offset: 2px;
}

.pay-header {
  height: 88px;
  border-bottom: 1px solid #e6e6e6;
  background: #ffffff;
}

.pay-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1120px;
  height: 100%;
  margin-inline: auto;
  padding-inline: 24px;
}

.pay-header__logo {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.pay-header__logo img {
  width: 168px;
  height: auto;
}

.pay-header__nav {
  display: flex;
  align-items: center;
  gap: 30px;
}

.pay-header__nav a {
  color: #1f2430;
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  transition: color 0.2s ease;
}

.pay-header__nav a:hover {
  color: var(--pay-blue);
}

.pay-main {
  background: #f6f6f6;
}

.pay-hero {
  position: relative;
  min-height: calc(100vh - 88px);
  overflow: hidden;
}

.pay-accent {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 180px;
  background: var(--pay-lime);
}

.pay-accent::after {
  content: "";
  position: absolute;
  top: 58px;
  left: 100%;
  width: 40px;
  height: 54px;
  background: var(--pay-lime);
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.pay-photo {
  position: absolute;
  bottom: -4px;
  left: -110px;
  z-index: 1;
  width: 299px;
  height: auto;
}

.pay-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 80px;
  width: 100%;
  max-width: 1120px;
  margin-inline: auto;
  padding: 125px 24px 70px;
}

.pay-welcome {
  flex: 0 0 592px;
  padding-left: 140px;
}

.pay-welcome__title {
  color: var(--pay-blue);
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.02;
}

.pay-welcome__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: var(--pay-teal);
  font-size: 33px;
  font-weight: 400;
  letter-spacing: -0.2px;
  line-height: 1.1;
}

.pay-welcome p {
  max-width: 390px;
  margin-top: 22px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--pay-text);
}

.pay-card {
  flex: 0 0 377px;
  overflow: hidden;
  border: 1px solid var(--pay-border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.pay-card__body {
  padding: 26px 28px 39px;
}

.pay-card h2 {
  margin-bottom: 16px;
  color: #171b26;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.pay-card__intro {
  margin-bottom: 26px;
  color: var(--pay-muted);
  font-size: 15px;
  line-height: 1.45;
}

.pay-form label {
  display: block;
  margin-bottom: 8px;
  color: #333333;
  font-size: 14px;
  font-weight: 700;
}

.pay-form input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid #d9d9d9;
  border-radius: 3px;
  outline: 0;
  background: #ffffff;
  color: #222222;
  font-size: 15px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.pay-form input:focus {
  border-color: var(--pay-lime);
  box-shadow: 0 0 0 3px rgba(128, 195, 66, 0.18);
}

.pay-form input[aria-invalid="true"] {
  border-color: #c0392b;
}

.pay-form__error {
  margin-top: 6px;
  color: #c0392b;
  font-size: 12px;
  line-height: 1.4;
}

.pay-form__legal {
  margin-top: 12px;
  color: var(--pay-muted);
  font-size: 12px;
  line-height: 1.5;
}

.pay-form__legal a {
  color: var(--pay-link);
}

.pay-form__legal a:hover {
  text-decoration: underline;
}

.pay-form__button {
  width: 100%;
  height: 44px;
  margin-top: 27px;
  border: 0;
  border-radius: 3px;
  background: var(--pay-green);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.2s ease;
}

.pay-form__button:hover {
  background: var(--pay-green-dark);
}

.pay-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px;
  border-top: 1px solid #ededed;
  background: #f5f5f5;
  color: #555555;
  font-size: 14px;
}

.pay-card__footer a {
  color: #0b6a83;
  font-weight: 600;
}

.pay-card__footer a:hover {
  text-decoration: underline;
}

.pay-results {
  position: relative;
  z-index: 2;
  padding: 0 24px 70px;
}

.pay-results__inner {
  max-width: 1120px;
  margin-inline: auto;
  padding: 28px;
  border: 1px solid var(--pay-border);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
}

.pay-results__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.pay-results__header h2 {
  color: var(--pay-blue);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.pay-results__summary {
  margin-top: 6px;
  color: #555555;
  font-size: 14px;
  line-height: 1.4;
}

.pay-results__note {
  flex: 0 0 auto;
  color: #8a8f98;
  font-size: 12px;
  line-height: 1.4;
  text-align: right;
}

.pay-results__body {
  margin-top: 22px;
}

.pay-results__state {
  padding: 28px 0 8px;
  color: var(--pay-muted);
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.pay-results__state--error {
  color: #b3261e;
}

.pay-results__spinner {
  width: 28px;
  height: 28px;
  margin: 0 auto 12px;
  border: 3px solid #e5e7eb;
  border-top-color: var(--pay-green);
  border-radius: 50%;
  animation: pay-spin 0.8s linear infinite;
}

@keyframes pay-spin {
  to {
    transform: rotate(360deg);
  }
}

.invoice-list {
  display: flex;
  flex-direction: column;
}

.invoice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 0;
  border-top: 1px solid #ededed;
}

.invoice:first-child {
  border-top: 0;
  padding-top: 0;
}

.invoice:last-child {
  padding-bottom: 0;
}

.invoice__main {
  min-width: 0;
}

.invoice__title {
  color: #222222;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.invoice__meta {
  margin-top: 3px;
  color: var(--pay-muted);
  font-size: 12.5px;
  line-height: 1.4;
}

.invoice__side {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 18px;
}

.invoice__amount {
  color: #171b26;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.invoice__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 74px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.invoice__badge--paid {
  background: #e8f5e9;
  color: #2e7d32;
}

.invoice__badge--pending {
  background: #fff4e5;
  color: #b26a00;
}

.invoice__badge--expired {
  background: #fdecea;
  color: #b3261e;
}

.invoice__badge--neutral {
  background: #eef1f5;
  color: #4b5563;
}

@media (min-width: 1341px) {
  .pay-photo {
    left: -40px;
  }
}

@media (max-width: 1240px) {
  .pay-content {
    gap: 45px;
    padding-left: 190px;
  }

  .pay-welcome {
    flex: 1 1 auto;
    min-width: 0;
    padding-left: 0;
  }

  .pay-card {
    flex: 0 0 360px;
  }

  .pay-accent {
    width: 140px;
  }

  .pay-photo {
    left: -90px;
    width: 240px;
  }
}

@media (max-width: 900px) {
  .pay-hero {
    min-height: calc(100vh - 88px);
  }

  .pay-content {
    flex-direction: column;
    gap: 38px;
    padding: 80px 24px 60px 190px;
  }

  .pay-welcome {
    flex-basis: auto;
  }

  .pay-welcome__title {
    font-size: 38px;
  }

  .pay-welcome__eyebrow {
    font-size: 29px;
  }

  .pay-card {
    flex: 0 0 auto;
    width: 100%;
    max-width: 420px;
  }
}

@media (max-width: 760px) {
  .pay-header {
    height: auto;
  }

  .pay-header__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding-block: 16px;
  }

  .pay-header__logo img {
    width: 138px;
  }

  .pay-header__nav {
    flex-wrap: wrap;
    gap: 8px 18px;
  }

  .pay-header__nav a {
    font-size: 12px;
  }

  .pay-accent,
  .pay-photo {
    display: none;
  }

  .pay-hero {
    min-height: auto;
  }

  .pay-content {
    padding: 36px 20px 50px;
  }

  .pay-results {
    padding: 0 20px 50px;
  }

  .pay-results__inner {
    padding: 22px 20px;
  }

  .pay-results__header {
    flex-direction: column;
    gap: 10px;
  }

  .pay-results__note {
    text-align: left;
  }

  .invoice {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 0;
  }

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

  .pay-welcome__title {
    font-size: 34px;
  }

  .pay-welcome__eyebrow {
    font-size: 26px;
  }

  .pay-welcome p {
    margin-top: 20px;
    font-size: 14px;
  }

  .pay-card__body {
    padding: 22px 20px 24px;
  }

  .pay-card__footer {
    padding: 18px 20px;
    font-size: 13px;
  }
}
