/* ============================================================
   Researcher Publishers — Login Page (admin-login.css)
   Final clean, functional version (with bottom-aligned Login text)
   ============================================================ */

/* --- Base --- */
html, body { height: 100%; }
body { background: #0A3489 !important; color: #ffffff !important; }

/* --- Layout --- */
section#main{
  min-height:100vh; display:flex !important; align-items:center !important; justify-content:center !important; padding:48px 16px;
}
section#main .container{ width:100% !important; padding:0 15px; margin:0 auto !important; }
section#main .container > .row:first-child{ display:flex !important; justify-content:center !important; }
section#main .container > .row:first-child .col-lg-4{
  float:none !important; width:100% !important; max-width:480px !important; margin:0 auto !important;
}

/* --- Card --- */
section#main .panel{
  background:#ffffff !important; color:#222 !important; border:none; border-radius:12px; box-shadow:0 8px 28px rgba(0,0,0,0.25);
}
section#main .panel .panel-body{ padding:28px 24px; }

/* --- Logo --- */
.mautic-logo{
  display:flex !important; justify-content:center !important; align-items:center !important; margin-bottom:16px !important; text-align:center !important;
}
.mautic-logo img{ display:block !important; margin:0 auto !important; max-width:150px !important; height:auto !important; }

/* --- Full-bleed footer --- */
section#main .container > .row:last-child{
  position:relative; left:50%; transform:translateX(-50%); width:100vw;
  margin-top:24px !important; padding:14px 16px !important;
  background:#0A3489 !important; text-align:center !important; border-top:1px solid rgba(255,255,255,0.15);
  color:#ffffff !important; font-size:16px !important; line-height:1.5 !important;
}
section#main .container > .row:last-child .text-secondary,
section#main .container > .row:last-child a,
section#main .container > .row:last-child a:visited { color:#ffffff !important; text-decoration:none; }
section#main .container > .row:last-child a:hover { color:#cde3ff !important; }
section#main .container > .row:last-child > [class*="col-"]{
  float:none !important; width:100% !important; max-width:none !important; margin:0 auto !important;
}

/* --- Remember Me --- */
.login-form .checkbox-inline.custom-primary{
  float:none !important; display:flex !important; justify-content:center !important; align-items:center !important; margin:10px 0 18px !important;
}
.login-form .checkbox-inline.custom-primary label{
  display:inline-flex !important; align-items:center !important; gap:8px !important;
  font-size:16px !important; font-weight:500 !important; color:#0A3489 !important; line-height:1.4 !important; margin:0 !important;
}
section#main input[type="checkbox"][id*="remember"]{ transform:translateY(1px); }

/* --- Login Button (Bottom-align label) --- */
/* Use a 1-cell grid; vertically align to bottom to counter font metrics pushing it high */
#form-loginbtn{
  width:100% !important; min-height:52px !important; height:52px !important;
  padding:0 0 2px !important;            /* tiny bottom pad so glyphs don’t clip */
  margin:0 !important; line-height:1 !important;

  background:#0A3489 !important; color:#fff !important;
  border:none !important; border-radius:6px !important;

  font-size:17px !important; font-weight:600 !important; letter-spacing:.3px !important; text-align:center !important;

  display:grid !important;
  align-items:end !important;            /* ⬅️ bottom alignment */
  justify-items:center !important;       /* horizontal center */
}
#form-loginbtn > *{
  grid-area:1 / 1 !important;            /* everything sits in the same centered cell */
  margin:0 !important; justify-self:center !important; align-self:end !important;
}
#form-loginbtn::before, #form-loginbtn::after{ content:none !important; }
#form-loginbtn .pull-left, #form-loginbtn .pull-right{ float:none !important; }
#form-loginbtn i, #form-loginbtn svg{ display:none !important; } /* if theme injects spinner/icon */

/* --- Responsive --- */
@media (max-width:768px){
  section#main{ padding:32px 12px; }
  section#main .container > .row:first-child .col-lg-4{ max-width:94% !important; }
  .mautic-logo img{ max-width:150px !important; }
}


/* ===== Final hard fix: center + bottom-align the Login text ===== */
#form-loginbtn {
  /* grid for bulletproof positioning */
  display: grid !important;
  place-items: end center !important;   /* vertical: bottom, horizontal: center */
  text-align: center !important;        /* fallback for plain text children */
}

#form-loginbtn > span {
  /* defeat any earlier "width:100%" or left text */
  width: auto !important;
  justify-self: center !important;
  align-self: end !important;
  text-align: center !important;
  white-space: nowrap !important;
  margin: 0 !important;
}

/* if the theme injects another inline element, center it too */
#form-loginbtn > *:not(span) {
  justify-self: center !important;
  align-self: end !important;
  text-align: center !important;
}

/* ===== FINAL OVERRIDE: Bottom-align + center the Login label ===== */

/* Make the button a flex box that centers horizontally and sits text on the bottom */
button#form-loginbtn.btn.btn-primary.btn-block.btn-nospin {
  display: flex !important;
  justify-content: center !important;   /* horizontal center */
  align-items: flex-end !important;      /* bottom align */
  height: 52px !important;
  width: 100% !important;
  padding: 0 !important;
  line-height: 1 !important;
  text-align: center !important;

  /* neutralize any theme extras */
  position: relative !important;
}
button#form-loginbtn.btn.btn-primary.btn-block.btn-nospin::before,
button#form-loginbtn.btn.btn-primary.btn-block.btn-nospin::after {
  content: none !important;
}

/* === Insert a blank spacer above the Login text === */
#form-loginbtn > span::before {
  content: "";                 /* invisible element */
  display: block;              /* forces a new line above the text */
  height: 12px;                 /* adjust this value to move the text down/up */
}

/* Ensure the button itself still centers everything properly */
#form-loginbtn {
  display: grid !important;
  place-items: center !important;  /* centers both vertically and horizontally */
  width: 100% !important;
  height: 56px !important;
  padding: 0 !important;
  line-height: normal !important;
  text-align: center !important;
}

#form-loginbtn > span {
  text-align: center !important;
  display: inline-block !important;
  line-height: 1.2 !important;
}

/* === Add "RePubs" text after "Login" === */
#form-loginbtn > span::after {
  content: " ResearcherPubs";              /* add a space before so it doesn’t stick to “Login” */
  font-weight: 600;                /* slightly lighter than main label */
  font-size: 16px;                 /* match or slightly smaller */
  letter-spacing: 0.2px;
  color: #ffffff;                  /* same color as Login text */
}
