/* =========================================
   auth.css  (AUTH-ONLY)
   Purpose: Styles for login / register / forgot pages
   Used by: login.html, register.html, forgot_password.html, forgot_username.html
   -----------------------------------------
   MOVED HERE FROM common.css:
   .auth-container, .forgot-password-container, .social-login,
   .input-error, .error, .forgot-links, .forgot-link,
   auth inputs & buttons
========================================= */

/* ===== Auth Containers ===== */
.auth-container,
.forgot-password-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  text-align: center;
}

.auth-container h2 {
  margin-bottom: 20px;
  color: #1877f2;
}

/* Inputs (shared for both containers) */
.auth-container input,
.forgot-password-container input {
  width: 100%;
  padding: 12px 15px;
  margin: 8px 0;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 14px;
  transition: 0.3s all;
}
.auth-container input:focus,
.forgot-password-container input:focus {
  border-color: #1877f2;
  outline: none;
  box-shadow: 0 0 5px rgba(24,119,242,0.3);
}

/* Buttons (use .btn-primary/.btn-secondary from common.css)
   NOTE: removed old element selectors to avoid duplication:
   - Removed ".auth-container button{...}" and ".forgot-password-container button{...}"
   Your templates already use class="btn-primary" on submit buttons. */

/* ===== Error & Inline Error ===== */
.error { color: red; margin-bottom: 8px; }

.input-error {
  color: #f44336;
  font-size: 12px;
  margin-top: 5px;
  display: block;
  font-weight: bold;
}

/* ===== Forgot links under Login ===== */
.forgot-links {
  color: #1877f2;
  text-decoration: none;
  font-size: 14px;
  margin: 8px;
  text-align: center;
}
.forgot-link:hover { text-decoration: underline; }
/* ===== Flash Messages ===== */
.flash-stack { display: grid; gap: 10px; margin: 12px 0 16px; }
.alert {
  padding: 10px 12px; border-radius: 10px; border: 1px solid #e5e7eb;
  background: #fff; color: #111827; line-height: 1.5;
}
.alert-success { background: #ECFDF5; border-color: #BBF7D0; color: #166534; }
.alert-danger  { background: #FEF2F2; border-color: #FECACA; color: #991B1B; }
.alert-info    { background: #EFF6FF; border-color: #BFDBFE; color: #1E40AF; }
.alert-warning { background: #FFFBEB; border-color: #FEF3C7; color: #92400E; }
/* ===== Social Login Buttons ===== */
.social-login {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 20px 0;
}
.social-login button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.3s, box-shadow 0.3s;
  width: 100%;
}
.social-login button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.social-login button img { height: 20px; }

.social-login .google-btn {
  background-color: #ffffff;
  border: 1px solid #ddd;
  color: #444;
}
.social-login .google-btn:hover { background-color: #f5f5f5; }

.social-login .facebook-btn {
  background-color: #1877f2;
  color: white;
}
.social-login .facebook-btn:hover { background-color: #145dbf; }

/* ===== Auth Responsive ===== */
@media (max-width: 768px) {
  .auth-container,
  .forgot-password-container {
    margin: 30px 20px;
    padding: 20px;
  }
}

@media (max-width: 480px) {
  .auth-container h2 { font-size: 14px; }

  /* keep smaller controls on tiny screens */
  .auth-container input,
  .forgot-password-container input,
  .social-login button {
    font-size: 14px;
    padding: 10px;
  }
}