/* Пилюля вопросов, карточка подтверждений 1–4, карточка Субагента и ступенчатый ползунок автономии */
.lh-agent-composer-box.is-question-active {
  max-height: 360px; padding: 14px 14px 10px 16px; border-radius: 22px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}
.lh-agent-composer-box.is-yesno-mode .lh-agent-input-row {
  max-height: 0; opacity: 0; pointer-events: none; overflow: hidden;
}
.lh-agent-pill-question-zone {
  max-height: 0; opacity: 0; overflow: hidden; transform: translateY(6px); pointer-events: none;
  display: flex; flex-direction: column; gap: 10px;
  transition: max-height 300ms var(--ease-apple), opacity 220ms ease, transform 220ms var(--ease-apple);
}
.lh-agent-composer-box.is-question-active .lh-agent-pill-question-zone {
  max-height: 250px; opacity: 1; transform: translateY(0); pointer-events: auto;
  padding-bottom: 8px; border-bottom: 1px solid var(--divider); margin-bottom: 6px;
}
.lh-agent-composer-box.is-yesno-mode .lh-agent-pill-question-zone { border-bottom: 0; margin-bottom: 0; padding-bottom: 2px; }
.lh-agent-q-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lh-agent-q-title { font-size: 14px; font-weight: 600; color: var(--text); line-height: 19px; }
.lh-agent-q-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; max-height: 165px; overflow-y: auto; padding: 2px; }
.lh-agent-q-card {
  border: 0; background: var(--field); border-radius: 12px; padding: 10px 13px; text-align: left;
  font-size: 13.5px; font-weight: 500; color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  transition: background 120ms ease, color 120ms ease;
}
.lh-agent-q-card:hover { background: var(--primary-soft); color: var(--primary); }
.lh-agent-q-card.is-yes-card { background: rgba(52, 199, 89, 0.14); color: #1b6b2b; justify-content: center; }
.lh-agent-q-card.is-no-card { background: rgba(255, 59, 48, 0.12); color: var(--semantic-err); justify-content: center; }

@keyframes lhConfirmCardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.lh-agent-confirm-card, .lh-subagent-card {
  background: var(--canvas); border: 0; border-radius: 16px; padding: 14px 16px; margin: 4px 0;
  display: flex; flex-direction: column; gap: 10px; animation: lhConfirmCardIn 180ms var(--ease-apple);
}
.lh-subagent-card { background: rgba(0, 122, 255, 0.06); }
.lh-subagent-tools-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.lh-subagent-tool-chip { font-size: 11.5px; font-weight: 500; background: var(--surface); color: var(--text); padding: 2px 9px; border-radius: 8px; }
.lh-agent-confirm-card.is-approved { background: rgba(52, 199, 89, 0.08); }
.lh-agent-confirm-card.is-rejected { background: rgba(255, 59, 48, 0.08); }
.lh-agent-confirm-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.lh-agent-confirm-title { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); }
.lh-risk-pill { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; }
.lh-risk-pill.is-risk-1 { background: rgba(0, 122, 255, 0.12); color: #007aff; }
.lh-risk-pill.is-risk-2 { background: rgba(52, 199, 89, 0.14); color: #2b8a3e; }
.lh-risk-pill.is-risk-3 { background: rgba(255, 149, 0, 0.16); color: #d97706; }
.lh-risk-pill.is-risk-4 { background: rgba(255, 59, 48, 0.14); color: #ff3b30; }
.lh-agent-confirm-details { font-size: 13px; color: var(--secondary-text); background: var(--surface); padding: 9px 12px; border-radius: 10px; word-break: break-word; }
.lh-agent-confirm-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }

.lh-autonomy-box { --auto-color: #8e8e93; --auto-pct: 0%; display: flex; flex-direction: column; gap: 14px; padding: 2px 0; }
.lh-autonomy-box[data-level="0"] { --auto-color: #8e8e93; --auto-pct: 0%; }
.lh-autonomy-box[data-level="1"] { --auto-color: #007aff; --auto-pct: 25%; }
.lh-autonomy-box[data-level="2"] { --auto-color: #34c759; --auto-pct: 50%; }
.lh-autonomy-box[data-level="3"] { --auto-color: #ff9500; --auto-pct: 75%; }
.lh-autonomy-box[data-level="4"] { --auto-color: #ff3b30; --auto-pct: 100%; }
.lh-autonomy-track-wrap { position: relative; padding: 14px 14px 6px; user-select: none; touch-action: none; cursor: pointer; }
.lh-autonomy-rail { position: relative; height: 10px; background: var(--field); border-radius: 999px; }
.lh-autonomy-fill { height: 100%; width: var(--auto-pct); background-color: var(--auto-color); border-radius: 999px; transition: width 220ms var(--ease-apple), background-color 240ms ease; }
.lh-autonomy-ticks { position: absolute; inset: 0; display: flex; align-items: center; justify-content: space-between; padding: 0 3px; pointer-events: none; }
.lh-autonomy-tick { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.85); }
.lh-autonomy-thumb { position: absolute; top: 50%; left: var(--auto-pct); transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: #ffffff; border: 3px solid var(--auto-color); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; color: var(--text); cursor: grab; transition: left 220ms var(--ease-apple), border-color 240ms ease; }
.lh-autonomy-steps-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; padding-top: 2px; }
.lh-autonomy-step-lbl { border: 0; background: transparent; padding: 6px 4px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; color: var(--secondary-text); }
.lh-autonomy-step-lbl.is-current { color: var(--text); font-weight: 600; }
.lh-autonomy-step-title { font-size: 12.5px; line-height: 16px; }
.lh-autonomy-step-sub { font-size: 11px; color: var(--secondary-text); line-height: 14px; }
.lh-autonomy-warn-collapse { display: grid; grid-template-rows: 0fr; opacity: 0; overflow: hidden; transition: grid-template-rows 260ms var(--ease-apple), opacity 220ms ease; }
.lh-autonomy-warn-collapse.is-open { grid-template-rows: 1fr; opacity: 1; }
.lh-autonomy-warn-inner { min-height: 0; overflow: hidden; }
.lh-autonomy-warn-card { margin-top: 4px; padding: 12px 15px; border-radius: 12px; background: var(--semantic-err-bg); color: var(--semantic-err); font-size: 13px; line-height: 18px; display: flex; flex-direction: column; gap: 4px; }
