/* ==========================================================================
   ICGC Praise Temple - sign-in screen
   ==========================================================================
   Loaded with a dependency on WordPress's own `login` stylesheet, so it always
   prints after it. That ordering is the whole trick: nearly every rule here is
   the same specificity as the core rule it replaces, and an inline <style> in
   login_enqueue_scripts prints *before* login.css, so a first attempt at this
   left the button blue and the WordPress mark in place.

   Where a selector still needs help it uses body.login rather than
   `.wp-core-ui .login` - those two classes sit on the same element, so a
   descendant combinator between them matches nothing at all.

   Values are copied from adinkra.css rather than imported: that file is ~90KB
   of Divi-specific selectors, none of which match anything on this page. If the
   palette moves, it has to be moved here too.
   ========================================================================== */

:root {
  --ad-ink: #14100C;
  --ad-paper: #EFF1EC;
  --ad-surface: #FFFFFF;
  --ad-gold: #A87524;
  --ad-gold-bright: #C08A2E;
  --ad-clay: #A34032;
  --ad-text: #1B1F1A;
  --ad-text2: #5A6158;
  --ad-muted: #6C7269;
  --ad-rule: #D5DACE;
  --ad-display: Futura, "Avenir Next", "Century Gothic", "URW Gothic", "Trebuchet MS", sans-serif;
  --ad-body: "Iowan Old Style", "Hoefler Text", Palatino, "Palatino Linotype", Georgia, serif;
}

body.login {
  background: var(--ad-paper);
  font-family: var(--ad-body);
  color: var(--ad-text);
}

/* ---- the mark ------------------------------------------------------------ */
body.login h1 { margin-bottom: 4px; }

body.login h1 a {
  background-image: url("https://icgcpraisetempletx.org/wp-content/uploads/2023/02/ICGC_M1A.png");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  width: 148px;
  height: 121px;              /* the logo is 1800x1476 - hold its ratio */
  margin-bottom: 14px;
}

/* Say whose sign-in this is. A login form that does not name its owner is
   indistinguishable from a phishing page. */
body.login h1::after {
  content: "ICGC Praise Temple";
  display: block;
  font-family: var(--ad-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ad-gold);
  text-align: center;
}

/* ---- the card ------------------------------------------------------------ */
body.login form {
  background: var(--ad-surface);
  border: 1px solid var(--ad-rule);
  border-radius: 0;
  box-shadow: none;
  padding: 30px 28px 28px;
  margin-top: 22px;
}

body.login label {
  font-family: var(--ad-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ad-muted);
}

body.login form .input,
body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"] {
  font-family: var(--ad-body);
  font-size: 17px;
  line-height: 1.4;
  padding: 13px 15px;
  background: var(--ad-paper);
  border: 1px solid var(--ad-rule);
  border-radius: 0;
  color: var(--ad-text);
  box-shadow: none;
  box-sizing: border-box;
}

body.login form .input:focus,
body.login input[type="text"]:focus,
body.login input[type="email"]:focus,
body.login input[type="password"]:focus {
  border-color: var(--ad-gold);
  outline: 2px solid var(--ad-gold);
  outline-offset: 0;
  box-shadow: none;
}

/* The show/hide-password control sits inside the field. */
body.login .wp-pwd .button.wp-hide-pw {
  color: var(--ad-muted);
  background: transparent;
  border: 0;
  box-shadow: none;
}
body.login .wp-pwd .button.wp-hide-pw:hover { color: var(--ad-gold); }
body.login .wp-pwd .button.wp-hide-pw:focus {
  outline: 2px solid var(--ad-gold);
  box-shadow: none;
}

/* ---- the button ---------------------------------------------------------- */
body.login .button-primary,
body.login #wp-submit {
  font-family: var(--ad-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 14px 30px;
  height: auto;
  min-height: 0;
  line-height: 1.2;
  background: var(--ad-gold);
  border: 2px solid var(--ad-gold);
  border-radius: 0;
  color: var(--ad-ink);
  text-shadow: none;
  box-shadow: none;
  float: none;
  width: 100%;
  transition: background-color .2s, border-color .2s, transform .2s;
}

body.login .button-primary:hover,
body.login #wp-submit:hover {
  background: var(--ad-gold-bright);
  border-color: var(--ad-gold-bright);
  color: var(--ad-ink);
  transform: translateY(-2px);
}

body.login .button-primary:focus,
body.login #wp-submit:focus {
  outline: 2px solid var(--ad-text);
  outline-offset: 2px;
  box-shadow: none;
}

/* Core floats the submit button beside "Remember Me"; a full-width button
   needs that line above it instead.

   The selector needs an id to win. Two core rules were flattening this:
   `.login form .forgetmenot` (three classes), and then `#login form p`, which
   carries an id and so outranks any class-only selector however late it loads.
   `#login form p.forgetmenot` clears both. Worth measuring rather than
   assuming - the id rule is the one that is easy to miss, because it names a
   bare `p` and does not look like it is about this element at all. */
#login form p.forgetmenot,
body.login form .forgetmenot {
  float: none;
  display: block;
  margin-bottom: 18px;
  line-height: 1.4;
}
body.login .forgetmenot label {
  text-transform: none;
  letter-spacing: 0.01em;
  font-family: var(--ad-body);
  font-size: 16px;
  color: var(--ad-text2);
}
body.login .submit { float: none; }

body.login input[type="checkbox"] {
  border-color: var(--ad-rule);
  border-radius: 0;
}
body.login input[type="checkbox"]:checked::before {
  content: "";
  background: var(--ad-gold);
  width: 12px;
  height: 12px;
  margin: 2px;
  display: block;
}
body.login input[type="checkbox"]:focus {
  outline: 2px solid var(--ad-gold);
  box-shadow: none;
}

/* ---- the links underneath ------------------------------------------------ */
body.login #nav,
body.login #backtoblog {
  text-align: center;
  padding: 0;
  margin: 16px 0 0;
}

body.login #nav a,
body.login #backtoblog a {
  font-family: var(--ad-display);
  font-size: 15px;
  color: var(--ad-text2);
  text-decoration: none;
}
body.login #nav a:hover,
body.login #backtoblog a:hover { color: var(--ad-gold); }
body.login #nav a:focus,
body.login #backtoblog a:focus {
  color: var(--ad-gold);
  box-shadow: none;
  outline: 2px solid var(--ad-gold);
  outline-offset: 2px;
}

/* ---- messages ------------------------------------------------------------ */
body.login .message,
body.login .success,
body.login #login_error {
  font-family: var(--ad-body);
  font-size: 16px;
  line-height: 1.5;
  background: var(--ad-surface);
  border: 1px solid var(--ad-rule);
  border-left: 4px solid var(--ad-gold);
  border-radius: 0;
  box-shadow: none;
  color: var(--ad-text);
}
body.login #login_error { border-left-color: var(--ad-clay); }

body.login .message a,
body.login #login_error a { color: var(--ad-gold); }

/* ---- language switcher, when present ------------------------------------- */
body.login .language-switcher { display: none; }

@media (max-width: 480px) {
  body.login form { padding: 24px 18px 22px; }
  body.login h1 a { width: 118px; height: 97px; }
}
