/* ==========================================================================
   Landingpage Inbox Agent – Vorführungen (agents/inbox/landing-view.php)
   Nur Variablen aus tokens.css und landing.css.
   ========================================================================== */

/* ---------- Hero ---------- */
.ib-hero { position: relative; display: flex; flex-direction: column; gap: 12px; }
.ib-alex { display: flex; gap: 10px; align-items: flex-start; }
.ib-alex-text { margin: 0; padding: 8px 12px; border-radius: 4px 14px 14px 14px; background: var(--lp-a-soft); border: 1px solid var(--lp-a-line); font-size: var(--fs-sm); line-height: 1.45; min-height: 2.9em; flex: 1; }
.ib-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ib-tabs span {
    display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 8px; font-size: var(--fs-xs); font-weight: 600;
    color: var(--text-2); background: var(--surface-2); border: 1px solid transparent; transition: all .3s ease;
}
.ib-tabs span b { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: inline-grid; place-items: center; background: var(--surface); color: var(--text); font-size: 11px; }
.ib-tabs span.is-active { color: var(--lp-a); background: var(--lp-a-soft); border-color: var(--lp-a-line); }
.ib-tabs span.is-active b { background: var(--lp-a); color: var(--lp-on-a); }
.ib-tabs.is-big span { height: 34px; font-size: var(--fs-sm); padding: 0 12px; }

.ib-list { display: flex; flex-direction: column; gap: 6px; }
.ib-row {
    display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 9px 10px;
    border-radius: 12px; background: var(--surface); border: 1px solid var(--border);
    transition: transform .5s cubic-bezier(.5, 0, .2, 1), opacity .45s ease, max-height .45s ease, padding .45s ease, margin .45s ease, border-color .3s ease, background .3s ease;
    max-height: 70px; overflow: hidden;
}
.ib-row .lp-lines span { transition: color .3s ease; }
.ib-row .ib-subj { display: none; }
.ib-row.is-raw .ib-sum { display: none; }
.ib-row.is-raw .ib-subj { display: block; }
.ib-row.is-raw .lp-lines strong::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lp-a); margin-right: 6px; vertical-align: 1px; }
.ib-tags { display: flex; gap: 6px; align-items: center; transition: opacity .35s ease, transform .35s ease; }
.ib-row.is-raw .ib-tags { opacity: 0; transform: scale(.85); }
.ib-row.is-focus { border-color: var(--lp-a-line); background: var(--lp-a-soft); }
.ib-row.is-gone { transform: translateX(110%); opacity: 0; max-height: 0; padding-block: 0; margin-block: -3px; border-width: 0; }
.ib-row .lp-avatar.is-danger { background: var(--c-danger-soft); color: var(--c-danger); }
.ib-move, .ib-step {
    display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; font: inherit; font-size: 11px; font-weight: 600;
    background: var(--surface); color: var(--lp-a); border: 1px dashed var(--lp-a-line); cursor: default; white-space: nowrap; transition: transform .15s ease, background .2s ease;
}
.ib-move.is-pressed, .ib-step.is-pressed { transform: scale(.94); background: var(--lp-a-soft); }
.ib-hero .lp-toast b, .ib-s4-toast b { margin-left: 4px; }
.lp-hero-window .lp-win-body { min-height: 440px; }

