/* IZI theme for SimpleSAMLphp. Loaded after the stock stylesheet (see themes/izi/default/_head.twig). */

:root {
  --izi-green: #83bc00;        /* logo green, accents only (white text on it fails contrast) */
  --izi-green-dark: #567d00;   /* buttons: 4.85:1 with white text */
  --izi-green-darker: #466600;
  --izi-green-tint: #f3f8e6;
  --izi-gray: #949899;         /* logo gray, decorative */
  --izi-text: #1f2933;
  --izi-muted: #6b7073;        /* 5.0:1 on white */
  --izi-border: #d8dcd2;
  --izi-error-bg: #fdecea;
  --izi-error: #b42318;
}

/* Sticky footer with flexbox instead of the stock negative margins */
html, body { height: auto; }
body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--izi-green-tint);
  color: var(--izi-text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
#layout { flex: 1 0 auto; min-height: 0; margin: 0; }
#push { display: none; }
#foot { flex-shrink: 0; margin: 0; }

/* Stock links turn into a dark #444 box with extra padding on hover/focus; keep them as plain links */
a, a:visited {
  color: var(--izi-green-dark);
  text-decoration: underline;
  text-decoration-color: rgba(86, 125, 0, .4);
  text-underline-offset: 2px;
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover, a:focus, a:visited:hover, a:visited:focus {
  color: var(--izi-green-darker);
  background-color: transparent;
  padding: 0;
  margin: 0;
  text-decoration-color: currentColor;
}
a:focus-visible {
  outline: 2px solid var(--izi-green);
  outline-offset: 2px;
  border-radius: 2px;
}
.izi-brand:hover, .izi-brand:focus { padding: 0; background: none; }

/* Header */
#header.izi-header {
  height: auto;
  background: #fff;
  border-bottom: 4px solid var(--izi-green);
  padding: .75rem 0;
}
.izi-brand { display: inline-block; line-height: 0; }
.izi-brand img { height: 48px; width: auto; }

/* Footer */
#footer.izi-footer {
  height: auto;
  padding: 1rem 0;
  background: transparent;
  color: var(--izi-muted);
  font-size: .875rem;
  text-align: center;
}

/* Generic pages (welcome, errors, logout) */
#content { padding: 2rem 0; }
h1 { color: var(--izi-text); font-weight: 700; }
.pure-button-red, .pure-button-primary {
  background-color: var(--izi-green-dark);
  color: #fff;
  border-radius: 6px;
}
.pure-button-red:hover, .pure-button-red:focus,
.pure-button-primary:hover, .pure-button-primary:focus {
  background-color: var(--izi-green-darker);
  padding: .5em 1em;
}
.message-box { border-radius: 6px; }
.message-box.error { background-color: var(--izi-error-bg); border-left-color: var(--izi-error); }

/* Login page: hide the page header, the card carries the logo */
#core\:loginuserpass #header { display: none; }
#core\:loginuserpass #content { padding: 0; }
#core\:loginuserpass .wrap { width: auto; max-width: none; }

.izi-login {
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 16px;
  box-sizing: border-box;
}
.izi-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-top: 4px solid var(--izi-green);
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(31, 41, 51, .08), 0 2px 6px rgba(31, 41, 51, .06);
  padding: 2rem 2rem 1.5rem;
  box-sizing: border-box;
}
.izi-card-logo { display: block; height: 72px; width: auto; margin: 0 auto 1.5rem; }
.izi-card h1 { font-size: 1.5rem; margin: 0 0 .25rem; text-align: center; }
.izi-lead { color: var(--izi-muted); text-align: center; margin: 0 0 1.5rem; font-size: .95rem; }

.izi-card .message-box { margin: 0 0 1.25rem; padding: .875rem 1rem; box-shadow: none; }
.izi-card .message-box p { margin: .25rem 0 0; font-size: .9rem; }

.izi-card form label { color: var(--izi-text); font-weight: 600; font-size: .9rem; margin: 0 0 .35rem; }
.izi-card form input[type="text"],
.izi-card form input[type="password"],
.izi-card form select {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 1rem;
  padding: .7rem .8rem;
  border: 1px solid var(--izi-border);
  border-radius: 8px;
  box-shadow: none;
  font-size: 1rem;
}
.izi-card form input:focus,
.izi-card form select:focus {
  outline: none;
  border-color: var(--izi-green);
  box-shadow: 0 0 0 3px rgba(131, 188, 0, .25);
}
.izi-card .izi-check { font-weight: 400; color: var(--izi-muted); margin: 0 0 1rem; display: flex; gap: .5rem; align-items: center; }

.izi-button {
  display: block;
  width: 100%;
  margin: .5rem 0 0;           /* stock .pure-button adds margin-left: 1ex */
  padding: .8rem 1rem;
  border-radius: 8px;
  background: var(--izi-green-dark);
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
}
/* Stock .pure-button:hover/:focus sets padding .5em 1em; keep it fixed so the button does not jump */
.izi-button:hover, .izi-button:focus { background: var(--izi-green-darker); color: #fff; padding: .8rem 1rem; }
.izi-button:focus-visible { outline: 3px solid rgba(131, 188, 0, .5); outline-offset: 2px; }
.izi-button[disabled] { opacity: .7; }

.izi-links { margin: 1rem 0 0; padding-left: 1.2rem; }
.izi-help {
  margin: 1.5rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid #eef0ea;
  color: var(--izi-muted);
  font-size: .85rem;
  text-align: center;
}

@media (max-width: 480px) {
  .izi-card { padding: 1.5rem 1.25rem 1.25rem; border-radius: 10px; }
  .izi-card-logo { height: 60px; }
}
