/**
 * Auth surfaces WP — paridad visual login ↔ registro ↔ recuperar.
 * /registro/ y /recuperar-password/ no tienen reglas en blocks.css del theme;
 * /login/ sí (.auth-page). Este archivo unifica el lenguaje visual.
 */

/* Isotipo R — canónico = /login/ (.auth-logo img, 154×178). */
.auth-page,
.register-page,
.recover-password,
body.login {
  --reino-kit-auth-isotipo-w: 154px;
  --reino-kit-auth-isotipo-h: 178px;
}

.auth-page .auth-logo {
  display: flex;
  justify-content: center;
}

.auth-page .auth-logo img {
  display: block;
  width: var(--reino-kit-auth-isotipo-w);
  height: var(--reino-kit-auth-isotipo-h);
  max-width: none;
  object-fit: contain;
}

/* Theme blocks.css: .auth-page { overflow: hidden } — recorta form+footer. */
.auth-page,
.register-page,
.recover-password {
  overflow: visible !important;
}

/* —— Layout registro (espejo .auth-page) —— */
.register-page {
  position: relative;
  padding: 3rem 0 6rem;
}

.register-page .c-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

/* Logo centrado (misma pieza y tamaño que /login/) */
.register-page .c-wrap::before {
  content: "";
  display: block;
  width: var(--reino-kit-auth-isotipo-w);
  height: var(--reino-kit-auth-isotipo-h);
  margin: 0 auto 1.75rem;
  background-image: var(--reino-kit-auth-logo);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.register-form-wrap {
  width: 100%;
  max-width: 39.375rem;
}

.register-form-wrap .title {
  margin: 0 0 1.25rem;
  font-family: var(--font-cinzel, "Cinzel", "Playfair Display", Georgia, serif);
  font-size: 2.21rem;
  font-weight: 400;
  line-height: 0.92;
  color: #e8d4a8;
  text-align: center;
}

.register-form-wrap .title::before {
  content: "Registro";
  display: block;
  margin-bottom: 0.55rem;
  color: #c5a059;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* Panel — mismo tratamiento que .auth-panel */
.register-form {
  padding: 1.6rem;
  border: 1px solid rgba(197, 160, 89, 0.12);
  border-radius: 0.9rem;
  background: #1a0f12;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.015) inset,
    0 1rem 2rem rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.register-form .field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.register-form .field label {
  color: rgba(197, 160, 89, 0.8);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.register-form .field input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(197, 160, 89, 0.1);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.2);
  color: #fff5e2;
  font-size: 0.8125rem;
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.register-form .field input::placeholder {
  color: rgba(255, 245, 226, 0.24);
}

.register-form .field input:focus {
  outline: none;
  border-color: rgba(197, 160, 89, 0.28);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 0 0 0.2rem rgba(197, 160, 89, 0.04);
}

.register-form button[type="submit"],
.register-form > button {
  cursor: pointer;
  width: 100%;
  height: 2.58rem;
  margin-top: 0.15rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #d7bc84 0%, #f2e3c2 100%);
  color: #1b1411;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 0.6rem 1.4rem rgba(215, 188, 132, 0.14);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.register-form button[type="submit"]:hover,
.register-form > button:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.8rem 1.6rem rgba(215, 188, 132, 0.18);
}

.register-links {
  margin-top: 1.35rem;
  text-align: center;
}

.register-links a {
  color: #c5a059;
  font-size: 0.8125rem;
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.2s ease;
}

.register-links a:hover,
.register-links a:focus-visible {
  color: #e8d4a8;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Errores / notices en registro si el theme los imprime cerca */
.register-page .woocommerce-error,
.register-page .woocommerce-message,
.register-form-wrap .error,
.register-form-wrap .register-error {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 120, 120, 0.12);
  border-radius: 0.7rem;
  background: rgba(255, 120, 120, 0.05);
  color: #ffd3d3;
  font-size: 0.75rem;
  line-height: 1.45;
}

/* Refuerzo links del login theme */
.auth-page .auth-links a {
  color: #c5a059;
}

.auth-page .auth-links a:hover,
.auth-page .auth-links a:focus-visible {
  color: #e8d4a8;
}

/* —— Recuperar contraseña (.recover-password) —— */
.recover-password {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 2rem 0 4rem;
}

.recover-password .c-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.recover-password .c-wrap::before {
  content: "";
  display: block;
  width: var(--reino-kit-auth-isotipo-w);
  height: var(--reino-kit-auth-isotipo-h);
  margin: 0 auto 1.75rem;
  background-image: var(--reino-kit-auth-logo);
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* Panel único — formulario y pantalla “email enviado” */
.recover-password .form-wrap {
  width: 100%;
  max-width: 39.375rem;
  padding: 1.75rem 1.6rem 1.5rem;
  border: 1px solid rgba(197, 160, 89, 0.12);
  border-radius: 0.9rem;
  background: #1a0f12;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.015) inset,
    0 1rem 2rem rgba(0, 0, 0, 0.12);
}

.recover-password .form-wrap > form {
  padding: 0;
  margin: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* Confirmación post-envío (template Juan: sin <form>, solo mensaje) */
.recover-password .form-wrap.is-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.15rem;
}

.recover-password .form-wrap.is-success > img,
.recover-password .form-wrap.is-success figure,
.recover-password .form-wrap.is-success .logo {
  display: none !important;
}

.recover-password .form-wrap.is-success .recover-success-message {
  margin: 0;
  max-width: 28rem;
  font-family: var(--font-cinzel, "Cinzel", "Playfair Display", Georgia, serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.35;
  color: #e8d4a8;
}

.recover-password .form-wrap.is-success .recover-success-message::before {
  content: "Correo en camino";
  display: block;
  margin-bottom: 0.65rem;
  color: #c5a059;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.recover-password .form-wrap.is-success .recover-success-hint {
  margin: 0;
  max-width: 26rem;
  color: #b5a896;
  font-size: 0.8125rem;
  line-height: 1.55;
}

.recover-password .form-wrap > form > h1 {
  margin: 0 0 0.35rem;
  font-family: var(--font-cinzel, "Cinzel", "Playfair Display", Georgia, serif);
  font-size: 2.21rem;
  font-weight: 400;
  line-height: 0.92;
  color: #e8d4a8;
  text-align: center;
}

.recover-password .form-wrap > form > h1::before {
  content: "Recuperá tu llave";
  display: block;
  margin-bottom: 0.55rem;
  color: #c5a059;
  font-family: system-ui, -apple-system, Segoe UI, sans-serif;
  font-size: 0.625rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.recover-password .form-wrap > form > p,
.recover-password .form-wrap .description {
  margin: 0 0 0.35rem;
  color: #b5a896;
  font-size: 0.8125rem;
  line-height: 1.55;
  text-align: center;
}

.recover-password .field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.recover-password .field label {
  color: rgba(197, 160, 89, 0.8);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.recover-password .field input {
  width: 100%;
  height: 2.5rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(197, 160, 89, 0.1);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.2);
  color: #fff5e2;
  font-size: 0.8125rem;
  box-sizing: border-box;
  transition:
    border-color 0.3s ease,
    background 0.3s ease,
    box-shadow 0.3s ease;
}

.recover-password .field input::placeholder {
  color: rgba(255, 245, 226, 0.24);
}

.recover-password .field input:focus {
  outline: none;
  border-color: rgba(197, 160, 89, 0.28);
  background: rgba(0, 0, 0, 0.28);
  box-shadow: 0 0 0 0.2rem rgba(197, 160, 89, 0.04);
}

.recover-password .submit {
  margin-top: 0.15rem;
}

.recover-password .submit button,
.recover-password form button[type="submit"] {
  cursor: pointer;
  width: 100%;
  height: 2.58rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #d7bc84 0%, #f2e3c2 100%);
  color: #1b1411;
  font-size: 0.8125rem;
  font-weight: 600;
  box-shadow: 0 0.6rem 1.4rem rgba(215, 188, 132, 0.14);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.recover-password .submit button:hover,
.recover-password form button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: 0 0.8rem 1.6rem rgba(215, 188, 132, 0.18);
}

.recover-links {
  margin: 0.35rem 0 0;
  width: 100%;
  text-align: center;
}

.recover-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.58rem;
  padding: 0 1.35rem;
  border: 1px solid rgba(197, 160, 89, 0.35);
  border-radius: 999px;
  color: #e8d4a8;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  letter-spacing: 0.04em;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.recover-links a:hover,
.recover-links a:focus-visible {
  color: #fff5e2;
  border-color: rgba(232, 212, 168, 0.55);
  background: rgba(197, 160, 89, 0.08);
  text-decoration: none;
}

.recover-password .woocommerce-error,
.recover-password .woocommerce-message,
.recover-password .form-wrap .error,
.recover-password .form-wrap .notice {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.85rem;
  border: 1px solid rgba(255, 120, 120, 0.12);
  border-radius: 0.7rem;
  background: rgba(255, 120, 120, 0.05);
  color: #ffd3d3;
  font-size: 0.75rem;
  line-height: 1.45;
}

.recover-password .woocommerce-message {
  border-color: rgba(197, 160, 89, 0.22);
  background: rgba(197, 160, 89, 0.08);
  color: #e8d4a8;
}

/* Footer vacío del template recover */
.recover-password + .footer:empty {
  display: none;
}

@media (max-width: 640px) {
  .register-page,
  .recover-password {
    padding: 1.25rem 0 3rem;
  }

  .register-form-wrap .title,
  .recover-password .form-wrap > form > h1 {
    font-size: 1.85rem;
  }

  .recover-password .form-wrap.is-success .recover-success-message {
    font-size: 1.25rem;
  }

  .recover-password .form-wrap {
    padding: 1.35rem 1.15rem 1.25rem;
  }
}

/* —— wp-login.php (resetpass / rp) — paridad portal oscuro #14 —— */
body.login {
  background-color: #0a0a0a;
  background-image: linear-gradient(180deg, rgba(9, 51, 41, 0.35) 0%, rgba(10, 10, 10, 1) 55%);
}

body.login #login {
  width: min(100%, 26rem);
  padding: 2rem 1.25rem 1rem;
}

body.login #login h1 a {
  background-image: var(--reino-kit-auth-logo, none);
  background-size: contain;
  background-position: center;
  width: var(--reino-kit-auth-isotipo-w, 154px);
  height: var(--reino-kit-auth-isotipo-h, 178px);
  margin: 0 auto 1.5rem;
}

body.login #loginform,
body.login #resetpassform,
body.login #lostpasswordform {
  margin-top: 0;
  padding: 1.6rem;
  border: 1px solid rgba(197, 160, 89, 0.12);
  border-radius: 0.9rem;
  background: #1a0f12;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.015) inset,
    0 1rem 2rem rgba(0, 0, 0, 0.12);
}

body.login label {
  color: rgba(197, 160, 89, 0.8);
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.login form .input,
body.login input[type="text"],
body.login input[type="password"] {
  border: 1px solid rgba(197, 160, 89, 0.1);
  border-radius: 0.65rem;
  background: rgba(0, 0, 0, 0.2);
  color: #fff5e2;
  box-shadow: none;
}

body.login form .input:focus,
body.login input[type="text"]:focus,
body.login input[type="password"]:focus {
  border-color: rgba(197, 160, 89, 0.28);
  box-shadow: 0 0 0 0.2rem rgba(197, 160, 89, 0.04);
}

body.login .button-primary,
body.login .button.button-large {
  width: 100%;
  height: 2.58rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #d7bc84 0%, #f2e3c2 100%);
  color: #1b1411;
  font-weight: 600;
  text-shadow: none;
  box-shadow: 0 0.6rem 1.4rem rgba(215, 188, 132, 0.14);
}

body.login .button-primary:hover,
body.login .button.button-large:hover {
  background: linear-gradient(135deg, #e0c992 0%, #f7ead0 100%);
  color: #1b1411;
}

body.login #nav a,
body.login #backtoblog a {
  color: #c5a059;
}

body.login #nav a:hover,
body.login #backtoblog a:hover {
  color: #e8d4a8;
}

body.login .message,
body.login #login_error {
  border-radius: 0.65rem;
  border-left-width: 3px;
  box-shadow: none;
}

body.login #login_error {
  background: rgba(255, 120, 120, 0.08);
  border-color: rgba(255, 120, 120, 0.2);
  color: #ffd3d3;
}

body.login .message {
  background: rgba(197, 160, 89, 0.08);
  border-color: rgba(197, 160, 89, 0.22);
  color: #e8d4a8;
}

body.login.login-action-rp #login > p,
body.login.login-action-resetpass #login > p,
body.login.login-action-lostpassword #login > p {
  color: #b5a896;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.55;
}

