/* Shared by the landing page and the privacy page. Same proportions and form language as the RIWA
   Keycloak login theme (materialize, keycloak/files/themes/riwa) - white only, like that theme. */
:root {
  --primary: #00497D;      /* --app-primary-color in riwa.css */
  --secondary: #009EE0;    /* --app-secondary-color in riwa.css */
  --bg: #FFFFFF;
  --text: rgba(0,0,0,0.87);
  --muted: rgba(0,0,0,0.54);
  --hairline: #E3E8EE;
  --error: #D32F2F;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  color-scheme: light;
}
html { font-size: 14.5px; height: 100%; }
body {
  margin: 0; min-height: 100%;
  background: var(--bg); color: var(--text);
  font-family: var(--font); line-height: 1.5;
  display: flex; flex-direction: column;
}

main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 3rem 16px; }
.box { width: 100%; max-width: 640px; display: flex; flex-direction: column; gap: 1.75rem; }

.header { display: flex; align-items: center; gap: 15px; }
.header a { height: 27px; flex-shrink: 0; }
.header img { height: 100%; width: auto; display: block; }
.header h1 { margin: 0; font-size: 1.64rem; line-height: 1.1; font-weight: bold; white-space: nowrap; }

.lead { margin: 0; color: var(--muted); max-width: 52ch; }

/* materialize .input-field look: floating label, underline in primary colour */
.field { position: relative; padding-top: 1rem; }
.field label {
  position: absolute; left: 0; top: 1.75rem; color: var(--primary);
  font-size: 1rem; transition: transform .2s ease-out; transform-origin: 0 100%; pointer-events: none;
}
.field.active label { transform: translateY(-1.6rem) scale(.8); }
.line {
  display: flex; align-items: baseline;
  border-bottom: 1px solid var(--primary); box-shadow: 0 1px 0 0 var(--primary);
  transition: border-color .2s, box-shadow .2s;
}
.field.invalid .line { border-color: var(--error); box-shadow: 0 1px 0 0 var(--error); }
.field.invalid label { color: var(--error); }
.line input {
  flex: 1; min-width: 0; height: 3rem; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 1rem; color: var(--text); padding: 0;
}
.suffix { color: var(--muted); font-size: 1rem; white-space: nowrap; padding-left: 2px; }
.helper { min-height: 1.4em; margin-top: .4rem; font-size: .85rem; color: var(--muted); overflow-wrap: anywhere; }
.helper.error { color: var(--error); }
.helper b { color: var(--primary); font-weight: 600; }

.actions { display: flex; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  height: 36px; padding: 0 16px; border: 0; border-radius: 2px; cursor: pointer;
  background: var(--primary); color: #fff; font: inherit; font-size: 14px; font-weight: 500;
  text-transform: uppercase; letter-spacing: .5px;
  box-shadow: 0 2px 2px 0 rgba(0,0,0,.14), 0 3px 1px -2px rgba(0,0,0,.12), 0 1px 5px 0 rgba(0,0,0,.2);
  transition: box-shadow .2s, background-color .2s;
}
.btn:hover { box-shadow: 0 3px 3px 0 rgba(0,0,0,.14), 0 1px 7px 0 rgba(0,0,0,.12), 0 3px 1px -1px rgba(0,0,0,.2); }
.btn:focus-visible { outline: 2px solid var(--secondary); outline-offset: 2px; }
.btn:disabled { background: #DFDFDF; color: #9F9F9F; box-shadow: none; cursor: default; }
.btn svg { width: 20px; height: 20px; fill: currentColor; }

.help { border-top: 1px solid var(--hairline); padding-top: 1.25rem; font-size: .9rem; color: var(--muted); display: grid; gap: .5rem; }
.help p { margin: 0; }
.help code { font-family: ui-monospace, Menlo, Consolas, monospace; color: var(--text); font-size: .85rem; overflow-wrap: anywhere; }

footer {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem;
  padding: 1.25rem 16px; font-size: .8rem; color: var(--muted);
}
footer a { color: var(--muted); }
footer a:hover { color: var(--primary); }
footer a.company { color: var(--primary); text-decoration: none; }
footer a.company:hover { text-decoration: underline; }
footer a[aria-current="page"] { color: var(--primary); }

/* Privacy page: long text, top-aligned, wider reading column */
main.doc { align-items: flex-start; }
main.doc .box { max-width: 760px; gap: 1.25rem; }
.back { color: var(--primary); text-decoration: none; font-size: .9rem; display: inline-flex; align-items: center; gap: .25rem; }
.back:hover { text-decoration: underline; }
.back svg { width: 18px; height: 18px; fill: currentColor; }
.legal { overflow-wrap: break-word; hyphens: auto; }
.legal h1 { font-size: 1.64rem; line-height: 1.2; margin: 0 0 1rem; }
.legal h2 {
  font-size: 1.25rem; color: var(--primary); margin: 2.25rem 0 .75rem;
  padding-top: 1.25rem; border-top: 1px solid var(--hairline);
}
.legal h3 { font-size: 1.05rem; color: var(--primary); margin: 1.5rem 0 .5rem; }
.legal h4 { font-size: 1rem; margin: 1.25rem 0 .4rem; }
.legal p, .legal ul { margin: 0 0 .75rem; }
.legal ul { padding-left: 1.25rem; }
.legal a { color: var(--primary); }
.legal a:hover { color: var(--secondary); }

@media (max-width: 480px) {
  .header a { height: 22px; }
  .header h1 { font-size: 1.4rem; }
  .suffix { font-size: .85rem; }
  .legal h1 { font-size: 1.4rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
