.tax-certificate-page {
  width: 670px;
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0 80px;
  color: #505050;
}

.tax-certificate-page * {
  box-sizing: border-box;
}

.tax-certificate-page__title {
  margin: 0 0 28px;
  color: #f26b19;
  font-size: 29px;
  line-height: 1.2;
  text-align: left;
  text-transform: uppercase;
}

.tax-certificate-page__steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 20px 38px;
}

.tax-step-indicator {
  display: flex;
  align-items: center;
  min-width: 0;
  color: #a7a7a7;
  font-size: 17px;
}

.tax-step-indicator__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin-right: 10px;
  border-radius: 50%;
  background: #edf2cc;
  color: #bdce68;
}

.tax-step-indicator__icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.tax-step-indicator.is-active {
  color: #505050;
}

.tax-step-indicator.is-active .tax-step-indicator__icon,
.tax-step-indicator.is-complete .tax-step-indicator__icon {
  background: #bdd461;
  color: #6d8606;
}

.tax-certificate-page__content {
  padding: 0 35px;
}

.tax-section {
  margin-bottom: 28px;
}

.tax-section + .tax-section {
  margin-top: 34px;
}

.tax-section__title {
  margin: 0 0 18px;
  color: #111;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.25;
}

.tax-person-card {
  margin-top: 18px;
  padding: 20px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
}

.tax-person-card .tax-section__title {
  margin-bottom: 22px;
}

.tax-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 16px;
  row-gap: 12px;
}

.tax-field {
  min-width: 0;
}

.tax-field--wide {
  grid-column: 1 / -1;
  width: calc(50% - 8px);
}

.tax-field label,
.tax-field__label {
  display: block;
  margin-bottom: 5px;
  font-size: 15px;
  line-height: 1.25;
}

.tax-required {
  color: #f26b19;
}

.tax-certificate-page input[type="text"],
.tax-certificate-page input[type="date"],
.tax-certificate-page select {
  display: block;
  width: 100%;
  height: 31px;
  margin: 0;
  padding: 4px 9px;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  background: #fff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.07);
  color: #505050;
  font: 15px/20px 'PT Sans', sans-serif;
}

.tax-certificate-page select {
  padding-right: 30px;
}

.tax-certificate-page input:focus,
.tax-certificate-page select:focus {
  border-color: #8ca02f;
  outline: none;
  box-shadow: 0 0 0 2px rgba(175, 197, 76, 0.22);
}

.tax-certificate-page .is-invalid,
.tax-certificate-page input.is-invalid,
.tax-certificate-page select.is-invalid {
  border-color: #f26b19;
  box-shadow: 0 0 0 2px rgba(242, 107, 25, 0.16);
}

.tax-field-error,
.tax-form-error {
  color: #c84f08;
  font-size: 13px;
  line-height: 1.25;
}

.tax-field-error {
  margin-top: 4px;
}

.tax-form-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-left: 3px solid #f26b19;
  background: #fff5ee;
}

.tax-choice {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 10px 0;
  cursor: pointer;
  font-size: 15px;
  line-height: 24px;
}

.tax-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.tax-choice__control {
  position: relative;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border: 1px solid #c7c7c7;
  border-radius: 4px;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05);
}

.tax-choice--radio .tax-choice__control {
  border-radius: 50%;
}

.tax-choice input:focus + .tax-choice__control {
  box-shadow: 0 0 0 2px rgba(175, 197, 76, 0.3);
}

.tax-choice input:checked + .tax-choice__control:after {
  content: '';
  position: absolute;
  inset: 6px;
  border-radius: 2px;
  background: #f26b19;
}

.tax-choice--radio input:checked + .tax-choice__control:after {
  border-radius: 50%;
}

.tax-choice.is-invalid .tax-choice__control,
.tax-choice-group.is-invalid {
  border-color: #f26b19;
}

.tax-choice-group__question {
  margin: 0 0 12px;
  font-size: 15px;
}

.tax-choice-group .tax-choice {
  width: max-content;
}

.tax-patient {
  margin-bottom: 34px;
}

.tax-patient + .tax-patient {
  padding-top: 2px;
}

.tax-taxpayer-summary {
  margin: 26px 0 20px;
  padding: 15px 18px;
  border-left: 2px solid #bdd461;
  border-radius: 9px;
  background: #fff;
  line-height: 1.45;
}

.tax-taxpayer-summary strong {
  display: block;
}

.tax-years {
  margin-top: 18px;
}

.tax-years__title {
  margin: 0 0 14px;
  color: #111;
  font-size: 17px;
  font-weight: 700;
}

.tax-year-row {
  display: flex;
  align-items: flex-start;
  min-height: 35px;
  gap: 12px;
}

.tax-year-row > .tax-choice {
  flex: 0 0 70px;
  margin: 2px 0 8px;
}

.tax-year-distribution {
  flex: 1 1 auto;
  min-width: 0;
}

