/* ============================================================
   GRN.CLOUD — Keycloak login theme
   Visual identity + centered single-column layout override.
   The stock keycloak.v2 desktop layout is a 2-column grid
   (main left, header right) — overridden here to a centered
   single column matching the classic Keycloak login look.
   Tokens sourced from design-system/grn.cloud/MASTER.md
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Rubik:wght@400;500;600;700&family=Karla:wght@400;500;700&display=swap');

:root {
  --color-primary: #02753C;
  --color-cta: #9EFF12;
  --color-accent: #61CE70;
  --color-heading: #1e1e1e;
  --color-body: #4B5563;
  --color-muted: #54595F;
  --color-bg: #F8FAFE;
  --color-card: #FFFFFF;
  --color-border: #E2E8F0;
  --color-destructive: #DC2626;

  --hero-bg-start: #04150d;
  --hero-bg-mid:   #042a18;
  --hero-bg-end:   #02753C;

  --font-display: 'Rubik', system-ui, sans-serif;
  --font-body:    'Karla', system-ui, sans-serif;

  /* Override PF5's GLOBAL palette vars so any component that falls
     back to "primary" colour (links, borders, hover states) inherits
     brand green instead of the PF5 stock blue. This kills the blue
     border on social IDP buttons and the blue underline on focused
     inputs that the per-component overrides missed. */
  --pf-v5-global--primary-color--100: #02753C;
  --pf-v5-global--primary-color--200: #02753C;
  --pf-v5-global--primary-color--light-100: #61CE70;
  --pf-v5-global--active-color--100: #02753C;
  --pf-v5-global--link--Color: #02753C;
  --pf-v5-global--link--Color--hover: #61CE70;
  --pf-v5-global--BorderColor--100: #E2E8F0;
  --pf-v5-global--BorderColor--200: #E2E8F0;
  --pf-v5-global--BorderColor--300: #E2E8F0;

  --radius-card: 10px;
  --radius-input: 8px;
  --radius-pill: 50px;
}

/* ── Page background only (no layout changes) ── */
html, body, .login-pf, .login-pf body {
  background: linear-gradient(115deg, var(--hero-bg-start) 0%, var(--hero-bg-mid) 42%, var(--hero-bg-end) 130%) !important;
  font-family: var(--font-body) !important;
  color: var(--color-body);
  -webkit-font-smoothing: antialiased;
}

/* Force light color-scheme so the native form controls (checkbox,
   select arrows, password reveal eye) render in light theme even
   when the user agent has prefers-color-scheme: dark. */
:root, html, body, .pf-v5-c-login, .pf-v5-c-login__main {
  color-scheme: light !important;
}

/* Decorative stripe texture (non-interactive, behind everything) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(
    135deg,
    rgba(255,255,255,0.04) 0px,
    rgba(255,255,255,0.04) 2px,
    transparent 2px,
    transparent 13px
  );
}

/* Lime glow in upper right */
body::after {
  content: "";
  position: fixed;
  width: 720px;
  height: 720px;
  right: -180px;
  top: -220px;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle, rgba(158,255,18,0.22), transparent 65%);
  filter: blur(12px);
}

/* ── Outer login: single-column centered layout ── */
.pf-v5-c-login {
  background: transparent !important;
  position: relative;
  z-index: 1;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 100vh !important;
  padding: 32px 16px !important;
}

