/**
 * ============================================================================
 * CUSTOM LOGIN PAGE STYLESHEET
 * The Wesleyan Argus — Production-Grade Login Styling
 * ============================================================================
 * 
 * APPROACH:
 * --------
 * This stylesheet uses CSS Grid and safe WordPress selectors to create a
 * split-screen login layout without modifying wp-login.php or core templates.
 * 
 * COMPATIBILITY:
 * - Works with 2FA plugins (Duo, Authy, Google Authenticator)
 * - Compatible with CAPTCHA plugins
 * - Safe with login attempt limiting plugins
 * - Works with SSO plugins
 * 
 * SECURITY:
 * - No inline JavaScript
 * - CSP-compliant (no style attributes)
 * - Accessibility maintained (WCAG 2.1)
 * - Password reset & remember me preserved
 * 
 * MAINTENANCE:
 * - Updates to WordPress core do not affect this file
 * - No hardcoded authentication logic
 * - Responsive design (mobile-first)
 * ============================================================================
 */

/* Reset and Base Styles */
* {
  box-sizing: border-box;
}

html,
body.login {
  margin: 0;
  padding: 0;
}

html {
  height: 100%;
}

body.login {
  background: #f5f5f5 !important;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-family: 'Lato', system-ui, -apple-system, sans-serif;
}

/* ===== MAIN LAYOUT CONTAINER ===== */

.wa-login-container {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: stretch;
  background: transparent;
  padding: 0;
  min-height: 100vh;
}

/* LEFT COLUMN: Background Image (Full Height, 50% Width) */ 
/* url used to be ../images/WESLEYAN3.jpg */
.wa-login-image {
  width: 100%;
  height: 100%;
  background: url('http://wesleyanargus.com/wp-content/uploads/2026/02/IMG_0823-5.jpg') top / contain no-repeat !important;
  background-attachment: fixed;
  display: block;
  position: relative;
}

/* Logo Container */

.wa-login-logo {
  grid-column: 2;
  text-align: center;
  margin: 140px 0 30px 0;
  padding: 0 45px;
}

.wa-login-logo img {
  max-width: 300px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* RIGHT COLUMN: Login Form */

/* Override default WordPress login styles */
#login {
  width: 100%;
  max-width: none;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 45px 60px 45px !important;
  margin: 0 !important;
  display: contents;
}

/* Logo/Header */
.login h1 {
  grid-column: 2;
  margin: 30px 0 0 0 !important;
  text-align: center;
  display: none;
}

.login h1 a {
  background-image: none !important;
  background-size: contain !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  width: 320px !important;
  height: 90px !important;
  padding: 0 !important;
  text-indent: -9999px;
  display: block;
  margin: 0 auto;
}

/* Form Container */
#loginform {
  grid-column: 2;
  background: white !important;
  padding: 40px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 auto 30px auto !important;
  width: 100% !important;
  max-width: 400px;
}

/* Form Elements */

.login label {
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  color: #333;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.login input[type="text"],
.login input[type="password"],
.login input[type="email"],
.login input[type="number"] {
  width: 100% !important;
  padding: 11px 13px !important;
  margin-bottom: 16px !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  font-family: 'Lato', sans-serif;
  font-size: 14px !important;
  background: #fafafa !important;
  color: #333 !important;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus,
.login input[type="number"]:focus {
  outline: none !important;
  border-color: #999 !important;
  background: #fff !important;
  box-shadow: none !important;
}

/* Checkbox (Remember Me) */
.login input[type="checkbox"] {
  margin-right: 6px;
  cursor: pointer;
}

.login label[for="rememberme"] {
  display: inline;
  font-weight: 400;
  margin-left: 4px;
  margin-bottom: 0;
}

.login #rememberme {
  margin-right: 6px !important;
  margin-bottom: 0 !important;
}

/* Submit Button */
.login input[type="submit"],
.login .button-primary {
  width: 100% !important;
  padding: 13px 24px !important;
  background: #b10f1a !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  font-family: 'Lato', sans-serif;
  font-size: 15px !important;
  font-weight: 700 !important;
  cursor: pointer !important;
  margin: 16px 0 0 0 !important;
  transition: background 0.2s ease;
}

.login input[type="submit"]:hover,
.login .button-primary:hover {
  background: #8a0a14 !important;
}

.login input[type="submit"]:active,
.login .button-primary:active {
  background: #6d0810 !important;
}

/* Links */
.login a {
  color: #b10f1a !important;
  text-decoration: none;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
  transition: color 0.2s ease;
}

.login a:hover {
  color: #8a0a14 !important;
  text-decoration: underline;
}

/* Navigation/Footer Links */
#backtoblog,
#nav {
  grid-column: 2;
  text-align: center;
  margin-top: 20px;
  font-family: 'Lato', sans-serif;
  font-size: 13px;
}

