/* ===== MetaEN Shared UX Enhancements ===== */

/* Toast Notification */
.metaen-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  padding: 14px 22px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: 'Noto Sans JP', sans-serif;
  color: #fff;
  box-shadow: 0 6px 24px rgba(0,0,0,0.18);
  transform: translateX(120%);
  transition: transform 0.35s cubic-bezier(0.4,0,0.2,1);
  max-width: 380px;
  word-break: break-word;
  display: flex;
  align-items: center;
  gap: 10px;
  line-height: 1.5;
}
.metaen-toast.show { transform: translateX(0); }
.metaen-toast.toast-success { background: linear-gradient(135deg, #00b894, #00a381); }
.metaen-toast.toast-error { background: linear-gradient(135deg, #e74c3c, #c0392b); }
.metaen-toast.toast-info { background: linear-gradient(135deg, #0984e3, #0767b5); }
.metaen-toast.toast-warning { background: linear-gradient(135deg, #f39c12, #d68910); }

/* Password Toggle */
.password-wrapper {
  position: relative;
}
.password-wrapper input {
  padding-right: 48px !important;
}
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  color: #999;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
  z-index: 2;
}
.password-toggle:hover { color: #555; }

/* Better label styling (remove uppercase) */
.field label {
  text-transform: none !important;
  font-size: 0.85rem !important;
  letter-spacing: 0 !important;
}

/* Loading spinner on buttons */
.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}
.btn-loading::after {
  content: '';
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  border: 3px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: metaen-spin 0.6s linear infinite;
}
@keyframes metaen-spin {
  to { transform: translateY(-50%) rotate(360deg); }
}

/* Better focus state */
input:focus {
  outline: none !important;
  box-shadow: 0 0 0 3px rgba(var(--focus-rgb, 74,158,110), 0.2) !important;
  border-color: var(--primary) !important;
}

/* Error message box (for gakusei register etc.) */
.error-banner {
  background: #fff5f5;
  border: 2px solid #fed7d7;
  border-radius: 10px;
  padding: 1.2rem 1.5rem;
  text-align: center;
  color: #c53030;
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
}
.error-banner .error-icon { font-size: 2rem; margin-bottom: 0.5rem; display: block; }
.error-banner .error-text { font-weight: 700; margin-bottom: 0.3rem; }
.error-banner .error-hint { color: #999; font-size: 0.8rem; }

/* Smooth form appearance */
.form-hidden {
  opacity: 0.3;
  pointer-events: none;
  filter: blur(2px);
  transition: all 0.3s;
}

/* Footer navigation links */
.footer-nav {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.footer-nav a {
  color: var(--text-light, #636e72);
  text-decoration: none;
  font-size: 0.78rem;
  font-family: 'DotGothic16', cursive;
  transition: color 0.2s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.footer-nav a:hover { color: var(--primary); }

/* Mobile toast adjustment */
@media (max-width: 480px) {
  .metaen-toast {
    right: 10px;
    left: 10px;
    max-width: none;
    font-size: 0.82rem;
  }
}