.pf-v5-c-login__container {
  display: flex !important;
  flex-direction: column !important;
  grid-template-columns: 1fr !important;
  grid-template-areas: "header" "main" "footer" !important;
  width: 100% !important;
  max-width: 540px !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

/* ── Header: center, show only our injected GRN.CLOUD logo ── */
.pf-v5-c-login__header {
  position: relative;
  width: 100% !important;
  text-align: center !important;
  margin-bottom: 24px !important;
  grid-area: header !important;
}

/* Hide the stock realm displayName ("public") rendered inside the header.
   NOTE: in keycloak.v2 `#kc-header` IS `.pf-v5-c-login__header` (same
   element via kcHeaderClass), so we must NOT hide it — only its
   inner wrapper (`#kc-header-wrapper` / `.pf-v5-c-brand`). */
#kc-header-wrapper,
.pf-v5-c-brand,
.pf-v5-c-login__header-desc {
  display: none !important;
}

/* Inject the canonical GRN.CLOUD logo (white-on-transparent variant
   from www.grn.cloud, source: wp-content/uploads/2025/09/logo-white-1.png).
   Responsive: width scales between 160px (mobile) and 320px (large
   desktop); height auto-derives from the 600:249 aspect ratio. */
.pf-v5-c-login__header::before {
  content: "";
  display: block;
  width: clamp(160px, 30vw, 320px);
  aspect-ratio: 600 / 249;
  height: auto;
  margin: 0 auto;
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAD5CAMAAADMZ7uMAAAABlBMVEX///////9VfPVsAAAAAXRSTlMAQObYZgAAAAFiS0dEAIgFHUgAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAHdElNRQfpCRgXDDmP+48aAAAD7HpUWHRSYXcgcHJvZmlsZSB0eXBlIHhtcAAASImlV1u2mzAM/NcqugQs2TJeDgnw13P62eV3RkAChNzbpskJIbY1Go8eJvL75y/5gVfy0ovdba597Ty5+c1Lzdq5evHqzScbVaf5drvNqhhvnjlSqpU8WpfH2mXD2t6b5L4OFYbF6pCnkh3fADSDkarNNmln99rbUHuHoY905kk7/va7T9U4J/QANtln8rBhmXgsDyZPGIzdaJEfFtqVPo+lEyW5ucaQVZ0s6Qg+Hd8csYax6ik+amaud4yr8QNH+O5xTWKqY5gNmChxBcDpresGFTzchqI5Zz9uTtZJbrCvGW9AYkNzjZdOFat0Cs6Vnq3xHUwUVyURYog7bqwiQtSk9tgYPHD+yAIUECyEQr2FVg0aYcU2LxBa4Q/SktUi7T4alPiVbzibnkHSSZA9s4/YSg8+HclD3G6L1hkyj8ifS1g54r6DBeB4AW4151Kdu5HvSb8DZ3pX6IU1c1EJCamRwqAQHykP4Sn3yX+HUpghMyDi7qCdfMvjxfxaR4mCQIVdZFIXPO/PLOI6XAsMC4uIzEEggMXSE5kQmZlSoAY5aCHD2e8v9fXCU6Ju0CsM09qXaB40QFqbtjcuSs7LNx0sdScAYK21uCIOKALUOq5L3bneojyHKOI97NoffIFM8or9GbQENmVs7rV9DitH3CiBIbOELYhPkV1wQOhlDaLYoukO6FbqanQMjQAKb2xldfXuhl6HLpBY0HAzou0Czgo+fbSRMMfqHQEJBgyr1UdubAwOLTjWLEwuchxtJMML+ST6RBMbrUd69nEHKHhu61jiHQCRAuQfcynssBd50YdZ3JbDCIzu79g+9MoLSw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Odmb+TCKnz78Vc/11WprOJ5jeibbg5r5MIqPXitvF1bnI3ZC2vcFtY8EFb581+viuCAYWZoMRlW0/da+sD1G0ZlBm4oazaHVVuWN+simktmVCkZ1mg5Gip94PIN1QJvKGt2hlVemMt1UQhrlsIahZ3RGNUNRvrb3zwaG7fITrX6+25rpr6cZM7s4Jbj4KlDssTJoMyeKP3t12dg3CY59eQIenl53mxJIieYLnZvbyeVWc6dXdb60Knn5/ZzTVV+PVR+Bft/Gf1N58OyjpV1ICwrWFonwrJ2lXUgLKtWWgfCsloJjrtlwrJKueyjHpa1yZtGgmENUQEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAD8Bf8AlTEqYZLktG0AAAAldEVYdGRhdGU6Y3JlYXRlADIwMjUtMDktMjFUMTY6MTE6MTQrMDA6MDDIQaNhAAAAJXRFWHRkYXRlOm1vZGlmeQAyMDI1LTA5LTIxVDE2OjExOjE0KzAwOjAwuRwb3QAAACh0RVh0ZGF0ZTp0aW1lc3RhbXAAMjAyNS0wOS0yNFQyMzoxMjo1NiswMDowMA381QwAAAAASUVORK5CYII=");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* ── Main card placement in the grid ── */
.pf-v5-c-login__main {
  grid-area: main !important;
  width: 100% !important;
}

/* ── Footer (language selector) centered below the card ── */
.pf-v5-c-login__footer {
  grid-area: footer !important;
  width: 100% !important;
  text-align: center !important;
  margin-top: 16px !important;
}

/* ── Card visual + sane internal layout ── */
.pf-v5-c-login__main {
  background-color: var(--color-card) !important;
  color: var(--color-heading) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-card) !important;
  box-shadow: 0 24px 60px rgba(0,0,0,0.28), 0 4px 12px rgba(0,0,0,0.12);
}

/* The main-header in keycloak.v2 is a flex row with title + locale
   switcher — at 500px the locale dropdown squeezes the title down to
   a few px causing one-character-per-line wrapping. Stack vertically. */
.pf-v5-c-login__main-header {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 16px !important;
}

.pf-v5-c-login__main-header-title,
.pf-v5-c-title {
  width: auto !important;
  flex: 0 0 auto !important;
  white-space: normal !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

/* ── Headings ── */
h1, h2, h3, h4,
.pf-v5-c-title,
.pf-v5-c-login__main-header-title {
  font-family: var(--font-display) !important;
  font-weight: 600 !important;
  color: var(--color-heading) !important;
}

/* ── Labels ── */
label,
.pf-v5-c-form__label,
.pf-v5-c-form__label-text {
  font-family: var(--font-body) !important;
  color: var(--color-heading) !important;
}

/* ── Inputs: PF5 underline-style — override the CSS vars that drive
     the ::after pseudo border so hover/focus is brand green not blue. */
.pf-v5-c-form-control {
  --pf-v5-c-form-control--BorderBottomColor: var(--color-border);
  --pf-v5-c-form-control--hover--BorderBottomColor: var(--color-primary);
  --pf-v5-c-form-control--focus--BorderBottomColor: var(--color-primary);
  --pf-v5-c-form-control--after--BorderBottomColor: var(--color-border);
  --pf-v5-c-form-control--hover--after--BorderBottomColor: var(--color-primary);
  --pf-v5-c-form-control--focus--after--BorderBottomColor: var(--color-primary);
  background-color: var(--color-card) !important;
  border-color: var(--color-border) !important;
  border-radius: var(--radius-input) !important;
  color: var(--color-heading) !important;
  font-family: var(--font-body) !important;
}

.pf-v5-c-form-control:hover::after,
.pf-v5-c-form-control:focus-within::after,
.pf-v5-c-form-control:hover,
.pf-v5-c-form-control:focus-within {
  border-bottom-color: var(--color-primary) !important;
}

input[type="text"],
input[type="password"],
input[type="email"] {
  color: var(--color-heading) !important;
  font-family: var(--font-body) !important;
}

input::placeholder { color: rgba(75,85,99,0.5); }

.pf-v5-c-form-control:focus-within,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus {
  border-color: var(--color-primary) !important;
  box-shadow: 0 0 0 3px rgba(2,117,60,0.15) !important;
  outline: none !important;
}

/* ── Checkbox: native, light color-scheme, green tick ── */
input[type="checkbox"],
.pf-v5-c-check__input {
  accent-color: var(--color-primary) !important;
  color-scheme: light !important;
  appearance: auto !important;
  -webkit-appearance: auto !important;
  width: 16px !important;
  height: 16px !important;
  background-color: #ffffff !important;
}

.pf-v5-c-check {
  --pf-v5-c-check__input--BackgroundColor: #ffffff;
  --pf-v5-c-check__input--BorderColor: var(--color-border);
  --pf-v5-c-check__input--checked--BackgroundColor: var(--color-primary);
  --pf-v5-c-check__input--checked--BorderColor: var(--color-primary);
}

/* "Remember me" label — match the "Forgot Password?" link visually
   (brand green, same font-size 14px, same weight 600). */
.pf-v5-c-check__label,
#kc-form-options,
#kc-form-options label,
#kc-form-options span,
label[for="rememberMe"],
#rememberMe + label,
#rememberMe ~ label,
.checkbox label {
  color: var(--color-primary) !important;
  font-family: var(--font-body) !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  opacity: 1 !important;
}

/* ── Language selector — keycloak.v2 renders it as a
     .pf-v5-c-form-control wrapper around #kc-current-locale-link,
     which inherits the dark form-control fill in PF5's default
     (dark) form-control variant. Force it white + brand border,
     and kill the underline pseudo (we use a full border instead). */
#kc-locale,
#kc-locale .pf-v5-c-dropdown,
#kc-locale .pf-v5-c-form-control,
.pf-v5-c-form-control.pf-v5-c-dropdown,
.kc-dropdown,
#kc-locale-dropdown {
  background: #ffffff !important;
  background-color: #ffffff !important;
  color: var(--color-heading) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-input) !important;
  font-family: var(--font-body) !important;
}

