/* ============================================================
   Erste Bank / George – brand theme layer  (DEMO)
   ------------------------------------------------------------
   This file re-skins the footprint calculator and the financial
   assessment from the previous insurance identity to an
   Erste Bank Austria look & feel.

   Strategy (maximum reuse, zero build step):
   The whole app is already coloured through CSS custom
   properties (--donau-*, --cg-*, --border-color …). By loading
   this file LAST and re-defining those tokens, every existing
   component recolours automatically. New components for the
   financial assessment (.fin-*) and the gamification teaser
   (.gp-*) are added at the bottom.

   Palette is Erste-inspired (deep navy + bright "George" blue +
   ESG green). No protected assets are used; the brand is shown
   as a text wordmark ("Erste Bank" / "George").
   ============================================================ */

/* ---------- 1. Brand tokens ---------- */
:root,
html {
  --erste-blue: #2870ed;          /* primary / interactive (George blue) */
  --erste-blue-dark: #1152b5;     /* hover / pressed */
  --erste-navy: #0a2e5c;          /* headings, footer, deep surfaces */
  --erste-navy-deep: #061f40;
  --erste-green: #3e9c56;         /* sustainability / ESG accent */
  --erste-green-dark: #2e7d45;
  --erste-green-light: #e8f5ec;
  --erste-red: #e2001a;           /* alerts only */
  --erste-light: #eef4fd;         /* light blue surface */
  --erste-surface: #ffffff;
  --erste-border: #d3e0f5;
  --erste-ink: #16233a;
  --erste-muted: #5b6b7f;

  /* --- Remap the legacy DONAU / Generali tokens so every existing
         var(--donau-*) reference now resolves to the Erste palette. --- */
  --donau-blue: var(--erste-blue);
  --donau-blue-dark: var(--erste-navy);
  --donau-red: var(--erste-red);
  --donau-light: var(--erste-light);
  --donau-border: var(--erste-border);

  --border-color: var(--erste-border);
  --blue-border-color: var(--erste-blue);
  --blue-background-color: var(--erste-light);
}

/* Coverage/finance widget tokens (scoped to .cg) inherit from the
   remapped DONAU tokens automatically, but we pin the green accent. */
.cg,
.fin {
  --cg-accent: var(--erste-blue);
  --cg-accent-dark: var(--erste-navy);
  --cg-covered: var(--erste-green-dark);
  --cg-surface-alt: var(--erste-light);
  --cg-border: var(--erste-border);
}

/* ---------- 2. Typography ---------- */
body,
button,
input,
select,
textarea,
.btn,
h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6,
[class^="uat-headlines"],
[class*=" uat-headlines"] {
  font-family: "Neue Helvetica LT", system-ui, -apple-system, "Segoe UI",
    Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3,
.uat-headlines-150,
.cg-title,
.fin-title {
  color: var(--erste-navy);
  letter-spacing: -0.01em;
}

/* ---------- 3. Brand wordmark (text logo, no image asset) ---------- */
.navbar-brand.erste-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  padding: 0;
}
.erste-brand__logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--erste-blue) 0%, var(--erste-navy) 100%);
  position: relative;
  flex: 0 0 auto;
  box-shadow: 0 2px 8px rgba(10, 46, 92, 0.25);
}
/* small sustainability "leaf/spark" mark drawn in CSS */
.erste-brand__logo::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 15px;
  height: 15px;
  border-radius: 50% 0 50% 50%;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #ffffff 0%, var(--erste-green-light) 100%);
}
.erste-brand__text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.erste-brand__name {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--erste-navy);
  letter-spacing: -0.02em;
}
.erste-brand__sub {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--erste-green-dark);
  margin-top: 3px;
}
@media (max-width: 767px) {
  .erste-brand__name { font-size: 1.05rem; }
  .erste-brand__sub { font-size: 0.55rem; }
}

/* ---------- 4. Header / top navigation ---------- */
.header > .container {
  box-shadow: 0 2px 10px rgba(10, 46, 92, 0.08);
  border-bottom: 3px solid var(--erste-blue);
}
.riskcheck-top-link {
  color: #fff;
  background: var(--erste-blue);
  font-size: 1rem;
  font-weight: 700;
  padding: 9px 18px;
  border-radius: 999px;
  transition: background 0.15s ease, transform 0.15s ease;
}
.riskcheck-top-link:hover,
.riskcheck-top-link:focus {
  color: #fff;
  background: var(--erste-blue-dark);
  transform: translateY(-1px);
}
.riskcheck-header-links .active a,
.riskcheck-header-links a:hover {
  border-bottom-color: var(--erste-blue);
  color: var(--erste-blue);
}

