
/* NUJIZ MERGE STUDIO V2 */

#videoDynamicControls:has(#nmsStudio){
  --nms-bg:#fff;
  --nms-panel:#f5f3ff;
  --nms-text:#20243b;
  --nms-muted:#626b80;
  --nms-line:#dcd9e8;
  --nms-accent:#7044df;
}

html[data-theme="dark"] #videoDynamicControls:has(#nmsStudio){
  --nms-bg:#171c27;
  --nms-panel:#202637;
  --nms-text:#f5f7ff;
  --nms-muted:#b9c3d6;
  --nms-line:#384155;
  --nms-accent:#b49aff;
}

#nmsStudio{
  display:grid;
  gap:12px;
  margin-bottom:18px;
}

html body #nmsStudio .nms-heading{
  position:relative;
  overflow:hidden;
  border-radius:17px;
  padding:22px 15px;
  text-align:center;
  background:linear-gradient(125deg,#352078,#7041e5,#2563a5,#352078)!important;
  background-size:300% 300%!important;
  animation:nmsGradient 12s ease infinite;
}

@keyframes nmsGradient{
  0%,100%{background-position:0% 50%}
  50%{background-position:100% 50%}
}

html body #nmsStudio .nms-heading *{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

#nmsStudio .nms-heading strong{
  display:block;
  font-size:21px;
  margin:10px 0;
  font-weight:900;
}

#nmsStudio .nms-heading p{
  font-size:13px;
  line-height:1.8;
  margin:0;
}

#nmsStudio .nms-stats{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}

#nmsStudio .nms-stats>div{
  background:var(--nms-panel)!important;
  border:1px solid var(--nms-line);
  border-radius:12px;
  padding:12px 4px;
  text-align:center;
}

html body #nmsStudio .nms-stats strong{
  display:block;
  margin-top:7px;
  font-size:15px;
  color:var(--nms-accent)!important;
  -webkit-text-fill-color:var(--nms-accent)!important;
}

html body #nmsStudio .nms-stats small,
html body #nmsStudio .nms-hint{
  font-size:11px;
  color:var(--nms-muted)!important;
  -webkit-text-fill-color:var(--nms-muted)!important;
}

html body #nmsStudio .nms-label{
  font-size:14px;
  font-weight:800;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
}

#nmsTimeline{
  display:flex;
  gap:5px;
  overflow-x:auto;
  padding:8px;
  border-radius:12px;
  background:var(--nms-panel)!important;
  direction:ltr;
}

html body #nmsTimeline button{
  flex:1 0 86px;
  min-width:86px;
  max-width:180px;
  padding:5px;
  border-radius:9px;
  background:var(--nms-bg)!important;
  border:1px solid var(--nms-line);
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
  cursor:pointer;
}

#nmsTimeline button.selected{
  border-color:#a78bfa!important;
  box-shadow:0 0 0 2px #8b5cf655;
}

#nmsTimeline b,#nmsTimeline small{
  display:block;
  font-size:11px;
  margin-top:4px;
}

#nmsTimeline .nms-thumb{
  aspect-ratio:16/9;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:5px;
  background:#30264b;
}

#nmsTimeline img,.nms-row-thumb img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
}

html body #nmsPlay{
  background:linear-gradient(110deg,#5330c5,#8154ed)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border:0;
  border-radius:11px;
  padding:13px 8px;
  font-weight:800;
  cursor:pointer;
}

#nmsStudio .nms-player{
  background:#080c15;
  border-radius:12px;
  padding:8px;
}

#nmsStudio .nms-player[hidden]{
  display:none!important;
}

#nmsPreview{
  display:block;
  width:100%;
  max-height:280px;
  background:#000;
  border-radius:8px;
}

html body #nmsPreviewLabel{
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  text-align:center;
  padding:8px;
  font-size:12px;
}

#nmsStudio .nms-navigation{
  display:flex;
  justify-content:center;
  gap:8px;
}

html body #nmsStudio .nms-navigation button{
  background:#30394c!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  border:0;
  border-radius:8px;
  padding:8px 15px;
  cursor:pointer;
}

#videoDynamicControls:has(#nmsStudio) .video-merge-item{
  display:grid!important;
  grid-template-columns:64px 20px minmax(0,1fr) repeat(3,25px)!important;
  align-items:center;
  gap:4px!important;
  padding:8px!important;
  margin:7px 0;
  border-radius:12px;
  background:var(--nms-bg)!important;
  border:1px solid var(--nms-line);
}

