/* Login screens — /user/login and /drupal/user
   Overrides adminimal_upei.min.css:3657 (.authenticatedmessage)
   and adminimal_upei.min.css:4408 (.user-login-form display rules)
   Author: Edwin M
   Date: 2026-08-28
*/

/* ------------------------------------------------------------------
   Tokens. Prefixed so they cannot collide — nothing else in this
   theme uses custom properties. Values are the existing UPEI palette.
   ------------------------------------------------------------------ */
:root {
  --upei-login-maroon: #8c2004;
  --upei-login-maroon-dark: #761c05;
  --upei-login-ink: #192a36;
  --upei-login-muted: #4e5961;
  --upei-login-border: #d8dcdf;
  --upei-login-radius: 12px;
  --upei-login-field-radius: 8px;
  --upei-login-shadow: 0 1px 2px rgba(25, 42, 54, 0.06),
    0 12px 32px rgba(25, 42, 54, 0.08);
}

/* ==================================================================
   1. /drupal/user — admin login card (node 115840)
   The card wraps the page title, the form and the helper text.
   ================================================================== */

/* The content column is a 940px float inside the 1180px container, with a
   240px sidebar reserved on the right — which would leave the card visibly
   left of centre. The sidebar holds only an empty "Relevant Links" block on
   this page, so drop it and let the column fill the container. Desktop only:
   the mobile*.css breakpoints already collapse this layout. */
@media only screen and (min-width: 992px) {
  .page-node-115840 .pagecontent {
    float: none;
    width: auto;
  }

  .page-node-115840 .sidebarfirst {
    display: none;
  }
}

.page-node-115840 .pagecontent > .innerpagecontent {
  box-sizing: border-box;
  max-width: 520px;
  margin: 48px auto 64px;
  padding: 40px;
  background: #fff;
  border: 1px solid var(--upei-login-border);
  border-radius: var(--upei-login-radius);
  box-shadow: var(--upei-login-shadow);
}

/* headings.css pushes h1 down 50px inside .innerpagecontent — not here. */
.page-node-115840 .pagecontent > .innerpagecontent h1,
.page-node-115840 .pagecontent > .innerpagecontent .h1like {
  margin-top: 0;
}

.page-node-115840 #block-pagetitle {
  margin-bottom: 28px;
}

.page-node-115840 #block-pagetitle h1.page-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
  text-align: center;
  color: var(--upei-login-ink);
}

/* Re-reveal the form. More robust than the .page-node-115840 rule in
   adminimal_upei.min.css:4411 — the block is only placed on this path. */
#block-userlogin .user-login-form {
  display: block;
}

#block-userlogin .form-item {
  margin: 0 0 20px;
}

#block-userlogin label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
  color: var(--upei-login-ink);
}

/* width:100% supersedes the size="15" attribute on the inputs. */
#block-userlogin input.form-text {
  box-sizing: border-box;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  font-size: 16px;
  line-height: 46px;
  color: var(--upei-login-ink);
  background: #fff;
  border: 1px solid var(--upei-login-border);
  border-radius: var(--upei-login-field-radius);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#block-userlogin input.form-text::placeholder {
  color: #889097;
}

/* The ring replaces the native outline, so it has to stay obvious. */
#block-userlogin input.form-text:focus {
  outline: none;
  border-color: var(--upei-login-maroon);
  box-shadow: 0 0 0 3px rgba(140, 32, 4, 0.15);
}

/* Password field + show/hide toggle (js/login.js). */
#block-userlogin .upei-login-pass-wrap {
  position: relative;
}

#block-userlogin .upei-login-pass-wrap input.form-text {
  padding-right: 48px;
}

#block-userlogin .upei-login-eye {
  position: absolute;
  top: 50%;
  right: 1px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  margin: 0;
  color: var(--upei-login-muted);
  background: none;
  border: 0;
  border-radius: var(--upei-login-field-radius);
  cursor: pointer;
}

#block-userlogin .upei-login-eye:hover {
  color: var(--upei-login-maroon);
}

#block-userlogin .upei-login-eye:focus-visible {
  outline: 3px solid rgba(140, 32, 4, 0.35);
  outline-offset: -2px;
}

#block-userlogin .upei-login-eye svg {
  display: block;
  width: 20px;
  height: 20px;
}

/* Primary action. */
#block-userlogin .form-actions {
  margin: 4px 0 0;
  padding: 0;
}

#block-userlogin input.form-submit {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: var(--upei-login-maroon);
  border: 0;
  border-radius: var(--upei-login-field-radius);
  cursor: pointer;
  transition: background-color 0.15s ease;
}

#block-userlogin input.form-submit:hover {
  background: var(--upei-login-maroon-dark);
}

#block-userlogin input.form-submit:focus-visible {
  outline: 3px solid rgba(140, 32, 4, 0.35);
  outline-offset: 2px;
}