/* de-only demo → hide the language switcher entirely */
.language-switcher,
.lang-separator {
  display: none !important;
}

/* ---------- 5. Erste-style footer ---------- */
footer .container {
  background: var(--erste-navy);
  color: #cfe0f7;
  padding: 2.6rem 1.6rem 2rem;
}
footer .container > div {
  border-top: none;
}
footer .container hr { display: none; }
.erste-footer {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
}
.erste-footer__brand .erste-brand__name { color: #fff; }
.erste-footer__brand p {
  color: #a9c4e8;
  font-size: 0.85rem;
  line-height: 1.5;
  margin-top: 0.9rem;
  max-width: 34ch;
}
.erste-footer__col h4 {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
}
.erste-footer__col ul { margin: 0; padding: 0; }
.erste-footer__col li { list-style: none; display: block; margin: 0 0 0.55rem; }
.erste-footer__col a {
  color: #cfe0f7;
  font-size: 0.88rem;
  line-height: 1.4;
  text-decoration: none;
}
.erste-footer__col a:hover { color: #fff; text-decoration: underline; }
.erste-footer__legal {
  max-width: 1200px;
  margin: 1.8rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.4rem;
  font-size: 0.78rem;
  color: #9bb6dc;
}
.erste-footer__legal a { color: #9bb6dc; text-decoration: none; }
.erste-footer__legal a:hover { color: #fff; }
@media (max-width: 767px) {
  .erste-footer { grid-template-columns: 1fr; gap: 1.4rem; }
}

/* ---------- 6. Buttons / cards polish ---------- */
.btn {
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.uniqa_box,
.generali_box {
  border: 1px solid var(--erste-border);
  border-radius: 16px;
  box-shadow: 0 6px 24px rgba(10, 46, 92, 0.07);
}

/* ESG accent chips used across the calculator */
.esg-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--erste-green-light);
  color: var(--erste-green-dark);
  font-size: 0.78rem;
  font-weight: 700;
}
.esg-chip::before {
  content: "";
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--erste-green);
}

/* Re-skin the footprint "produkt" recommendation blocks as Erste
   banking nudges (green ESG accent instead of insurance blue). */
.produkt.alert,
.produkt.alert-info {
  background: var(--erste-green-light);
  border: 1px solid #cfe9d6;
  border-left: 4px solid var(--erste-green);
  color: #1f3d29;
  border-radius: 10px;
}
.produkt.alert a { color: var(--erste-green-dark); font-weight: 700; }

/* Fade-in keyframes (also defined in riskcheck-coverage.css; re-declared here
   so pages that do not load that stylesheet still animate). */
@keyframes cg-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   7. Financial Assessment widget  (.fin-*)
   Reuses the .cg-* layout primitives; adds finance-specific UI.
   ============================================================ */
.fin { color: var(--erste-ink); font-size: 1em; }
.fin *, .fin *::before, .fin *::after { box-sizing: border-box; }

.fin-screen { display: none; }
.fin-screen.is-active { display: block; animation: cg-fade 0.25s ease; }

.fin-title {
  font-size: 1.5em;
  font-weight: 800;
  margin: 0 0 0.35em;
}
.fin-lead { color: var(--erste-muted); margin: 0 0 1.3em; line-height: 1.55; }

.fin-steps {
  display: flex;
  gap: 8px;
  margin: 0 0 1.4em;
  flex-wrap: wrap;
}
.fin-step {
  flex: 1 1 0;
  min-width: 90px;
  font-size: 0.72em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--erste-muted);
  padding-top: 10px;
  border-top: 3px solid var(--erste-border);
}
.fin-step.is-active { color: var(--erste-blue); border-top-color: var(--erste-blue); }
.fin-step.is-done { color: var(--erste-green-dark); border-top-color: var(--erste-green); }

/* intake choice cards */
.fin-choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 1.2em; }
.fin-choice {
  text-align: left;
  border: 1.5px solid var(--erste-border);
  background: #fff;
  border-radius: 16px;
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  display: flex; flex-direction: column; gap: 6px;
}
.fin-choice:hover { border-color: var(--erste-blue); box-shadow: 0 8px 24px rgba(40,112,237,0.12); transform: translateY(-2px); }
.fin-choice.is-primary { border-color: var(--erste-blue); }
.fin-choice__badge {
  align-self: flex-start;
  background: var(--erste-blue); color: #fff;
  font-size: 0.68em; font-weight: 700; letter-spacing: 0.04em;
  padding: 3px 10px; border-radius: 999px; text-transform: uppercase;
}
.fin-choice__icon { font-size: 1.8em; }
.fin-choice__title { font-weight: 800; font-size: 1.05em; color: var(--erste-navy); }
.fin-choice__desc { color: var(--erste-muted); font-size: 0.9em; line-height: 1.45; }
@media (max-width: 640px) { .fin-choice-grid { grid-template-columns: 1fr; } }

