/* Hero-Animation der Startseite: "Heute besprochen. Morgen in Ihrer Software."
 * Ein Kundenwunsch erscheint, am naechsten Tag ist er in der Software.
 * Zustand steuert hero-evo.js ueber data-step (0-5) auf .evo.
 */

.evo {
  --evo-surface: #0D1628;
  --evo-surface-2: rgba(255, 255, 255, .035);
  --evo-line: rgba(255, 255, 255, .09);
  --evo-ok: #34D399;
  --evo-warn: #FBBF24;
  --evo-bad: #F87171;
  position: relative;
  width: 100%;
  max-width: 470px;
  font-size: 13px;
  color: var(--text);
  user-select: none;
}
[data-theme="light"] .evo {
  --evo-surface: #FFFFFF;
  --evo-surface-2: rgba(15, 23, 42, .035);
  --evo-line: rgba(15, 23, 42, .09);
  --evo-ok: #059669;
  --evo-warn: #D97706;
  --evo-bad: #DC2626;
}

/* ── Tageszaehler ── */
.evo-day {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase;
  color: var(--muted);
}
.evo-day-num {
  display: inline-flex; align-items: baseline; gap: 6px;
  padding: 4px 12px; border-radius: 100px;
  border: 1px solid var(--border);
  color: var(--heading); font-size: 13px; letter-spacing: 0; text-transform: none;
  font-variant-numeric: tabular-nums;
  transition: border-color .4s, box-shadow .4s;
}
.evo-day-num.tick { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(34, 211, 238, .12); }
.evo-day-track { flex: 1; height: 2px; border-radius: 2px; background: var(--evo-line); overflow: hidden; }
.evo-day-track span {
  display: block; height: 100%; width: 0; background: var(--grad);
  transition: width .8s ease;
}
.evo[data-step="0"] .evo-day-track span { width: 8%; }
.evo[data-step="1"] .evo-day-track span, .evo[data-step="2"] .evo-day-track span { width: 36%; }
.evo[data-step="3"] .evo-day-track span, .evo[data-step="4"] .evo-day-track span { width: 66%; }
.evo[data-step="5"] .evo-day-track span { width: 100%; }

/* ── Kundenwunsch ── */
.evo-ask {
  position: relative; height: 62px; margin-bottom: 14px;
}
.evo-bubble {
  position: absolute; inset: 0 auto auto 0; max-width: 92%;
  display: flex; gap: 10px; align-items: flex-start;
  opacity: 0; transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
}
.evo-avatar {
  flex: none; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--card); border: 1px solid var(--border);
  font-size: 11px; font-weight: 700; color: var(--heading);
}
.evo-bubble-body {
  padding: 9px 13px; border-radius: 4px 14px 14px 14px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--heading); line-height: 1.45;
}
.evo-bubble-meta { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.evo-bubble-meta .done { color: var(--evo-ok); font-weight: 600; opacity: 0; transition: opacity .4s; }

/* Welcher Wunsch ist sichtbar, und wann ist er erledigt */
.evo[data-step="0"] .evo-bubble[data-req="1"],
.evo[data-step="1"] .evo-bubble[data-req="1"],
.evo[data-step="2"] .evo-bubble[data-req="2"],
.evo[data-step="3"] .evo-bubble[data-req="2"],
.evo[data-step="4"] .evo-bubble[data-req="3"],
.evo[data-step="5"] .evo-bubble[data-req="3"] { opacity: 1; transform: none; }
.evo[data-step="1"] .evo-bubble[data-req="1"] .done,
.evo[data-step="3"] .evo-bubble[data-req="2"] .done,
.evo[data-step="5"] .evo-bubble[data-req="3"] .done { opacity: 1; }

/* ── App-Fenster ── */
.evo-app {
  position: relative;
  border-radius: 14px;
  background: var(--evo-surface);
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55);
  overflow: hidden;
}
[data-theme="light"] .evo-app { box-shadow: 0 30px 60px -24px rgba(15, 23, 42, .25); }
.evo-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 14px; border-bottom: 1px solid var(--evo-line);
}
.evo-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--evo-line); }
.evo-bar b { margin-left: 8px; font-size: 12px; font-weight: 600; color: var(--heading); }