#backtoblog a,
#nav a {
  display: inline-block;
  margin: 0 8px;
}

/* Error/Success Messages */
.login .notice,
.login .error,
.login .message {
  grid-column: 2;
  border-left: 4px solid #b10f1a !important;
  background-color: #fff5f5 !important;
  margin: 0 0 20px 0 !important;
  padding: 12px 15px !important;
  border-radius: 4px !important;
  font-family: 'Lato', sans-serif;
  font-size: 13px !important;
  color: #333 !important;
}

.login .message {
  border-left-color: #27ae60 !important;
  background-color: #f0fdf4 !important;
}

/* Additional form groups (for plugin compatibility) */
.login form > p {
  margin-bottom: 16px !important;
}

.login form > p:last-child {
  margin-bottom: 0 !important;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet and smaller (1024px and below) */
@media (max-width: 1024px) {
  .wa-login-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .wa-login-image {
    display: none;
  }

  .login h1,
  #loginform,
  #backtoblog,
  #nav,
  .login .notice,
  .login .error,
  .login .message {
    grid-column: 1 !important;
  }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
  body.login {
    background: #fff !important;
    padding: 15px;
  }

  .wa-login-container {
    gap: 20px;
  }

  #loginform {
    padding: 40px 30px !important;
  }

  .login h1 {
    margin-bottom: 30px !important;
  }

  .login h1 a {
    width: 260px !important;
    height: 75px !important;
  }

  .login input[type="text"],
  .login input[type="password"],
  .login input[type="email"],
  .login input[type="number"] {
    font-size: 16px !important;
    padding: 12px 13px !important;
  }

  .login input[type="submit"],
  .login .button-primary {
    padding: 12px 20px !important;
    font-size: 14px !important;
  }
}

/* Small mobile (480px and below) */
@media (max-width: 480px) {
  body.login {
    padding: 10px;
  }

  #loginform {
    padding: 30px 20px !important;
  }

  .login h1 {
    margin-bottom: 25px !important;
  }

  .login h1 a {
    width: 220px !important;
    height: 65px !important;
  }

  .login input[type="text"],
  .login input[type="password"],
  .login input[type="email"],
  .login input[type="number"],
  .login input[type="submit"],
  .login .button-primary {
    font-size: 14px !important;
  }

  #backtoblog,
  #nav {
    font-size: 12px !important;
  }
}

/* ===== ACCESSIBILITY ===== */

/* Focus visible for keyboard navigation */
.login input:focus-visible {
  outline: 2px solid #b10f1a;
  outline-offset: 2px;
}

.login a:focus-visible {
  outline: 2px solid #b10f1a;
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
  .login input[type="text"],
  .login input[type="password"],
  .login input[type="email"],
  .login input[type="number"] {
    border-width: 2px !important;
  }

  .login input[type="submit"],
  .login .button-primary {
    border: 2px solid #6d0810 !important;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .login input[type="text"],
  .login input[type="password"],
  .login input[type="email"],
  .login input[type="number"],
  .login input[type="submit"],
  .login .button-primary,
  .login a {
    transition: none !important;
  }
}


.login .message {
  
    width: 50%;
    justify-self: center;
}