#kc-locale:hover,
#kc-locale:focus-within,
#kc-locale .pf-v5-c-dropdown:hover,
#kc-locale-dropdown:hover {
  border-color: var(--color-primary) !important;
  box-shadow: none !important;
}

/* Hide the ::after pseudo underline — we use a full border instead.
   This kills the blue PF5 hover line on the language dropdown. */
#kc-locale::after,
#kc-locale .pf-v5-c-form-control::after,
#kc-locale .pf-v5-c-dropdown::after,
.pf-v5-c-form-control.pf-v5-c-dropdown::after {
  display: none !important;
  border: none !important;
}

#kc-current-locale-link,
#kc-locale button,
#kc-locale select {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--color-heading) !important;
  border: none !important;
  font-family: var(--font-body) !important;
}

/* Also style standalone PF5 menu/dropdown toggles defensively */
.pf-v5-c-menu-toggle,
.pf-v5-c-dropdown__toggle,
.pf-v5-c-select__toggle {
  --pf-v5-c-menu-toggle--BackgroundColor: #ffffff;
  --pf-v5-c-menu-toggle--Color: var(--color-heading);
  --pf-v5-c-menu-toggle--BorderColor: var(--color-border);
  background-color: #ffffff !important;
  color: var(--color-heading) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: var(--radius-input) !important;
}