/* question card */
.fin-q { animation: cg-fade 0.25s ease; }
.fin-q__counter { font-size: 0.8em; font-weight: 700; color: var(--erste-blue); text-transform: uppercase; letter-spacing: 0.06em; }
.fin-q__question { font-size: 1.3em; font-weight: 800; color: var(--erste-navy); margin: 6px 0 4px; }
.fin-q__hint { color: var(--erste-muted); margin: 0 0 1.1em; line-height: 1.5; }
.fin-progress { height: 8px; border-radius: 999px; background: var(--erste-light); overflow: hidden; margin: 0 0 1.3em; }
.fin-progress__bar { height: 100%; background: linear-gradient(90deg, var(--erste-blue), var(--erste-green)); transition: width 0.3s ease; }

.fin-options { display: grid; gap: 10px; }
.fin-option {
  display: flex; align-items: center; gap: 12px;
  border: 1.5px solid var(--erste-border);
  border-radius: 12px; padding: 14px 16px;
  cursor: pointer; background: #fff;
  transition: border-color 0.12s, background 0.12s;
  font-size: 1em; text-align: left; width: 100%;
}
.fin-option:hover { border-color: var(--erste-blue); background: var(--erste-light); }
.fin-option.is-selected { border-color: var(--erste-blue); background: var(--erste-light); box-shadow: inset 0 0 0 1px var(--erste-blue); }
.fin-option__dot {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--erste-border); flex: 0 0 auto; position: relative;
}
.fin-option.is-selected .fin-option__dot { border-color: var(--erste-blue); }
.fin-option.is-selected .fin-option__dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--erste-blue);
}

.fin-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 1.5em; }
.fin-actions.end { justify-content: flex-end; }
.fin-btn {
  border: none; border-radius: 999px; padding: 12px 26px;
  font-size: 1em; font-weight: 700; cursor: pointer;
  background: var(--erste-blue); color: #fff;
  transition: background 0.15s, transform 0.15s;
}
.fin-btn:hover { background: var(--erste-blue-dark); transform: translateY(-1px); }
.fin-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
.fin-btn--ghost { background: transparent; color: var(--erste-blue); box-shadow: inset 0 0 0 1.5px var(--erste-border); }
.fin-btn--ghost:hover { background: var(--erste-light); }
.fin-btn--green { background: var(--erste-green); }
.fin-btn--green:hover { background: var(--erste-green-dark); }

