/* ============================================ */
/* ARCHIV-STRATEGIE – Signal Flow Animation       */
/* Prefix: asf-                                   */
/* ============================================ */

.archiv-signal-flow {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 16px 12px;
    background: var(--card-bg, #0f0f0f);
    border: 1px solid var(--border-color, #222);
    border-radius: 2px;
    overflow: hidden;
}

/* ── Cards ── */
.asf-card {
    width: 100%;
    max-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 16px;
    border: 1px solid var(--border-color, #222);
    border-radius: 2px;
    background: rgba(255,255,255,0.02);
    text-align: center;
    transition: border-color 0.5s ease, box-shadow 0.5s ease;
}

.asf-card.is-active.asf-old {
    border-color: #f59e0b;
    box-shadow: 0 0 16px rgba(245,158,11,0.15);
}

.asf-card.is-active.asf-engine {
    border-color: #60a5fa;
    box-shadow: 0 0 16px rgba(96,165,250,0.15);
}

.asf-card.is-active.asf-new {
    border-color: #4ade80;
    box-shadow: 0 0 16px rgba(74,222,128,0.2);
}

.asf-card-icon {
    font-size: 22px;
    margin-bottom: 6px;
    color: var(--text-color-muted, #949494);
    transition: color 0.5s ease;
}

.asf-old.is-active .asf-card-icon { color: #f59e0b; }
.asf-engine.is-active .asf-card-icon { color: #60a5fa; }
.asf-new.is-active .asf-card-icon { color: #4ade80; }

.asf-card-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-color, #e4e4e4);
    font-family: 'DM Sans', sans-serif;
    line-height: 1.2;
    margin-bottom: 3px;
}

.asf-card-meta {
    font-size: 9px;
    color: var(--text-color-subtle, #555);
    font-family: 'Courier New', 'Consolas', monospace;
    margin-bottom: 6px;
}

.asf-card-badge {
    font-size: 8px;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 2px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: 'DM Sans', sans-serif;
}

.asf-badge-archived {
    background: rgba(245,158,11,0.12);
    color: #f59e0b;
}

.asf-badge-ok {
    background: rgba(96,165,250,0.12);
    color: #60a5fa;
}

.asf-badge-live {
    background: rgba(74,222,128,0.12);
    color: #4ade80;
}

/* ── Connectors (vertical) ── */
.asf-connector {
    position: relative;
    width: 2px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.asf-line {
    width: 1px;
    height: 100%;
    background: rgba(196,163,90,0.15);
}

.asf-dot {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-color, #c4a35a);
    box-shadow: 0 0 8px rgba(196,163,90,0.5);
    opacity: 0;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
}

.asf-dot.is-traveling {
    opacity: 1;
    animation: asfDotV 0.4s ease forwards;
}

@keyframes asfDotV {
    from { top: 0; }
    to   { top: calc(100% - 6px); }
}

/* ── Ping Labels ── */
.asf-ping {
    position: absolute;
    right: -72px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 10px;
    font-family: 'Courier New', 'Consolas', monospace;
    font-weight: 700;
    color: var(--accent-color, #c4a35a);
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
}

.asf-ping.is-visible {
    opacity: 1;
}

/* ── Summary Image Container Fix ── */
.summary-image:has(.archiv-signal-flow) {
    width: 100%;
    display: block;
}

@media (min-width: 992px) {
    .summary-image:has(.archiv-signal-flow) {
        display: flex;
        justify-content: flex-end;
    }
}

/* ── Light Mode ── */
body.light-mode .archiv-signal-flow {
    background: #fafafa;
    border-color: #e0e0e0;
}

body.light-mode .asf-card {
    background: rgba(0,0,0,0.02);
    border-color: #e0e0e0;
}

body.light-mode .asf-line {
    background: rgba(196,163,90,0.2);
}

/* ── Responsive ── */
@media (max-width: 480px) {
    .asf-card-label { font-size: 10px; }
    .asf-card-meta { font-size: 8px; }
    .asf-ping { font-size: 9px; right: -60px; }
    .asf-connector { height: 24px; }
}

/* ── Checklist-Table: Mobile Label Fix ── */
/* Overrides the hardcoded "Falsch:"/"Richtig:" ::before
   from .comparison-table with correct labels for the
   Situation/Aktion checklist.                            */

@media (max-width: 768px) {
    .checklist-table td:first-child::before {
        content: "Situation: " !important;
        color: var(--accent-color, #c4a35a) !important;
    }

    .checklist-table td:last-child::before {
        content: "Aktion: " !important;
        color: var(--accent-color, #c4a35a) !important;
    }
}
