
/* ========================================
   BJJ FOUNDATION — CUSTOM LOGIN
   Login / Forgot Password / Reset Password
   Uses Global BJJ Foundation Color Palette
======================================== */

/* CONTAINER */

.f-login {
  box-sizing: border-box;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  padding: 38px 34px;
  background: var(--f-charcoal);
  border: 1px solid var(--f-steel);
  border-radius: 14px;
  color: var(--f-matte-white);
  font-family: Lato, Arial, sans-serif;
}

.f-login *,
.f-login *::before,
.f-login *::after {
  box-sizing: border-box;
}

/* INTRODUCTION */

.f-login__intro {
  text-align: center;
  margin-bottom: 30px;
}

/* LOGO EMBLEM */

.f-login__logo {
  display: block;
  width: 120px;
  height: 120px;
  max-width: 100%;
  object-fit: contain;
  margin: 0 auto 20px;
}

.f-login__intro h2 {
  color: var(--f-white);
  font-family: 'Archivo Black', Arial, sans-serif;
  font-size: clamp(27px, 4vw, 36px);
  line-height: 1.15;
  margin: 0 0 14px;
  padding: 0;
}

.f-login__intro > p:last-child {
  color: var(--f-ice-gray);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* FORM LAYOUT */

.f-login__form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0;
}

.f-login__form label {
  display: block;
  color: var(--f-matte-white);
  font-family: Lato, Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  margin: 0;
}

/* INPUT FIELDS — ALL SCREENS */

.f-login__form input[type="text"],
.f-login__form input[type="email"],
.f-login__form input[type="password"] {
  display: block;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  padding: 13px 14px;
  margin: 0 0 8px;
  background: var(--f-slate);
  border: 1px solid var(--f-steel);
  border-radius: 6px;
  color: var(--f-white);
  font: 400 15px Lato, Arial, sans-serif;
  transition: border-color .2s, box-shadow .2s;
}

.f-login__form input[type="text"]:focus,
.f-login__form input[type="email"]:focus,
.f-login__form input[type="password"]:focus {
  border-color: var(--f-burnt-orange);
  outline: none;
  box-shadow: 0 0 0 2px rgba(244, 119, 33, .15);
}

/* REMEMBER ME */

.f-login__form label:has(input[type="checkbox"]) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  align-self: flex-start;
  cursor: pointer;
  margin: 0 0 6px;
}

.f-login__form input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--f-iron-red);
}

/* SUBMIT BUTTON — ALL SCREENS */

.f-login__form button[type="submit"] {
  display: block;
  width: 100%;
  min-height: 52px;
  padding: 14px 20px;
  background: var(--f-iron-red) !important;
  border: 2px solid var(--f-iron-red) !important;
  border-radius: 7px;
  color: var(--f-white) !important;
  font: 800 15px Lato, Arial, sans-serif;
  line-height: 1.4;
  cursor: pointer;
  transition: background-color .25s, border-color .25s;
}

.f-login__form button[type="submit"]:hover {
  background: var(--f-slate) !important;
  border-color: var(--f-white) !important;
}

.f-login__form button[type="submit"]:focus-visible {
  outline: 2px solid var(--f-burnt-orange);
  outline-offset: 3px;
}

/* LINKS */

.f-login a {
  color: var(--f-burnt-orange) !important;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  transition: color .2s;
}

.f-login a:hover {
  color: var(--f-white) !important;
  text-decoration: underline !important;
}

.f-login__form > p {
  text-align: center;
  margin: 8px 0 0;
  padding: 0;
}

/* BACK TO LOGIN / RESET LINKS */

.f-login > p:has(a) {
  text-align: center;
  margin: 24px 0 0;
}

/* STATUS AND ERROR MESSAGES */

.f-login__notice,
.f-login > p[role="alert"] {
padding: 16px 20px 20px !important;
  margin: 0 0 22px;
  background: var(--f-slate);
  border-left: 3px solid var(--f-burnt-orange);
  border-radius: 5px;
  color: var(--f-matte-white);
  font-size: 14px;
  line-height: 1.6;
}

/* ========================================
   PASSWORD RESET SCREENS
======================================== */

/* Consistent spacing for reset form fields */

.f-login__form input[autocomplete="new-password"] {
  margin-bottom: 8px;
}

/* Distinguish invalid or expired reset links */

.f-login > p[role="alert"] {
  border-left-color: var(--f-iron-red);
}

/* Ensure confirmation messages remain readable */

.f-login__notice[role="status"] {
  display: block;
  width: 100%;
}

/* Reset links outside the form */

.f-login > p > a {
  display: inline-block;
  line-height: 1.5;
}

/* Ensure Divi does not add unwanted form paragraph spacing */

.f-login__form p,
.f-login > p {
  padding-bottom: 0;
}

/* RESPONSIVE */

@media (max-width: 600px) {
  .f-login {
    padding: 30px 24px;
  }

  .f-login__intro {
    margin-bottom: 26px;
  }

  .f-login__intro h2 {
    font-size: clamp(26px, 7vw, 32px);
  }

  .f-login__logo {
    width: 80px;
    height: 80px;
  }
}

/* ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  .f-login__form input,
  .f-login__form button,
  .f-login a {
    transition: none !important;
  }
}
