/* ==========================================================
   Kingsbridge Scholars - Canvas login page overrides
   Upload in: Admin > Themes > Theme Editor > Upload > CSS file
   Written against the live markup of /login/canvas.
   ========================================================== */

/* 1. Hide the Instructure / "Open Source LMS" footer.
      Canvas forces it on with "body.ic-Login-Body #footer.ic-Login-footer
      { display: block !important }", so this selector has to be more specific. */
html body.ic-Login-Body footer#footer.ic-Login-footer {
  display: none !important;
}

/* 1b. Hide the "By Instructure" footer on signed-in pages
       (Dashboard, courses, etc.). Canvas uses #footer.ic-app-footer there. */
html body footer#footer.ic-app-footer,
html body #footer.ic-app-footer {
  display: none !important;
}

/* 2. Login box: 480px wide, centered on the page */
.ic-Login {
  width: 100% !important;
  max-width: none !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
}

.ic-Login__container,
.ic-Login__content {
  width: 480px !important;
  min-width: min(480px, 95vw) !important;
  max-width: 95vw !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

.ic-Login__body,
#login_form {
  width: 100% !important;
  max-width: none !important;
  box-sizing: border-box;
}

#login_form input[type="text"],
#login_form input[type="password"] {
  width: 100% !important;
  box-sizing: border-box;
}

/* 3. Center the logo.
      The header holds the logo plus an empty "links" area that was
      taking up all the space to the right and pushing the logo left. */
.ic-Login-header__links {
  display: none !important;
}

.ic-Login-header {
  display: flex !important;
  justify-content: center !important;
}

.ic-Login-header__logo {
  flex: 0 0 160px !important;  /* logo width - change to taste */
  width: 160px !important;
  margin: 0 auto !important;
}

.ic-Login-header__logo img {
  display: block;
  width: 100%;
  height: auto;
}

/* Equal white space above and below the logo: 18px each.
   Above the logo the white space is the box's own 12px padding
   + a 2px inner border + this padding, so 4px here = 18px total. */
.ic-Login__innerContent {
  padding-top: 4px !important;
}

.ic-Login__body {
  margin-top: 18px !important;
}

/* 4. Make the Email / Password / Stay signed in labels readable
      (they were navy text on the navy panel, i.e. invisible) */
#login_form label,
#login_form .ic-Label {
  color: #FFFFFF !important;
}

/* 5. Actions row: [x] Stay signed in   Forgot Password?        [Log In] */
#login_form .ic-Login__actions {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

#login_form .ic-Login__actions-timeout {
  display: flex !important;
  align-items: center;
  flex-wrap: nowrap;
  gap: 6px;
}

#login_form .ic-Login__actions-timeout label {
  margin: 0 !important;
  white-space: nowrap;
}

#login_form .ic-Login__forgot {
  display: inline-block !important;
  margin: 0 0 0 10px !important;
  white-space: nowrap;
}

/* 6. Orange Log In button */
#login_form .Button--login {
  flex-shrink: 0;
  min-width: 110px;
  background: #D16D2E !important;
  border: 1px solid #D16D2E !important;
  color: #FFFFFF !important;
}

#login_form .Button--login:hover,
#login_form .Button--login:focus {
  background: #B35A22 !important;
  border-color: #B35A22 !important;
  color: #FFFFFF !important;
}