/* ---------- Bühne ---------- */
.ib-stage-win .lp-win-body { min-height: 360px; }
.ib-field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; flex: 1; min-width: 0; }
.ib-field label { font-size: var(--fs-xs); color: var(--text-2); font-weight: 600; }
.ib-input { display: block; height: 36px; line-height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid var(--border-strong); background: var(--surface); font-family: var(--font-mono); font-size: var(--fs-xs); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ib-field-row { display: flex; gap: 10px; }
.ib-field.is-narrow { flex: 0 0 38%; }
.ib-checks, .ib-folders { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.ib-checks li { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); font-size: var(--fs-sm); }
.ib-checks li .icon { width: 20px; height: 20px; padding: 3px; border-radius: 50%; background: var(--c-success-soft); color: var(--c-success); flex: none; }
.ib-checks li:last-child { background: var(--lp-a-soft); color: var(--lp-a); font-weight: 600; }

.ib-s2-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.ib-s2-head span { font-size: var(--fs-xs); color: var(--text-2); }
.ib-folders li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.ib-folders li .icon { color: var(--lp-a); }
.ib-folders li strong { flex: 1; font-size: var(--fs-sm); }
.ib-s3-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.ib-s3-sum { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: 12px; background: var(--lp-a-soft); border: 1px solid var(--lp-a-line); margin-bottom: 12px; }
.ib-s3-sum p { margin: 0; line-height: 1.5; }
.ib-kv { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.ib-kv div { padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.ib-kv dt { font-size: var(--fs-xs); color: var(--text-2); }
.ib-kv dd { margin: 2px 0 0; font-weight: 600; }
.ib-suggest { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; margin: 12px 0; padding: 12px; border-radius: 12px; border: 1px dashed var(--lp-a-line); }
.ib-suggest strong { display: flex; align-items: center; gap: 6px; color: var(--lp-a); }
.ib-suggest > div:first-child span { display: block; font-size: var(--fs-xs); color: var(--text-2); margin-top: 4px; max-width: 34ch; }
.ib-suggest-btns { display: flex; gap: 6px; }
.ib-level { display: flex; flex-direction: column; gap: 6px; font-size: var(--fs-xs); color: var(--text-2); }
.ib-level ol { list-style: none; margin: 0; padding: 3px; display: flex; gap: 3px; border-radius: 10px; background: var(--surface-2); }
.ib-level li { flex: 1; text-align: center; padding: 7px 6px; border-radius: 8px; color: var(--text-2); font-weight: 600; }
.ib-level li.is-on { background: var(--surface); color: var(--lp-a); box-shadow: 0 2px 6px -2px var(--lp-shadow); }
.ib-s4-toast { margin-top: 14px; display: inline-flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: 10px; background: var(--lp-ink); color: var(--bg); font-size: var(--fs-xs); }
.ib-s4-toast b { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* Einlauf je Schritt: startet neu, sobald die Szene aktiv wird */
@keyframes ib-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes ib-pop { 0% { opacity: 0; transform: scale(.9); } 60% { transform: scale(1.03); } 100% { opacity: 1; transform: none; } }
.lp-js [data-step="1"] .ib-s1 .ib-checks li,
.lp-js [data-step="2"] .ib-s2 .ib-folders li,
.lp-js [data-step="3"] .ib-s3 .ib-kv div { animation: ib-in .45s both; animation-delay: calc(var(--d) * 420ms + 250ms); }
.lp-js [data-step="4"] .ib-s4 .ib-s4-toast { animation: ib-pop .5s both 1.6s; }
.lp-js [data-step="4"] .ib-s4 .ib-level li.is-on { animation: ib-pop .5s both .9s; }
.lp-js [data-step="2"] .ib-s2 .lp-bar i { animation: ib-bar 1.6s ease both; }
@keyframes ib-bar { from { width: 0; } }

/* ---------- Reiter-Vorführung ---------- */
.ib-tabsdemo { display: flex; flex-direction: column; gap: 12px; min-height: 230px; }
.ib-tabpanes { position: relative; min-height: 150px; }
.ib-tabpanes ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; position: absolute; inset: 0 0 auto 0; opacity: 0; transform: translateY(8px); transition: opacity .35s ease, transform .35s ease; }
.ib-tabpanes ul.is-active { opacity: 1; transform: none; position: relative; }
.ib-tabpanes li { display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-size: var(--fs-sm); }
.ib-tabpanes li i { width: 8px; height: 8px; border-radius: 50%; background: var(--lp-a); flex: none; }
.ib-tabpanes li i.is-warn { background: var(--c-warning); }
.ib-tabpanes li i.is-danger { background: var(--c-danger); }

/* ---------- Zusagen ---------- */
.ib-promise { position: relative; display: flex; flex-direction: column; gap: 16px; min-height: 250px; }
.ib-mailtext { margin: 0; padding: 14px; border-radius: 12px; background: var(--surface-2); line-height: 1.6; }
.ib-mailtext mark { background: transparent; color: inherit; padding: 1px 2px; border-radius: 4px; box-shadow: inset 0 -2px 0 var(--lp-a); transition: background .4s ease; }
.ib-mailtext mark.is-lit { background: var(--lp-a-soft); }
.ib-items { display: flex; flex-direction: column; gap: 8px; }
.ib-items > strong { display: flex; align-items: center; gap: 6px; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); }
.ib-item { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); font-size: var(--fs-sm); }
.ib-item > span:first-child { flex: 1; min-width: 0; }
.ib-item.is-new { border-color: var(--lp-a-line); }
.ib-item.is-hidden { opacity: 0; transform: translateY(-10px); }
.ib-item { transition: opacity .4s ease, transform .4s ease; }
.ib-flyer {
    position: absolute; left: 20%; top: 26%; display: inline-flex; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 10px;
    background: var(--lp-a); color: var(--lp-on-a); font-size: var(--fs-xs); font-weight: 600; box-shadow: 0 12px 24px -10px var(--lp-glow);
    opacity: 0; pointer-events: none; transition: transform .8s cubic-bezier(.5, 0, .2, 1), opacity .3s ease;
}
.ib-flyer.is-on { opacity: 1; }
.ib-flyer.is-fly { transform: translate(-10%, 150px) scale(.9); opacity: 0; transition: transform .8s cubic-bezier(.5, 0, .2, 1), opacity .3s ease .6s; }

/* ---------- Junk ---------- */
.ib-junk { display: flex; flex-direction: column; gap: 12px; min-height: 250px; }
.ib-junk-head { display: flex; align-items: center; gap: 10px; }
.ib-junk-head .lp-avatar.is-danger { background: var(--c-danger-soft); color: var(--c-danger); }
.ib-mono { font-family: var(--font-mono); }
.ib-junk-badge { transition: opacity .3s ease, transform .3s ease; }
.ib-junk.is-scan .ib-junk-badge { opacity: 0; transform: scale(.8); }
.ib-junk-subj { margin: 0; font-weight: 600; }
.ib-meter { display: flex; align-items: center; gap: 12px; }
.ib-meter-bar { position: relative; flex: 1; height: 10px; border-radius: 99px; background: var(--surface-2); }
.ib-meter-bar i { position: absolute; inset: 0 auto 0 0; width: var(--w); border-radius: inherit; background: linear-gradient(90deg, var(--c-warning), var(--c-danger)); transition: width .6s ease; }
.ib-meter-bar em { position: absolute; left: var(--at); top: -4px; bottom: -4px; width: 2px; background: var(--text-2); border-radius: 2px; }
.ib-meter > span { font-size: var(--fs-xs); color: var(--text-2); min-width: 72px; text-align: right; }
.ib-meter > span b { font-size: var(--fs-md); color: var(--c-danger); }
.ib-reasons { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.ib-reasons li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-radius: 10px; background: var(--c-danger-soft); color: var(--text); font-size: var(--fs-sm); transition: opacity .35s ease, transform .35s ease; }
.ib-reasons li b { color: var(--c-danger); }
.ib-junk.is-scan .ib-reasons li:not(.is-on) { opacity: 0; transform: translateX(-10px); }

/* ---------- Zählpixel ---------- */
.ib-pixel { position: relative; display: flex; flex-direction: column; gap: 12px; min-height: 270px; }
.ib-layers { display: flex; gap: 6px; flex-wrap: wrap; }
.ib-layers span { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 99px; font-size: 11px; font-weight: 600; background: var(--c-success-soft); color: var(--c-success); transition: opacity .3s ease, transform .3s ease; }
.ib-pixel.is-scan .ib-layers span:not(.is-on) { opacity: .25; transform: scale(.95); }
.ib-mailcanvas { position: relative; padding: 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 10px; }
.ib-mailcanvas p { margin: 0; color: var(--text-2); font-size: var(--fs-sm); }
.ib-img { position: relative; height: 64px; border-radius: 10px; background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 8px, var(--surface) 8px, var(--surface) 16px); border: 1px dashed var(--border-strong); display: grid; place-items: center; overflow: hidden; }
.ib-img.is-big { height: 92px; }
.ib-img span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; color: var(--text-2); background: var(--surface); padding: 4px 8px; border-radius: 99px; }
.ib-img.is-loaded { background: linear-gradient(135deg, var(--lp-glow), var(--lp-glow2)); border-style: solid; border-color: transparent; }
.ib-img.is-loaded span { opacity: 0; }
.ib-img span { transition: opacity .3s ease; }
.ib-img-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ib-pixel-dot { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 600; color: var(--c-danger); }
.ib-pixel-dot i { width: 8px; height: 8px; border-radius: 2px; background: var(--c-danger); box-shadow: 0 0 0 4px var(--c-danger-soft); }
.ib-load { align-self: flex-start; }

/* ---------- Mini-Demos im Raster ---------- */
.ib-mini-snooze, .ib-mini-steps { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ib-mini-keys { display: flex; gap: 8px; }
.ib-mini-keys kbd {
    min-width: 40px; height: 36px; padding: 0 10px; display: inline-grid; place-items: center; border-radius: 9px; font-family: var(--font-mono); font-size: var(--fs-sm);
    background: var(--surface); border: 1px solid var(--border-strong); box-shadow: 0 3px 0 var(--border-strong); color: var(--text);
}

@media (max-width: 640px) {
    .ib-row { grid-template-columns: auto minmax(0, 1fr) auto; }
    .ib-row .lp-time { display: none; }
    .ib-row .ib-tags .lp-tag + * { display: none; }
    .lp-hero-window .lp-win-body { min-height: 400px; }
    .ib-kv { grid-template-columns: 1fr; }
}