#videoDynamicControls .nms-row-thumb{
  width:64px!important;
  height:45px!important;
  padding:0!important;
  overflow:hidden;
  border-radius:7px;
  background:#30264b!important;
  color:#fff!important;
  cursor:pointer;
}

#videoDynamicControls:has(#nmsStudio) .video-merge-item b{
  overflow-wrap:anywhere;
  font-size:11px!important;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
}

html body #videoDynamicControls .nms-clip-details{
  display:block;
  font-size:10px;
  color:var(--nms-muted)!important;
  -webkit-text-fill-color:var(--nms-muted)!important;
}

#videoDynamicControls .nms-dragging{
  opacity:.45;
}

#videoDynamicControls .nms-native{
  display:none!important;
}

#videoDynamicControls .nms-options{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin:8px 0 14px;
}

html body #videoDynamicControls .nms-options button{
  padding:13px 6px;
  border:1px solid var(--nms-line);
  border-radius:10px;
  background:var(--nms-bg)!important;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
  font-size:12px;
  font-weight:800;
  cursor:pointer;
  transition:transform .18s,border-color .18s;
}

#videoDynamicControls .nms-options button:hover{
  transform:translateY(-2px);
}

html body #videoDynamicControls .nms-options button.selected{
  border-color:#9271ef!important;
  background:var(--nms-panel)!important;
  color:var(--nms-accent)!important;
  -webkit-text-fill-color:var(--nms-accent)!important;
  box-shadow:inset 0 0 0 1px #9271ef;
}

#videoDynamicControls .nms-audio{
  display:grid;
  gap:8px;
  padding:13px;
  background:var(--nms-panel)!important;
  border:1px solid var(--nms-line);
  border-radius:12px;
}

html body #videoDynamicControls .nms-audio label{
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
  font-weight:800;
  font-size:13px;
}

@media(max-width:480px){
  #nmsStudio .nms-heading strong{font-size:18px}
  #nmsStudio .nms-stats strong{font-size:13px}
  #videoDynamicControls:has(#nmsStudio) .video-merge-item{
    grid-template-columns:48px 18px minmax(0,1fr) repeat(3,23px)!important;
  }
  #videoDynamicControls .nms-row-thumb{width:48px!important}
}

@media(prefers-reduced-motion:reduce){
  #nmsStudio .nms-heading{animation:none!important}
  #videoDynamicControls .nms-options button{transition:none!important}
}

html body:has(#nmsStudio):has(#videoDownloadButton.visible[href]:not([href="#"]):not([href=""])) #videoProcessButton{
  display:none!important;
}


/* NUJIZ MERGE READABILITY V21 */

html body #videoDynamicControls:has(#nmsStudio){
  font-size:15px!important;
  line-height:1.7!important;
  --nms-text:#182238;
  --nms-muted:#475569;
}

html[data-theme="dark"] body
#videoDynamicControls:has(#nmsStudio){
  --nms-text:#f8fafc;
  --nms-muted:#d1d9e8;
  --nms-accent:#c4b5fd;
}

/* Studio header */

html body #nmsStudio .nms-heading strong{
  font-size:25px!important;
  font-weight:900!important;
  line-height:1.5!important;
}

html body #nmsStudio .nms-heading small{
  font-size:13px!important;
}

html body #nmsStudio .nms-heading p{
  font-size:15px!important;
  line-height:1.8!important;
}

html body #nmsStudio .nms-heading *{
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}

/* Statistics */

html body #nmsStudio .nms-stats small{
  font-size:13px!important;
  font-weight:700!important;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
}

html body #nmsStudio .nms-stats strong{
  font-size:18px!important;
  font-weight:900!important;
}

/* Field titles */

html body #nmsStudio .nms-label,
html body #videoDynamicControls:has(#nmsStudio) label,
html body #videoDynamicControls:has(#nmsStudio) .field-label,
html body #videoDynamicControls:has(#nmsStudio) .video-field>span,
html body #videoDynamicControls:has(#nmsStudio) .video-field>label{
  font-size:17px!important;
  font-weight:800!important;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
}

/* Clip timeline */

html body #nmsTimeline button b{
  font-size:14px!important;
  font-weight:800!important;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
}

html body #nmsTimeline button small{
  font-size:13px!important;
  color:var(--nms-muted)!important;
  -webkit-text-fill-color:var(--nms-muted)!important;
}

html body #nmsTimeline button{
  flex-basis:110px!important;
  min-width:110px!important;
  padding:7px!important;
}

/* Add clips */

