/*
 * SEPEX login theme – CI (decided 2026-11-18): green #769B27 as accent, accessible variants #56721C (green) and
 * #1A5FAF (blue) for buttons, links and text, light blue #68A9F4 sparingly, Inter, calm light background,
 * white card with a soft shadow, 44 px targets, clearly visible focus (WCAG 2.2 AA). Builds on keycloak.v2.
 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --sepex-green: #769b27;
  --sepex-green-strong: #56721c;
  --sepex-green-soft: #eef4e2;
  --sepex-blue-strong: #1a5faf;
  --sepex-blue-light: #68a9f4;
  --sepex-ink: #0f172a;
  --sepex-ink-muted: #475569;
  --sepex-line: #d6dce4;
  --sepex-canvas: #f4f6f1;
  --sepex-critical: #b42318;

  --pf-v5-global--FontFamily--text: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --pf-v5-global--FontFamily--heading: var(--pf-v5-global--FontFamily--text);
  --pf-v5-global--primary-color--100: var(--sepex-green-strong);
  --pf-v5-global--primary-color--200: #435915;
  --pf-v5-global--link--Color: var(--sepex-blue-strong);
  --pf-v5-global--link--Color--hover: #144a88;
  --pf-v5-global--Color--100: var(--sepex-ink);
  --pf-v5-global--Color--200: var(--sepex-ink-muted);
  --pf-v5-global--BorderColor--100: var(--sepex-line);
  --pf-v5-global--FontSize--md: 1rem;
  /* keycloak.v2 draws a coloured line on the card header – the card itself carries the SEPEX green instead */
  --keycloak-card-top-color: transparent;
}

html,
body,
#keycloak-bg,
.pf-v5-c-login {
  font-family: var(--pf-v5-global--FontFamily--text);
  color: var(--sepex-ink);
  background: var(--sepex-canvas) !important;
  background-image: none !important;
}
.pf-v5-c-login {
  min-height: 100vh;
  padding: 24px 16px;
}
.pf-v5-c-login__container {
  max-width: 480px;
  grid-template-columns: 1fr;
  grid-template-areas: 'header' 'main' 'footer';
}

/* header: original logo + which application */
.pf-v5-c-login__header {
  padding: 8px 0 20px;
  text-align: center;
}
.sepex-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.sepex-logo {
  display: block;
  width: 220px;
  max-width: 70vw;
  height: auto;
}
.sepex-app {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: normal;
  color: var(--sepex-green-strong);
}

/* card */
.pf-v5-c-login__main {
  background: #fff;
  border: 1px solid var(--sepex-line);
  border-top: 4px solid var(--sepex-green);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgb(15 23 42 / 6%), 0 8px 24px rgb(15 23 42 / 8%);
}
.pf-v5-c-login__main-header {
  padding-top: 28px;
}
.pf-v5-c-title,
#kc-page-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--sepex-ink);
}

/* form: large fields and buttons (44 px) */
.pf-v5-c-form__label-text {
  font-size: 1rem;
  font-weight: 600;
  color: var(--sepex-ink);
}
.pf-v5-c-form-control {
  --pf-v5-c-form-control--BorderRadius: 10px;
  min-height: 48px;
  font-size: 1rem;
  border-radius: 10px;
}
.pf-v5-c-form-control > input,
.pf-v5-c-form-control > select {
  min-height: 46px;
  font-size: 1rem;
}
.pf-v5-c-form-control::after {
  border-radius: 10px;
}
.pf-v5-c-button {
  min-height: 48px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 12px;
}
.pf-v5-c-button.pf-m-primary {
  --pf-v5-c-button--m-primary--BackgroundColor: var(--sepex-green-strong);
  --pf-v5-c-button--m-primary--hover--BackgroundColor: #435915;
  --pf-v5-c-button--m-primary--focus--BackgroundColor: #435915;
  --pf-v5-c-button--m-primary--active--BackgroundColor: #435915;
  --pf-v5-c-button--m-primary--Color: #fff;
}
.pf-v5-c-button.pf-m-secondary {
  --pf-v5-c-button--m-secondary--Color: var(--sepex-blue-strong);
  --pf-v5-c-button--m-secondary--after--BorderColor: var(--sepex-blue-strong);
}
.pf-v5-c-button.pf-m-link,
a {
  color: var(--sepex-blue-strong);
}
a:hover {
  color: #144a88;
}

