/* Autenticação Stone — olho de senha, CTA "Quero participar" e página cadastro.html */

/* ---------- Campo de senha com olho ---------- */
.stone-senha-wrap {
  position: relative;
  width: 100%;
}

.stone-senha-wrap .form-control {
  width: 100%;
  padding-right: 5rem !important;
}

.stone-senha-toggle {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 4.8rem;
  height: 48px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #666666;
  font-size: 1.7rem;
  cursor: pointer;
}

.stone-senha-toggle:hover,
.stone-senha-toggle:focus-visible {
  color: #004921;
}

.stone-senha-toggle:focus-visible {
  outline: 2px solid #004921;
  outline-offset: -2px;
  border-radius: 6px;
}

/* ---------- Box "Quero participar" (home) ---------- */
.stone-login-cta {
  margin-top: 1.6rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(31, 31, 31, 0.12);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  text-align: center;
}

.stone-login-cta__text {
  margin: 0 !important;
  font-size: 1.35rem;
  color: #666666;
}

.stone-login-forgot {
  margin: 0 !important;
  text-align: center;
  font-size: 1.35rem;
  color: #666666;
}

.stone-login-forgot a {
  color: #666666;
  text-decoration: underline;
}

.stone-login-forgot a:hover,
.stone-login-forgot a:focus-visible {
  color: #004921;
}

/* ---------- Página cadastro.html ---------- */
.stone-cadastro-page {
  /* Preserva o padding-top de .site-main (header + faixa de countdown) */
  padding-top: calc(var(--header-h) + var(--promo-encerrada-h, 0px) + clamp(2.4rem, 4vw, 4.8rem));
  padding-inline: 1.6rem;
  padding-bottom: 6.4rem;
}

body.page-cadastro {
  background: #00D700;
  background-image: none;
}

.stone-cadastro-shell {
  width: min(100%, 96rem);
  margin: 0 auto;
}

.stone-cadastro-card {
  padding: clamp(2rem, 4vw, 3.6rem);
  border-radius: 2.4rem;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(31, 31, 31, 0.14);
  color: #1f1f1f;
}

.stone-cadastro-card__title {
  margin: 0 0 0.6rem;
  font-family: var(--font-heading, inherit);
  font-size: clamp(2.8rem, 4vw, 3.8rem);
  line-height: 1.05;
  color: #1f1f1f;
}

.stone-cadastro-card__lead {
  margin: 0 0 2.4rem;
  font-size: 1.5rem;
  line-height: 1.5;
  color: #666666;
}

.stone-cadastro-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.8rem 2.4rem;
  align-items: start;
}

.stone-cadastro-form > .stone-cadastro-fieldset,
.stone-cadastro-form > .stone-cadastro-field--full,
.stone-cadastro-form > .stone-cadastro-aceites,
.stone-cadastro-form > .stone-cadastro-actions {
  grid-column: 1 / -1;
}

.stone-cadastro-form > .stone-cadastro-actions {
  max-width: 44rem;
  width: 100%;
  margin-inline: auto;
}

.stone-cadastro-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
}

.stone-cadastro-fieldset legend {
  float: none;
  width: auto;
  margin: 0 0 1rem;
  padding: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: #1f1f1f;
}

.stone-tipo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stone-tipo__opt {
  position: relative;
}

.stone-tipo__opt input {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
}

.stone-tipo__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 1.2rem;
  border: 2px solid rgba(0, 0, 0, 0.18);
  border-radius: 1.6rem;
  background: #ffffff;
  font-size: 1.45rem;
  font-weight: 600;
  color: #1f1f1f;
  text-align: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.stone-tipo__opt input:checked + span {
  border-color: #004921;
  background: #a5fa00;
}

.stone-tipo__opt input:focus-visible + span {
  outline: 2px solid #004921;
  outline-offset: 2px;
}

.stone-cadastro-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