/* upload drop zone */
.fin-drop {
  border: 2px dashed var(--erste-border); border-radius: 16px;
  padding: 34px 20px; text-align: center; cursor: pointer;
  background: var(--erste-light); transition: border-color 0.15s, background 0.15s;
}
.fin-drop.is-drag, .fin-drop:hover { border-color: var(--erste-blue); background: #fff; }
.fin-drop__icon { font-size: 2em; }
.fin-drop__hint { color: var(--erste-muted); font-size: 0.85em; margin-top: 6px; }
.fin-note { font-size: 0.85em; color: var(--erste-muted); margin-top: 10px; }

/* ---------- Result: score gauges ---------- */
.fin-result { animation: cg-fade 0.3s ease; }
.fin-scorecards { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 0 0 1.6em; }
@media (max-width: 640px) { .fin-scorecards { grid-template-columns: 1fr; } }
.fin-score {
  border-radius: 18px; padding: 22px; color: #fff;
  position: relative; overflow: hidden;
}
.fin-score--health { background: linear-gradient(135deg, var(--erste-blue), var(--erste-navy)); }
.fin-score--risk { background: linear-gradient(135deg, var(--erste-green), var(--erste-green-dark)); }
.fin-score__label { font-size: 0.8em; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; opacity: 0.9; }
.fin-score__value { font-size: 3em; font-weight: 800; line-height: 1; margin: 8px 0 2px; }
.fin-score__value small { font-size: 0.35em; font-weight: 600; opacity: 0.8; }
.fin-score__band { font-size: 0.95em; font-weight: 700; }
.fin-score__desc { font-size: 0.85em; opacity: 0.92; margin-top: 8px; line-height: 1.45; }
.fin-gauge {
  position: absolute; right: -18px; top: -18px;
  width: 120px; height: 120px; border-radius: 50%;
  background: conic-gradient(rgba(255,255,255,0.9) var(--val, 0%), rgba(255,255,255,0.18) 0);
  -webkit-mask: radial-gradient(circle 42px at center, transparent 40px, #000 42px);
          mask: radial-gradient(circle 42px at center, transparent 40px, #000 42px);
  opacity: 0.9;
}

/* category bars */
.fin-cats { display: grid; gap: 12px; margin: 0 0 1.6em; }
.fin-cat { display: grid; grid-template-columns: 190px 1fr auto; align-items: center; gap: 12px; }
@media (max-width: 640px) { .fin-cat { grid-template-columns: 1fr; gap: 4px; } }
.fin-cat__name { font-weight: 700; color: var(--erste-navy); font-size: 0.95em; }
.fin-cat__track { height: 10px; border-radius: 999px; background: var(--erste-light); overflow: hidden; }
.fin-cat__fill { height: 100%; border-radius: 999px; }
.fin-cat__fill--good { background: var(--erste-green); }
.fin-cat__fill--mid { background: #e6a817; }
.fin-cat__fill--weak { background: var(--erste-red); }
.fin-cat__val { font-weight: 700; font-size: 0.85em; color: var(--erste-muted); }

/* section headings inside result */
.fin-section-title {
  font-size: 1.25em; font-weight: 800; color: var(--erste-navy);
  margin: 1.8em 0 0.8em; display: flex; align-items: center; gap: 10px;
}
.fin-section-title .esg-chip { font-size: 0.6em; }

/* priority action + recommendation cards */
.fin-cardlist { display: grid; gap: 12px; }
.fin-card {
  border: 1px solid var(--erste-border); border-radius: 14px;
  padding: 16px 18px; background: #fff; display: flex; gap: 14px; align-items: flex-start;
}
.fin-card__icon {
  width: 42px; height: 42px; border-radius: 11px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 1.3em;
  background: var(--erste-light);
}
.fin-card--green .fin-card__icon { background: var(--erste-green-light); }
.fin-card__body h4 { margin: 0 0 3px; font-size: 1.02em; color: var(--erste-navy); font-weight: 800; }
.fin-card__body p { margin: 0; color: var(--erste-muted); font-size: 0.9em; line-height: 1.5; }
.fin-card__cta { margin-top: 8px; display: inline-flex; }
.fin-card__cta a {
  font-size: 0.85em; font-weight: 700; color: var(--erste-blue); text-decoration: none;
}
.fin-card__cta a:hover { text-decoration: underline; }
.fin-badge {
  display: inline-block; font-size: 0.7em; font-weight: 700;
  padding: 2px 9px; border-radius: 999px; margin-left: 6px;
}
.fin-badge--prio { background: #fdecec; color: var(--erste-red); }
.fin-badge--esg { background: var(--erste-green-light); color: var(--erste-green-dark); }

/* insurance-vs-planning callout */
.fin-insight {
  border-radius: 16px; padding: 20px 22px; margin: 1.8em 0 0;
  background: linear-gradient(135deg, var(--erste-light), #fff);
  border: 1px solid var(--erste-border); border-left: 5px solid var(--erste-green);
}
.fin-insight h4 { margin: 0 0 6px; color: var(--erste-navy); font-weight: 800; }
.fin-insight p { margin: 0; color: var(--erste-ink); line-height: 1.55; }
.fin-disclaimer { font-size: 0.78em; color: var(--erste-muted); margin-top: 1.4em; line-height: 1.5; }

/* ============================================================
   8. Gamification teaser  (.gp-*)  – "Green Points"
   ============================================================ */
.gp {
  border-radius: 22px; overflow: hidden;
  border: 1px solid var(--erste-border);
  box-shadow: 0 10px 30px rgba(10, 46, 92, 0.08);
  background: #fff;
}
.gp__head {
  background: linear-gradient(135deg, var(--erste-green), var(--erste-green-dark));
  color: #fff; padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.gp__head-titles h3 { margin: 0; color: #fff; font-weight: 800; font-size: 1.4em; }
.gp__head-titles p { margin: 4px 0 0; opacity: 0.92; font-size: 0.9em; }
.gp__tag {
  background: rgba(255,255,255,0.18); border: 1px solid rgba(255,255,255,0.35);
  padding: 4px 12px; border-radius: 999px; font-size: 0.72em; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase;
}
.gp__balance { display: flex; align-items: center; gap: 20px; padding: 22px 24px; flex-wrap: wrap; }
.gp__ring {
  --p: 68;
  width: 118px; height: 118px; border-radius: 50%; flex: 0 0 auto;
  background: conic-gradient(var(--erste-green) calc(var(--p) * 1%), var(--erste-light) 0);
  display: grid; place-items: center; position: relative;
}
.gp__ring::before {
  content: ""; position: absolute; inset: 12px; border-radius: 50%; background: #fff;
}
.gp__ring-inner { position: relative; text-align: center; }
.gp__ring-inner b { display: block; font-size: 1.6em; font-weight: 800; color: var(--erste-green-dark); line-height: 1; }
.gp__ring-inner span { font-size: 0.68em; color: var(--erste-muted); font-weight: 700; }
.gp__balance-text h4 { margin: 0 0 4px; color: var(--erste-navy); font-weight: 800; }
.gp__balance-text p { margin: 0; color: var(--erste-muted); font-size: 0.9em; line-height: 1.5; }
.gp__next { margin-top: 8px; font-size: 0.85em; color: var(--erste-green-dark); font-weight: 700; }

.gp__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 1px solid var(--erste-border); }
@media (max-width: 640px) { .gp__grid { grid-template-columns: 1fr; } }
.gp__col { padding: 20px 24px; }
.gp__col + .gp__col { border-left: 1px solid var(--erste-border); }
@media (max-width: 640px) { .gp__col + .gp__col { border-left: none; border-top: 1px solid var(--erste-border); } }
.gp__col h4 { margin: 0 0 12px; color: var(--erste-navy); font-weight: 800; font-size: 1.02em; }
.gp__item { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--erste-border); }
.gp__item:last-child { border-bottom: none; }
.gp__item-ic {
  width: 38px; height: 38px; border-radius: 10px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 1.15em; background: var(--erste-green-light);
}
.gp__item-body { flex: 1; }
.gp__item-body b { display: block; color: var(--erste-navy); font-size: 0.92em; }
.gp__item-body span { color: var(--erste-muted); font-size: 0.8em; }
.gp__item-pts { font-weight: 800; color: var(--erste-green-dark); font-size: 0.92em; white-space: nowrap; }
.gp__reward {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 11px 14px; border: 1px solid var(--erste-border); border-radius: 12px; margin-bottom: 10px;
}
.gp__reward b { color: var(--erste-navy); font-size: 0.92em; }
.gp__reward span { color: var(--erste-muted); font-size: 0.8em; display: block; }
.gp__reward button {
  border: none; background: var(--erste-green); color: #fff; font-weight: 700; font-size: 0.8em;
  padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap;
}
.gp__reward button:hover { background: var(--erste-green-dark); }
.gp__reward button:disabled { background: var(--erste-border); color: var(--erste-muted); cursor: not-allowed; }
.gp__partners { padding: 16px 24px 22px; border-top: 1px solid var(--erste-border); }
.gp__partners h4 { margin: 0 0 10px; color: var(--erste-navy); font-weight: 800; font-size: 0.95em; }
.gp__partner-row { display: flex; flex-wrap: wrap; gap: 8px; }
.gp__partner {
  font-size: 0.78em; font-weight: 700; color: var(--erste-navy);
  background: var(--erste-light); border: 1px solid var(--erste-border);
  padding: 6px 12px; border-radius: 999px;
}
.gp__foot { padding: 14px 24px 20px; font-size: 0.76em; color: var(--erste-muted); line-height: 1.5; }
