/* etfmcap login — light overlay on keycloak.v2 / PatternFly 5 */

:root {
  color-scheme: light;
  --etfmc-blue: #7fa8d9;
  --etfmc-blue-strong: #5f8fc8;
  --etfmc-dark: #2e3a46;
  --etfmc-bg: #f3f7fb;
  --etfmc-elevated: #ffffff;
  --etfmc-border: #d5e2ef;
  --etfmc-muted: #5f6d7d;
  --pf-v5-global--BackgroundColor--100: #ffffff;
  --pf-v5-global--BackgroundColor--200: #f3f7fb;
  --pf-v5-global--Color--100: #2e3a46;
  --pf-v5-global--Color--200: #5f6d7d;
  --pf-v5-global--BorderColor--100: #d5e2ef;
  --pf-v5-global--primary-color--100: #5f8fc8;
  --pf-v5-global--primary-color--200: #5f8fc8;
  --pf-v5-global--link--Color: #5f8fc8;
  --pf-v5-c-form-control--BackgroundColor: #ffffff;
  --pf-v5-c-form-control--Color: #2e3a46;
  --pf-v5-c-form-control--BorderColor--default: #d5e2ef;
  --pf-v5-c-form-control--BorderColor--hover: #5f8fc8;
  --pf-v5-c-form-control--after--BorderColor--focus: #5f8fc8;
}

html,
body,
.login-pf,
.login-pf body {
  background: var(--etfmc-bg) !important;
  color: var(--etfmc-dark) !important;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
  min-height: 100%;
  color-scheme: light !important;
}

/* Brand column: logo instead of realm id */
.pf-v5-c-login__header,
#kc-header {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
  padding: 2rem !important;
}

#kc-header-wrapper,
.pf-v5-c-brand {
  color: transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  width: min(260px, 72vw) !important;
  min-height: 4rem;
  background: url("../img/logo.png") left center / contain no-repeat !important;
  text-indent: -9999px;
  overflow: hidden;
}

.pf-v5-c-login__header::after {
  content: "Only European Actively Managed ETFs";
  display: block;
  margin-top: 0.75rem;
  max-width: 15rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--etfmc-muted);
}

/* One clean card — do not nest borders on body/wrapper */
.pf-v5-c-login__container {
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}

.pf-v5-c-login__main {
  background: var(--etfmc-elevated) !important;
  border: 1px solid var(--etfmc-border) !important;
  border-radius: 14px !important;
  box-shadow: 0 10px 28px rgba(46, 58, 70, 0.08) !important;
  overflow: hidden;
}

.pf-v5-c-login__main-header,
.pf-v5-c-login__main-body,
.pf-v5-c-login__main-footer,
#kc-form-wrapper,
.card-pf {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.pf-v5-c-login__main-header {
  border-bottom: 1px solid var(--etfmc-border) !important;
}

#kc-page-title,
.pf-v5-c-title,
h1 {
  color: var(--etfmc-dark) !important;
  letter-spacing: -0.02em !important;
  font-weight: 700 !important;
  font-size: 1.35rem !important;
}

.pf-v5-c-form__label-text,
label {
  color: var(--etfmc-dark) !important;
  font-weight: 600 !important;
}

/* PF5 wraps the <input> in span.pf-v5-c-form-control — style the wrapper, keep input clear */
span.pf-v5-c-form-control,
.pf-v5-c-form-control {
  background-color: #ffffff !important;
  background-image: none !important;
  color: var(--etfmc-dark) !important;
  border-color: var(--etfmc-border) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  --pf-v5-c-form-control--BackgroundColor: #ffffff;
  --pf-v5-c-form-control--Color: #2e3a46;
  --pf-v5-c-form-control--BorderColor--default: #d5e2ef;
}

span.pf-v5-c-form-control > input,
.pf-v5-c-form-control > input,
input[type="text"],
input[type="password"] {
  background: transparent !important;
  background-color: transparent !important;
  color: var(--etfmc-dark) !important;
  caret-color: var(--etfmc-dark) !important;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 2.6rem;
  -webkit-text-fill-color: var(--etfmc-dark);
}

span.pf-v5-c-form-control > input::placeholder,
input::placeholder {
  color: var(--etfmc-muted) !important;
  opacity: 1;
}

/* Chrome autofill otherwise paints yellow/black bricks */
span.pf-v5-c-form-control > input:-webkit-autofill,
input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 40px #ffffff inset !important;
  -webkit-text-fill-color: var(--etfmc-dark) !important;
  caret-color: var(--etfmc-dark) !important;
}

