/* Together › Falas. The transcript is one list; the selected speech opens inline. */
#editor.together #editor-settings-host,#editor.proof-editor.together #deepcut-inspector #editor-settings-host[hidden]{display:block!important}
#editor.together #together-panel-falas #editor-review-panel{display:flex!important;flex-direction:column;gap:12px;padding:0;margin:0;border:0;background:none;overflow:visible;flex:none}
#editor.together #together-panel-falas :is(#editor-review-panel>.panel-title,#editor-review-panel>.tabs,#proof-transcript-options,#review-hint){display:none!important}
#editor.together #proof-transcript-search{margin:0}
#editor.together #proof-transcript-search label{height:36px;padding:0 10px;gap:8px;border-radius:8px}
#editor.together #proof-transcript-search label svg{width:15px;height:15px}
#editor.together #proof-transcript-search input{font-size:13px}
#editor.together #review-items{overflow:visible;padding:0;display:flex;flex-direction:column;gap:8px}

/* Rows: time and speech, an optional Legenda oculta flag and an icon-only Play share the header; the open speech's form spans below. */
#editor.together #review-items .caption-row{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:start;column-gap:10px;position:relative;margin:0;padding:7px 9px 7px 14px;min-height:0;border:1px solid var(--proof-border);border-radius:8px;background:var(--proof-surface)}
#editor.together #review-items .caption-row:is(.is-selected,.in-time-selection,.is-current){background:var(--proof-surface);border-color:var(--proof-border)}
#editor.together #review-items .caption-row.is-current:not(.falas-open){background:var(--proof-selection);border-color:transparent}
/* The time column grows with long or hour-length times (never wraps or clips); the speech text wraps. */
#editor.together #review-items .deepcut-speech-row{grid-column:1;grid-row:1;grid-template-columns:minmax(44px,max-content) minmax(0,1fr);gap:18px;font:14px/20px var(--proof-font-family);color:var(--proof-text);padding:5px 0;min-height:0;text-align:left}
#editor.together #review-items{--falas-time:#5a58aa}
:root[data-theme="dark"] #editor.together #review-items{--falas-time:#a9a8f0}
#editor.together #review-items .deepcut-speech-time{font:500 14px/20px var(--proof-font-family);color:var(--falas-time);font-variant-numeric:tabular-nums;white-space:nowrap}
#editor.together .caption-row>:is(.falas-inline,.falas-removed){display:block!important;grid-column:1/-1}

/* Hidden caption: an eye-off icon and a Legenda oculta tag before Play. */
#editor.together .caption-row>.falas-flag{display:inline-flex!important;grid-column:2;grid-row:1;align-items:center;gap:8px;margin-top:5px;color:var(--proof-text-muted);font:12px/18px var(--proof-font-family);white-space:nowrap}
#editor.together .caption-row>.falas-flag svg{width:18px;height:18px}
#editor.together .caption-row>.falas-flag span{padding:1px 10px;border:1px solid var(--proof-border);border-radius:999px;background:var(--proof-surface-subtle);color:var(--proof-text)}

