/* «Тестирование», вкладка «Автоматизация» (welcome-testlab-auto.js): сводка «что включено», настройки, журнал, покрытие, тренды,
   баннеры «стало хуже» и окно проверки перед публикацией; здесь же предупреждение вкладки «Нагрузка» (своего css у неё нет).
   Цвета только из --ov-* (welcome-next.css), поэтому тёмная тема body.theme-dark работает сама. */
/* Сводка «что включено»: строка на каждую автоматическую проверку, кнопка справа */
#section-support-testlab .wtla-summary{padding:14px 20px}
#section-support-testlab .wtla-summary .wn-title{margin-bottom:2px}
#section-support-testlab .wtla-summary .wn-title small{font-size:12px;color:var(--ov-muted)}
#section-support-testlab .wtla-sum-row{display:flex;align-items:center;justify-content:space-between;gap:6px 14px;padding:9px 0;border-bottom:1px solid var(--ov-line)}
#section-support-testlab .wtla-sum-text{display:flex;align-items:baseline;gap:9px;min-width:0;margin:0;font-size:13px;line-height:1.45;color:var(--ov-text)}
#section-support-testlab .wtla-sum-text .c-dot{transform:translateY(-1px)}
#section-support-testlab .wtla-sum-text b{font-weight:650}
html body.product-support #section-support-testlab .wtla-sum-row .support-btn{flex:none;padding:5px 12px!important;min-height:0!important;font-size:12px!important}
#section-support-testlab .wtla-sum-foot{margin:10px 0 0;font-size:12px;line-height:1.5;color:var(--ov-muted)}
#section-support-testlab .wtla-summary .wtla-warn{margin-top:10px}
/* «Что даёт» и «когда включать» у каждой настройки, вводные строки подвкладок */
#section-support-testlab .wtla-help{margin:0;font-size:12.5px;line-height:1.5;color:var(--ov-muted)}
#section-support-testlab .wtla-help b{font-weight:650;color:var(--ov-text)}
#section-support-testlab .wtla-intro{margin:0 0 12px}
/* «Нагрузка»: предупреждение сверху */
#section-support-testlab .wtll-warn{margin:0 0 12px;font-size:13px;line-height:1.5;color:var(--ov-text)}
#section-support-testlab .wtla-panes{margin:0 0 12px;flex-wrap:wrap}
html body.product-support #section-support-testlab .wtla-panes button{white-space:nowrap}
#section-support-testlab .wtla-settings{display:grid;gap:14px}
#section-support-testlab .wtla-box{display:grid;gap:10px;scroll-margin-top:16px;transition:box-shadow .3s}
#section-support-testlab .wtla-box .wn-title{margin:0}
#section-support-testlab .wtla-box.is-target{box-shadow:0 0 0 2px color-mix(in srgb,var(--ov-accent) 55%,transparent),var(--sh-1)}
/* «Сохранить» внизу формы; после «Включить» из сводки подсказка с той же кнопкой появляется прямо в нужном блоке */
#section-support-testlab .wtla-save{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:10px 14px;border:1px solid var(--ov-line);border-radius:12px;background:var(--ov-surface)}
#section-support-testlab .wtla-save span{font-size:12px;color:var(--ov-muted)}
#section-support-testlab .wtla-tick{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}
html body.product-support #section-support-testlab .wtla-tick .support-btn{padding:5px 12px!important;min-height:0!important;font-size:12px!important}
html body.product-support #section-support-testlab .wtla-settings input:is([type=checkbox],[type=radio]){width:16px!important;height:16px!important;min-width:16px!important;min-height:0!important;flex:none!important;margin:0!important;padding:0!important}
#section-support-testlab .wtla-switch{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:650;color:var(--ov-text)}
#section-support-testlab .wtla-box .wtl-field>label{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--ov-text)}
#section-support-testlab .wtla-inline-num{flex-wrap:wrap}
html body.product-support #section-support-testlab .wtla-inline-num input[type=number]{width:84px!important;min-width:0!important}
#section-support-testlab .wtla-warn{margin:0;padding:8px 12px;border:1px solid color-mix(in srgb,var(--ov-warn) 45%,var(--ov-line));border-radius:10px;background:color-mix(in srgb,var(--ov-warn) 7%,var(--ov-surface));font-size:12.5px}
#section-support-testlab .wtla-gate-card{display:grid;gap:8px;padding:12px 14px;border:1px solid var(--ov-line);border-radius:12px;background:var(--wtl-soft)}
#section-support-testlab .wtla-gate-card .support-btn{justify-self:start}
#section-support-testlab .wtla-gate-top{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px}
#section-support-testlab .wtla-gate-card p,.wtla-dialog .wtla-gate-body p{margin:0}
/* Отчёт «что стало хуже»: и во вкладке, и в окне публикации */
.wtla-verdict{display:grid;gap:8px}
.wtla-verdict-head{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:0;font-size:13px}
.wtla-verdict-head span{color:var(--ov-muted);font-size:12.5px}
.wtla-reasons{margin:0;padding-left:18px;font-size:13px;font-weight:600;color:var(--ov-bad)}
.wtla-verdict h4{margin:6px 0 0;font-size:13px}
/* Уведомления о регрессиях */
.wtla-banner{display:grid;gap:8px;margin:0 0 16px;padding:12px 16px;border-top:3px solid color-mix(in srgb,var(--ov-bad) 70%,var(--ov-line));background:color-mix(in srgb,var(--ov-bad) 5%,var(--ov-surface))}
.wtla-alert{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px}
.wtla-alert+.wtla-alert{padding-top:8px;border-top:1px solid var(--ov-line)}
.wtla-alert-text{display:grid;gap:2px;min-width:0;flex:1 1 280px}
.wtla-alert-text b{font-size:13.5px;color:var(--ov-text);overflow-wrap:anywhere}
.wtla-alert-text span{font-size:12px;color:var(--ov-muted)}
.wtla-alert .wn-actions{display:flex;flex-wrap:wrap;gap:6px}
html body.product-support .wtla-alert .support-btn{padding:5px 12px!important;min-height:0!important;font-size:12px!important}
html body.product-support .wtla-alert .support-btn.wtl-danger{color:var(--ov-bad)!important}
#wtla-main-banner .wtla-banner{margin:0 0 14px}
/* Журнал и покрытие */
#section-support-testlab .wtla-sub{margin:0 0 8px;font-size:13px}
#section-support-testlab .wtla-log-row{grid-template-columns:120px 190px minmax(0,1fr) auto;padding:7px 6px;align-items:start}
#section-support-testlab .wtla-log-text{font-size:12.5px;line-height:1.45;overflow-wrap:anywhere}
#section-support-testlab .wtla-log-text small{color:var(--ov-muted)}
#section-support-testlab .wtla-kpis{margin-bottom:14px}
#section-support-testlab .wtla-kpis .c-value{font-size:24px}
#section-support-testlab .wtla-topic-row{grid-template-columns:minmax(0,1fr) 90px 110px;padding:7px 6px}
#section-support-testlab .wtla-q-row{grid-template-columns:minmax(0,1.6fr) auto minmax(0,.8fr) auto;padding:8px 6px}
#section-support-testlab .wtla-q-row .wtl-cell-main b{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#section-support-testlab .wtla-cols{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
#section-support-testlab .wtla-cols h4{margin:0 0 6px;font-size:13px}
#section-support-testlab .wtla-list{margin:0 0 10px;padding-left:18px;font-size:12.5px;line-height:1.5;max-height:260px;overflow:auto}
#section-support-testlab .wtla-list a{color:var(--ov-accent);font-weight:600}
/* Тренды: два графика рядом, одна ось у каждого */
#section-support-testlab .wtla-trends{margin-top:16px}
#section-support-testlab .wtla-charts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
#section-support-testlab .wtla-chart{margin:0;min-width:0}
#section-support-testlab .wtla-chart figcaption{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 10px;margin-bottom:4px;font-size:12.5px}
#section-support-testlab .wtla-chart figcaption span{color:var(--ov-muted)}
#section-support-testlab .wtla-chart svg{display:block;width:100%;height:auto;overflow:visible}
#section-support-testlab .wtla-line{fill:none;stroke:var(--ov-accent);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
#section-support-testlab .wtla-dot{fill:var(--ov-accent);stroke:var(--ov-surface);stroke-width:2}
#section-support-testlab .wtla-dot.is-draft{fill:var(--ov-surface);stroke:var(--ov-accent)}
#section-support-testlab .wtla-hit{fill:transparent;cursor:default}
#section-support-testlab .wtla-pt:hover .wtla-dot{r:5}
#section-support-testlab .wtla-grid{stroke:var(--ov-line);stroke-width:1}
#section-support-testlab .wtla-axis{fill:var(--ov-muted);font-size:10.5px;font-variant-numeric:tabular-nums}
#section-support-testlab .wtla-table-view{margin-top:10px;font-size:12.5px}
#section-support-testlab .wtla-table-view summary{cursor:pointer;font-weight:600;color:var(--ov-accent)}
/* Окно проверки перед публикацией: открывается из «Настроек бота», вне раздела «Тестирование» */
.wtla-dialog{width:min(720px,calc(100vw - 32px));max-width:none;max-height:calc(100dvh - 48px);padding:0;border:1px solid var(--ov-line);border-radius:16px;background:var(--ov-surface);color:var(--ov-text);box-shadow:var(--sh-2);overflow:hidden}
.wtla-dialog[open]{display:flex;flex-direction:column}
.wtla-dialog::backdrop{background:rgba(10,18,26,.45)}
.wtla-dialog-head{padding:14px 18px;border-bottom:1px solid var(--ov-line)}
.wtla-dialog-head h2{margin:0;font-size:17px!important;font-weight:700;color:var(--ov-text)!important;-webkit-text-fill-color:currentColor!important}
.wtla-dialog-body{display:grid;gap:12px;align-content:start;flex:1;min-height:0;padding:16px 18px;overflow:auto;font-size:13px;line-height:1.5}
.wtla-dialog .wtl-muted{margin:0;font-size:12px;color:var(--ov-muted)}
.wtla-dialog .wtla-gate-body{display:grid;gap:8px}
.wtla-dialog .wtl-form-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
html body.product-support .wtla-dialog .support-btn{padding:7px 14px!important;min-height:0!important;font-size:12.5px!important}
html body.product-support .wtla-dialog .support-btn.wtl-danger{color:var(--ov-bad)!important}
.wtla-dialog .wtl-table-wrap{max-height:240px;overflow:auto}
.wtla-dialog .wtl-table{width:100%;border-collapse:collapse;font-size:12.5px}
html body.product-support .wtla-dialog .wtl-table :is(th,td){padding:6px 8px!important;border:0!important;border-bottom:1px solid var(--ov-line)!important;background:none!important;text-align:left!important;vertical-align:top!important;color:var(--ov-text)!important}
html body.product-support .wtla-dialog .wtl-table th{font-size:11px;text-transform:uppercase;letter-spacing:.4px;color:var(--ov-muted)!important}
.wtla-dialog .wtl-fail{display:block;color:var(--ov-bad)}
/* Телефон 390 px: всё в столбик, строки карточками, окно на весь экран */
@media (max-width:760px){
 #section-support-testlab .wtla-panes{width:100%;overflow-x:auto;flex-wrap:nowrap}
 #section-support-testlab :is(.wtla-charts,.wtla-cols){grid-template-columns:minmax(0,1fr)}
 #section-support-testlab :is(.wtla-log-row,.wtla-topic-row,.wtla-q-row){grid-template-columns:minmax(0,1fr) auto;gap:4px 10px}
 #section-support-testlab :is(.wtla-log-row,.wtla-q-row)>:first-child,#section-support-testlab .wtla-log-text{grid-column:1 / -1}
 #section-support-testlab .wtla-topic-row>:first-child{grid-column:1 / -1}
 .wtla-alert .wn-actions{width:100%}
 #section-support-testlab .wtla-sum-row{flex-wrap:wrap}
 #section-support-testlab .wtla-summary{padding:12px 14px}
 .wtla-dialog{width:100vw;height:100dvh;max-height:100dvh;margin:0;border-radius:0;border:0}
 .wtla-dialog-body{padding:12px}
}
