.protected-by,
.payment-trust-badge {
  --trust-badge-gray: #77706a;
  --trust-badge-gray-soft: #92877f;

  width: fit-content;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.36rem;
  justify-self: center;
  margin: -6px auto 0;
  padding: 2px 8px 0;
  color: var(--trust-badge-gray-soft);
  font-size: clamp(0.78rem, 1.8vw, 0.88rem);
  line-height: 1;
  letter-spacing: -0.025em;
  text-align: center;
  user-select: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.protected-by span,
.payment-trust-badge__label {
  color: #8e837b;
  font-weight: 560;
  white-space: nowrap;
}

.protected-by strong,
.payment-trust-badge__brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.24rem;
  min-width: 0;
  color: var(--trust-badge-gray);
  font-size: 1.06em;
  font-weight: 850;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.protected-by .mp-logo,
.payment-trust-badge__logo {
  width: 2.5rem;
  height: 1.6rem;
  flex: 0 0 auto;
  color: currentColor;
  opacity: 0.95;
  filter: drop-shadow(0 0.5px 0 rgba(255, 255, 255, 0.36));
}

.protected-by__icon {
  width: 28px;
  height: auto;
  margin-right: -0.08rem;
}

.payment-trust-badge__name {
  color: var(--trust-badge-gray);
  font-size: 1.06em;
  font-weight: 850;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.card-payment-note {
  display: none !important;
}

.contribution-form > .name-section {
  order: 1;
}
.contribution-form > .contact-fields {
  order: 2;
}
.contribution-form > .amount-presets-section {
  order: 3;
}
.contribution-form > .custom-amount-section {
  order: 4;
}
.contribution-form > .message-section {
  order: 5;
}
.contribution-form > .payment-method-section {
  order: 6;
}
.contribution-form > .card-payment-panel {
  order: 7;
}
.contribution-form > .checkbox-stack {
  order: 8;
}
.contribution-form > #pixSubmitButton {
  order: 10;
}
.contribution-form > #pixPaymentBox {
  order: 11;
}
.contribution-form > .contribution-summary {
  order: 12;
}
.contribution-form > .protected-by {
  order: 13;
}
.contribution-form > .form-feedback {
  order: 14;
}

.message-section {
  gap: 9px;
}
.message-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.message-meta .char-counter {
  flex: 0 0 auto;
  margin-left: auto;
  padding-top: 1px;
}
.checkbox.checkbox-compact {
  gap: 7px;
  color: #8a7e75;
  font-size: 0.78rem;
  font-weight: 560;
  line-height: 1.35;
}
.checkbox.checkbox-compact input {
  margin-top: 2px;
  transform: scale(0.88);
  transform-origin: top left;
}

@media (max-width: 520px) {
  .message-meta {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }
  .message-meta .checkbox {
    flex: 1 1 auto;
    min-width: 0;
  }
  .message-meta .char-counter {
    flex: 0 0 auto;
    margin-left: auto;
    padding-top: 1px;
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
    text-align: right;
  }
}

@media (max-width: 420px) {
  .protected-by,
  .payment-trust-badge {
    gap: 0.38rem;
    margin-top: -4px;
    padding-inline: 4px;
    font-size: 0.78rem;
  }

  .protected-by .mp-logo,
  .payment-trust-badge__logo {
    width: 2.15rem;
    height: 1.38rem;
  }

  .protected-by__icon {
    width: 26px;
  }

  .checkbox-stack .checkbox:has(input[name="allowPublicDisplay"]) {
    width: calc(100% - 104px);
    max-width: calc(100% - 104px);
  }
}

@media (prefers-contrast: more) {
  .protected-by,
  .payment-trust-badge {
    --trust-badge-gray: #625b55;
    --trust-badge-gray-soft: #71675f;
  }
}
