/* AuDHD staging additions — audhd-editor
   Loaded after audhd-automations.css. Calm error UX + plain-Dutch rule
   summary for AutomationRuleEditor. Lives in web-staging only. */

/* ─── Plain-Dutch rule summary bar (T5.19) ────────────────────────────
   Sits between the editor header and the WANNEER/ALS/DAN columns.
   Calm, non-interactive, single-line preview of "what this rule does". */
.audhd-editor-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 4px 0 12px;
    border-radius: 10px;
    background: rgba(var(--color-info-rgb, 59, 130, 246), 0.07);
    border: 1px solid rgba(var(--color-info-rgb, 59, 130, 246), 0.20);
    color: var(--color-text);
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 500;
    letter-spacing: 0.005em;
}

.audhd-editor-summary__icon {
    flex-shrink: 0;
    font-size: 1rem;
    opacity: 0.75;
}

.audhd-editor-summary__text {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.audhd-editor-summary__text--empty {
    color: var(--color-text-muted);
    font-weight: 400;
    font-style: italic;
}

.audhd-editor-summary__arrow {
    margin: 0 4px;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* ─── Calm amber teaching banner (T1.1) ───────────────────────────────
   Replaces the shouty red validation strip when the user hasn't actively
   tried to save yet. Tone: "still missing one thing", not "ERROR". */
.audhd-editor-teaching {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    margin: 0 0 12px;
    border-radius: 10px;
    border-left: 3px solid var(--color-warning, #d97706);
    background: var(--color-warning-soft-faint, rgba(217, 119, 6, 0.07));
    color: var(--color-text);
    font-size: 0.92rem;
    line-height: 1.4;
}

.audhd-editor-teaching__icon {
    flex-shrink: 0;
    font-size: 1rem;
    color: var(--color-warning, #d97706);
    line-height: 1.4;
}

.audhd-editor-teaching__text {
    flex: 1 1 auto;
    min-width: 0;
}

/* ─── Footer count summary (T1.2) ─────────────────────────────────────
   Tiny count-only chip that ONLY appears after a failed Opslaan attempt.
   Replaces the duplicate footer error strip. */
.audhd-editor-error-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    margin: 8px 0 0;
    border-radius: 999px;
    background: rgba(var(--color-warning-rgb, 217, 119, 6), 0.10);
    color: var(--color-warning-text, #b45309);
    font-size: 0.85rem;
    font-weight: 500;
    width: fit-content;
}

.audhd-editor-error-count__icon {
    font-size: 0.75rem;
    line-height: 1;
}

/* ─── Sticky editor header (follow-up patch to Wave D) ────────────────
   The rule editor's actions (Terug · titel · toggle · Simuleren · Opslaan)
   live in `.automation-editor__header`, NOT a footer — there is no footer
   element. The modal panel is the scroll container (overflow-y: auto), so
   when the user scrolls a tall rule the header scrolls away with the
   content and Save becomes unreachable (tunnel-feeling failure). Pinning
   the header to the top of the panel solves it on every viewport.

   Validation 2026-05-03 confirmed `.automation-editor__footer` matched
   nothing in the DOM; the original Wave D rule was a no-op. */
.automation-editor-modal-panel .automation-editor__header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--color-surface-strong, var(--color-surface));
    border-bottom: 1px solid var(--color-line);
}