/* O cadastro atual aceita somente pessoa física. */
.stone-tipo,
.stone-cadastro-field[data-tipo-campo="PJ"],
.stone-cadastro-field:has(#Celular) { display: none !important; }
.stone-cadastro-field:has(#NomeCompleto) { grid-column: 1 / -1; }

.stone-cadastro-field > label:not(.error),
.stone-cadastro-field .stone-cadastro-label {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1f1f1f;
}

/* Label fixa já identifica o campo: sem float-placeholder do fenix.js */
.stone-cadastro-form .float-placeholder {
  display: none !important;
}

.stone-cadastro-field .req,
.stone-cadastro-aceites .req {
  color: #c62828;
}

.stone-cadastro-field[hidden] {
  display: none !important;
}

.stone-cadastro-aceites {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.stone-cadastro-aceites .form-check label:not(.error) {
  color: #1f1f1f;
}

.stone-cadastro-aceites .form-check {
  align-items: center;
  column-gap: 1.2rem;
  margin: 0;
}

.stone-cadastro-aceites .form-check-input[type="checkbox"] {
  width: 2.2rem;
  height: 2.2rem;
  min-width: 2.2rem;
  margin: 0;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 6px;
  background: #ffffff;
  box-shadow: none;
}

.stone-cadastro-aceites .form-check-input[type="checkbox"]:hover {
  border-color: rgba(0, 0, 0, 0.25);
  box-shadow: 0 0 0 3px rgba(165, 250, 0, 0.55);
}

.stone-cadastro-aceites .form-check-input[type="checkbox"]:checked {
  background: #004921;
  border-color: #004921;
  box-shadow: none;
}

.stone-cadastro-aceites .form-check-input[type="checkbox"]:checked::after {
  border-color: #a5fa00;
}

.stone-cadastro-aceites .form-check-input[type="checkbox"]:focus-visible {
  outline: 2px solid #004921;
  outline-offset: 3px;
}

.stone-cadastro-aceites .form-check label:not(.error) {
  margin: 0;
  line-height: 1.4;
}

.stone-cadastro-aceites .form-check > label.error {
  margin: 0.2rem 0 0;
  font-size: 1.2rem;
  line-height: normal;
  color: var(--color-error-soft);
  cursor: default;
}

.stone-cadastro-aceites a {
  color: #004921;
  font-weight: 700;
  text-decoration: underline;
}

.stone-cadastro-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.6rem;
}

.stone-cadastro-login {
  margin: 0;
  text-align: center;
  font-size: 1.35rem;
  color: #666666;
}

.stone-cadastro-login a {
  color: #004921;
  font-weight: 700;
}

@media (max-width: 720px) {
  .stone-cadastro-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 480px) {
  .stone-tipo {
    grid-template-columns: 1fr;
  }
}

/* ---------- Esqueci minha senha (box da home) ---------- */
.stone-esqueci-back {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0 0 1.2rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: #666666;
  font-size: 1.35rem;
  font-weight: 600;
  cursor: pointer;
}

.stone-esqueci-back:hover,
.stone-esqueci-back:focus-visible {
  color: #004921;
}

.stone-esqueci-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5.6rem;
  height: 5.6rem;
  margin: 0 0 1.2rem;
  border-radius: 50%;
  background: #a5fa00;
  color: #004921;
  font-size: 2.4rem;
}

.stone-esqueci-text {
  margin: 0 0 1.2rem;
  font-size: 1.35rem;
  line-height: 1.45;
  color: #666666;
}

[data-esqueci-step="sucesso"] .btn {
  margin-top: 0.4rem;
}

[data-esqueci-step="sucesso"] .stone-login-forgot {
  margin-top: 1.2rem !important;
}

.stone-esqueci-erro {
  display: flex;
  align-items: center;
  margin: 0.6rem 0 0 !important;
  font-size: 1.2rem;
  line-height: 1.3;
  color: #f23d4f !important;
}

.stone-esqueci-erro[hidden] {
  display: none !important;
}

.stone-esqueci-icon + .vitrine-title {
  margin-top: 0;
}

.login-step[data-esqueci-step="codigo"] .login-verify__resend,
.login-step[data-esqueci-step="codigo"] .login-verify__support {
  justify-content: center;
  text-align: center;
}

.login-step[data-esqueci-step="codigo"] .login-verify__resend {
  flex-direction: column;
  gap: 0.4rem;
}

.login-step[data-esqueci-step="codigo"] .login-verify__timer:empty {
  display: none;
}

/* Máscara do código fica presa à altura do campo (mensagem de erro do validator entra dentro do wrap). */
.login-step[data-esqueci-step="codigo"] .login-verify__code-mask {
  inset: 0 0 auto 0;
  height: 48px;
}

/* Regras de senha — popover branco delicado abaixo do campo (home e cadastro) */
.login-step[data-esqueci-step="senha"] .hero__cpf-form__field {
  position: relative;
}

.stone-senha-regras {
  position: absolute;
  top: calc(100% + 0.6rem);
  left: 0;
  z-index: 10;
  width: 100%;
  margin: 0 !important;
  padding: 1rem 1.3rem 1.1rem !important;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 1.2rem !important;
  background: #ffffff !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  text-align: left;
}

.stone-senha-regras[hidden] {
  display: none !important;
}

.stone-senha-regras::before {
  content: "";
  position: absolute;
  top: -0.5rem;
  left: 1.8rem;
  width: 0.9rem;
  height: 0.9rem;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  border-left: 1px solid rgba(0, 0, 0, 0.08);
  background: #ffffff;
  transform: rotate(45deg);
}

.stone-senha-regras__title {
  margin: 0 0 0.5rem !important;
  font-size: 1.15rem !important;
  font-weight: 600;
  line-height: 1.3 !important;
  color: #1f1f1f !important;
}

.stone-senha-regras .senha-regra {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0.3rem 0 0;
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.35;
  color: #7a7a7a;
}

.stone-senha-regras .senha-regra__icon {
  flex: 0 0 1.4rem;
  width: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stone-senha-regras .senha-regra__icon i {
  font-size: 1.2rem;
  color: #b3b3b3;
}

.stone-senha-regras .senha-regra.is-ok {
  color: #004921;
  font-weight: 500;
}

.stone-senha-regras .senha-regra.is-ok .senha-regra__icon i {
  color: #00a000;
}