.pf-v5-c-input-group {
  background: transparent !important;
  gap: 0.35rem;
}

.pf-v5-c-input-group__item {
  background: transparent !important;
}

.pf-v5-c-button.pf-m-control {
  background: #ffffff !important;
  color: var(--etfmc-dark) !important;
  border: 1px solid var(--etfmc-border) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.pf-v5-c-button.pf-m-control:hover {
  background: #f8fafc !important;
}

.pf-v5-c-button.pf-m-primary,
#kc-login {
  background: var(--etfmc-blue-strong) !important;
  border-color: var(--etfmc-blue-strong) !important;
  color: #ffffff !important;
  border-radius: 10px !important;
  font-weight: 650 !important;
  min-height: 2.7rem;
  box-shadow: none !important;
}

.pf-v5-c-button.pf-m-primary:hover,
#kc-login:hover {
  filter: brightness(0.97);
}

.pf-v5-c-button.pf-m-secondary {
  background: #ffffff !important;
  color: var(--etfmc-dark) !important;
  border: 1px solid var(--etfmc-border) !important;
  border-radius: 10px !important;
  box-shadow: none !important;
}

.pf-v5-c-button.pf-m-secondary:hover {
  background: #f8fafc !important;
}

a {
  color: var(--etfmc-blue-strong) !important;
}

#kc-info,
#kc-info-wrapper,
.pf-v5-c-login__main-footer,
.pf-v5-c-helper-text {
  color: var(--etfmc-muted) !important;
}

@media (max-width: 991px) {
  .pf-v5-c-login__header,
  #kc-header {
    align-items: center !important;
    text-align: center;
    padding: 1.25rem 1rem 0.25rem !important;
  }

  #kc-header-wrapper,
  .pf-v5-c-brand {
    margin-inline: auto;
  }

  .pf-v5-c-login__header::after {
    margin-inline: auto;
    text-align: center;
  }
}

/* Kill dark-scheme overrides from PatternFly / browser */
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: light;
  }

  html,
  body,
  .login-pf,
  .login-pf body {
    background: var(--etfmc-bg) !important;
    color: var(--etfmc-dark) !important;
  }

  span.pf-v5-c-form-control,
  .pf-v5-c-form-control,
  .pf-v5-c-login__main,
  .pf-v5-c-button.pf-m-control,
  .pf-v5-c-button.pf-m-secondary {
    background-color: #ffffff !important;
    color: var(--etfmc-dark) !important;
  }

  span.pf-v5-c-form-control > input,
  input[type="text"],
  input[type="password"] {
    color: var(--etfmc-dark) !important;
    -webkit-text-fill-color: var(--etfmc-dark);
  }
}

/*
 * Field and button chrome. PatternFly 5 draws borders on ::before/::after, and its dark
 * theme leaves a dark border-left on the input-group item. Verified in-browser on staging.
 */
span.pf-v5-c-form-control::before {
  border: 1px solid var(--etfmc-border) !important;
  border-radius: 10px !important;
}

span.pf-v5-c-form-control::after {
  display: none !important;
}

span.pf-v5-c-form-control:focus-within::before {
  border-color: var(--etfmc-blue-strong) !important;
  box-shadow: 0 0 0 3px rgba(95, 143, 200, 0.2) !important;
}

span.pf-v5-c-form-control > input {
  padding-inline: 0.85rem !important;
}

.pf-v5-c-input-group {
  align-items: stretch;
  gap: 0.4rem !important;
}

.pf-v5-c-input-group__item {
  border: 0 !important;
}

.pf-v5-c-button.pf-m-control,
.pf-v5-c-button.pf-m-secondary {
  border: 0 !important;
}

.pf-v5-c-button.pf-m-control {
  background: transparent !important;
}

.pf-v5-c-button.pf-m-control::after,
.pf-v5-c-button.pf-m-secondary::after {
  border: 1px solid var(--etfmc-border) !important;
  border-radius: 10px !important;
}

.pf-v5-c-button.pf-m-control:hover::after,
.pf-v5-c-button.pf-m-secondary:hover::after {
  border-color: var(--etfmc-blue-strong) !important;
}

.pf-v5-c-login__main-body {
  padding-top: 1.5rem !important;
}
