/* plan-bar.css 1.1.0 — the plan bar above the message field (plan "Planul ancorat in conversatie", step E3, 16.11.2026).
   Colors only from the rag-ai.css tokens. */

.plan-bar { margin: 0 14px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.plan-bar[hidden] { display: none; }

/* One row: title, count, state. A tap opens the list of steps. */
.plan-head { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 12px; font: inherit; font-size: 14px;
  color: var(--fg); background: transparent; border: none; cursor: pointer; text-align: left; }
.plan-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.plan-count { font-size: 13px; color: var(--muted); white-space: nowrap; }
.plan-state { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--acc); color: var(--acc); white-space: nowrap; }
.plan-bar[data-state="paused"] .plan-state { border-color: var(--run); color: var(--run); }
.plan-bar[data-state="proposed"] .plan-state { border-color: var(--muted); color: var(--muted); }
.plan-caret { color: var(--muted); font-size: 12px; }

/* The segments of progress, one per step */
.plan-segments { display: flex; gap: 3px; padding: 0 12px 8px; }
.plan-seg { flex: 1; height: 5px; border-radius: 3px; background: var(--line); }
.plan-seg[data-step="done"], .plan-seg[data-step="skipped"] { background: var(--ok); }
.plan-seg[data-step="running"] { background: var(--acc); animation: plan-pulse 1.2s ease-in-out infinite; }
.plan-seg[data-step="blocked"] { background: var(--off); }
@keyframes plan-pulse { 50% { opacity: .4; } }

/* The list of steps, opened by a tap; scrolls inside, so the page does not grow */
.plan-steps { margin: 0; padding: 0 12px 10px; list-style: none; max-height: 30dvh; overflow-y: auto; font-size: 14px; }
.plan-steps[hidden] { display: none; }
.plan-step { display: flex; gap: 8px; padding: 3px 0; }
.plan-step-mark { width: 1.2em; text-align: center; color: var(--muted); }
.plan-step[data-step="done"] .plan-step-mark, .plan-step[data-step="skipped"] .plan-step-mark { color: var(--ok); }
.plan-step[data-step="running"] .plan-step-mark { color: var(--acc); }
.plan-step[data-step="blocked"] .plan-step-mark { color: var(--off); }
.plan-step[data-current="1"] .plan-step-title { font-weight: 700; }
.plan-step-bg { font-size: 12px; color: var(--muted); }

/* ---- the confirmation card (E3b, 1.1.0): apart from the conversation, above the plan bar, full width on the phone ---- */
.confirm-card { margin: 0 14px 8px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.confirm-card[hidden] { display: none; }
.confirm-band { display: flex; align-items: center; justify-content: space-between; padding: 5px 12px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .03em; color: #fff; background: var(--run); }
.confirm-band[data-type="irreversible"], .confirm-band[data-type="production"] { background: var(--off); }
.confirm-band[data-type="permission"], .confirm-band[data-type="outside"] { background: var(--run); }
.confirm-band[data-type="secrets"] { background: var(--acc); }
.confirm-count { font-weight: 600; opacity: .9; }
.confirm-body { padding: 10px 12px 4px; font-size: 14px; }
.confirm-title { font-weight: 700; font-size: 15px; }
.confirm-what { margin-top: 2px; }
.confirm-effect { margin-top: 4px; color: var(--muted); }
.confirm-details { margin-top: 6px; color: var(--muted); }
.confirm-details ul { margin: 4px 0 0; padding-left: 18px; max-height: 20dvh; overflow-y: auto; }
.confirm-actions { display: flex; gap: 10px; padding: 10px 12px 12px; }
.confirm-actions button { flex: 1; min-height: 44px; font: inherit; font-size: 15px; font-weight: 600; border-radius: var(--radius); cursor: pointer; }
.confirm-yes { color: #fff; background: var(--acc); border: 1px solid var(--acc); }
.confirm-no { color: var(--fg); background: transparent; border: 1px solid var(--line); }
.confirm-no:hover { border-color: var(--off); color: var(--off); }
.confirm-actions button:disabled { opacity: .5; cursor: default; }
