/* Augustine Institute Online Webstore login theme.
   Brand guide (Aug 2025): Augustine Blue #002157, Augustine Gold #917F2E, Augustine Yellow #FFE06A.
   Fonts: Source Serif 4 (headings) and Jost (body), self-hosted from resources/fonts/, SIL OFL.
   These are free open-source stand-ins for the brand's Publico Banner (serif) and Avenir (sans);
   swap in the licensed webfonts later if desired. Gold usage: on the navy panel, gold accents use
   Augustine Yellow #FFE06A (legible on dark); on white, gold links use Augustine Gold #917F2E.
   Product logos (WoL/SoG) are the real files. */

@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../fonts/source-serif-4-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Jost"; src: url("../fonts/jost-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

* { box-sizing: border-box; }

.ai-body {
  margin: 0;
  background: #ece9e3;
  font-family: "Jost", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

.ai-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 16px;
}

.ai-card {
  width: 100%;
  max-width: 960px;
  background: #fff;
  border: 1px solid #e0ddd8;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
}

/* ---------- Left brand panel ---------- */
.ai-pan {
  flex: 1.6 1 0;
  min-width: 0;
  background: #002157;
  color: #fff;
  padding: 46px 44px;
}

/* Logo lockup: official Augustine Institute mark (white PNG) stacked over the
   ONLINE WEBSTORE qualifier. .ai-bn / .ai-mark are retired; the image carries the wordmark. */
.ai-lockup { display: block; }
.ai-logomark { display: block; width: auto; height: 46px; margin: 0 0 8px; }
.ai-bs {
  color: #FFE06A;
  font-size: 11.5px;
  letter-spacing: 0.18em;
}

.ai-tag {
  color: #FFE06A;
  font-size: 11.5px;
  letter-spacing: 0.17em;
  margin: 26px 0 22px;
}