/* Selector de idioma WP — oculto (paridad portal Reino). */
body.login .language-switcher,
body.login form#language-switcher,
body.login #language-switcher-locales,
body.login .locale-switcher,
body.login select[name="wp_lang"],
body.login input[type="submit"][value="Cambiar"] {
  display: none !important;
}

body.login.login-action-lostpassword #login,
body.login.login-action-rp #login,
body.login.login-action-resetpass #login {
  margin-top: 1.5rem;
}

body.login #login_error,
body.login .notice.notice-error {
  background: rgba(255, 120, 120, 0.1);
  border: 1px solid rgba(255, 120, 120, 0.28);
  border-left-width: 3px;
  border-radius: 0.65rem;
  color: #ffd8d8;
  font-size: 0.875rem;
  line-height: 1.5;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

body.login #login_error a,
body.login .notice.notice-error a {
  color: #f2c4c4;
  text-decoration: underline;
}

body.login #login_error strong,
body.login .notice.notice-error strong {
  color: #fff0f0;
  font-weight: 600;
}

body.login .privacy-policy-page-link,
body.login #login form p.submit {
  margin-top: 1rem;
}

body.login input[type="submit"].button-primary {
  margin-top: 0.25rem;
}

/* Hint bajo formularios de reset / lost password */
body.login form .description,
body.login form p.description {
  color: rgba(181, 168, 150, 0.92) !important;
  font-size: 0.8125rem !important;
  line-height: 1.5 !important;
}
