/* =========================================================
   Componentes compartilhados dos formulários (Contato e Ouvidoria):
   campos, aviso, consentimento LGPD, reCAPTCHA, botão, mensagens de
   status e o banner "Sua dúvida já pode ter resposta" (.faq-banner,
   sobre o .help da Home). Comportamento em js/forms.js.
   Medidas em px de layout (1920); breakpoints iguais aos da Home.
   ========================================================= */

/* elementos ocultos (erros, aviso de configuração, status) */
.secure-form [hidden] {
  display: none !important;
}

.secure-form {
  margin-top: 37px;
}

.secure-form__field + .secure-form__field,
.secure-form__field + .secure-form__row,
.secure-form__row + .secure-form__field {
  margin-top: 33px;
}

/* especificidade maior que as regras de espaçamento dos breakpoints */
.secure-form .secure-form__row > .secure-form__field {
  margin-top: 0;
}

.secure-form__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 21px;
}

.secure-form__label {
  display: block;
  padding-left: 3px;
  font-size: 24px;
  line-height: 32px;
  color: #1a2424;
}

.secure-form__input {
  display: block;
  width: 100%;
  height: 69px;
  margin-top: 9px;
  padding: 0 26px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  background: var(--color-surface);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
  font: inherit;
  font-size: 22px;
  color: #1a2424;
  -webkit-appearance: none;
          appearance: none;
}

.secure-form__input:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.secure-form__input[aria-invalid='true'] {
  border-color: #b3261e;
}

.secure-form__textarea {
  height: 202px;
  padding: 20px 26px;
  line-height: 30px;
  resize: none;
}

.secure-form__select {
  position: relative;
}

.secure-form__select select {
  padding-right: 80px;
  cursor: pointer;
}

/* placeholder do select (nenhum assunto escolhido) */
.secure-form__select select:invalid {
  color: #949494;
}

.secure-form__select option {
  color: #1a2424;
}

.secure-form__chevron {
  position: absolute;
  top: 50%;
  right: 34px;
  width: 30px;
  height: 30px;
  margin-top: -9px;
  color: #6f7d7c;
  pointer-events: none;
}

.secure-form__count {
  margin-top: 6px;
  text-align: right;
  font-size: 16px;
  line-height: 20px;
  color: #6f7776;
}

.secure-form__count:empty {
  display: none;
}

.secure-form__error {
  margin-top: 8px;
  padding-left: 3px;
  font-size: 18px;
  line-height: 24px;
  color: #b3261e;
}

/* campo isca: fora da tela */
.secure-form__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.secure-form__notice {
  margin-top: 24px;
  padding: 35px 32px 24px;
  border-radius: 20px;
  background: #ebeae6;
  font-size: 20.7px;
  font-weight: 600;
  line-height: 26px;
  color: #4d4d4d;
}

.secure-form__notice a,
.secure-form__consent a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.secure-form__consent {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-top: 24px;
  padding-left: 3px;
  font-size: 16.2px;
  line-height: 24px;
  color: #1a2424;
}

.secure-form__checkbox {
  flex: none;
  width: 31px;
  height: 31px;
  margin: 0;
  border-radius: 4px;
  background: var(--color-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  -webkit-appearance: none;
          appearance: none;
}

.secure-form__checkbox:checked {
  background: var(--color-button-login) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 22px no-repeat;
}

.secure-form__checkbox:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 3px;
}

.secure-form__checkbox[aria-invalid='true'] {
  box-shadow: 0 0 0 1.5px #b3261e;
}

.secure-form__error--consent {
  padding-left: 51px;
}

/* o widget oficial tem 304×78px; no layout ele aparece ~1,35× maior */
.secure-form__captcha {
  width: 410px;
  min-height: 105px;
  margin-top: 34px;
}

.secure-form__recaptcha {
  transform: scale(1.348);
  transform-origin: left top;
}

.secure-form__captcha-pending {
  display: flex;
  align-items: center;
  min-height: 103px;
  padding: 12px 20px;
  border: 1.5px dashed #b6bbb8;
  border-radius: 6px;
  font-size: 16px;
  line-height: 22px;
  color: #4d4d4d;
}