.tax-year-distribution > .tax-choice {
  margin: 2px 0 8px;
}

.tax-amounts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 10px;
}

.tax-amount-box {
  display: flex;
  align-items: center;
  min-width: 0;
  height: 32px;
  border: 1px solid #c9c9c9;
  border-radius: 3px;
  background: #fff;
  overflow: hidden;
}

.tax-amount-box.is-invalid {
  border-color: #f26b19;
}

.tax-amount-box__name {
  flex: 0 1 auto;
  max-width: 47%;
  padding: 0 7px;
  overflow: hidden;
  background: #ececec;
  color: #929292;
  line-height: 30px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tax-certificate-page .tax-amount-box input[type="text"] {
  min-width: 50px;
  height: 30px;
  padding-right: 2px;
  border: 0;
  box-shadow: none;
  text-align: right;
}

.tax-amount-box__currency {
  padding: 0 6px 0 2px;
}

.tax-inline-error {
  margin: -5px 0 8px 82px;
}

.tax-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 38px;
  padding-top: 16px;
  border-top: 1px solid #bdd461;
}

.tax-actions--patients {
  justify-content: space-between;
}

.tax-btn {
  min-height: 39px;
  padding: 8px 18px;
  border: 0;
  border-radius: 22px;
  font: 16px/23px 'PT Sans', sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.tax-btn--primary {
  background: #afc54c;
  color: #fff;
}

.tax-btn--primary:hover,
.tax-btn--primary:focus {
  background: #768d0d;
}

.tax-btn--secondary {
  background: #d2d2d2;
  color: #505050;
}

.tax-btn--add {
  margin-top: 6px;
  background: #afc54c;
  color: #fff;
}

.tax-btn--remove {
  margin-top: 8px;
  background: #f26b19;
  color: #fff;
}

.tax-summary-section {
  margin-bottom: 27px;
}

.tax-summary-section h2 {
  margin: 0 0 13px;
  color: #111;
  font-size: 17px;
  font-weight: 700;
}

.tax-summary-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  row-gap: 7px;
  margin: 0;
  font-size: 15px;
  line-height: 1.25;
}

.tax-summary-list dt,
.tax-summary-list dd {
  margin: 0;
}

.tax-summary-list dd {
  font-weight: 700;
}

.tax-distribution-summary {
  margin-top: 10px;
  padding: 12px 15px;
  border-left: 2px solid #bdd461;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.8);
}

.tax-distribution-summary strong,
.tax-distribution-summary span {
  display: block;
  margin-bottom: 4px;
}

.tax-consent {
  margin-top: 34px;
}

.tax-consent a {
  color: #3185cd;
}

.tax-success {
  margin: 20px 0 80px;
  padding: 35px 30px;
  border-left: 3px solid #afc54c;
  border-radius: 10px;
  background: #fff;
  text-align: center;
}

.tax-success h2 {
  margin: 0 0 18px;
  color: #111;
  font-size: 24px;
  font-weight: 700;
}

.tax-success__number {
  margin: 10px 0 18px;
  color: #f26b19;
  font-size: 24px;
  font-weight: 700;
}

.tax-form-trap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media screen and (max-width: 860px) {
  .tax-certificate-page {
    padding-top: 0;
  }

  .tax-certificate-page__title {
    font-size: 24px;
    text-align: center;
  }
}

@media screen and (max-width: 620px) {
  .tax-certificate-page__title {
    margin-bottom: 22px;
    font-size: 20px;
  }

  .tax-certificate-page__content {
    padding: 0;
  }

  .tax-certificate-page__steps {
    align-items: flex-start;
    margin: 0 0 30px;
  }

  .tax-step-indicator {
    flex: 1 1 33.333%;
    flex-direction: column;
    gap: 5px;
    font-size: 12px;
    text-align: center;
  }

  .tax-step-indicator__icon {
    flex-basis: 34px;
    width: 34px;
    height: 34px;
    margin: 0;
  }

  .tax-form-grid {
    grid-template-columns: 1fr;
  }

  .tax-field--wide {
    grid-column: auto;
    width: 100%;
  }

  .tax-person-card {
    padding: 16px;
  }

  .tax-year-row {
    flex-wrap: wrap;
  }

  .tax-year-distribution {
    flex-basis: calc(100% - 82px);
  }

  .tax-amounts {
    grid-template-columns: 1fr;
  }

  .tax-summary-list {
    grid-template-columns: minmax(95px, 0.7fr) 1.3fr;
  }

  .tax-actions--patients {
    align-items: flex-end;
  }

  .tax-btn {
    font-size: 14px;
  }
}

@media screen and (max-width: 400px) {
  .tax-actions {
    gap: 8px;
  }

  .tax-actions--patients {
    flex-wrap: wrap;
  }

  .tax-actions--patients .tax-btn--add {
    width: 100%;
  }
}