/* ── Password reveal "eye" toggle (pf-m-control button) ──
     PF5 paints a thick ::after pseudo underline that's much heavier
     than the input's own underline. Hide the pseudo entirely; on
     hover just turn the icon brand green. */
button.pf-v5-c-button.pf-m-control,
button#kc-password-toggle,
.pf-v5-c-input-group button,
.pf-v5-c-input-group__item button,
button[aria-label*="password" i] {
  background-color: #ffffff !important;
  color: var(--color-heading) !important;
  border: none !important;
  box-shadow: none !important;
}

button.pf-v5-c-button.pf-m-control:hover,
button#kc-password-toggle:hover,
.pf-v5-c-input-group button:hover {
  color: var(--color-primary) !important;
  background-color: #ffffff !important;
}

button.pf-v5-c-button.pf-m-control::after,
button.pf-v5-c-button.pf-m-control::before,
button.pf-v5-c-button.pf-m-control:hover::after,
button.pf-v5-c-button.pf-m-control:focus::after,
button#kc-password-toggle::after,
button#kc-password-toggle:hover::after,
.pf-v5-c-input-group button::after,
.pf-v5-c-input-group button:hover::after {
  display: none !important;
  content: none !important;
  border: none !important;
}

/* ── Kill the dark line underneath the SIGN IN button.
     keycloak.v2 puts an <hr/> inside #kc-social-providers, before
     the social provider buttons; PF5 also adds a ::after pseudo
     border below pf-m-primary buttons that mimics a depth shadow.
     Both must be neutralised. */
.pf-v5-c-button.pf-m-primary::after,
#kc-login::after,
input[type="submit"]::after,
button[type="submit"]::after {
  display: none !important;
  border: none !important;
  background: none !important;
}

#kc-form-buttons,
#kc-form-buttons::after,
.pf-v5-c-form__group--action-group,
.pf-v5-c-form__group--action-group::after {
  border: none !important;
  box-shadow: none !important;
  background: none !important;
}

/* Hide all <hr> separators inside the login card — they render as a
   hard dark bar between SIGN IN and the social provider buttons,
   and the spacing without them is fine. */
.pf-v5-c-login hr,
.pf-v5-c-login__main hr,
#kc-social-providers hr,
#kc-social-providers > hr,
.pf-v5-c-login__main-body hr,
hr {
  display: none !important;
  border: none !important;
  background: transparent !important;
  height: 0 !important;
  margin: 0 !important;
}

/* Give the social providers section breathing room above (since
   the <hr> that previously created the gap is now hidden). */
#kc-social-providers {
  margin-top: 24px !important;
}

/* ── Primary submit button: lime pill ── */
.pf-v5-c-button.pf-m-primary,
#kc-login,
button[type="submit"] {
  background-color: var(--color-cta) !important;
  color: #000 !important;
  font-family: var(--font-display) !important;
  font-weight: 700 !important;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 3px solid transparent !important;
  border-radius: var(--radius-pill) !important;
  transition: all 240ms ease;
}

.pf-v5-c-button.pf-m-primary:hover,
#kc-login:hover,
button[type="submit"]:hover {
  background-color: var(--color-primary) !important;
  color: #fff !important;
  border-color: var(--color-cta) !important;
}