.secure-form__submit {
  width: 371px;
  height: 67px;
  margin-top: 40px;
  background: var(--color-button-login);
  font-size: 20px;
  letter-spacing: 0.5px;
  color: var(--color-white);
}

.secure-form__submit:disabled {
  cursor: progress;
  opacity: 0.75;
}

.secure-form__status {
  margin-top: 24px;
  padding: 22px 26px;
  border-radius: 14px;
  font-size: 20px;
  line-height: 28px;
}

.secure-form__status[data-state='success'] {
  background: #e3efe9;
  color: #1f4d3a;
}

.secure-form__status[data-state='warning'] {
  background: #f4eedb;
  color: #5a4a14;
}

.secure-form__status[data-state='error'] {
  background: #f6e3e1;
  color: #8a1f17;
}

.secure-form__status strong {
  font-weight: 600;
}

.faq-banner {
  margin-top: 49px;
}

.faq-banner .help__title {
  margin-top: -7px;
}

.faq-banner__text {
  margin-top: 2px;
  color: var(--color-white);
}

.faq-banner__button {
  width: 414px;
}

/* Tablet (≤ 1200px, sem zoom) */
@media (max-width: 1200px) {
  .secure-form {
      margin-top: 32px;
    }

  .secure-form__field + .secure-form__field,
    .secure-form__field + .secure-form__row,
    .secure-form__row + .secure-form__field {
      margin-top: 22px;
    }

  .secure-form__label {
      padding-left: 0;
      font-size: 17px;
      line-height: 24px;
    }

  .secure-form__input {
      height: 56px;
      margin-top: 8px;
      padding: 0 18px;
      font-size: 17px;
    }

  .secure-form__textarea {
      resize: vertical;
      height: 170px;
      padding: 14px 18px;
      line-height: 25px;
    }

  .secure-form__chevron {
      right: 18px;
      width: 24px;
      height: 24px;
      margin-top: -6px;
    }

  .secure-form__error {
      font-size: 15px;
      line-height: 21px;
    }

  .secure-form__notice {
      padding: 22px 22px;
      border-radius: 16px;
      font-size: 16px;
      line-height: 23px;
    }

  .secure-form__consent {
      gap: 12px;
      padding-left: 0;
      font-size: 15px;
      line-height: 21px;
    }

  .secure-form__checkbox {
      width: 24px;
      height: 24px;
    }

  .secure-form__checkbox:checked {
      background-size: 18px;
    }

  .secure-form__error--consent {
      padding-left: 36px;
    }

  /* sem zoom: o widget fica no tamanho original */
  .secure-form__captcha {
      width: 304px;
      min-height: 78px;
      margin-top: 24px;
    }

  .secure-form__recaptcha {
      transform: none;
    }

  .secure-form__captcha-pending {
      min-height: 78px;
      font-size: 15px;
      line-height: 21px;
    }

  .secure-form__submit {
      width: 300px;
      height: 54px;
      margin-top: 28px;
      font-size: 15px;
    }

  .secure-form__status {
      font-size: 16px;
      line-height: 24px;
    }

  .faq-banner {
      width: 100%;
      margin: 40px 0 0;
    }

  .faq-banner__button {
      width: 360px;
    }
}

/* Mobile (≤ 767px) */
@media (max-width: 767px) {
  .secure-form__row {
      grid-template-columns: 1fr;
      row-gap: 22px;
    }

  .secure-form__input {
      height: 52px;
      padding: 0 16px;
      font-size: 16px;
    }

  .secure-form__textarea {
      height: 160px;
      padding: 12px 16px;
      line-height: 24px;
    }

  .secure-form__notice {
      padding: 18px;
      font-size: 15px;
      line-height: 22px;
    }

  /* reCAPTCHA (304px) reduzido para caber em telas estreitas */
  .secure-form__captcha {
      width: 100%;
      max-width: 304px;
    }

  .secure-form__submit {
      width: 100%;
    }

  .faq-banner__button {
      width: 100%;
    }
}

/* telas muito estreitas (< 336px): reduz o reCAPTCHA (304px) para caber */
@media (max-width: 335px) {
  .secure-form__recaptcha {
      transform: scale(0.94);
    }
}
