/* REGAZE brand overlay for Keycloak login.
   parent=keycloak.v2 (PatternFly v5). Additive styling only; the login form
   logic (2-step username/password flow) is inherited unchanged from keycloak.v2.

   v4 (2026-07-07): minimal, auditable delta over v3:
   - Removed the accent line on top of the login card (per request).
   The "真っ黒" card in OS dark mode is fixed at the THEME level, not here:
   theme.properties now sets `darkMode=false`, so keycloak.v2 never injects the
   html.pf-v5-theme-dark class and every class-driven component (card / inputs /
   alerts) renders in its native light appearance — matching the REGAZE light
   brand. NOTE: only the html.pf-v5-theme-dark-SCOPED rule further below is inert
   under darkMode=false; the plain `body#keycloak-bg` light-background block is
   ACTIVE and required (do not remove it). */
:root {
  --rgz-magenta: #a40b5e;
  --rgz-magenta-dark: #86094d;
  --rgz-ink: #1d1d23;
  --rgz-font-mincho: YuMincho, "游明朝", "Yu Mincho", "Hiragino Mincho ProN", serif;
}

/* Card top accent line REMOVED. keycloak.v2 draws a 4px border-top on
   .pf-v5-c-login__main-header (styles.css: border-top:4px solid …); v3 recolored
   it to REGAZE magenta. Remove it entirely for a clean card top. */
.pf-v5-c-login__main-header {
  border-top: 0 !important;
}

/* keycloak.v2 paints the dark polygon background on body#keycloak-bg with high
   specificity, so the REGAZE background must match/exceed it (id selector). */
html.login-pf body#keycloak-bg,
.login-pf body#keycloak-bg,
body#keycloak-bg {
  background-image:
    radial-gradient(1100px 560px at 50% -12%, rgba(164, 11, 94, 0.12), transparent 60%) !important;
  background-color: #f4f5f8 !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  color: var(--rgz-ink);
}
/* inert backstop (darkMode=false): keep the REGAZE light background even if a
   viewer or future config forces the dark theme class back on. */
html.pf-v5-theme-dark.login-pf body#keycloak-bg,
.pf-v5-theme-dark body#keycloak-bg {
  background-image:
    radial-gradient(1100px 560px at 50% -12%, rgba(164, 11, 94, 0.16), transparent 60%) !important;
  background-color: #eceef3 !important;
}

/* Card */
.pf-v5-c-login__main {
  border-radius: 22px !important;
  box-shadow: 0 24px 60px rgba(44, 47, 58, 0.14) !important;
  border: 1px solid rgba(255, 255, 255, 0.75);
}

/* Replace realm-name header text with the REGAZE logo */
#kc-header-wrapper {
  font-size: 0 !important;
  line-height: 0 !important;
  color: transparent !important;
  padding: 6px 0 14px !important;
  height: 58px;
  background: url('../img/regaze-logo.svg') center center / contain no-repeat;
}

/* Titles */
#kc-page-title,
.pf-v5-c-login__main-header-desc {
  font-family: var(--rgz-font-mincho);
  color: var(--rgz-ink);
  letter-spacing: 0.02em;
}

/* Primary button -> REGAZE magenta */
#kc-login,
.pf-v5-c-button.pf-m-primary,
input[type="submit"].pf-m-primary {
  background-color: var(--rgz-magenta) !important;
  border-color: var(--rgz-magenta) !important;
}
#kc-login:hover,
.pf-v5-c-button.pf-m-primary:hover,
input[type="submit"].pf-m-primary:hover {
  background-color: var(--rgz-magenta-dark) !important;
  border-color: var(--rgz-magenta-dark) !important;
}

/* Links / social separators */
.pf-v5-c-login a,
.pf-v5-c-login__main-footer a,
#kc-registration a,
#kc-info-wrapper a {
  color: var(--rgz-magenta);
}

/* Input focus accent (box outline) */
.pf-v5-c-form-control:focus,
.pf-v5-c-form-control:focus-within,
input:focus {
  outline-color: var(--rgz-magenta) !important;
  border-color: var(--rgz-magenta) !important;
}
/* Input focus UNDERLINE: PatternFly draws a ::after bottom bar whose color
   (--pf-v5-c-form-control--focus--after--BorderBottomColor) defaults to the
   primary blue. Override to REGAZE magenta. */
.pf-v5-c-form-control {
  --pf-v5-c-form-control--focus--after--BorderBottomColor: var(--rgz-magenta);
}
.pf-v5-c-form-control:focus-within,
.pf-v5-c-form-control:focus {
  --pf-v5-c-form-control--after--BorderBottomColor: var(--rgz-magenta) !important;
}
/* Shift PatternFly primary accent to REGAZE magenta (info/success/danger keep
   their semantic colors, so the informational alert stays blue). */
:root,
.login-pf,
.pf-v5-c-login {
  --pf-v5-global--primary-color--100: #a40b5e;
  --pf-v5-global--primary-color--200: #86094d;
  --pf-v5-global--link--Color: #a40b5e;
  --pf-v5-global--link--Color--hover: #86094d;
}
