/* GENERATED by login-ui/scripts/sync-theme.ts from login-ui/src/theme/ (spec 005). Do not edit; edit the
 * sources and run `bun run sync-theme` in login-ui/. */

@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fraunces-latin-600-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/nunito-latin-400-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Nunito";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/nunito-latin-700-normal.woff2") format("woff2");
}

/* Grocery List brand tokens: the single source for the login UI bundle and the Keycloak theme (spec 005). */
:root {
  --gl-cream: #fbf6ea;
  --gl-card: #fffdf8;
  --gl-ink: #3d2b1f;
  --gl-ink-soft: #6b5a4c;
  --gl-line: #e6dccb;
  --gl-green: #2f7a3a;        /* white text on it: about 5.3:1 (AA) */
  --gl-green-dark: #245e2d;
  --gl-green-tint: #e7f2e3;
  --gl-tomato: #c4372a;       /* on the card: about 5.2:1 (AA) */
  --gl-tomato-tint: #fbe7e3;
  --gl-sun: #f7d046;
  --gl-sun-tint: #fdf4cf;
  --gl-focus: #f28c28;
  --gl-radius: 18px;
  --gl-radius-sm: 10px;
  --gl-shadow: 0 18px 40px -18px rgba(61, 43, 31, 0.35);
  --gl-font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --gl-font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/*
 * Grocery List look for every Keycloak login page (keycloak.v2 / PatternFly 5 markup), and the fallback look of
 * the sign-in and registration forms when the login UI bundle is not running (spec 005, contracts/theme-form.md).
 * Source of themes/grocery/login/resources/css/grocery.css: edit here, then `bun run sync-theme`.
 */

:root {
  --pf-v5-global--FontFamily--text: var(--gl-font-body);
  --pf-v5-global--FontFamily--heading: var(--gl-font-heading);
  --pf-v5-global--primary-color--100: var(--gl-green);
  --pf-v5-global--primary-color--dark-100: var(--gl-green);
  --pf-v5-global--primary-color--200: var(--gl-green-dark);
  --pf-v5-global--link--Color: var(--gl-green-dark);
  --pf-v5-global--link--Color--dark: var(--gl-green-dark);
  --pf-v5-global--link--Color--hover: var(--gl-ink);
  --pf-v5-global--link--Color--dark--hover: var(--gl-ink);
  --pf-v5-global--Color--100: var(--gl-ink);
  --pf-v5-global--Color--200: var(--gl-ink-soft);
  --pf-v5-c-login__main--BackgroundColor: var(--gl-card);
  --keycloak-card-top-color: var(--gl-green);
}

/* Page background and the produce border (fixed, behind the card, never clickable). */
.login-pf body,
body#keycloak-bg {
  background: var(--gl-cream) !important;
  color: var(--gl-ink);
  font-family: var(--gl-font-body);
  min-height: 100vh;
}

body#keycloak-bg::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-repeat: no-repeat;
  background-image:
    url("../img/produce/apple.svg"), url("../img/produce/leaf.svg"), url("../img/produce/carrot.svg"),
    url("../img/produce/lemon.svg"), url("../img/produce/broccoli.svg"), url("../img/produce/strawberry.svg"),
    url("../img/produce/tomato.svg"), url("../img/produce/pear.svg"), url("../img/produce/eggplant.svg"),
    url("../img/produce/banana.svg");
  background-size: 84px, 64px, 92px, 76px, 96px, 72px, 88px, 80px, 90px, 92px;
  background-position:
    2% 3%, 24% 1%, 97% 3%,
    99% 42%, 96% 82%, 76% 99%,
    50% 101%, 22% 99%, 2% 88%,
    1% 45%;
}

.pf-v5-c-login,
.pf-v5-c-login__container {
  position: relative;
  z-index: 1;
}

/* Header brand: realm displayNameHtml is <span class="gl-brand">Grocery List</span>. */
#kc-header-wrapper {
  color: var(--gl-ink) !important;
  text-transform: none;
  letter-spacing: 0;
  font-family: var(--gl-font-heading);
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 2.75rem);
}

