/* Mergeia brand override — applies to any Chatwoot auth screen sharing the
   bg-n-brand/5 wrapper (login, reset password, set new password, etc.) */

/* 1) Watermark background on every auth screen, regardless of wrapper tag */
.bg-n-brand\/5 {
  position: relative;
  overflow: hidden;
}
.bg-n-brand\/5::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url('https://atendimento.mergeia.com.br/brand/mergeia_turbina_icone.png');
  background-repeat: no-repeat;
  background-position: center 55%;
  background-size: 900px auto;
  opacity: 0.08;
  pointer-events: none;
  z-index: 0;
}
.bg-n-brand\/5 > * {
  position: relative;
  z-index: 1;
}

/* 2) Login page: the real logo <img> exists already — just resize it */
img[src="https://atendimento.mergeia.com.br/brand/mergeia_turbina_full.png"] {
  height: 9.1rem !important;
  width: auto !important;
  max-width: 90vw;
}

/* 3) Pages with no logo element at all (set new password, reset password
   request, etc. — identified by the justify-center variant of the same
   wrapper) get a logo injected above the form via a flex-ordered ::after */
/* 4) "Set new password" screen doesn't describe the accepted password
   rule anywhere — inject the real rule (confirmed in the Devise config:
   min 6 chars, 1 uppercase, 1 lowercase, 1 number, 1 special char) as a
   permanent helper line under the password field. Scoped to the
   justify-center wrapper (password reset family) so it never shows on
   the plain login screen. */
.justify-center div.space-y-1:has(input[name="password"])::after {
  content: "Mínimo de 6 caracteres, com pelo menos 1 letra maiúscula, 1 minúscula, 1 número e 1 caractere especial.";
  display: block;
  margin-top: 0.375rem;
  font-size: 0.8rem;
  line-height: 1.3;
  color: #8a8a94;
}

.justify-center.bg-n-brand\/5::after {
  content: "";
  order: -1;
  display: block;
  width: 280px;
  height: 100px;
  max-width: 80vw;
  margin: 0 auto 1.5rem auto;
  background-image: url('https://atendimento.mergeia.com.br/brand/mergeia_turbina_full.png');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  position: relative;
  z-index: 1;
}