/* Play: icon only; its accessible name and tooltip come from the shared owner. */
#editor.together #review-items .caption-row>.review-play{grid-column:3;grid-row:1;position:static;display:flex;align-items:center;justify-content:center;gap:0;width:40px;min-width:40px;height:30px;min-height:30px;margin:0;padding:0;border:1.5px solid var(--proof-primary-text);border-radius:6px;background:var(--proof-surface);color:var(--proof-primary-text);font-size:0;line-height:0;cursor:pointer;transition:background-color var(--proof-duration-fast,120ms) var(--proof-ease,ease)}
#editor.together #review-items .caption-row>.review-play>span{display:none}
#editor.together #review-items .caption-row>.review-play::before{content:"";width:12px;height:13px;margin-left:2px;background:currentColor;mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 13'%3E%3Cpath d='M0 0v13l12-6.5Z'/%3E%3C/svg%3E") center/contain no-repeat}
#editor.together #review-items .caption-row>.review-play:enabled:hover{background:var(--proof-selection)}
#editor.together #review-items .caption-row>.review-play[aria-busy=true]::before{width:16px;height:16px;margin-left:0;mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='black' stroke-width='2.5' stroke-linecap='round' d='M12 3a9 9 0 1 1-9 9'/%3E%3C/svg%3E");animation:falas-play-busy .8s linear infinite}
#editor.together #review-items .caption-row>.review-play:disabled{border-color:var(--proof-border);background:var(--proof-surface-subtle);color:var(--proof-disabled-text);cursor:not-allowed}
@keyframes falas-play-busy{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#editor.together #review-items .caption-row>.review-play[aria-busy=true]::before{animation:none}}
@media(pointer:coarse){#editor.together #review-items .caption-row>.review-play{width:44px;min-width:44px;height:44px;min-height:44px}}

/* Open row: tinted header, then the form on the surface. */
#editor.together #review-items .caption-row.falas-open{border:2px solid var(--proof-primary-text);padding:6px 8px 6px 13px;background:var(--proof-selection)}
#editor.together #review-items .caption-row.falas-open .deepcut-speech-time{color:var(--proof-primary-text);font-weight:600}
#editor.together #review-items .caption-row.falas-open .deepcut-speech-row span:last-child{font-weight:600}
#editor.together #review-items .caption-row.falas-open>.falas-inline:not(:empty){margin:6px -8px -6px -13px;padding:12px 15px 18px;border-radius:0 0 6px 6px;background:var(--proof-surface)}
.falas-inline:empty{display:none!important}
#editor.together .falas-inline #timeline-properties{display:flex;flex-direction:column;gap:12px;margin:0;padding:0;border:0;min-width:0}
#editor.together .falas-inline #deepcut-property-extra{display:block;margin:0}
#editor.together .falas-inline .proof-speech-form{display:flex;flex-direction:column;gap:12px}
#editor.together .falas-inline .proof-speech-text{display:flex;flex-direction:column;align-items:stretch;gap:2px;margin:0;font-size:inherit;text-align:left}
#editor.together .falas-inline .proof-speech-label{font:13px/15px var(--proof-font-family);color:var(--proof-text)}
#editor.together .falas-inline #deepcut-speech-text{width:100%;font:14px/1.45 var(--proof-font-family);height:auto;min-height:56px;max-height:120px;field-sizing:content;margin:0;padding:8px 12px;border:1px solid var(--proof-control-border);border-radius:6px;background:var(--proof-surface);color:var(--proof-text);resize:vertical}
/* Destaques: collapsed by default; the summary counts the chosen words. */
#editor.together .proof-speech-words[hidden]{display:none}
#editor.together .proof-speech-words>summary{display:flex;width:max-content;align-items:center;gap:7px;list-style:none;cursor:pointer;font:13px/20px var(--proof-font-family);color:var(--proof-text);border-radius:4px}
#editor.together .proof-speech-words>summary::-webkit-details-marker{display:none}
#editor.together .proof-speech-words>summary svg{width:11px;height:11px;transition:transform var(--proof-duration-fast,120ms) var(--proof-ease,ease)}
#editor.together .proof-speech-words[open]>summary svg{transform:rotate(90deg)}
#editor.together .falas-inline #deepcut-speech-highlights{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 0}
#editor.together .falas-inline #deepcut-speech-highlights button{border:1px solid var(--proof-border);border-radius:6px;padding:4px 9px;font:13px/1.35 var(--proof-font-family);background:var(--proof-surface);color:var(--proof-text);min-height:0;cursor:pointer}
#editor.together .falas-inline #deepcut-speech-highlights button[aria-pressed=true]{background:var(--proof-success-surface);border-color:var(--proof-success);color:var(--proof-success);font-weight:600}
#editor.together .proof-speech-line{display:flex;align-items:center;gap:16px;margin-top:3px;font:13px/1.4 var(--proof-font-family);color:var(--proof-text)}
#editor.together .proof-speech-switch{display:flex;align-items:center;gap:16px;margin:0;flex:none;cursor:pointer}
#editor.together .proof-speech-switch input{appearance:none;width:40px;height:22px;min-height:22px;border-radius:20px;background:var(--proof-control-border);border:0;padding:3px;margin:0;flex:none;cursor:pointer;transition:background var(--proof-duration-fast,120ms) var(--proof-ease,ease)}
#editor.together .proof-speech-switch input::before{content:"";display:block;width:16px;height:16px;border-radius:50%;background:#fff;transition:transform var(--proof-duration-fast,120ms) var(--proof-ease,ease)}
#editor.together .proof-speech-switch input:checked{background:var(--proof-primary)}
#editor.together .proof-speech-switch input:checked::before{transform:translateX(18px)}
#editor.together .proof-speech-switch input:focus-visible{outline:var(--proof-focus-width,2px) solid var(--proof-focus);outline-offset:2px}
/* Speech applies automatically: no local Aplicar/Cancelar; validation messages still show. */
#editor.together .falas-inline .deepcut-property-actions{display:none!important}
#editor.together .falas-inline #deepcut-property-message{order:10;font-size:12px;margin:0}

/* Removed speech stays in the script, greyed, with Restaurar. */
#editor.together #review-items .caption-row.excluded{background:var(--proof-surface-subtle)}
#editor.together #review-items .caption-row.excluded .deepcut-speech-row span:last-child{color:var(--proof-text-muted);text-decoration:line-through;text-decoration-color:var(--proof-text-muted)}
#editor.together .caption-row>.falas-removed{display:flex!important;align-items:center;gap:10px;margin:2px 0 3px 62px;font:12px/1.4 var(--proof-font-family);color:var(--proof-text-muted)}
#editor.together .falas-removed span{border-radius:6px;padding:1px 7px;background:var(--proof-warning-surface);color:var(--proof-warning)}
#editor.together .falas-removed button{border:0;background:none;padding:0;min-height:0;color:var(--proof-selection-text);font:600 12px/1.4 var(--proof-font-family);cursor:pointer}
/* Narrow panels: the Legenda oculta flag drops under the speech so the text keeps its measure. */
#editor.together #together-panel-falas #review-items{container-type:inline-size}
@container(max-width:380px){#editor.together .caption-row>.falas-flag{grid-column:1;grid-row:2;justify-self:start;margin:0 0 3px 62px}}

/* Caption look card body (proof-appearance arranges the controls). */
#falas-look .together-card-body #captions-content{display:flex!important;flex-direction:column;gap:4px;padding:0;margin:0}
#falas-look .proof-caption-heading>:is(h2,p){display:none}
#falas-look .proof-caption-heading{display:block;padding:0;margin:0;border:0}
#falas-look .proof-caption-heading>label{margin:0!important}
#falas-look .proof-caption-heading>label{display:flex;align-items:center;justify-content:space-between;font:14px/1.5 var(--proof-font-family);color:var(--proof-text)}
#editor.together .falas-inline #timeline-property-remove{display:none!important}
#editor.together .falas-inline :is(.timeline-property-fields,#timeline-property-title-text-label){display:none!important}
#editor #proof-transcript-search label svg{width:15px;height:15px}
#editor.together .falas-inline .proof-speech-switch{display:flex!important;flex-direction:row;align-items:center}
#editor.together .falas-inline .proof-speech-switch input{display:block}
#editor #falas-look .proof-caption-heading{padding:0 0 10px;margin:0 0 6px;border-bottom:1px solid var(--proof-border)}
#editor #falas-look .proof-caption-heading>label{position:static;display:flex;align-items:center;justify-content:space-between;font:14px/1.5 var(--proof-font-family);color:var(--proof-text)}
#editor #falas-look input[type=checkbox]{margin-inline:0}
#editor #falas-look #proof-caption-main>label:has(:is(#caption-outline-enabled,#caption-shadow-enabled)){display:flex;justify-content:space-between;gap:20px}
/* Highlights are chosen per word in each speech; the typed list stays saved but has no field here. Mais ajustes drops its prose. */
#editor.together #falas-look :is(.falas-trim,#highlight-controls>label:has(#highlight-keywords),#highlight-controls>.help){display:none!important}
#editor #falas-look #proof-caption-main>label>select{flex-shrink:0}
/* Falas: the transcript list is its own scroll area (follow-playback scrolls it); the look card scrolls within its share. */
#editor.proof-editor.together[data-together-tab=falas] #deepcut-inspector{overflow-y:auto}
#editor.proof-editor.together[data-together-tab=falas] #deepcut-inspector>#editor-settings-host{max-height:55%!important;overflow:auto!important;flex-shrink:0}
#editor.proof-editor.together[data-together-tab=falas] #deepcut-inspector>#together-panel-falas{flex:1 1 auto;min-height:0;flex-shrink:1;padding-bottom:0}
#editor.together #together-panel-falas #editor-review-panel{flex:1 1 auto!important;min-height:0}
#editor.together #together-panel-falas #review-items{flex:1 1 auto;min-height:200px;overflow:auto!important;padding:0 0 16px;overscroll-behavior:contain}
#editor.together #together-panel-falas #review-items>*{flex-shrink:0}