.ai-sso {
  border-top: 1px solid #e0ddd8;
  border-bottom: 1px solid #e0ddd8;
  padding: 14px 0;
  margin: 0 0 24px;
}
.ai-sso-label { color: #9a9a9a; font-size: 11px; letter-spacing: .12em; margin-bottom: 7px; }
.ai-sso-list { color: #002157; font-size: 13px; font-weight: 700; line-height: 1.7; }

.ai-welcome {
  color: #fff;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 13px;
}
.ai-intro { color: #cdd7e6; font-size: 14px; line-height: 1.65; margin: 0 0 26px; }

.ai-prod { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.ai-chip {
  background: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.ai-logo { display: block; width: auto; }
.ai-logo--wol { height: 52px; }
.ai-logo--sog { height: 34px; }
.ai-prod-desc { color: #dbe4f2; font-size: 13px; line-height: 1.5; }

.ai-notice {
  background: rgba(255,255,255,.07);
  border-left: 4px solid #FFE06A;
  padding: 20px 22px;
  margin: 28px 0 24px;
}
.ai-notice-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.ai-notice-ico { color: #FFE06A; font-size: 18px; line-height: 1; }
.ai-notice-title { color: #fff; font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.ai-notice-body { color: #c2cee0; font-size: 13px; line-height: 1.75; margin: 0; }

.ai-support { border-top: 1px solid rgba(255,255,255,.15); padding-top: 20px; }
.ai-support-hd { color: #fff; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.ai-support-line { color: #9fb3d6; font-size: 12.5px; line-height: 2; }
.ai-support-line a { color: #FFE06A; text-decoration: none; }
.ai-support-line a:hover { text-decoration: underline; }

/* ---------- Right form ---------- */
.ai-form {
  flex: 1 1 0;
  min-width: 0;
  padding: 46px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.ai-fh {
  color: #002157;
  font-family: "Source Serif 4", Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  margin: 0 0 5px;
}
.ai-fsub { color: #6b6b6b; font-size: 13.5px; line-height: 1.5; margin: 0 0 22px; }

.ai-alert { border-radius: 0; padding: 11px 13px; font-size: 13px; line-height: 1.45; margin: 0 0 16px; }
.ai-alert--error { background: #fbeaea; border: 1px solid #e0b4b4; color: #8a2b2b; }
.ai-alert--success { background: #eaf4ec; border: 1px solid #b6d8be; color: #2c6b39; }
.ai-alert--warning { background: #fbf7ec; border: 1px solid #e7d9b0; color: #7a5b16; }
.ai-alert--info { background: #eaf0f8; border: 1px solid #b8cce6; color: #002157; }

.ai-label { display: block; color: #002157; font-size: 11.5px; font-weight: 700; margin-bottom: 6px; }
.ai-input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid #cfcbc5;
  border-radius: 0;
  font-size: 14px;
  background: #fff;
  color: #333;
  margin-bottom: 18px;
}
.ai-input:focus { outline: none; border-color: #002157; box-shadow: 0 0 0 2px rgba(0,33,87,.15); }

.ai-remember { display: flex; align-items: center; gap: 7px; color: #555; font-size: 12.5px; margin: 0 0 18px; }
.ai-remember input { margin: 0; }

.ai-btn {
  width: 100%;
  background: #002157;
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 0;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .05em;
  cursor: pointer;
}
.ai-btn:hover { background: #00173f; }
.ai-btn-secondary { background: #fff; color: #002157; border: 1px solid #002157; margin-top: 10px; }
.ai-btn-secondary:hover { background: #f4f1eb; }

.ai-forgot { margin-top: 16px; }
.ai-forgot a { color: #917F2E; font-size: 13px; text-decoration: none; }
.ai-forgot a:hover { text-decoration: underline; }

/* ---------- Flow steps (email / password / code) ---------- */
.ai-or { display: flex; align-items: center; gap: 12px; color: #9a9a9a; font-size: 11px; letter-spacing: .08em; margin: 22px 0; }
.ai-or::before, .ai-or::after { content: ""; flex: 1; height: 1px; background: #e0ddd8; }
.ai-google { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 1px solid #cfcbc5; border-radius: 0; padding: 12px; font-size: 13.5px; font-weight: 700; color: #444; cursor: pointer; text-decoration: none; }
.ai-google:hover { background: #f7f5f1; }
.ai-google svg { flex: 0 0 auto; }
.ai-as { background: #f4f1eb; border: 1px solid #e0ddd8; padding: 10px 13px; font-size: 12.5px; color: #555; margin: 0 0 18px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ai-as a { color: #917F2E; text-decoration: none; white-space: nowrap; }
.ai-altlink { margin-top: 14px; }
.ai-altlink a { color: #002157; font-size: 12.5px; text-decoration: none; }
.ai-altlink a:hover { text-decoration: underline; }
.ai-codein { letter-spacing: .45em; font-size: 18px; text-align: center; }

/* ---------- Account picker (subaccount selection) ---------- */
.ai-acctbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #f4f1eb; border: 1px solid #e0ddd8; padding: 10px 13px; font-size: 12.5px; color: #555; margin: 0 0 20px; }
.ai-acctbar a { color: #917F2E; text-decoration: none; white-space: nowrap; }
.ai-acctgrp { margin: 0 0 18px; }
.ai-acctgrp-label { color: #9a9a9a; font-size: 11px; letter-spacing: .12em; margin-bottom: 9px; }
.ai-acct { width: 100%; text-align: left; display: block; background: #fff; border: 1px solid #cfcbc5; border-radius: 0; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; }
.ai-acct:hover { border-color: #002157; background: #f7f9fc; }
.ai-acct-name { display: block; color: #002157; font-size: 14px; font-weight: 700; }
.ai-acct-mail { display: block; color: #6b6b6b; font-size: 12px; margin-top: 3px; }

/* ---------- Inherited Keycloak screens ----------
   Screens we don't hand-build (account picker, forgot password, required actions, errors)
   render through template.ftl, and their inner markup is PatternFly v5. These rules restyle
   that markup to match the brand. Scoped to .ai-kc so they can't affect our own screens. */

.ai-req { color: #6b6b6b; font-size: 12px; margin: 0 0 16px; }
.ai-req-star { color: #a3352f; }
.ai-info { margin-top: 18px; font-size: 12.5px; color: #6b6b6b; line-height: 1.6; }
.ai-info a { color: #917F2E; text-decoration: none; }
.ai-info a:hover { text-decoration: underline; }

.ai-kc { width: 100%; }
.ai-kc .pf-v5-c-form,
.ai-kc form { width: 100%; }
.ai-kc .pf-v5-c-form__group { margin: 0 0 16px; }
.ai-kc .pf-v5-c-form__group-label { padding-bottom: 5px; }

/* labels */
.ai-kc .pf-v5-c-form__label,
.ai-kc .pf-v5-c-form__label-text,
.ai-kc label { color: #002157; font-size: 11.5px; font-weight: 700; }
.ai-kc .pf-v5-c-form__label-required { color: #a3352f; }

/* inputs: PatternFly puts .pf-v5-c-form-control on a wrapping span in some screens
   and directly on the control in others, so handle both. */
.ai-kc .pf-v5-c-form-control,
.ai-kc input[type="text"], .ai-kc input[type="email"], .ai-kc input[type="password"],
.ai-kc input[type="tel"], .ai-kc input[type="number"], .ai-kc select, .ai-kc textarea {
  border: 1px solid #cfcbc5;
  border-radius: 0;
  background: #fff;
  color: #333;
  font-size: 14px;
  width: 100%;
  box-sizing: border-box;
}
.ai-kc .pf-v5-c-form-control { padding: 0; display: flex; align-items: center; }
.ai-kc .pf-v5-c-form-control > input,
.ai-kc .pf-v5-c-form-control > select,
.ai-kc .pf-v5-c-form-control > textarea {
  border: 0; background: transparent; width: 100%; padding: 12px 13px; font-size: 14px; color: #333;
}
.ai-kc input:not([type="checkbox"]):not([type="radio"]):focus,
.ai-kc .pf-v5-c-form-control:focus-within {
  outline: none; border-color: #002157; box-shadow: 0 0 0 2px rgba(0,33,87,.15);
}
.ai-kc .pf-v5-c-form-control.pf-m-readonly,
.ai-kc .pf-v5-c-form-control.pf-m-readonly > input { background: #f4f1eb; }

/* the email + restart-login pairing */
.ai-kc .pf-v5-c-input-group { display: flex; align-items: stretch; gap: 0; }
.ai-kc .pf-v5-c-input-group__item.pf-m-fill { flex: 1 1 auto; min-width: 0; }
.ai-kc .pf-v5-c-input-group__item { display: flex; }

/* buttons */
.ai-kc .pf-v5-c-button {
  border-radius: 0; font-size: 13.5px; font-weight: 700; letter-spacing: .04em;
  padding: 13px 16px; cursor: pointer; border: 1px solid transparent;
}
.ai-kc .pf-v5-c-button.pf-m-primary { background: #002157; color: #fff; }
.ai-kc .pf-v5-c-button.pf-m-primary:hover { background: #00173f; }
.ai-kc .pf-v5-c-button.pf-m-secondary,
.ai-kc .pf-v5-c-button.pf-m-tertiary { background: #fff; color: #002157; border-color: #002157; }
.ai-kc .pf-v5-c-button.pf-m-secondary:hover,
.ai-kc .pf-v5-c-button.pf-m-tertiary:hover { background: #f4f1eb; }
.ai-kc .pf-v5-c-button.pf-m-link { background: none; border: 0; color: #917F2E; font-weight: 400; padding: 0; letter-spacing: 0; }
.ai-kc .pf-v5-c-button.pf-m-control { background: #fff; color: #002157; border: 1px solid #cfcbc5; border-left: 0; padding: 0 12px; white-space: nowrap; font-weight: 400; }
.ai-kc .pf-v5-c-button.pf-m-control:hover { background: #f4f1eb; }
.ai-kc .pf-v5-c-button.pf-m-block { width: 100%; display: block; }

/* grouped choices, e.g. the account picker's Primary Account / Subaccounts fieldsets */
.ai-kc fieldset { border: 0; padding: 0; margin: 0 0 18px; }
.ai-kc legend {
  color: #9a9a9a; font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  padding: 0; margin-bottom: 9px; float: none; width: auto;
}

/* Account choice buttons. Verified against the live picker: it renders
     <button type="submit" name="id" class="btn btn-fluid btn-primary email-login-button"
             style="margin-bottom:1rem; border-radius:0.7rem"><b>Name</b><br>email</button>
   Those are legacy Bootstrap-era classes (no PatternFly styling), and the inline style sets a
   border-radius, so the overrides below need !important to win. */
.ai-kc button[name="id"],
.ai-kc .email-login-button {
  display: block; width: 100%; text-align: left;
  background: #fff !important;
  border: 1px solid #cfcbc5 !important;
  border-radius: 0 !important;
  padding: 12px 14px !important;
  margin: 0 0 10px !important;
  cursor: pointer;
  font-size: 13px; font-weight: 400; letter-spacing: 0; color: #6b6b6b;
  box-shadow: none;
}
.ai-kc button[name="id"]:hover,
.ai-kc .email-login-button:hover { border-color: #002157 !important; background: #f7f9fc !important; }
.ai-kc button[name="id"] b,
.ai-kc button[name="id"] strong,
.ai-kc .email-login-button b { display: block; color: #002157; font-size: 14px; font-weight: 700; margin-bottom: 2px; }
.ai-kc button[name="id"] br { display: none; }

/* legacy Bootstrap-ish button classes used by older 5 Stones templates */
.ai-kc .btn:not([name="id"]) {
  border-radius: 0; background: #002157; color: #fff; border: 1px solid #002157;
  padding: 13px 16px; font-size: 13.5px; font-weight: 700; cursor: pointer;
}
.ai-kc .btn:not([name="id"]):hover { background: #00173f; }
.ai-kc .btn-fluid { width: 100%; }

/* the picker's prompt line and any bare copy on inherited screens */
.ai-kc p { color: #6b6b6b; font-size: 13.5px; line-height: 1.55; margin: 0 0 16px; }

/* checkboxes */
.ai-kc .pf-v5-c-check { display: flex; align-items: center; gap: 7px; margin: 0 0 16px; }
.ai-kc .pf-v5-c-check__label { color: #555; font-size: 12.5px; font-weight: 400; }

/* alerts rendered inside a screen's own markup */
.ai-kc .pf-v5-c-alert { border-radius: 0; padding: 11px 13px; font-size: 13px; margin: 0 0 16px; background: #fbf7ec; border: 1px solid #e7d9b0; color: #7a5b16; }
.ai-kc .pf-v5-c-alert.pf-m-danger { background: #fbeaea; border-color: #e0b4b4; color: #8a2b2b; }
.ai-kc .pf-v5-c-alert.pf-m-success { background: #eaf4ec; border-color: #b6d8be; color: #2c6b39; }
.ai-kc .pf-v5-c-alert.pf-m-info { background: #eaf0f8; border-color: #b8cce6; color: #002157; }

/* "try another way" style method lists */
.ai-kc .pf-v5-c-data-list__item { border-bottom: 1px solid #e0ddd8; }
.ai-kc .select-auth-box-headline { color: #002157; font-weight: 700; }
.ai-kc .pf-v5-c-title { color: #002157; font-family: "Source Serif 4", Georgia, serif; }

.ai-kc a { color: #917F2E; }
.ai-kc ul, .ai-kc ol { padding-left: 18px; }
.ai-kc li { font-size: 13px; line-height: 1.6; }

/* ---------- Stack on narrow screens ---------- */
@media (max-width: 680px) {
  .ai-card { flex-direction: column; }
  .ai-pan, .ai-form { flex: 1 1 auto; }
  .ai-pan { padding: 34px 30px; }
}
