/*
 * Exentriq login theme (child of keycloak.v2, Keycloak 26 / PatternFly v5).
 * Selectors taken from the real rendered login page:
 *   body#keycloak-bg                       - page background (polygon image in default theme)
 *   #kc-header-wrapper.pf-v5-c-brand       - plain-text "exentriq" brand above the card
 *   .pf-v5-c-login__main                   - login card
 *   .pf-v5-c-button.pf-m-primary           - submit button
 *   span.pf-v5-c-form-control              - input wrappers (focus border drawn on ::after)
 * keycloak.v2 toggles html.pf-v5-theme-dark from prefers-color-scheme, so the
 * card is pinned to light colors explicitly.
 */

/* ---- Page background: dark-teal gradient instead of grey polygons ---- */
body#keycloak-bg {
  background-image: linear-gradient(135deg, #062e28 0%, #0E7A66 100%) !important;
  background-size: cover;
}

/* ---- Brand colors for PatternFly components inside the login block ---- */
.pf-v5-c-login {
  --pf-v5-global--primary-color--100: #1BBC9B;
  --pf-v5-global--primary-color--200: #17a689;
  --pf-v5-global--primary-color--300: #0E7A66;
  --pf-v5-global--active-color--100: #1BBC9B;
  --pf-v5-global--link--Color: #1BBC9B;
  --pf-v5-global--link--Color--hover: #17a689;
}

/* ---- Wordmark: hide the text brand, show the white PNG above the card ---- */
#kc-header-wrapper.pf-v5-c-brand {
  font-size: 0;
  color: transparent;
  height: 40px;
  width: 100%;
  background: url(../img/exentriq-mark-white.png) no-repeat center center;
  background-size: contain;
  margin: 0 auto;
}

/* ---- Card: white, rounded, soft shadow (also under pf-v5-theme-dark) ---- */
.pf-v5-c-login__main {
  background-color: #ffffff;
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(4, 32, 28, 0.35);
  overflow: hidden;
}

.pf-v5-c-login__main .pf-v5-c-title,
.pf-v5-c-login__main .pf-v5-c-form__label-text,
.pf-v5-c-login__main .pf-v5-c-form__helper-text {
  color: #4A4A4A;
}

/* Keep inputs light even when the dark theme class is set on <html> */
.pf-v5-c-login__main .pf-v5-c-form-control,
.pf-v5-c-login__main .pf-v5-c-form-control > input {
  background-color: #ffffff;
  color: #4A4A4A;
}

/* ---- Inputs: teal focus border (PF v5 draws it on ::after) ---- */
.pf-v5-c-login__main .pf-v5-c-form-control:focus-within::after {
  border-bottom-color: #1BBC9B;
  border-bottom-width: 2px;
}

/* ---- Primary button: teal with darker hover/active ---- */
.pf-v5-c-button.pf-m-primary {
  background-color: #1BBC9B;
  color: #ffffff;
  border-radius: 8px;
}

.pf-v5-c-button.pf-m-primary:hover,
.pf-v5-c-button.pf-m-primary:focus,
.pf-v5-c-button.pf-m-primary:active {
  background-color: #17a689;
  color: #ffffff;
}

/* ---- Footer: a little breathing room below the form ---- */
.pf-v5-c-login__main-footer {
  padding-bottom: 1.25rem;
}

/* ------------------------------------------------------------------------
 * ReputationIndex additions on top of the estate theme (2026-10-08).
 *
 * keycloak.v2 exposes the two things the rules above were fighting:
 *   --keycloak-card-top-color   the 4px stripe on .pf-v5-c-login__main-header,
 *                               bound to PatternFly blue by default -- which is
 *                               why the card kept a blue top edge under a teal
 *                               theme.
 *   #kc-header-wrapper spacing  the brand sits flush against the card unless the
 *                               header is given room, so the wordmark collided
 *                               with the card's top edge.
 * Setting the variable and the gap is the supported way; it survives Keycloak
 * upgrades better than out-specificity wars with the base theme.
 * ---------------------------------------------------------------------- */
:root {
  --keycloak-card-top-color: #1BBC9B;
}

#kc-header-wrapper.pf-v5-c-brand {
  height: 40px !important;
  margin: 0 auto 28px !important;
}

.pf-v5-c-login__header {
  padding-bottom: 8px;
}

/* Focus ring on inputs followed PatternFly blue; it reads the primary colour
 * from :root, not from .pf-v5-c-login where the theme sets it. */
:root {
  --pf-v5-global--primary-color--100: #1BBC9B;
  --pf-v5-global--active-color--100: #1BBC9B;
}
