
/* =========================
   ACCOUNT MODAL
========================= */

.account-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 2000;
}

.account-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.account-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.96);
  width: 100%;
  max-width: 360px;
  background: #fff;
  padding: 32px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 2001;
  box-sizing: border-box;
}

.account-modal.active {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.account-close {
  position: absolute;
  top: 18px;
  right: 18px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

.account-title {
  font-size: 14px;
  letter-spacing: 2px;
  margin-bottom: 24px;
  text-align: center;
}

/* ===== FORM ===== */
.account-form {
  display: flex;
  flex-direction: column;
}


/* ===== INPUTS ===== */
.account-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #000;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 12px;
  transition: border-color 0.2s ease;
}

.account-form input:focus {
  border-color: #555;
}

/* ===== ACCOUNT ERROR MESSAGE (FINAL) ===== */
.account-error {
  display: block;
  width: 100%;
  margin: 8px 0 12px;
  text-align: center;
  color: #c62828;
  font-size: 13px;
  line-height: 1.3;
}

.account-error.show {
  opacity: 1;
}

/* ===== ERROR INPUT ===== */
.input-error {
  border-color: #c0392b;
}

/* ===== BUTTON ===== */
.account-btn {
  margin-top: 6px;
  padding: 14px;
  background: #000;
  color: #fff;
  border: none;
  font-size: 12px;
  letter-spacing: 1px;
  cursor: pointer;
  width: 100%;
}

.account-btn:hover {
  background: #111;
}

/* ===== SWITCH ===== */
.account-switch {
  margin-top: 18px;
  font-size: 12px;
  text-align: center;
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.account-switch span {
  margin-left: 6px;
  cursor: pointer;
  text-decoration: underline;
  opacity: 1;
}

.account-switch span:hover {
  opacity: 0.6;
}

.hidden {
  display: none;
}

body.modal-open {
  overflow: hidden;
}

/* ===== MOBILE ===== */
@media (max-width: 420px) {
  .account-modal {
    padding: 24px;
  }
}

.account-form {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.error-message {
  width: 100%;
  text-align: center;
  color: #e63946; /* rojo limpio, no chillón */
  font-size: 13px;
  margin-top: 6px;
  margin-bottom: 12px;
  min-height: 16px; /* evita que el layout se mueva */
}

.hidden {
  display: none !important;
}

/* ===== ERROR ANIMATION ===== */
.account-error {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.account-error.show {
  opacity: 1;
  transform: translateY(0);
}

.form-error {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .3s ease, transform .3s ease;
  color: #c0392b;
  text-align: center;
  font-size: 12px;
  margin-bottom: 12px;
}

.form-error.show {
  opacity: 1;
  transform: translateY(0);
}

