/* Редизайн раздела «Обработка повторных вопросов» по макету. Аддитивный слой поверх
   agent-console-redesign.css (подключать ПОСЛЕ него). Скоуп: .agent-tab3 .ag-rq2…
   Хуки data-rq-* сохранены — сохранение настроек не меняется. */

.agent-tab3 .ag-rq2{position:relative;display:flex;flex-direction:column;gap:20px}

/* декоративная иллюстрация чат-бабблов справа сверху (в зоне шапки) */
.agent-tab3 .ag-rq2-illus{position:absolute;top:-78px;right:-4px;width:200px;height:130px;pointer-events:none;opacity:.9}
.agent-tab3 .ag-rq2-illus svg{width:100%;height:100%}

/* карточка-тумблер */
.agent-tab3 .ag-rq2-toggle{display:flex;align-items:flex-start;gap:14px;padding:18px 20px;
  background:var(--c-surface);border:1px solid var(--c-line);border-radius:var(--c-r-card);box-shadow:var(--c-shadow-sm)}
.agent-tab3 .ag-rq2-toggle-txt b{display:block;font-size:15.5px;font-weight:800;color:var(--c-ink)}
.agent-tab3 .ag-rq2-toggle-txt span{display:block;margin-top:4px;font-size:13.5px;line-height:1.5;color:var(--c-ink-soft)}

/* выбор режима: Шаблон / Ответить ИИ и продолжить воронку */
.agent-tab3 .ag-rq2-mode{display:flex;flex-direction:column;gap:12px}
.agent-tab3 .ag-rq2-mode-head{font-size:15px;font-weight:700;color:var(--c-ink)}
.agent-tab3 .ag-rq2-mode-opt{display:flex;align-items:flex-start;gap:13px;padding:15px 17px;cursor:pointer;
  background:var(--c-surface);border:1.5px solid var(--c-line);border-radius:var(--c-r-card);box-shadow:var(--c-shadow-sm);
  transition:border-color .15s var(--c-ease),background .15s var(--c-ease),box-shadow .15s var(--c-ease)}
