﻿/* ---------- Common: includes and fonts ---------- */
@import url("/themes/_common/css/reset.css");
@import url("/themes/_common/css/fonts/font-awesome/css/font-awesome.min.css");
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400;500;700&family=Poppins:wght@300;400;500;600&display=swap');
@import url("/themes/_portals/bluestar/css/login.css?V");

/* ---------- Root: customer colour scheme ---------- */
:root {
  --primary-font-family: 'Poppins', Arial, Sans-Serif;
  --primary-color: #525252;
  --primary-color-hover: var(--secondary-color);
  --primary-contrast: #ffffff;
  --secondary-font-family: 'Oswald', Serif;
  --secondary-color: #293377;
  --secondary-color-hover: var(--tertiary-color);
  --secondary-contrast: #ffffff;
  --tertiary-color: #3872db;
  --tertiary-contrast: #ffffff;
  --focus-color: color-mix(in srgb, var(--secondary-color) 35%, transparent);
  --background-color: #ffffff;
  --background-contrast: #000000;
  --border-color: #c0c0c0;
  --border-radius: 5px;
}

/* ---------- App: common application style ---------- */
html, body { height: auto; min-height: 100%; }

.app-body {
  min-width: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  font-family: var(--primary-font-family);
  font-size: 16px;
  color: var(--primary-contrast);
  -webkit-text-size-adjust: 100%;
  background: var(--secondary-color) left top 110px / cover no-repeat;
}
@keyframes app-slideshow {
  0%, 50%, 100% { background-image: url(/themes/bluestar/img/bluestar_bg.jpg); }
  25%, 75%      { background-image: url(/themes/bluestar/img/bluestar_merchandise_bg.jpg); }
}

.app-container {
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  box-sizing: border-box;
}

.app-header {
  height: 110px;
  display: flex;
  align-items: center;
  background: var(--background-color);
}
.app-logo { 
  display: inline-block; 
  line-height: 0; 
}
.app-logo-image {
  display: block;
  width: 84px;
  height: 95px;
  background: url(/themes/_common/img/bluestar_logo.gif) no-repeat left center / contain;
}
.app-logo:focus-visible { 
  outline: 3px solid var(--focus-color); outline-offset: 4px; 
}
.app-main { 
  flex: 1 0 auto; 
}

/* ---------- Footer (wraps shared bs-footer.jsp include) ---------- */
.app-footer .footer {
  height: auto;
  background: var(--secondary-color);
  opacity: 1;
  text-align: center;
}
.app-footer div.footer .footer-logo {
  min-width: 0;
  width: 100%;
  max-width: 1350px;
  margin: 0 auto;
  box-sizing: border-box;
  background-image: url(/themes/_portals/bluestar/img/Blue_Star_Reversed.png), url(/themes/_common/img/ISO27001_Logo_Reversed.png);
  background-position: left 24px center, right 24px center;
  background-repeat: no-repeat, no-repeat;
  background-size: 200px auto, 60px auto;
  padding: 48px 240px;
  height: auto;
  font-size: 13px;
  line-height: 1.8;
  color: var(--secondary-contrast);
}
.app-footer .footer-logo > div { margin-left: 0 !important; }
.app-footer a { color: var(--primary-contrast); white-space: nowrap; }
.app-footer a:hover { text-decoration: underline; }

/* ---------- Login: page elements ---------- */

/* ---------- Layout (desktop) ---------- */
.login-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 475px;
  grid-template-areas:
    "intro   card"
    "manual  card"
    "help    help"
    "notices notices";
  column-gap: 56px;
  row-gap: 24px;
  padding-top: 56px;
  padding-bottom: 48px;
}
.login-intro   { grid-area: intro;  align-self: center; }
.login-card    { grid-area: card;   align-self: center; }
.login-manual  { grid-area: manual; align-self: start; }
.login-help    { grid-area: help;   margin-top: 24px; }
.login-notices { grid-area: notices; }

