/* ============================================
   Wuallet Auth UI – estilos comunes
   Pantallas: login, register, otp, password
   ============================================ */

/* Lienzo limpio (plantilla wuallet-blank) */
html,
body {
  height: 100%;
}

body.wuallet-blank {
  margin: 0;
  min-height: 100%;
  background: none;
}

/* Por si acaso alguno sobrevive */
#wuallet-register-bg #wpadminbar,
#wpadminbar {
  display: none !important;
}

/* Fondo a pantalla completa (compartido) */
#wuallet-register-bg {
  position: fixed;
  inset: 0;
  background: var(--wuallet-auth-bg, none) center / cover no-repeat;
}

/* Centro absoluto para el panel */
.wuallet-center {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px 0;
}

/* Panel translúcido centrado */
.wuallet-panel {
  width: min(350px, 35vw);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 30px 24px 18px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
}

/* Branding */
.wuallet-brand {
  display: flex;
  justify-content: center;
  margin: 2px 0 20px 0;
}

/* Logo controlado por el loader (span.wuallet-logo usa --wuallet-auth-logo) */
.wuallet-logo {
  display: block;
  width: 85%;
  max-width: 300px;
  aspect-ratio: 5 / 1;          /* ajusta a la proporción de tu logo */
  min-height: 60px;             /* asegura que se vea incluso si falla el ratio */
  margin: 0 auto;
  background: var(--wuallet-auth-logo, none) center / contain no-repeat;
}

.wuallet-title {
  text-align: center;
  font-size: 22px;
  font-weight: 400;
  color: #0f172a;
  margin: 6px 0 16px 0;
}

.wuallet-subtext {
  text-align: center;
  font-size: 13px;
  color: #334155;
  margin: 0 0 10px 0;
}

/* Mensajería */
.wuallet-alert {
  font-size: 13px;
  border-radius: 8px;
  padding: 10px 12px;
  margin: 0 0 10px 0;
  text-align: center;
}

.wuallet-alert-error {
  background: #fff1f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.wuallet-alert-ok {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

/* Campos */
.wuallet-field {
  margin: 10px 0;
}

.wuallet-field label {
  display: block;
  font-size: 13px;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.wuallet-label-center {
  text-align: center;
}

.wuallet-input,
.wuallet-input[type="text"],
.wuallet-input[type="email"],
.wuallet-input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background: #fff;
  box-sizing: border-box;
  outline: none;
  font-size: 16px; /* evita zoom iOS */
}

/* Password + “ojito” */
.wp-pwd {
  position: relative;
  display: block;
}

.wp-hide-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 4px;
}

/* OTP compacto (6 dígitos) */
.wuallet-otp-code {
  width: 12ch;
  text-align: center;
  letter-spacing: 0.25ch;
  font-weight: 700;
  font-size: 22px;
  padding: 10px 12px;
  border-radius: 8px;
  margin: 0 auto;
  display: block;
}

/* Utilitarios */
.wuallet-check {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: start;
}

.wuallet-divider {
  border-top: 1px solid rgba(15, 23, 42, 0.15);
  margin: 16px 0;
}

.wuallet-help {
  display: inline-block;
  margin: 6px 0 0 26px;
  text-decoration: underline;
  font-size: 12px;
}

.wuallet-help-box {
  margin: 0 0 0 15px;
  padding: 10px;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.5;
  color: #0f172a;
  background: transparent;
}

/* Botón pequeño y centrado */
.wuallet-submit-wrap {
  text-align: center;
  margin: 0;
}

.wuallet-submit {
  display: inline-block;
  width: auto;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 400;
  background: #0f264a;
  color: #fff;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(15, 38, 74, 0.25);
}

/* Pie: versiones */
.wuallet-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: #334155;
}

.wuallet-foot a {
  color: #0f264a;
}

/* Pie en una sola línea (OTP) */
.wuallet-footline {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  font-size: 12px;
  color: #334155;
}

.wuallet-sep {
  opacity: 0.6;
}

.wuallet-inline-form {
  display: inline;
  margin: 0;
  padding: 0;
}

.wuallet-resend-link {
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  color: #0f264a;
  text-decoration: underline;
  cursor: pointer;
  font-size: 12px;
}

/* Breakpoint móvil */
@media (max-width: 768px) {
  .wuallet-panel {
    width: min(350px, 90vw);
    padding: 28px 18px 16px;
  }

  .wuallet-brand img {
    max-width: 300px;
  }

  .wuallet-logo {
    max-width: 300px;
  }
}