/* THC Core: the sign-in page (wp-login.php) in the site's look (1.12.35). Colours come from the display tokens
   (thc-display.css, enqueued first) so Dark and High contrast follow the visitor's saved choice; literal fallbacks
   are the light palette. The @font-face rules and the logo address are added inline by includes/login.php. */

:root {
  --thc-l-canvas: var(--thc-canvas, var(--wp--preset--color--base, #f7f1e4));
  --thc-l-raised: var(--thc-surface-raised, var(--wp--preset--color--accent-5, #fcf8ef));
  --thc-l-muted: var(--thc-surface-muted, var(--wp--preset--color--accent-4, #ece4d9));
  --thc-l-border: var(--thc-border, var(--wp--preset--color--accent-6, #d9d0bc));
  --thc-l-text: var(--thc-text, var(--wp--preset--color--contrast, #332d25));
  --thc-l-leaf: var(--thc-leaf, var(--wp--preset--color--accent-1, #5e7d53));
  --thc-l-deep: var(--thc-leaf-deep, var(--wp--preset--color--accent-3, #3f5c3b));
  --thc-l-stroke: var(--thc-control-stroke, var(--wp--preset--color--control-stroke, #8a7f66));
  --thc-l-error: var(--thc-error, #a13d2d);
  --thc-l-body: "THC Fira Sans", "Segoe UI", Arial, sans-serif;
  --thc-l-display: "THC Platypi", Georgia, "Times New Roman", serif;
}

html[data-thc-theme="dark"] .login { color-scheme: dark; }

body.login {
  background: var(--thc-l-canvas);
  color: var(--thc-l-text);
  font-family: var(--thc-l-body);
  font-size: 1rem;
  line-height: 1.5;
  min-height: 100vh;
}

#login { width: min(100% - 2rem, 25rem); padding: 5vh 0 2rem; margin: 0 auto; }

/* The logo: the Customizer's custom logo (set inline), in place of the WordPress mark. */
.login h1 a,
.login h1 a:focus {
  display: block;
  width: 100%;
  max-width: 14rem;
  height: 7rem;
  margin: 0 auto 1.5rem;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  outline-offset: 6px;
  border-radius: 8px;
}
.login h1 a:focus-visible { outline: 3px solid var(--thc-l-deep); box-shadow: none; }
html[data-thc-theme="dark"] .login h1 a { background-color: #f7f1e4; border-radius: 12px; background-size: 85%; }

/* The panel. */
.login form,
.login #login_error,
.login .message,
.login .success,
.login .notice {
  background: var(--thc-l-raised);
  color: var(--thc-l-text);
  border: 1px solid var(--thc-l-border);
  border-radius: 12px;
  box-shadow: none;
  margin-top: 1rem;
}
.login form { padding: 1.5rem 1.5rem 1.25rem; }
.login #login_error { border-left: 4px solid var(--thc-l-error); }
.login .message, .login .success { border-left: 4px solid var(--thc-l-leaf); }
.login #login_error a, .login .message a { color: var(--thc-l-deep); }

.login label {
  font-family: var(--thc-l-body);
  font-weight: 600;
  font-size: .95rem;
  color: var(--thc-l-text);
}

.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
  min-height: 44px;
  padding: .5rem .75rem;
  font-family: var(--thc-l-body);
  font-size: 1rem;
  color: var(--thc-l-text);
  background: var(--thc-l-canvas);
  border: 1px solid var(--thc-l-stroke);
  border-radius: 8px;
  box-shadow: none;
  margin: .35rem 0 1rem;
}
.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
  border-color: var(--thc-l-deep);
  box-shadow: 0 0 0 2px var(--thc-l-deep);
  outline: 0;
}
.login .wp-pwd .button.wp-hide-pw { color: var(--thc-l-text); min-height: 44px; }
.login .wp-pwd .button.wp-hide-pw:focus { box-shadow: 0 0 0 2px var(--thc-l-deep); border-color: var(--thc-l-deep); }

.login input[type="checkbox"] {
  width: 1.25rem; height: 1.25rem;
  border: 1px solid var(--thc-l-stroke);
  border-radius: 4px;
  background: var(--thc-l-canvas);
  box-shadow: none;
}
.login input[type="checkbox"]:checked::before { filter: hue-rotate(260deg) saturate(.6); }
.login input[type="checkbox"]:focus { box-shadow: 0 0 0 2px var(--thc-l-deep); border-color: var(--thc-l-deep); }
.login .forgetmenot { margin-top: .25rem; }
.login .forgetmenot label { font-weight: 400; }

/* The one Leaf button, 44 px, full width on narrow screens. #wp-submit (every login screen's button) outranks
   WordPress's .button.button-large rules and Core's dark input rule, both of which otherwise win on specificity. */
.login #wp-submit,
.login .button-primary {
  min-height: 44px;
  padding: 0 1.25rem;
  font-family: var(--thc-l-body);
  font-weight: 600;
  font-size: 1rem;
  line-height: 44px;
  color: #fff;
  background: var(--thc-l-leaf);
  border: 1px solid var(--thc-l-leaf);
  border-radius: 999px;
  box-shadow: none;
  text-shadow: none;
}
html[data-thc-theme="dark"] .login #wp-submit,
html[data-thc-theme="dark"] .login .button-primary { background: var(--thc-l-leaf); border-color: var(--thc-l-leaf); color: #1b1915; }
.login #wp-submit:hover,
.login .button-primary:hover { background: var(--thc-l-deep); border-color: var(--thc-l-deep); color: #fff; }
html[data-thc-theme="dark"] .login #wp-submit:hover,
html[data-thc-theme="dark"] .login .button-primary:hover { color: #1b1915; }
.login #wp-submit:focus,
.login .button-primary:focus { box-shadow: 0 0 0 3px var(--thc-l-canvas), 0 0 0 6px var(--thc-l-deep); outline: 0; }
@media (max-width: 480px) {
  .login .submit { float: none; }
  .login #wp-submit, .login .button-primary { width: 100%; min-height: 44px; line-height: 44px; padding: 0 1.25rem; }
  .login .forgetmenot { float: none; margin-bottom: .75rem; }
}

/* Links under the panel. */
.login #nav, .login #backtoblog { font-family: var(--thc-l-body); font-size: .95rem; padding: .75rem 0 0; }
.login #nav a, .login #backtoblog a, .login .privacy-policy-page-link a {
  color: var(--thc-l-deep);
  text-decoration: underline;
  text-underline-offset: .15em;
}
.login #nav a:hover, .login #backtoblog a:hover, .login .privacy-policy-page-link a:hover { color: var(--thc-l-text); }
.login #nav a:focus, .login #backtoblog a:focus, .login .privacy-policy-page-link a:focus { outline: 3px solid var(--thc-l-deep); outline-offset: 2px; box-shadow: none; }
.login .privacy-policy-page-link { margin-top: 1.5rem; }
.login .language-switcher { display: none; }

/* A heading some pages print (Lost password, Register). */
.login .message strong, .login h2 { font-family: var(--thc-l-display); }

/* Room for anything another plugin adds inside the form (a bot check, a sign-in button). */
.login form > div:not(.user-pass-wrap):not(.forgetmenot):not(.submit) { margin: .5rem 0 1rem; }
