/* Cross-page consistency layer, loaded after every page stylesheet.
   One control scale per surface; the YouTube (pill) and Content Engine (chat)
   replicas keep their own shapes but stop mixing sizes inside themselves. */

/* Shared form details */
html[data-studio-theme] #studio :is(input[type=checkbox],input[type=radio]){accent-color:var(--accent)}
html[data-studio-theme] #studio input[type=file]{font-size:13px;color:var(--muted)}
html[data-studio-theme] #studio input[type=file]::file-selector-button{margin-right:12px;padding:7px 14px;border:1px solid var(--surface-border);border-radius:10px;background:var(--surface-raised);color:var(--text);font:inherit;font-weight:500;cursor:pointer}
html[data-studio-theme] #studio input[type=file]:hover::file-selector-button{border-color:var(--surface-hover)}

/* Status colors that were tuned for dark surfaces only */
html[data-studio-theme][data-studio-mode=light] #studio :is(.quality-passed,.quality-pass){color:#0f6b57}

/* Video frames stay dark in both kits, like the review cards and players */
html[data-studio-theme][data-studio-mode] #studio .caption-preview{background:#111817;color:#edf6f0;border-color:#ffffff1f}
html[data-studio-theme][data-studio-mode] #studio .caption-preview :is(.topline,.eyebrow){color:#c9d4cd}
html[data-studio-theme][data-studio-mode] #studio .caption-preview .topline svg{color:#c9d4cd}

/* Workflow canvas: every node button and field uses the same type size */
html[data-studio-theme] #studio .workflow-workspace .btn{font-size:13px}
html[data-studio-theme] #studio .workflow-node :is(select,textarea,input:not([type=checkbox]):not([type=radio]):not([type=range])){font-size:12px}

/* Content Engine: one pill button size and one field size */
html[data-studio-theme] #studio .content-research .btn{min-height:36px;padding:7px 14px;border-radius:18px;font-size:13px;font-weight:500}
html[data-studio-theme] #studio .research-options :is(select,input:not([type=checkbox]):not([type=radio])){height:40px;min-height:40px;padding:0 12px;border-radius:8px;font-size:13px}
html[data-studio-theme] #studio .research-options textarea{border-radius:8px;font-size:13px}

/* YouTube Studio: one button weight, readable table controls, no wrapping pills */
html[data-studio-theme] #studio .youtube-layout .btn,html[data-studio-theme] #studio .youtube-studio .btn.primary{font-weight:500}
html[data-studio-theme] #studio :is(.yt-content-sort,.yt-table-footer) select,html[data-studio-theme] #studio .yt-content-studio .yt-content-search input{font-size:13px}
html[data-studio-theme] #studio .yt-connection-body .btn{white-space:nowrap;max-width:100%;overflow:hidden;text-overflow:ellipsis}

/* B-roll library: the help card matches every other panel description */
html[data-studio-theme] #studio .broll-library>.panel>h2{margin-bottom:6px}
html[data-studio-theme] #studio .broll-library>.panel>p{font-size:.82rem;line-height:1.6;color:var(--muted)}

@media(max-width:760px){
  html[data-studio-theme] #studio :is(.research-composer-meta,.research-composer-note){font-size:11px}
  html[data-studio-theme] #studio .research-starters button{font-size:12px}
}

/* A component's flex/grid layout must never override its hidden state. */
#studio [hidden]:not([hidden="until-found"]){display:none!important}

/* Long labels wrap within their panel instead of pushing adjacent controls away. */
#studio :is(.copy-body,.draft-body,.thumb-body,.member-panel,.research-idea){overflow-wrap:anywhere}
#studio :is(.draft-head,.thumbnail-designer header,.youtube-copy-editor header,.member-header)>div{min-width:0}
#studio :is(.draft-head,.thumbnail-designer header,.youtube-copy-editor header,.member-header)>.btn{flex-shrink:0}
html[data-studio-theme] #studio :is(.draft-transcript,.copy-preview,.draft-note){border-color:var(--line)}
/* Time labels sit over video frames and keep their own contrast in every kit. */
#studio :is(.clip-duration,.research-thumbnail>span){color:#fff}

@media(max-width:800px){
  /* Avoid mobile browser input zoom, including the more specific page rules. */
  html[data-studio-theme] #studio :is(.content-research,.youtube-layout,.youtube-studio,.workflow-node,dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){font-size:16px}
  html[data-studio-theme] #studio .content-research .btn{min-height:44px}
  #studio .research-icon-button{width:44px;height:44px}
  #studio :is(.draft-head,.thumbnail-designer header,.youtube-copy-editor header,.member-header){gap:12px}
  #studio .member-pagination{flex-wrap:wrap}
}
