/**
 * Modal global de autenticacion y panel reutilizable.
 * Reutiliza variables --remax-* definidas en users.css.
 */

.mt-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.mt-auth-modal[hidden] {
  display: none;
}

.mt-auth-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 39, 100, 0.55);
  backdrop-filter: blur(2px);
}

.mt-auth-modal__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: #fff;
  border-radius: var(--border-radius-xl, 16px);
  box-shadow: var(--shadow-xl, 0 12px 32px rgba(0, 61, 165, 0.15));
  padding: 32px;
}

.mt-auth-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: var(--text-gray, #6b7280);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background 0.15s ease, color 0.15s ease;
}

.mt-auth-modal__close:hover {
  background: var(--bg-light, #f3f4f6);
  color: var(--remax-blue-dark, #002764);
}

body.mt-auth-modal-open {
  overflow: hidden;
}

/* Panel reutilizable (inline o dentro del modal) */
.mt-auth-panel__header {
  text-align: center;
  margin-bottom: 24px;
}

.mt-auth-panel__eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--remax-red, #DC1C2E);
}

.mt-auth-panel__title {
  margin: 0 0 8px;
  font-size: 22px;
  color: var(--remax-blue-dark, #002764);
}

.mt-auth-panel__subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-gray, #6b7280);
}

/* Google resaltado como opcion principal */
.mt-auth-panel__google {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.mt-auth-panel__google .mt-google-btn {
  width: 100%;
  display: flex;
  justify-content: center;
  min-height: 48px;
  border-radius: var(--border-radius-lg, 12px);
  box-shadow: 0 4px 14px rgba(0, 61, 165, 0.18);
  overflow: hidden;
}

.mt-auth-panel__divider {
  margin: 8px 0 20px;
}

/* La seccion de correo es visualmente secundaria */
.mt-auth-panel__section[hidden] {
  display: none;
}

.mt-auth-panel__section[data-mt-auth-section="login"] .mt-users-form,
.mt-auth-panel__section[data-mt-auth-section="register"] .mt-users-form {
  opacity: 0.96;
}

.mt-auth-panel__switch {
  margin: 16px 0 0;
  text-align: center;
  font-size: 14px;
  color: var(--text-gray, #6b7280);
}

.mt-auth-panel__switch-btn {
  border: 0;
  background: transparent;
  padding: 0 0 0 4px;
  font: inherit;
  font-weight: 700;
  color: var(--remax-blue, #003DA5);
  cursor: pointer;
  text-decoration: underline;
}

.mt-auth-panel__switch-btn:hover {
  color: var(--remax-blue-dark, #002764);
}

.mt-auth-panel__complete-title {
  margin: 0 0 6px;
  font-size: 18px;
  color: var(--remax-blue-dark, #002764);
}

.mt-auth-panel__complete-intro {
  margin: 0 0 16px;
  font-size: 14px;
  color: var(--text-gray, #6b7280);
}

/* Panel inline (pagina cuenta-acceso) centrado en tarjeta */
.mt-users-auth__panel-card {
  max-width: 460px;
  margin: 0 auto;
}

.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 480px) {
  .mt-auth-modal__dialog {
    padding: 24px 20px;
  }
}