.evo-tools {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px 4px; min-height: 46px;
}
.evo-search {
  flex: 1 1 120px; height: 28px; border-radius: 7px;
  background: var(--evo-surface-2); border: 1px solid var(--evo-line);
  padding: 0 10px; display: flex; align-items: center; color: var(--muted); font-size: 12px;
}

/* Neue Funktionen: eingeklappt, bis sie "live" gehen */
.evo-feat {
  opacity: 0; transform: scale(.85);
  transition: opacity .5s ease, transform .5s cubic-bezier(.2, .9, .3, 1.3), box-shadow 1.2s ease;
}
.evo-feat.on { opacity: 1; transform: none; }
.evo-feat.fresh { box-shadow: 0 0 0 3px rgba(34, 211, 238, .35); }

.evo-export {
  height: 28px; padding: 0 11px; border-radius: 7px;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--grad); color: #fff; font-size: 12px; font-weight: 600;
}
.evo-chips { display: flex; gap: 6px; width: 100%; padding: 0 14px; height: 0; overflow: hidden; transition: height .45s ease, padding .45s ease; }
.evo-chips.on { height: 34px; padding-top: 6px; }
.evo-chip {
  height: 24px; padding: 0 10px; border-radius: 100px;
  display: inline-flex; align-items: center;
  border: 1px solid var(--evo-line); font-size: 11.5px; color: var(--text);
}
.evo-chip.sel { border-color: var(--cyan); color: var(--cyan); }

.evo-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.evo-table th, .evo-table td {
  text-align: left; padding: 9px 14px; border-top: 1px solid var(--evo-line); white-space: nowrap;
}
.evo-table th { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.evo-table td { color: var(--heading); font-size: 12.5px; }
.evo-table td.num { font-variant-numeric: tabular-nums; color: var(--text); }
.evo-st { font-size: 11.5px; color: var(--text); }

/* Spalte "Faellig" waechst von 0 auf volle Breite */
.evo-due { width: 0; padding-left: 0 !important; padding-right: 0 !important; overflow: hidden; }
.evo-due > span { display: inline-flex; align-items: center; gap: 6px; max-width: 0; overflow: hidden; opacity: 0; transition: max-width .6s ease, opacity .5s ease .15s; }
.evo-table.due-on .evo-due { width: auto; padding-right: 14px !important; }
.evo-table.due-on .evo-due > span { max-width: 90px; opacity: 1; }
.evo-dot { width: 8px; height: 8px; border-radius: 50%; }
.evo-dot.ok { background: var(--evo-ok); }
.evo-dot.warn { background: var(--evo-warn); }
.evo-dot.bad { background: var(--evo-bad); }

/* Zeilen, die der Statusfilter ausblendet */
.evo-table tr.hide-on-filter td { transition: opacity .4s ease; }
.evo-table.filter-on tr.hide-on-filter td { opacity: .25; }

/* ── "Live"-Meldung ── */
.evo-toast {
  position: absolute; right: 8px; top: 6px;
  display: flex; align-items: center; gap: 8px;
  padding: 5px 11px; border-radius: 10px;
  background: var(--evo-surface); border: 1px solid var(--evo-ok);
  color: var(--heading); font-size: 12px; font-weight: 600;
  box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .5);
  opacity: 0; transform: translateY(-6px);
  transition: opacity .35s ease, transform .35s ease;
}
.evo-toast.on { opacity: 1; transform: none; }
.evo-toast svg { color: var(--evo-ok); flex: none; }
.evo-toast [data-msg] { display: none; }
.evo[data-step="1"] .evo-toast [data-msg="1"],
.evo[data-step="3"] .evo-toast [data-msg="2"],
.evo[data-step="5"] .evo-toast [data-msg="3"] { display: inline; }

/* Neustart der Schleife: kurz ausblenden */
.evo.resetting .evo-app, .evo.resetting .evo-ask { opacity: 0; transition: opacity .5s ease; }
.evo .evo-app, .evo .evo-ask { transition: opacity .5s ease; }

@media (max-width: 480px) {
  .evo { font-size: 12px; }
  .evo-table th, .evo-table td { padding: 8px 10px; }
  .evo-table th.hide-sm, .evo-table td.hide-sm { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .evo *, .evo *::before, .evo *::after { transition: none !important; }
}