.gl-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-family: var(--gl-font-heading);
  font-weight: 600;
  color: var(--gl-ink);
}

.gl-brand::before {
  content: "";
  width: 1.05em;
  height: 1.05em;
  background: url("../img/produce/apple.svg") center / contain no-repeat;
}

/* The card. */
.pf-v5-c-login__main {
  border-radius: var(--gl-radius);
  box-shadow: var(--gl-shadow);
  border: 2px solid var(--gl-line);
  overflow: hidden;
}

.pf-v5-c-login__main-header {
  border-top-width: 6px;
}

#kc-page-title,
.pf-v5-c-title {
  font-family: var(--gl-font-heading);
  font-weight: 600;
  color: var(--gl-ink);
}

.pf-v5-c-button.pf-m-primary {
  --pf-v5-c-button--m-primary--BackgroundColor: var(--gl-green);
  --pf-v5-c-button--m-primary--hover--BackgroundColor: var(--gl-green-dark);
  --pf-v5-c-button--m-primary--focus--BackgroundColor: var(--gl-green-dark);
  --pf-v5-c-button--BorderRadius: 999px;
  font-weight: 700;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--gl-focus);
  outline-offset: 2px;
}

/* Fallback form (contracts/theme-form.md), shown until the bundle replaces it or when it never loads. */
.gl-form {
  display: grid;
  gap: 1rem;
  font-family: var(--gl-font-body);
}

.gl-field {
  display: grid;
  gap: 0.35rem;
}

.gl-field label {
  font-weight: 700;
  color: var(--gl-ink);
}

.gl-field input {
  font: inherit;
  color: var(--gl-ink);
  background: #fff;
  border: 2px solid var(--gl-line);
  border-radius: var(--gl-radius-sm);
  padding: 0.65rem 0.8rem;
  width: 100%;
  box-sizing: border-box;
}

.gl-field input:focus {
  border-color: var(--gl-green);
}

.gl-field input[aria-invalid="true"] {
  border-color: var(--gl-tomato);
}

.gl-required {
  color: var(--gl-tomato);
  margin-left: 0.15em;
}

.gl-error {
  color: var(--gl-tomato);
  font-size: 0.9rem;
  font-weight: 700;
}

.gl-error:empty {
  display: none;
}

.gl-message {
  border-radius: var(--gl-radius-sm);
  padding: 0.7rem 0.9rem;
  font-weight: 700;
  border: 2px solid transparent;
}

.gl-message--error {
  background: var(--gl-tomato-tint);
  border-color: var(--gl-tomato);
  color: var(--gl-tomato);
}

.gl-message--warning {
  background: var(--gl-sun-tint);
  border-color: var(--gl-sun);
  color: var(--gl-ink);
}

.gl-message--success,
.gl-message--info {
  background: var(--gl-green-tint);
  border-color: var(--gl-green);
  color: var(--gl-green-dark);
}

#gl-submit {
  font: inherit;
  font-weight: 700;
  font-size: 1.05rem;
  color: #fff;
  background: var(--gl-green);
  border: 0;
  border-radius: 999px;
  padding: 0.8rem 1rem;
  cursor: pointer;
}

#gl-submit:hover {
  background: var(--gl-green-dark);
}

.gl-switch {
  margin: 0;
  text-align: center;
  color: var(--gl-ink-soft);
}

.gl-switch a {
  font-weight: 700;
}

/* Phones: a lighter border that stays in the corners, clear of the card. */
@media (max-width: 600px) {
  body#keycloak-bg::before {
    background-image:
      url("../img/produce/apple.svg"), url("../img/produce/carrot.svg"),
      url("../img/produce/strawberry.svg"), url("../img/produce/leaf.svg");
    background-size: 48px, 52px, 44px, 40px;
    background-position: 2% 1%, 98% 1%, 98% 99%, 2% 99%;
    opacity: 0.85;
  }

  .pf-v5-c-login__main {
    border-radius: var(--gl-radius-sm);
  }

  /* Keep the header brand clear of the corner pieces. */
  #kc-header {
    padding-top: 56px;
  }

  #kc-header-wrapper {
    font-size: 1.9rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