/* ── Social IDP buttons ──
     keycloak.v2 renders these as
     <a id="social-{alias}" class="pf-v5-c-login__main-footer-links-item-link pf-v5-c-button pf-m-secondary">
     containing an <i>/<img>/<svg> brand icon + a text span. Use ID-
     prefix selectors plus all known class combinations to win the
     cascade in every PF5 version we might hit. Hex values inline (no
     var()) to be certain nothing blue can resolve through. */
a[id^="social-"],
button[id^="social-"],
#kc-social-providers a,
#kc-social-providers button,
#kc-social-providers .pf-v5-c-button,
.pf-v5-c-login__main-footer-links li a,
.pf-v5-c-login__main-footer-links li button,
.pf-v5-c-login__main-footer-links-item-link,
.pf-v5-c-button.pf-m-tertiary,
.pf-v5-c-button.pf-m-secondary,
a.pf-v5-c-button {
  --pf-v5-c-button--m-secondary--BackgroundColor: #ffffff;
  --pf-v5-c-button--m-secondary--Color: #1e1e1e;
  --pf-v5-c-button--m-secondary--BorderColor: #E2E8F0;
  --pf-v5-c-button--m-secondary--hover--BackgroundColor: #ffffff;
  --pf-v5-c-button--m-secondary--hover--Color: #02753C;
  --pf-v5-c-button--m-secondary--hover--BorderColor: #02753C;
  --pf-v5-c-button--m-tertiary--BackgroundColor: #ffffff;
  --pf-v5-c-button--m-tertiary--Color: #1e1e1e;
  --pf-v5-c-button--m-tertiary--BorderColor: #E2E8F0;
  --pf-v5-c-button--m-tertiary--hover--BorderColor: #02753C;
  --pf-v5-c-button--m-tertiary--hover--Color: #02753C;
  background-color: #ffffff !important;
  color: #1e1e1e !important;
  border: 1px solid #E2E8F0 !important;
  border-color: #E2E8F0 !important;
  border-radius: 8px !important;
  text-decoration: none !important;
  font-family: 'Rubik', system-ui, sans-serif !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  padding: 10px 16px !important;
  min-height: 44px !important;
}

a[id^="social-"]:hover,
button[id^="social-"]:hover,
#kc-social-providers a:hover,
#kc-social-providers button:hover,
.pf-v5-c-login__main-footer-links li a:hover,
.pf-v5-c-login__main-footer-links-item-link:hover,
.pf-v5-c-button.pf-m-tertiary:hover,
.pf-v5-c-button.pf-m-secondary:hover,
a.pf-v5-c-button:hover {
  background-color: #ffffff !important;
  color: #02753C !important;
  border-color: #02753C !important;
}

/* Clamp social provider icons — when an IDP has a configured
   iconUrl, keycloak renders the image at its natural size (often
   256+px). Firefox shows them at full size, Safari sometimes
   fails to load them entirely. Clamp uniformly. */
a[id^="social-"] img,
a[id^="social-"] svg,
a[id^="social-"] i,
#kc-social-providers img,
#kc-social-providers svg,
#kc-social-providers i,
.pf-v5-c-login__main-footer-links img,
.pf-v5-c-login__main-footer-links svg,
.pf-v5-c-login__main-footer-links i,
.pf-v5-c-login__main-footer-links-item-link img,
.pf-v5-c-login__main-footer-links-item-link svg,
.pf-v5-c-login__main-footer-links-item-link i,
.pf-v5-c-login__main-footer-links-item-link-icon,
i.kc-social-provider-logo,
.kc-social-icon-text {
  width: 20px !important;
  height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  font-size: 18px !important;
  line-height: 1 !important;
  flex-shrink: 0 !important;
  object-fit: contain !important;
  vertical-align: middle !important;
  margin: 0 !important;
}

/* ── Links (Forgot password, Register, etc.) ── */
a, a:visited {
  color: var(--color-primary) !important;
  font-family: var(--font-body);
  font-weight: 600;
  transition: color 200ms ease;
}
a:hover { color: var(--color-accent) !important; }

/* ── Alerts / errors ── */
.pf-v5-c-alert.pf-m-danger,
.pf-v5-c-alert.pf-m-danger .pf-v5-c-alert__title,
#kc-error-message,
.alert-error,
.pf-v5-c-form__helper-text.pf-m-error {
  color: var(--color-destructive) !important;
  font-family: var(--font-body);
}
