#calls .t2-config>summary,#calls #t2STT>summary{cursor:pointer;padding:8px 0;color:#176db6;min-height:40px}
#calls #t2Settings h3{font-size:17px;font-weight:500}
#calls .t2-filters{display:grid;grid-template-columns:minmax(160px,2fr) repeat(5,minmax(110px,1fr));gap:8px;margin-bottom:12px}
#calls .t2-filters label,#t2STTForm label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#56748b;min-width:0}
#calls .t2-filters input,#calls .t2-filters select,#t2STTForm input,#t2STTForm select{min-width:0;width:100%;min-height:36px;border:1px solid #d8e6f0;border-radius:5px;padding:6px 8px;background:white}
#t2STTForm{display:grid;gap:12px;max-width:540px}
#t2STTForm input[type=checkbox]{width:20px;min-height:20px}
#calls [hidden],#t2STTForm [hidden],#t2TranscriptDialog [hidden]{display:none!important}
#calls .t2-table-wrap,#dealCalls .t2-table-wrap{min-width:0;max-width:100%;overflow:auto}
#calls .t2-table,#dealCalls .t2-table{min-width:0!important;width:100%;font-size:14px;border-collapse:collapse}
#calls .t2-table th,#calls .t2-table td,#dealCalls .t2-table th,#dealCalls .t2-table td{padding:8px 7px;vertical-align:middle;overflow-wrap:anywhere;line-height:1.4}
#calls .t2-table th,#dealCalls .t2-table th{font-size:13px;font-weight:400;color:#637d90}
#calls .t2-table b,#dealCalls .t2-table b{font-weight:500}
#calls .t2-table td:first-child,#dealCalls .t2-table td:first-child{font-variant-numeric:tabular-nums;white-space:nowrap}
#calls .t2-table td:nth-child(2)>a,#dealCalls .t2-table td:nth-child(2)>a{display:block;margin-top:2px;color:#637d90}
#calls .t2-call-actions,#dealCalls .t2-call-actions{display:flex;gap:5px;flex-wrap:wrap;align-items:center}
#calls .t2-text-button,#dealCalls .t2-text-button,#calls .t2-table .btn,#dealCalls .t2-table .btn{border:1px solid #d4e5f1;background:#f5faff;border-radius:5px;color:#176db6;min-height:32px;padding:5px 9px;font-size:13px;text-align:left;max-width:100%}
#calls .t2-direction.incoming,#dealCalls .t2-direction.incoming{color:#14835f}
#calls .t2-direction.missed,#dealCalls .t2-direction.missed{color:#b42318}
#calls .t2-direction.outgoing,#dealCalls .t2-direction.outgoing{color:#1973b9}
#calls .t2-pager{display:flex;flex-wrap:wrap;gap:8px;align-items:center;margin-top:12px}
#calls .t2-pager span{margin-right:auto}
#calls .t2-empty{padding:16px;color:#587186}
#calls .t2-player,#dealCalls .t2-player{max-width:100%;width:496px;flex:0 0 100%;display:block;margin-top:4px}
#calls .t2-call-actions:has(.t2-player),#dealCalls .t2-call-actions:has(.t2-player){width:496px;max-width:100%}
#calls .t2-audio-note,#dealCalls .t2-audio-note{font-size:13px;max-width:230px;margin-top:4px;color:#526c81;overflow-wrap:anywhere}
#t2TranscriptDialog{box-sizing:border-box;width:min(650px,calc(100vw - 24px));max-height:90vh;max-height:90dvh;border:1px solid #d3e4f0;border-radius:8px;color:#21465e;background:white;padding:14px 16px;font-size:14px;line-height:1.5;overflow:auto}
#t2TranscriptDialog::backdrop{background:#20394b66}
#t2TranscriptDialog h2,#t2TranscriptDialog h3,#t2TranscriptDialog p{margin:0}
#t2TranscriptDialog h2{font-size:17px;font-weight:500;line-height:1.4;overflow-wrap:anywhere}
#t2TranscriptDialog h3{font-size:14px;font-weight:500}
#t2TranscriptDialog .btn{border-radius:5px;min-height:34px;padding:6px 10px;font-size:14px}
.t2-dialog-head{display:flex;justify-content:space-between;gap:12px;align-items:flex-start}
.t2-dialog-head>div{min-width:0}
.t2-dialog-head [data-t2-close]{flex:none}
#t2TranscriptDialog .t2-call-meta{font-size:12px;color:#637d90;margin-top:3px;overflow-wrap:anywhere}
#t2TranscriptDialog [data-t2-status]{margin-top:10px;color:#56748b;overflow-wrap:anywhere}
.t2-dialog-audio{margin:10px 0}
.t2-dialog-audio .t2-player{display:block;width:100%;max-width:100%;height:40px}
.t2-dialog-audio .t2-audio-note{font-size:13px;margin-top:4px;overflow-wrap:anywhere}
.t2-call-summary{background:#f3f8fc;border:1px solid #d9e7f1;border-radius:5px;padding:10px 12px;margin:12px 0}
#t2TranscriptDialog .t2-call-summary p{margin-top:5px;line-height:1.5;overflow-wrap:anywhere}
.t2-dialogue-head{display:flex;justify-content:space-between;gap:8px;align-items:center;margin:12px 0 6px}
.t2-dialogue-head>span{font-size:12px}
.t2-transcript{display:flex;flex-direction:column;gap:8px}
.t2-turn{width:fit-content;max-width:83%;border:0;background:transparent;padding:0;text-align:left}
.t2-speaker-2,.t2-speaker-4{align-self:flex-end;text-align:right}
.t2-turn-head{display:flex;gap:7px;align-items:center;min-height:28px}
.t2-speaker-2 .t2-turn-head,.t2-speaker-4 .t2-turn-head{justify-content:flex-end}
.t2-turn-role{font-size:12px;color:#637d90;font-weight:500}
.t2-turn-role.t2-role-employee{color:#1973b9}
#t2TranscriptDialog .t2-turn p{padding:0;border:0;line-height:1.5;overflow-wrap:anywhere}
.t2-turn-time{border:0;background:transparent;padding:2px 0;color:#7e95a8;font:inherit;font-size:12px;font-variant-numeric:tabular-nums;min-height:28px;cursor:pointer;text-align:inherit}
.t2-turn-time:hover{color:#176db6;text-decoration:underline}
.t2-turn-time:focus-visible{outline:2px solid #1973b9;outline-offset:2px}
.t2-speaker-form{margin-top:14px;padding-top:10px;border-top:1px solid #d9e7f1;display:flex;flex-wrap:wrap;gap:7px;align-items:center}
#t2TranscriptDialog [data-t2-speaker-roles]{position:sticky;bottom:-14px;background:white;padding-bottom:10px;z-index:1}
#t2TranscriptDialog [data-t2-speaker-roles]:empty{display:none}
.t2-speaker-form label{white-space:nowrap;font-size:13px}
.t2-speaker-form select,.t2-analysis-action select{border:1px solid #d8e6f0;background:white;border-radius:5px;padding:6px 8px;min-height:34px;font:inherit;min-width:0;max-width:100%}
.t2-speaker-feedback{font-size:12px;overflow-wrap:anywhere}
.t2-speaker-feedback.t2-saved{color:#14835f}
.t2-speaker-feedback[role=alert],#t2TranscriptDialog [role=alert]{color:#b42318}
.t2-original-text{margin-top:10px;overflow-wrap:anywhere}
.t2-original-text summary,#t2TranscriptDialog [data-t2-text-action]>details>summary{cursor:pointer;padding:6px 0;color:#637d90;font-size:13px}
#t2TranscriptDialog .t2-original-text p{padding:4px 0}
.t2-original-text small{color:#64748b;margin-right:8px;font-variant-numeric:tabular-nums}
.t2-analysis-action{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px;margin-top:8px}
.t2-analysis-action label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:#56748b}
#t2TranscriptDialog [data-t2-text-action]{margin-top:8px}
.t2-attach-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #e5edf3}
.t2-attach-row small{display:block}
@media(min-width:701px){
 #calls .t2-table td:nth-child(4),#calls .t2-table td:nth-child(5),#calls .t2-table th:nth-child(5),#dealCalls .t2-table td:nth-child(4),#dealCalls .t2-table td:nth-child(5),#dealCalls .t2-table th:nth-child(5){white-space:nowrap;overflow-wrap:normal}
}
@media(max-width:1250px){#calls .t2-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:700px){
 #calls .t2-filters{grid-template-columns:repeat(2,minmax(0,1fr))}
 #calls .t2-filters label:first-child{grid-column:1/-1}
 #calls .t2-filters input,#calls .t2-filters select{min-height:44px}
 #calls .t2-table thead,#dealCalls .t2-table thead{display:none}
 #calls .t2-table,#calls .t2-table tbody,#calls .t2-table td,#dealCalls .t2-table,#dealCalls .t2-table tbody,#dealCalls .t2-table td{display:block;width:100%;box-sizing:border-box}
 #calls .t2-table tr,#dealCalls .t2-table tr{display:grid;width:100%;box-sizing:border-box;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 10px;border-bottom:1px solid #d8e6f0;padding:10px 0}
 #calls .t2-table td,#dealCalls .t2-table td{border:0;padding:2px 0;white-space:normal}
 #calls .t2-table td:nth-child(1),#calls .t2-table td:nth-child(2),#calls .t2-table td:last-child,#dealCalls .t2-table td:nth-child(1),#dealCalls .t2-table td:nth-child(2),#dealCalls .t2-table td:last-child{grid-column:1/-1}
 #calls .t2-table td:nth-child(1),#dealCalls .t2-table td:nth-child(1){font-size:12px;color:#7690a2}
 #calls .t2-table td:nth-child(3)::before,#dealCalls .t2-table td:nth-child(3)::before{content:'Сотрудник: ';font-size:12px;color:#7590a4}
 #calls .t2-table td:nth-child(5),#dealCalls .t2-table td:nth-child(5){font-size:13px;color:#637d90}
 #calls .t2-table .btn,#calls .t2-text-button,#dealCalls .t2-table .btn,#dealCalls .t2-text-button{min-height:44px;padding:8px 12px}
 #calls .t2-call-actions:has(.t2-player),#dealCalls .t2-call-actions:has(.t2-player){width:100%;min-width:0}
 #calls .t2-player,#dealCalls .t2-player{width:100%;min-width:0}
 #t2TranscriptDialog{width:calc(100vw - 16px);padding:12px;max-height:94vh;max-height:94dvh}
 #t2TranscriptDialog [data-t2-speaker-roles]{bottom:-12px}
 #t2TranscriptDialog .btn,.t2-speaker-form select,.t2-analysis-action select{min-height:44px}
 .t2-turn{max-width:92%}
 .t2-turn-time{min-height:44px}
 .t2-speaker-form label{width:100%}
 .t2-speaker-form select{flex:1}
 .t2-speaker-feedback{width:100%}
 .t2-analysis-action .btn{max-width:100%}
}

/* Call controls keep the same columns; status and audio occupy their own lines. */
@media(min-width:701px){
 #calls .t2-table,#dealCalls .t2-table{min-width:1080px!important}
 #calls .t2-recording-cell,#dealCalls .t2-recording-cell{width:510px}
}
#calls .t2-call-media,#dealCalls .t2-call-media{width:496px;max-width:100%;min-width:272px}
#calls .t2-call-actions,#dealCalls .t2-call-actions{display:grid;grid-template-columns:88px 72px 96px;gap:8px;align-items:center;width:272px;max-width:100%}
#calls .t2-call-actions .btn,#calls .t2-call-actions .t2-text-button,#dealCalls .t2-call-actions .btn,#dealCalls .t2-call-actions .t2-text-button{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:100%;min-height:36px;margin:0;padding:6px 8px;border-radius:7px;white-space:nowrap;text-align:center}
#calls .t2-call-actions button:disabled,#dealCalls .t2-call-actions button:disabled{background:#f7f9fc;border-color:#e3ebf2;color:#8897a6;opacity:1;cursor:default}
#calls .t2-call-actions button:focus-visible,#dealCalls .t2-call-actions button:focus-visible{outline:2px solid #0099f4;outline-offset:2px}
#calls .t2-recording-status,#dealCalls .t2-recording-status{margin:6px 0 0;font-size:12px;line-height:1.4;color:#637d90;overflow-wrap:anywhere}
#calls .t2-recording-status-error,#dealCalls .t2-recording-status-error{color:#b42318}
#calls .t2-call-media .t2-audio-note,#dealCalls .t2-call-media .t2-audio-note{box-sizing:border-box;max-width:100%;width:100%;margin:8px 0 0;line-height:1.45}
#calls .t2-call-media .t2-audio-note[role=alert],#dealCalls .t2-call-media .t2-audio-note[role=alert]{padding:8px 10px;background:#fff4f2;border:1px solid #f5d5d0;border-radius:7px;color:#a53529}
#calls .t2-call-media .t2-player,#dealCalls .t2-call-media .t2-player{margin-top:10px;width:496px;max-width:100%;height:44px}
/* Notes use the space to the right; playback retains the full media width. */
#calls .t2-call-top,#dealCalls .t2-call-top{display:grid;grid-template-columns:272px minmax(0,1fr);align-items:start;gap:12px}
#calls .t2-call-actions .t2-task-created,#dealCalls .t2-call-actions .t2-task-created{background:#e4f6e9;border-color:#88c99c;color:#176338;font-weight:600}
#calls .t2-call-actions .t2-task-created:hover,#dealCalls .t2-call-actions .t2-task-created:hover{background:#d4efdc;border-color:#53a972}
#calls .t2-call-comment,#dealCalls .t2-call-comment{min-width:0}
#calls .t2-call-comment textarea,#dealCalls .t2-call-comment textarea{box-sizing:border-box;display:block;width:100%;min-width:0;height:36px;min-height:36px;max-height:140px;resize:vertical;border:1px solid #cddfea;border-radius:7px;padding:8px 9px;background:#fff;color:#21465e;font:inherit;font-size:13px;line-height:18px;transition:border-color .15s}
#calls .t2-call-comment textarea::placeholder,#dealCalls .t2-call-comment textarea::placeholder{color:#75899b;opacity:1}
#calls .t2-call-comment:focus-within textarea,#dealCalls .t2-call-comment:focus-within textarea{border-color:#0099f4;outline:2px solid #0099f433;outline-offset:1px}
#calls .t2-comment-filled textarea,#dealCalls .t2-comment-filled textarea{height:58px}
#calls .t2-call-comment textarea:disabled,#dealCalls .t2-call-comment textarea:disabled{opacity:1;background:#f7f9fc;color:#526c81;resize:none}
#calls .t2-comment-footer,#dealCalls .t2-comment-footer{display:flex;flex-wrap:wrap;align-items:center;gap:5px 8px;margin-top:4px}
#calls .t2-comment-footer:has(:only-child:empty),#dealCalls .t2-comment-footer:has(:only-child:empty){display:none}
#calls .t2-comment-footer [hidden],#dealCalls .t2-comment-footer [hidden]{display:none!important}
#calls .t2-comment-footer [data-t2-comment-status],#dealCalls .t2-comment-footer [data-t2-comment-status]{flex:1;min-width:55px;font-size:11px;line-height:1.35;color:#637d90;overflow-wrap:anywhere}
#calls .t2-comment-footer .t2-comment-error,#dealCalls .t2-comment-footer .t2-comment-error{flex-basis:100%;color:#b42318}
#calls .t2-comment-footer .t2-comment-saved,#dealCalls .t2-comment-footer .t2-comment-saved{color:#176338}
#calls .t2-comment-footer .btn,#dealCalls .t2-comment-footer .btn{min-height:28px;padding:4px 7px;font-size:11px;border-radius:5px;text-align:center}
@media(max-width:700px){
 #calls .t2-table,#dealCalls .t2-table{min-width:0!important}
 #calls .t2-call-media,#dealCalls .t2-call-media{width:100%;min-width:0;padding-top:6px}
 #calls .t2-call-actions,#dealCalls .t2-call-actions{width:100%;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
 #calls .t2-call-actions .btn,#calls .t2-call-actions .t2-text-button,#dealCalls .t2-call-actions .btn,#dealCalls .t2-call-actions .t2-text-button{min-height:44px;padding:8px 5px}
 #calls .t2-call-media .t2-player,#dealCalls .t2-call-media .t2-player{width:100%}
 #calls .t2-call-top,#dealCalls .t2-call-top{grid-template-columns:minmax(0,1fr);gap:8px}
 #calls .t2-call-comment textarea,#dealCalls .t2-call-comment textarea{height:44px;min-height:44px;padding:11px 9px;font-size:14px}
 #calls .t2-comment-filled textarea,#dealCalls .t2-comment-filled textarea{height:64px}
 #calls .t2-comment-footer .btn,#dealCalls .t2-comment-footer .btn{min-height:40px;padding:8px;font-size:12px}
}

/* Preserve the chosen structured summary and keep setup usable on phones. */
.t2-call-summary p{white-space:pre-wrap;overflow-wrap:anywhere}
#t2STTForm textarea{width:100%;box-sizing:border-box;min-height:180px;resize:vertical}
#t2STTForm [data-stt-key-note]{display:block;margin-top:6px;color:var(--muted,#52708a)}