/* SSO link, wrapped and re-weighted by adminimal_upei.theme. */
#block-userlogin .upei-login-sso {
  position: relative;
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--upei-login-border);
}

/* Decorative "or" divider sitting on the rule above. */
#block-userlogin .upei-login-sso::before {
  content: "or";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0 12px;
  font-size: 13px;
  line-height: 1;
  color: var(--upei-login-muted);
  background: #fff;
}

#block-userlogin .upei-login-sso a {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--upei-login-maroon);
  background: #fff;
  border: 1px solid var(--upei-login-maroon);
  border-radius: var(--upei-login-field-radius);
  transition: background-color 0.15s ease, color 0.15s ease;
}

#block-userlogin .upei-login-sso a:hover {
  color: #fff;
  background: var(--upei-login-maroon);
}

#block-userlogin .upei-login-sso a:focus-visible {
  outline: 3px solid rgba(140, 32, 4, 0.35);
  outline-offset: 2px;
}

/* "Reset your password" — kill the bullet and .pagecontent ul margins. */
#block-userlogin .item-list ul {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  text-align: center;
}

#block-userlogin .item-list ul li {
  margin: 0;
  padding: 0;
  list-style: none;
}

#block-userlogin .item-list a.request-password-link {
  font-size: 14px;
  color: var(--upei-login-muted);
}

#block-userlogin .item-list a.request-password-link:hover {
  color: var(--upei-login-maroon);
}

/* Node body — "Login with Drupal Administration". */
.page-node-115840 .pagecontent > .innerpagecontent .field--name-body {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--upei-login-border);
}

.page-node-115840 .pagecontent > .innerpagecontent .field--name-body p {
  margin: 0;
  font-size: 14px;
  text-align: center;
  color: var(--upei-login-muted);
}

/* ==================================================================
   2. /user/login — staff/faculty SSO card
   Scoped to #block-staffandfacultylogin so the shared
   .authenticatedmessage / .disclaimer rule stays amber elsewhere.
   ================================================================== */

/* The card itself, so the block label <h2> sits inside it. */
#block-staffandfacultylogin {
  box-sizing: border-box;
  max-width: 560px;
  margin: 48px auto 64px;
  padding: 36px 40px;
  background: #fff;
  border: 1px solid var(--upei-login-border);
  border-radius: var(--upei-login-radius);
  box-shadow: var(--upei-login-shadow);
}

/* Real heading rendered by the block template from the block label — see
   config/sync/block.block.staffandfacultylogin.yml (label_display: visible).
   Font family and weight come from the theme's own h2 rule. */
#block-staffandfacultylogin > h2 {
  margin: 0 0 20px;
  font-size: 24px;
  line-height: 1.25;
  color: var(--upei-login-ink);
}

/* Drop the amber alert chrome from adminimal_upei.min.css:3657 — the card
   above provides it now — but keep the typography. */
#block-staffandfacultylogin .authenticatedmessage {
  padding: 0;
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: var(--upei-login-ink);
  background-color: transparent;
  border: 0;
}

/* Base rule sets .authenticatedmessage a { color: #fff }. */
#block-staffandfacultylogin .authenticatedmessage a {
  color: var(--upei-login-maroon);
}

/* The SSO anchor carries inline font-size/font-weight (on its parent
   div) and text-decoration — those three need !important. */
#block-staffandfacultylogin .authenticatedmessage a[href*="samllogin"] {
  box-sizing: border-box;
  display: block;
  width: 100%;
  margin-top: 24px;
  padding: 14px 20px;
  text-align: center;
  color: #fff !important;
  background: var(--upei-login-maroon);
  border-radius: var(--upei-login-field-radius);
  font-size: 16px !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: background-color 0.15s ease;
}

#block-staffandfacultylogin .authenticatedmessage a[href*="samllogin"]:hover {
  background: var(--upei-login-maroon-dark);
}

#block-staffandfacultylogin .authenticatedmessage a[href*="samllogin"]:focus-visible {
  outline: 3px solid rgba(140, 32, 4, 0.35);
  outline-offset: 2px;
}

/* Trailing separator from the block body. */
#block-staffandfacultylogin .field--name-body > hr {
  display: none;
}

/* ==================================================================
   3. Responsive — breakpoints match the theme's mobile*.css files.
   ================================================================== */

@media only screen and (max-width: 991px) {
  /* max-width:none, not 100% — a block at 100% of its parent plus side
     margins overflows by the width of those margins. */
  .page-node-115840 .pagecontent > .innerpagecontent,
  #block-staffandfacultylogin {
    max-width: none;
    margin: 32px 16px 48px;
  }
}

@media screen and (max-width: 600px) {
  .page-node-115840 .pagecontent > .innerpagecontent {
    padding: 24px 20px;
    margin: 24px 12px 40px;
  }

  #block-staffandfacultylogin {
    padding: 24px 20px;
    margin: 24px 12px 40px;
  }

  .page-node-115840 #block-pagetitle h1.page-title {
    font-size: 24px;
  }
}
