/**
 * Play GOOD — Login / registro (layout a prueba de overflow)
 * Cargar DESPUÉS de branding.css y playgood-theme.css
 */

body.pg-auth-page {
  overflow-x: hidden;
}

body.pg-auth-page .pg-auth-shell {
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 0 4px;
}

body.pg-auth-page .pg-auth-card {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  padding: 28px 24px;
  box-sizing: border-box;
}

body.pg-auth-page .pg-auth-form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  position: relative;
  overflow: hidden;
}

body.pg-auth-page .pg-auth-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* Honeypot — nunca visible */
body.pg-auth-page .pg-honeypot,
body.pg-auth-page .hp-field {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.pg-auth-page .pg-honeypot label,
body.pg-auth-page .hp-field label {
  display: none !important;
}

/* Campos */
body.pg-auth-page .pg-field {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

body.pg-auth-page .pg-field input {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  min-height: 48px;
  padding: 12px 14px;
  margin: 0;
  border: 1px solid rgba(204, 255, 0, 0.14);
  border-radius: 10px;
  background: #252b38;
  color: #cbd5e1;
  font-size: 16px;
  line-height: 1.35;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
}

body.pg-auth-page .pg-field--icon input {
  padding-right: 44px;
}

body.pg-auth-page .pg-field--pwd input {
  padding-right: 48px;
}

body.pg-auth-page .pg-field input:focus {
  border-color: #ccff00;
  outline: none;
  background: #2a3140;
  box-shadow: 0 0 0 3px rgba(204, 255, 0, 0.12);
}

body.pg-auth-page .pg-field input::placeholder {
  color: #5c6b80;
}

/* Autofill Chrome — evitar fondo blanco/azul */
body.pg-auth-page .pg-field input:-webkit-autofill,
body.pg-auth-page .pg-field input:-webkit-autofill:hover,
body.pg-auth-page .pg-field input:-webkit-autofill:focus,
body.pg-auth-page .input-group input:-webkit-autofill,
body.pg-auth-page .input-group input:-webkit-autofill:hover,
body.pg-auth-page .input-group input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #252b38 inset !important;
  box-shadow: 0 0 0 1000px #252b38 inset !important;
  -webkit-text-fill-color: #cbd5e1 !important;
  caret-color: #cbd5e1;
  border: 1px solid rgba(204, 255, 0, 0.14) !important;
  transition: background-color 99999s ease-out;
}

body.pg-auth-page .pg-field .field-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  pointer-events: none;
  color: #5c6b80;
  fill: currentColor;
}

body.pg-auth-page .pg-field .pwd-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: #5c6b80;
}

body.pg-auth-page .pg-field .pwd-toggle:hover {
  background: rgba(255, 255, 255, 0.06);
}

body.pg-auth-page .pg-field .pwd-toggle svg {
  width: 22px;
  height: 22px;
}

body.pg-auth-page .pg-field .pwd-toggle svg .slash {
  opacity: 0;
  transition: opacity 0.18s;
}

body.pg-auth-page .pg-field .pwd-toggle svg.off .slash {
  opacity: 1;
}

body.pg-auth-page .pg-auth-form .btn {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  min-height: 48px;
  margin-top: 4px;
}

/* Compatibilidad con clases legacy input-group */
body.pg-auth-page .input-group {
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-bottom: 0;
}

body.pg-auth-page .input-group input {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

@media (max-width: 480px) {
  body.pg-auth-page .pg-auth-card {
    padding: 22px 16px;
  }
}