.agent-tab3 .ag-rq2-mode-opt input{position:absolute;opacity:0;width:0;height:0;pointer-events:none}
.agent-tab3 .ag-rq2-mode-opt:hover{border-color:var(--c-accent-line)}
.agent-tab3 .ag-rq2-mode-opt.is-on{border-color:var(--c-accent);background:var(--c-accent-soft)}
.agent-tab3 .ag-rq2-mode-dot{flex:none;width:20px;height:20px;margin-top:2px;border-radius:50%;
  border:2px solid #b9c6db;background:#fff;transition:border-color .15s var(--c-ease)}
.agent-tab3 .ag-rq2-mode-opt.is-on .ag-rq2-mode-dot{border-color:var(--c-accent);
  box-shadow:inset 0 0 0 4px var(--c-accent)}
.agent-tab3 .ag-rq2-mode-ic{flex:none;width:38px;height:38px;border-radius:11px;display:grid;place-items:center;
  background:#eaf2fd;color:#2f6fed}
.agent-tab3 .ag-rq2-mode-ic svg{width:20px;height:20px}
.agent-tab3 .ag-rq2-mode-txt b{display:block;font-size:14.5px;font-weight:800;color:var(--c-ink)}
.agent-tab3 .ag-rq2-mode-txt small{display:block;margin-top:3px;font-size:13px;line-height:1.5;color:var(--c-ink-soft)}

/* карточка чувствительности + градиентный ползунок */
.agent-tab3 .ag-rq2-simcard{padding:18px 20px;background:var(--c-surface);border:1px solid var(--c-line);
  border-radius:var(--c-r-card);box-shadow:var(--c-shadow-sm)}
.agent-tab3 .ag-rq2-simhead{font-size:15px;font-weight:700;color:var(--c-ink);margin-bottom:14px}
.agent-tab3 .ag-rq2-simhead b{color:var(--c-accent);font-weight:800;margin-left:4px}
.agent-tab3 .ag-rq2-range{-webkit-appearance:none;appearance:none;width:100%;height:8px;border-radius:999px;
  background:linear-gradient(90deg,#7c5cff,#2f6fed) 0/var(--rqpct,72%) 100% no-repeat,#e6eef8;cursor:pointer;outline:none}
.agent-tab3 .ag-rq2-range::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;border-radius:50%;
  background:#2f6fed;border:4px solid #fff;box-shadow:0 3px 9px rgba(31,95,214,.55);cursor:pointer;margin-top:-1px}
.agent-tab3 .ag-rq2-range::-moz-range-thumb{width:18px;height:18px;border-radius:50%;background:#2f6fed;
  border:4px solid #fff;box-shadow:0 3px 9px rgba(31,95,214,.55);cursor:pointer}
.agent-tab3 .ag-rq2-simlabels{display:flex;justify-content:space-between;gap:16px;margin-top:11px;font-size:12.5px;color:var(--c-ink-faint)}
.agent-tab3 .ag-rq2-simlabels span:last-child{text-align:right}

/* строка «жёстче с повтора №» */
.agent-tab3 .ag-rq2-escrow{display:flex;align-items:center;flex-wrap:wrap;gap:14px}
.agent-tab3 .ag-rq2-esc-lbl{font-size:15px;font-weight:700;color:var(--c-ink)}
.agent-tab3 .ag-rq2-numbox{position:relative;display:inline-flex;align-items:center}
.agent-tab3 .ag-rq2-numbox input{width:84px;height:46px;padding:0 34px 0 16px;border:1.5px solid var(--c-line);
  border-radius:12px;background:var(--c-surface-2);font:inherit;font-size:16px;font-weight:700;color:var(--c-ink)}
.agent-tab3 .ag-rq2-numbox input:focus{outline:none;border-color:var(--c-accent-line);box-shadow:0 0 0 3px var(--c-accent-soft);background:var(--c-surface)}
.agent-tab3 .ag-rq2-pencil{position:absolute;right:11px;width:15px;height:15px;color:var(--c-ink-faint);pointer-events:none}
.agent-tab3 .ag-rq2-info{display:inline-flex;align-items:center;gap:9px;padding:9px 14px;border-radius:11px;
  background:var(--c-surface-2);border:1px solid var(--c-line-soft);font-size:13px;color:var(--c-ink-soft)}
.agent-tab3 .ag-rq2-info svg{width:17px;height:17px;flex:none;color:var(--c-accent)}

/* блоки ответов (мягко / жёстче) */
.agent-tab3 .ag-rq2-answer{display:flex;flex-direction:column;gap:10px}
.agent-tab3 .ag-rq2-ans-label{font-size:15px;font-weight:800;color:var(--c-ink)}
.agent-tab3 .ag-rq2-ans-label em{font-style:normal;font-weight:600;color:var(--c-ink-faint)}
.agent-tab3 .ag-rq2-ans-row{display:flex;align-items:stretch;gap:14px}
.agent-tab3 .ag-rq2-ans-ic{width:46px;height:46px;flex:none;border-radius:13px;display:grid;place-items:center}
.agent-tab3 .ag-rq2-ans-ic svg{width:22px;height:22px}
.agent-tab3 .ag-rq2-answer.soft .ag-rq2-ans-ic{background:#eaf2fd;color:#2f6fed}
.agent-tab3 .ag-rq2-answer.firm .ag-rq2-ans-ic{background:#fdeceb;color:#e5484d}
.agent-tab3 .ag-rq2-ta{position:relative;flex:1;min-width:0}
.agent-tab3 .ag-rq2-ta textarea{width:100%;min-height:92px;padding:13px 15px 26px;border:1.5px solid var(--c-line);
  border-left-width:4px;border-radius:13px;background:var(--c-surface-2);font:inherit;font-size:14px;line-height:1.5;
  color:var(--c-ink);resize:vertical}
.agent-tab3 .ag-rq2-answer.soft .ag-rq2-ta textarea{border-left-color:#2f6fed}
.agent-tab3 .ag-rq2-answer.firm .ag-rq2-ta textarea{border-left-color:#e5484d}
.agent-tab3 .ag-rq2-ta textarea::placeholder{color:#a8b4c8}
.agent-tab3 .ag-rq2-ta textarea:focus{outline:none;background:var(--c-surface);box-shadow:0 0 0 3px var(--c-accent-soft)}
.agent-tab3 .ag-rq2-answer.firm .ag-rq2-ta textarea:focus{box-shadow:0 0 0 3px #fdeceb}
.agent-tab3 .ag-rq2-count{position:absolute;right:13px;bottom:8px;font-size:12px;color:var(--c-ink-faint);pointer-events:none}
.agent-tab3 .ag-rq2-gen{flex:none;width:150px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  border:1.5px solid var(--c-accent-line);border-radius:13px;background:var(--c-accent-soft);color:var(--c-accent);
  font:inherit;font-weight:700;font-size:13.5px;line-height:1.25;text-align:center;cursor:pointer;
  transition:background .15s var(--c-ease),border-color .15s var(--c-ease),transform .12s var(--c-ease)}
.agent-tab3 .ag-rq2-gen svg{width:20px;height:20px}
.agent-tab3 .ag-rq2-gen span{display:block}
.agent-tab3 .ag-rq2-gen:hover{background:#dbeafe;border-color:var(--c-accent);transform:translateY(-1px)}
.agent-tab3 .ag-rq2-gen.is-busy{opacity:.6;pointer-events:none}
.agent-tab3 .ag-rq2-gen:disabled{opacity:.6;cursor:default}

/* ── нижняя панель действий по макету: Сохранить (синяя) + Остановить бота (красная) ── */
.agent-tab3 .ag-actions .ag-btn-draft{display:inline-flex;align-items:center;gap:9px;
  background:linear-gradient(180deg,#2f6fed,#1f5fd6)!important;border-color:#1f5fd6!important;color:#fff!important;
  box-shadow:0 10px 20px -10px rgba(31,95,214,.6)}
.agent-tab3 .ag-actions .ag-btn-draft:hover{filter:brightness(1.05);background:linear-gradient(180deg,#2f6fed,#1f5fd6)!important}
.agent-tab3 .ag-actions .ag-btn-draft::before{content:"";width:18px;height:18px;flex:none;
  background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z'/%3E%3Cpolyline points='17 21 17 13 7 13 7 21'/%3E%3Cpolyline points='7 3 7 8 15 8'/%3E%3C/svg%3E")}
.agent-tab3 .ag-actions .ag-btn-pause{display:inline-flex;align-items:center;gap:9px;
  background:#fff!important;border-color:#f3c6c4!important;color:#e5484d!important}
.agent-tab3 .ag-actions .ag-btn-pause:hover{background:#fdeceb!important;border-color:#e5484d!important}
.agent-tab3 .ag-actions .ag-btn-pause::before{content:"";width:18px;height:18px;flex:none;
  background:no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e5484d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18.4 6.6a9 9 0 1 1-12.8 0'/%3E%3Cline x1='12' y1='2' x2='12' y2='12'/%3E%3C/svg%3E")}

@media(max-width:760px){
  .agent-tab3 .ag-rq2-illus{display:none}
  .agent-tab3 .ag-rq2-ans-row{flex-wrap:wrap}
  .agent-tab3 .ag-rq2-gen{width:100%;flex-direction:row}
}