/* ---------- Intro ---------- */
.login-title {
  margin: 0;
  font-family: var(--secondary-font-family);
  text-transform: uppercase;
  color: var(--primary-contrast);
  line-height: 1;
}
.login-title-kicker {
  display: block;
  font-size: clamp(1.4rem, 3.5vw, 45px);
  font-weight: 300;
}
.login-title-main {
  display: block;
  font-size: clamp(4.5rem, 12vw, 150px);
  font-weight: 700;
  margin: 4px 0 12px;
  letter-spacing: .01em;
}
.login-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- Login card ---------- */
.login-card {
  padding: 32px 36px;
  box-sizing: border-box;
  background: color-mix(in srgb, var(--background-color) 95%, transparent);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  border-radius: var(--border-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
  color: var(--background-contrast);
}

.login-card-title {
  margin: 0 0 20px;
  font-family: var(--secondary-font-family);
  font-size: 22px;
  font-weight: 300;
  line-height: 1.25;
  text-transform: uppercase;
  color: var(--background-contrast);
}

.login-error { margin: 0 0 12px; color: #c00000; line-height: 1.5; }
.login-error:empty { display: none; }

/* ---------- Screen-reader labels ---------- */
.login-label {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.login-input {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0 0 12px;
  padding: 0 14px;
  box-sizing: border-box;
  font: 16px/1 var(--primary-font-family);
  color: var(--background-contrast);
  background: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}
.login-input:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px var(--focus-color);
}

/* ---------- Buttons ---------- */
.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  box-sizing: border-box;
  border: 0;
  border-radius: var(--border-radius);
  font: 500 17px var(--primary-font-family);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--primary-contrast);
  background: var(--secondary-color);
  cursor: pointer;
  transition: background-color .15s;
}
.login-button:hover { background: var(--secondary-color-hover); color: var(--primary-contrast); }
.login-button:focus-visible { outline: 3px solid var(--focus-color); outline-offset: 2px; }
.login-button-primary { margin-top: 4px; }

.login-button-manual {
  display: inline-flex;
  width: auto;
  padding: 0 32px;
  font: 400 18px var(--secondary-font-family);
  color: var(--secondary-contrast);
  background: var(--tertiary-color);
}
.login-button-manual:hover { background: var(--secondary-color-hover); color: var(--secondary-contrast); }

/* ---------- Register / forgot password ---------- */
.login-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin: 16px 0;
}
.login-link {
  display: inline-block;
  padding: 6px 0;
  font: 300 18px var(--secondary-font-family);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--background-contrast);
}
.login-link:hover { color: var(--tertiary-color); }
.login-link:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 2px; }

/* ---------- Support contacts ---------- */
.login-help { line-height: 1.6; }
.login-help-title {
  margin: 0 0 8px;
  font: 300 16px/1.6 var(--primary-font-family);
  color: var(--primary-contrast);
}
.login-contacts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 8px 24px;
}
.login-contact { min-width: 0; display: flex; flex-direction: column; }
.login-contact-name {
  margin: 16px 0 6px;
  font: 500 1.5rem/1 var(--secondary-font-family);
  text-transform: uppercase;
}
.login-contact-phone,
.login-contact-email {
  font-size: 15px;
  color: var(--primary-contrast);
  text-decoration: none;
  overflow-wrap: break-word;
}
.login-contact-phone:hover,
.login-contact-email:hover { text-decoration: underline; }

/* ---------- Notices (holiday arrangements etc. from message.jsp) ---------- */

.login-notices { display: block; margin-top: 24px;}
.login-notice {
  padding: 24px 32px;
  color: var(--background-contrast);
  background: color-mix(in srgb, var(--background-color) 95%, transparent);
  border-radius: var(--border-radius);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .25);
}
.login-notice + .login-notice { margin-top: 16px; }
.login-notice-title {
  margin: 0 0 12px;
  font: 600 24px/1.3 var(--secondary-font-family);
  text-transform: uppercase;
  color: var(--secondary-color);
}
.login-notice-title .fa { margin-right: 10px; }
.login-notice p { margin: 0; font-size: 14px; font-weight: 300; line-height: 1.6; }
.login-notice p + p { margin-top: 4px; }
.login-notice strong { font-weight: 600; }
@media (max-width: 479px) {
  .login-notice { padding: 20px; }
}

/* ---------- Media queries (widest to smallest) ---------- */

/* ---------- Tablet & phone: ≤ 899px ---------- */
@media (max-width: 899px) {
  /* ---------- Layout: one column ---------- */
  .login-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "intro"
      "card"
      "manual"
      "help"
      "notices";
    row-gap: 16px;
    padding-top: 32px;
  }
  .login-intro,
  .login-card,
  .login-manual { align-self: auto; }
  .login-help   { margin-top: 0; }

  .login-button-manual { display: flex; width: 100%; padding: 0 16px; }

  /* ---------- Footer: logos stacked ---------- */
  .app-footer div.footer .footer-logo {
    background-position: center top 24px, center bottom 20px;
    background-size: 180px auto, 56px auto;
    padding: 80px 16px 100px;
    font-size: 14px;
  }
}

/* ---------- Small tablet & phone: ≤ 639px ---------- */
@media (max-width: 639px) {
  .app-container { padding-left: 16px; padding-right: 16px; }
}

/* ---------- Phone: ≤ 479px ---------- */
@media (max-width: 479px) {
  .login-card { padding: 24px 20px; }
}

/* ---------- Accessibility preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  .app-body { animation: none; }
  .login-button { transition: none; }
}
