/* Twelve Labs Studio - all rules are scoped under #tls-root so theme CSS cannot break the layout */
#tls-root,#tls-root *,#tls-root *::before,#tls-root *::after{box-sizing:border-box}
#tls-root{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100vh;height:100dvh;max-width:none;margin:0;padding:0;transform:none;z-index:2147483000;-webkit-text-size-adjust:100%;background:#fff;color:#0c0a09;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,Roboto,Helvetica,Arial,sans-serif;font-size:14px;line-height:1.4;display:flex;flex-direction:column;overflow:hidden;text-align:left}
body.admin-bar #tls-root{top:32px;height:calc(100vh - 32px);height:calc(100dvh - 32px)}
@media(max-width:782px){body.admin-bar #tls-root{top:46px;height:calc(100vh - 46px);height:calc(100dvh - 46px)}}
#tls-root h2,#tls-root h3,#tls-root p{font-family:inherit;color:inherit;text-transform:none;letter-spacing:normal}
#tls-root button,#tls-root input,#tls-root select,#tls-root textarea{font:inherit;color:inherit;margin:0;letter-spacing:normal;text-transform:none;text-shadow:none;box-shadow:none;-webkit-appearance:none;appearance:none;height:auto;min-height:0;max-width:100%;line-height:1.35}
#tls-root a{color:inherit;text-decoration:none}
#tls-root select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:32px!important;text-overflow:ellipsis}
#tls-root input[type=checkbox]{-webkit-appearance:checkbox;appearance:auto;width:16px;height:16px;flex:0 0 auto;accent-color:#0c0a09}
/* top bar */
#tls-root .tls-top{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:52px;padding:8px 16px;border-bottom:1px solid #eeeeec;background:#fff}
#tls-root .tls-brand{display:flex;align-items:center;gap:10px;font-weight:600;min-width:0}
#tls-root .tls-logo{width:26px;height:26px;flex:0 0 auto;border-radius:7px;background:#0c0a09;color:#fff;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700}
#tls-root .tls-title{color:#78716c;font-weight:500;margin-left:6px;white-space:nowrap}
#tls-root .tls-right{display:flex;align-items:center;gap:8px;flex:0 0 auto}
#tls-root .tls-pill{background:#f5f5f4;border-radius:999px;padding:6px 12px;font-size:12px;color:#44403c;white-space:nowrap}
#tls-root .tls-pill.warn{background:#fef2f2;color:#b91c1c}
#tls-root .tls-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #e7e5e4;background:#fff;color:#0c0a09;border-radius:8px;padding:7px 14px;cursor:pointer;font-weight:500;white-space:nowrap}
#tls-root .tls-btn:hover{background:#f5f5f4}
#tls-root .tls-btn[disabled]{opacity:.55;cursor:not-allowed}
/* layout */
#tls-root .tls-body{flex:1 1 auto;display:flex;min-height:0}
#tls-root .tls-side{width:210px;flex:0 0 auto;border-right:1px solid #eeeeec;padding:12px 8px;display:flex;flex-direction:column;gap:2px;background:#fafaf9}
#tls-root .tls-nav{display:flex;align-items:center;gap:10px;padding:9px 12px;border-radius:8px;border:0;background:transparent;text-align:left;cursor:pointer;color:#44403c;font-weight:500;width:100%}
#tls-root .tls-nav:hover{background:#f0efed}
#tls-root .tls-nav.on{background:#e7e5e4;color:#0c0a09}
#tls-root .tls-nav svg{width:17px;height:17px;flex:0 0 auto}
#tls-root .tls-main{flex:1 1 auto;min-width:0;position:relative}
#tls-root .tls-view{position:absolute;top:0;left:0;right:0;bottom:0;display:none}
#tls-root .tls-view.on{display:flex}
/* text to speech */
#tls-root .tls-tts-left{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;padding:16px 20px}
#tls-root .tls-tts-left textarea{flex:1 1 auto;width:100%;border:0;outline:0;resize:none;font-size:15px;line-height:1.6;background:transparent;padding:0}
#tls-root .tls-result{border:1px solid #eeeeec;border-radius:10px;padding:10px 12px;margin:8px 0;display:none;align-items:center;gap:10px;flex-wrap:wrap}
#tls-root .tls-result.on{display:flex}
#tls-root .tls-result audio{flex:1 1 220px;min-width:0;height:36px}
#tls-root .tls-gen{display:block;width:100%;background:#0c0a09;color:#fff;border:0;border-radius:10px;padding:12px;font-weight:600;cursor:pointer;text-align:center}
#tls-root .tls-gen:hover{background:#292524}
#tls-root .tls-gen[disabled]{opacity:.6;cursor:wait}
#tls-root .tls-meta{display:flex;justify-content:space-between;gap:8px;font-size:11px;color:#78716c;margin-top:8px}
#tls-root .tls-set{width:340px;flex:0 0 auto;border-left:1px solid #eeeeec;padding:16px 20px;overflow:auto}
#tls-root .tls-tabs{display:flex;gap:16px;border-bottom:1px solid #eeeeec;margin-bottom:16px;font-size:13px}
#tls-root .tls-tabs span{padding-bottom:8px;color:#78716c}
#tls-root .tls-tabs span.on{color:#0c0a09;border-bottom:2px solid #0c0a09;font-weight:600}
#tls-root .tls-field{margin-bottom:18px;min-width:0}
#tls-root .tls-field>label,#tls-root .tls-lbl{display:block;font-size:12px;font-weight:600;margin:0 0 6px;color:#0c0a09}
#tls-root .tls-field select,#tls-root .tls-field input[type=text],#tls-root .tls-field input[type=email],#tls-root .tls-field input[type=password],#tls-root .tls-field input[type=url],#tls-root .tls-field textarea{display:block;width:100%;border:1px solid #e7e5e4;border-radius:8px;padding:9px 10px;background-color:#fff;outline:0;color:#0c0a09}
#tls-root .tls-field select:focus,#tls-root .tls-field input:focus,#tls-root .tls-field textarea:focus{border-color:#a8a29e}
#tls-root .tls-vrow{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-top:6px;font-size:12px}
#tls-root .tls-link{border:0;background:transparent;padding:0;cursor:pointer;color:#0c0a09;font-weight:600;text-decoration:underline;font-size:12px}
#tls-root .tls-link.red{color:#b91c1c}
#tls-root .tls-slider .head{display:flex;justify-content:space-between;font-size:12px;font-weight:600}
#tls-root .tls-slider .row{display:flex;justify-content:space-between;font-size:11px;color:#78716c;margin-top:2px}
#tls-root .tls-slider input[type=range]{display:block;width:100%;padding:0;border:0;height:3px;background:#d6d3d1;border-radius:3px;outline:0;margin:12px 0 6px}
#tls-root .tls-slider input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;background:#0c0a09;cursor:pointer;border:0}
#tls-root .tls-slider input[type=range]::-moz-range-thumb{width:16px;height:16px;border:0;border-radius:50%;background:#0c0a09;cursor:pointer}
#tls-root .tls-check{display:flex!important;align-items:center;gap:8px;font-size:13px;font-weight:500!important}
/* video / dubbing */
#tls-root .tls-pane{flex:1 1 auto;overflow:auto;-webkit-overflow-scrolling:touch;padding:20px;display:flex;justify-content:center;align-items:flex-start}
#tls-root .tls-card{width:100%;max-width:780px;min-width:0}
#tls-root .tls-card h2{margin:0 0 4px;font-size:18px;font-weight:600;line-height:1.3}
#tls-root .tls-card p.sub{margin:0 0 18px;color:#78716c}
#tls-root .tls-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:0 14px}
#tls-root .tls-grid>*{min-width:0}
#tls-root .tls-field textarea.big{min-height:120px;resize:vertical}
#tls-root .tls-upl{display:flex;flex-wrap:wrap;gap:10px}
#tls-root .tls-upl label.f{flex:1 1 150px;border:1px dashed #d6d3d1;border-radius:10px;padding:12px;font-size:12px;color:#57534e;cursor:pointer;text-align:center;margin:0;font-weight:500;display:block}
#tls-root .tls-upl label.f:hover{background:#fafaf9}
#tls-root .tls-upl input{display:none}
#tls-root .tls-upl .nm{display:block;color:#0c0a09;margin-top:4px;word-break:break-all}
#tls-root .tls-out{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px;margin-top:20px}
#tls-root .tls-vid{border:1px solid #eeeeec;border-radius:12px;padding:10px;min-width:0}
#tls-root .tls-vid video{display:block;width:100%;border-radius:8px;background:#000}
#tls-root .tls-vid .acts{display:flex;gap:8px;margin-top:8px;flex-wrap:wrap}
#tls-root .tls-status{margin-top:14px;font-size:13px;color:#57534e}
#tls-root .tls-status.err{color:#b91c1c}
#tls-root .tls-chip{display:inline-flex;gap:8px;align-items:center;background:#f5f5f4;border-radius:999px;padding:5px 12px;font-size:12px;margin-bottom:12px}
#tls-root .tls-chip button{border:0;background:transparent;cursor:pointer;font-size:16px;padding:0 2px}
#tls-root .tls-seg{display:flex;gap:6px;margin-bottom:12px}
#tls-root .tls-seg button{flex:1;padding:8px;border:1px solid #e7e5e4;background:#fff;color:#0c0a09;border-radius:8px;cursor:pointer;font-weight:500}
#tls-root .tls-seg button.on{background:#0c0a09;color:#fff;border-color:#0c0a09}
/* modal */
#tls-root .tls-modal{position:absolute;top:0;left:0;right:0;bottom:0;background:rgba(12,10,9,.5);display:none;align-items:center;justify-content:center;padding:16px;z-index:5;overflow:auto}
#tls-root .tls-modal.on{display:flex}
#tls-root .tls-dlg{background:#fff;border-radius:16px;padding:24px;width:100%;max-width:400px;margin:auto;position:relative}
#tls-root .tls-dlg h3{margin:0 0 4px;font-size:18px;font-weight:600}
#tls-root .tls-dlg .x{position:absolute;right:12px;top:10px;border:0;background:transparent;font-size:24px;line-height:1;cursor:pointer;color:#78716c;padding:4px 8px}
#tls-root .tls-err{color:#b91c1c;font-size:13px;margin:0 0 10px}
#tls-root .tls-wa{margin-top:16px;border:1px solid #bbf7d0;background:#f0fdf4;border-radius:12px;padding:14px;text-align:center}
#tls-root .tls-wa p{margin:0 0 8px;font-size:13px;color:#166534}
#tls-root .tls-wa .ur{font-size:15px;line-height:1.9;direction:rtl}
#tls-root .tls-wa a{display:inline-flex;align-items:center;gap:8px;background:#22c55e;color:#fff;border-radius:8px;padding:9px 16px;font-weight:600;margin:4px 0 8px}
#tls-root .tls-wa a svg{width:18px;height:18px}
/* tablet + phone */
@media(max-width:1024px){
 #tls-root{font-size:15px}
 #tls-root .tls-top{padding:8px 12px}
 #tls-root .tls-title{display:none}
 #tls-root .tls-pill{font-size:11px;padding:5px 9px}
 #tls-root .tls-btn{padding:7px 11px}
 #tls-root .tls-body{flex-direction:column}
 #tls-root .tls-side{width:100%;flex-direction:row;border-right:0;border-bottom:1px solid #eeeeec;padding:6px;gap:4px}
 #tls-root .tls-nav{flex:1 1 0;min-width:0;flex-direction:column;gap:3px;padding:7px 4px;font-size:11px;text-align:center;justify-content:center;line-height:1.15}
 #tls-root .tls-nav svg{width:18px;height:18px}
 #tls-root .tls-view.on{flex-direction:column;overflow-y:auto;overflow-x:hidden;-webkit-overflow-scrolling:touch}
 #tls-root .tls-tts-left{flex:0 0 auto;padding:14px}
 #tls-root .tls-tts-left textarea{flex:0 0 auto;height:190px;border:1px solid #eeeeec;border-radius:10px;padding:10px}
 #tls-root .tls-set{width:100%;flex:0 0 auto;border-left:0;border-top:1px solid #eeeeec;overflow:visible;padding:16px 14px 28px}
 #tls-root .tls-pane{flex:0 0 auto;overflow:visible;padding:14px}
 #tls-root .tls-card{max-width:none}
 #tls-root .tls-out{grid-template-columns:1fr}
 #tls-root input,#tls-root select,#tls-root textarea{font-size:16px!important}
 #tls-root .tls-modal{align-items:flex-start;padding:10px}
 #tls-root .tls-dlg{padding:20px 16px}
}
@media(max-width:520px){
 #tls-root .tls-grid{grid-template-columns:1fr}
 #tls-root .tls-brand span:not(.tls-logo){font-size:14px}
 #tls-root .tls-upl label.f{flex-basis:100%}
 #tls-root .tls-right{gap:6px}
}