/* clearly visible focus for keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
.pf-v5-c-button:focus-visible,
.pf-v5-c-form-control:focus-within {
  outline: 3px solid var(--sepex-blue-strong);
  outline-offset: 2px;
}

/* messages: readable, not only by colour */
.pf-v5-c-alert {
  border-radius: 12px;
  font-size: 1rem;
}
.pf-v5-c-alert.pf-m-danger,
.pf-v5-c-alert.pf-m-error {
  --pf-v5-c-alert--BorderTopColor: var(--sepex-critical);
}
.pf-v5-c-helper-text__item.pf-m-error,
.kc-feedback-text.pf-m-error {
  color: var(--sepex-critical);
  font-weight: 600;
}

/* app code setup: QR code on white with room */
#kc-totp-secret-qr-code {
  display: block;
  margin: 12px auto;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--sepex-line);
  border-radius: 12px;
  max-width: 220px;
}

.pf-v5-c-login__main-footer-band {
  border-radius: 0 0 16px 16px;
  background: var(--sepex-green-soft);
}

@media (max-width: 480px) {
  .pf-v5-c-login {
    padding: 16px 12px;
  }
  .pf-v5-c-login__main {
    border-radius: 14px;
  }
}

/* SEPEX Login: choice of the sign-in method, e-mail code */
.sepex-lead { margin: 0 0 16px; color: var(--sepex-ink-muted); line-height: 1.5; }
.sepex-help { margin: 6px 0 0; font-size: .9rem; color: var(--sepex-ink-muted); }
.sepex-hidden { display: none !important; }
.sepex-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); border: 0; }
.sepex-choices { display: grid; gap: 12px; margin: 0 0 8px; padding: 0; border: 0; }
.sepex-choice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; min-height: 44px; cursor: pointer;
  border: 1px solid var(--sepex-line); border-radius: 12px; background: #fff; }
.sepex-choice:hover { border-color: var(--sepex-green); }
.sepex-choice:has(input:checked) { border: 2px solid var(--sepex-green-strong); background: var(--sepex-green-soft); padding: 13px 15px; }
.sepex-choice:has(input:focus-visible) { outline: 3px solid var(--sepex-blue-strong); outline-offset: 2px; }
.sepex-choice:has(input:disabled) { opacity: .6; cursor: not-allowed; }
.sepex-choice input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--sepex-green-strong); flex: none; }
.sepex-choice-body { display: grid; gap: 4px; }
.sepex-choice-title { font-weight: 600; color: var(--sepex-ink); }
.sepex-choice-help { font-size: .9rem; line-height: 1.45; color: var(--sepex-ink-muted); }
.sepex-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600;
  color: #fff; background: var(--sepex-green-strong); vertical-align: middle; }
#code { letter-spacing: .3em; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
/* keep the card readable on wide screens (keycloak.v2 grid would shrink it) and never break words in titles */
.pf-v5-c-login__container { width: 100%; margin-inline: auto; padding-inline: 0 !important; }
.pf-v5-c-login__main-header, .pf-v5-c-login__main-body, .pf-v5-c-login__main-footer { padding-inline: 32px; }
@media (max-width: 420px) { .pf-v5-c-login__main-header, .pf-v5-c-login__main-body, .pf-v5-c-login__main-footer { padding-inline: 20px; } }
.pf-v5-c-login__main { width: 100%; }
#kc-page-title { overflow-wrap: normal; word-break: normal; hyphens: manual; }