html body #videoDynamicControls:has(#nmsStudio)
.video-merge-picker b{
  font-size:17px!important;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
}

html body #videoDynamicControls:has(#nmsStudio)
.video-merge-picker small{
  font-size:13px!important;
  line-height:1.7!important;
  color:var(--nms-muted)!important;
  -webkit-text-fill-color:var(--nms-muted)!important;
}

/* Clip list */

html body #videoDynamicControls:has(#nmsStudio)
.video-merge-item{
  grid-template-columns:76px 24px minmax(0,1fr)
    repeat(3,32px)!important;
  gap:6px!important;
  padding:10px!important;
  min-height:95px!important;
}

html body #videoDynamicControls:has(#nmsStudio)
.nms-row-thumb{
  width:76px!important;
  height:57px!important;
}

html body #videoDynamicControls:has(#nmsStudio)
.video-merge-item b{
  font-size:14px!important;
  font-weight:800!important;
  line-height:1.5!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
}

html body #videoDynamicControls:has(#nmsStudio)
.video-merge-item small{
  display:block!important;
  font-size:13px!important;
  font-weight:600!important;
  line-height:1.6!important;
  color:var(--nms-muted)!important;
  -webkit-text-fill-color:var(--nms-muted)!important;
}

html body #videoDynamicControls:has(#nmsStudio)
.video-merge-item>span{
  font-size:13px!important;
  font-weight:800!important;
}

html body #videoDynamicControls:has(#nmsStudio)
.video-merge-item button[data-merge-action]{
  width:32px!important;
  height:36px!important;
  font-size:20px!important;
  font-weight:800!important;
  padding:0!important;
  border-radius:7px!important;
  background:var(--nms-panel)!important;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
}

html body #videoDynamicControls:has(#nmsStudio)
.video-merge-item button.danger{
  background:#fee2e2!important;
  color:#b91c1c!important;
  -webkit-text-fill-color:#b91c1c!important;
}

html[data-theme="dark"] body
#videoDynamicControls:has(#nmsStudio)
.video-merge-item button.danger{
  background:#451f2b!important;
  color:#fda4af!important;
  -webkit-text-fill-color:#fda4af!important;
}

/* Option cards */

html body #videoDynamicControls:has(#nmsStudio)
.nms-options button{
  font-size:15px!important;
  font-weight:800!important;
  min-height:54px!important;
  line-height:1.5!important;
  padding:12px 8px!important;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
}

html body #videoDynamicControls:has(#nmsStudio)
.nms-options button.selected{
  background:#ede9fe!important;
  border:2px solid #8054e8!important;
  color:#5126b5!important;
  -webkit-text-fill-color:#5126b5!important;
}

html[data-theme="dark"] body
#videoDynamicControls:has(#nmsStudio)
.nms-options button.selected{
  background:#352654!important;
  border-color:#b69aff!important;
  color:#e0d5ff!important;
  -webkit-text-fill-color:#e0d5ff!important;
}

/* Audio and instructions */

html body #nmsAudio{
  font-size:15px!important;
  font-weight:700!important;
  min-height:48px!important;
  color:var(--nms-text)!important;
  -webkit-text-fill-color:var(--nms-text)!important;
  background:var(--nms-bg)!important;
}

html body #nmsStudio .nms-hint,
html body #videoDynamicControls:has(#nmsStudio)
.video-note{
  font-size:14px!important;
  line-height:1.8!important;
  color:var(--nms-muted)!important;
  -webkit-text-fill-color:var(--nms-muted)!important;
}

html body #nmsPlay{
  font-size:16px!important;
  min-height:50px!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Narrow screens */

@media(max-width:600px){

  html body #nmsStudio .nms-heading strong{
    font-size:21px!important;
  }

  html body #videoDynamicControls:has(#nmsStudio)
  .video-merge-item{
    grid-template-columns:60px 20px minmax(0,1fr)
      repeat(3,28px)!important;
    gap:4px!important;
    padding:8px!important;
  }

  html body #videoDynamicControls:has(#nmsStudio)
  .nms-row-thumb{
    width:60px!important;
    height:48px!important;
  }

  html body #videoDynamicControls:has(#nmsStudio)
  .video-merge-item button[data-merge-action]{
    width:28px!important;
  }

  html body #nmsStudio .nms-stats strong{
    font-size:16px!important;
  }

  html body #videoDynamicControls:has(#nmsStudio)
  .video-merge-item b{
    font-size:13px!important;
  }
}

/* END NUJIZ MERGE READABILITY V21 */
