
/* NUJIZ BLUR STUDIO V2 */

html body #nbsStudio {
  --bs-bg:#f7f8fc;
  --bs-card:#ffffff;
  --bs-text:#172033;
  --bs-muted:#536177;
  --bs-border:#cbd5e1;
  --bs-accent:#7045e8;
  display:grid;
  gap:14px;
  padding:16px;
  border:1px solid var(--bs-border);
  border-radius:18px;
  background:var(--bs-bg);
}

html[data-theme="dark"] body #nbsStudio {
  --bs-bg:#171c27;
  --bs-card:#202838;
  --bs-text:#f8fafc;
  --bs-muted:#c4cedd;
  --bs-border:#465268;
  --bs-accent:#b49aff;
}

html body #nbsStudio :is(h4,strong,p,button,label) {
  color:var(--bs-text)!important;
  -webkit-text-fill-color:var(--bs-text)!important;
  opacity:1!important;
}

html body #nbsStudio h4 {
  font-size:14px;
  margin:3px 0 0;
}

html body #nbsStudio .nbs-header {
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px;
  border-radius:14px;
  background:linear-gradient(135deg,#5032a5,#7550db);
}

html body #nbsStudio .nbs-header * {
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

html body #nbsStudio .nbs-header > i {
  font-size:32px;
  font-style:normal;
}

html body #nbsStudio .nbs-header strong {
  font-size:17px;
}

html body #nbsStudio .nbs-header p {
  font-size:12px;
  margin:4px 0 0;
}

html body #nbsStudio .nbs-grid {
  display:grid;
  gap:8px;
}

html body #nbsStudio .nbs-two {
  grid-template-columns:repeat(2,minmax(0,1fr));
}

html body #nbsStudio .nbs-three {
  grid-template-columns:repeat(3,minmax(0,1fr));
}

html body #nbsStudio button {
  min-width:0;
  min-height:48px;
  padding:10px 6px;
  background:var(--bs-card)!important;
  border:1px solid var(--bs-border)!important;
  border-radius:12px!important;
  font-family:inherit;
  font-size:12px!important;
  font-weight:800!important;
  cursor:pointer;
}

html body #nbsStudio button.selected {
  border-color:#9871ff!important;
  box-shadow:inset 0 0 0 1px #9871ff!important;
  background:#9871ff19!important;
}

html body #nbsStudio button:disabled {
  opacity:.45!important;
  cursor:not-allowed;
}

html body #nbsStudio button i {
  display:block;
  font-style:normal;
  font-size:27px;
  margin-bottom:5px;
  color:var(--bs-accent)!important;
  -webkit-text-fill-color:var(--bs-accent)!important;
}

html body #nbsStudio .nbs-soft {
  filter:blur(2px);
}

html body #nbsStudio .nbs-solid {
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  text-shadow:0 0 2px #aaa;
}

html body #nbsStudio .nbs-label {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

html body #nbsStrengthNumber {
  width:76px!important;
  min-height:40px!important;
  text-align:center;
  background:var(--bs-card)!important;
  color:var(--bs-text)!important;
  -webkit-text-fill-color:var(--bs-text)!important;
  border:1px solid var(--bs-border)!important;
  border-radius:9px;
}

html body #nbsStrength {
  width:100%;
  margin:15px 0 5px;
  accent-color:#8056ee;
}

html body #nbsRegionList {
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin:10px 0;
}

html body #nbsStudio .nbs-privacy {
  font-size:12px;
  padding:10px;
  margin:0;
  border-radius:10px;
  background:#22c55e16;
  color:var(--bs-text)!important;
}

html body #nbsStudio [hidden],
html body #videoBlurRegionControls[hidden],
html body #videoDynamicControls label[hidden] {
  display:none!important;
}

html body:has(#nbsStudio) #videoPlayerStage {
  min-height:0!important;
  padding:12px!important;
  overflow:hidden;
}

html body:has(#nbsStudio) #videoPreview {
  width:100%!important;
  height:auto!important;
  max-height:560px!important;
  object-fit:contain!important;
  display:block;
}

html body:has(#nbsStudio)
#videoPlayerStage.result-visible #videoPreview {
  display:none!important;
}

html body #nbsLivePreview {
  display:block!important;
  position:absolute!important;
  z-index:6;
  pointer-events:none!important;
  max-height:none!important;
  border-radius:0!important;
}

html body #nbsLivePreview[hidden],
html body .result-visible #nbsLivePreview {
  display:none!important;
}

html body:has(#nbsStudio) .video-mark-selector {
  background:transparent!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  box-sizing:border-box!important;
  min-width:0!important;
  min-height:0!important;
  border:2px dashed #b8ff35!important;
  z-index:8!important;
}

html body:has(#nbsStudio) .video-mark-selector::before {
  top:0!important;
  transform:translate(-50%,-110%)!important;
  background:#5335bc!important;
  font-size:11px!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

@media(max-width:600px){
  html body #nbsStudio {
    padding:10px;
    gap:10px;
  }

  html body #nbsStudio button {
    font-size:11px!important;
  }

  html body:has(#nbsStudio) #videoPlayerStage {
    padding:8px!important;
  }
}


/* NUJIZ BLUR PREVIEW FIX V21 */

html body #nbsStudio header.nbs-header,
html[data-theme="dark"] body #nbsStudio header.nbs-header {
    display:flex!important;
    align-items:center!important;
    gap:12px!important;
    padding:16px!important;
    min-height:76px!important;
    background:linear-gradient(
        135deg,#39246f,#6541bd
    )!important;
    border:1px solid #8b6bdb!important;
    border-radius:14px!important;
    box-shadow:none!important;
}

html body #nbsStudio header.nbs-header *,
html[data-theme="dark"] body #nbsStudio header.nbs-header * {
    color:#ffffff!important;
    -webkit-text-fill-color:#ffffff!important;
    opacity:1!important;
}

html body #nbsStudio header.nbs-header strong {
    display:block!important;
    font-size:17px!important;
    font-weight:800!important;
    line-height:1.6!important;
}

html body #nbsStudio header.nbs-header p {
    font-size:13px!important;
    font-weight:500!important;
    line-height:1.7!important;
    margin:4px 0 0!important;
}

html body #nbsStudio header.nbs-header > i {
    display:grid!important;
    place-items:center!important;
    flex:0 0 44px!important;
    width:44px!important;
    height:44px!important;
    font-size:25px!important;
    border-radius:12px!important;
    background:#ffffff20!important;
}

html body #nbsLivePreview[hidden] {
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
}

html body:has(#nbsStudio)
#videoPlayerStage:not(.result-visible) #videoPreview {
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
}

html body:has(#nbsStudio)
#videoPlayerStage:not(.result-visible) #videoCanvas {
    display:none!important;
}



/* NUJIZ BLUR PREVIEW V22 */

html body:has(#nbsStudio)
#videoPlayerStage:not(.result-visible) #videoPreview {

    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    position:relative!important;
    z-index:2!important;

    width:100%!important;
    height:auto!important;
    max-height:560px!important;

    object-fit:contain!important;
}

html body #videoPlayerStage #nbsLivePreview {

    background:transparent!important;
    background-color:transparent!important;

    position:absolute!important;
    pointer-events:none!important;

    z-index:3!important;
    object-fit:fill!important;

    padding:0!important;
    margin:0!important;
    border:0!important;
    box-shadow:none!important;
}

html body #videoPlayerStage #nbsLivePreview[hidden] {
    display:none!important;
}

html body:has(#nbsStudio)
#videoPlayerStage .video-mark-selector {
    z-index:8!important;
}

html body #videoPlayerStage.result-visible
#nbsLivePreview {
    display:none!important;
}



/* NUJIZ SMART BLUR V3 */

html body #nbsStudio .nbs-smart-card {
    padding:14px;
    border:1px solid #9570ed;
    border-radius:14px;
    background:#8056ee12!important;
}

html body #nbsStudio .nbs-smart-toggle {
    display:grid!important;
    grid-template-columns:40px minmax(0,1fr) 24px;
    align-items:center;
    gap:10px;
    cursor:pointer;
}

html body #nbsStudio .nbs-smart-toggle strong {
    display:block;
    font-size:14px;
}

html body #nbsStudio .nbs-smart-toggle small,
html body #nbsStudio .nbs-face-warning {
    display:block;
    font-size:12px;
    line-height:1.7;
    color:var(--bs-muted)!important;
    -webkit-text-fill-color:var(--bs-muted)!important;
}

html body #nbsStudio .nbs-face-icon {
    display:grid;
    place-items:center;
    width:40px;
    height:40px;
    border-radius:10px;
    font-size:27px;
    background:#8056ee25;
    color:var(--bs-accent)!important;
    -webkit-text-fill-color:var(--bs-accent)!important;
}

html body #nbsStudio #nbsSmart {
    width:22px!important;
    height:22px!important;
    min-height:0!important;
    accent-color:#8056ee;
}

html body #nbsSmartOptions {
    display:grid;
    gap:12px;
    margin-top:12px;
}

html body #nbsFaceStatus {
    padding:10px;
    border-radius:9px;
    background:#22c55e18!important;
    font-size:13px;
    font-weight:700;
    color:var(--bs-text)!important;
    -webkit-text-fill-color:var(--bs-text)!important;
}

html body #nbsFaceShape {
    display:block;
    width:100%;
    margin-top:6px;
    background:var(--bs-card)!important;
    color:var(--bs-text)!important;
    -webkit-text-fill-color:var(--bs-text)!important;
}

html body:has(#nbsSmart:checked) .video-mark-selector {
    display:none!important;
}

html body #nbsSmartOptions[hidden] {
    display:none!important;
}



/* NUJIZ FACE SCAN V34 */

html body #nbsScanStatus {
    padding:13px!important;
    margin:10px 0!important;
    border-radius:10px!important;
    font-weight:700!important;
    line-height:1.7!important;
}

html body #nbsScanStatus[data-state="loading"] {
    background:#ede9fe!important;
    color:#5b21b6!important;
    -webkit-text-fill-color:#5b21b6!important;
}

html body #nbsScanStatus[data-state="success"] {
    background:#dcfce7!important;
    color:#166534!important;
    -webkit-text-fill-color:#166534!important;
}

html body #nbsScanStatus[data-state="empty"],
html body #nbsScanStatus[data-state="error"] {
    background:#fee2e2!important;
    color:#991b1b!important;
    -webkit-text-fill-color:#991b1b!important;
}

html body #nbsRetryScan {
    width:100%!important;
    min-height:44px!important;
    margin-top:8px!important;
    border:1px solid #a78bfa!important;
    border-radius:10px!important;
    background:#ede9fe!important;
    color:#5b21b6!important;
    -webkit-text-fill-color:#5b21b6!important;
    font-weight:700!important;
}

html body #nbsStudio [data-scope]:disabled {
    opacity:.45!important;
}

html body:has(#nbsStudio) #videoProcessButton:disabled {
    opacity:.45!important;
    cursor:not-allowed!important;
}



/* NUJIZ HYBRID BLUR V40 */

html body #nbsHybridManual {
    display:flex!important;
    align-items:center!important;
    gap:12px!important;
    padding:14px!important;
    margin:10px 0!important;
    border:1px solid #a78bfa!important;
    border-radius:12px!important;
    background:#ede9fe!important;
    cursor:pointer!important;
}

html body #nbsHybridManual strong {
    display:block!important;
    color:#4c1d95!important;
    -webkit-text-fill-color:#4c1d95!important;
    font-size:14px!important;
}

html body #nbsHybridManual small {
    display:block!important;
    margin-top:4px!important;
    color:#5b21b6!important;
    -webkit-text-fill-color:#5b21b6!important;
    line-height:1.6!important;
}

html body #nbsManualEnabled {
    width:20px!important;
    height:20px!important;
    accent-color:#7950dc!important;
    flex-shrink:0!important;
}

html[data-theme="dark"] body #nbsHybridManual {
    background:#29213f!important;
    border-color:#9674e5!important;
}

html[data-theme="dark"] body #nbsHybridManual strong {
    color:#ffffff!important;
    -webkit-text-fill-color:#ffffff!important;
}

html[data-theme="dark"] body #nbsHybridManual small {
    color:#ddd6fe!important;
    -webkit-text-fill-color:#ddd6fe!important;
}







/* NUJIZ SMART BUTTON V51 */

html body #nbsStudio label:has(#nbsSmart) {
    position:relative!important;
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:12px!important;
    padding:18px!important;
    margin:16px 0!important;
    border:1px solid #a78bfa!important;
    border-radius:16px!important;
    background:#f7f5ff!important;
    cursor:pointer!important;
    text-align:center!important;
    box-sizing:border-box!important;
}

html body #nbsStudio label:has(#nbsSmart) strong,
html body #nbsStudio label:has(#nbsSmart) b {
    font-size:18px!important;
    font-weight:800!important;
    color:#4c1d95!important;
    -webkit-text-fill-color:#4c1d95!important;
    line-height:1.6!important;
}

html body #nbsStudio label:has(#nbsSmart) small {
    font-size:13px!important;
    line-height:1.7!important;
    color:#64748b!important;
    -webkit-text-fill-color:#64748b!important;
}

/* Keep the native checkbox functional and accessible */

html body #nbsSmart {
    position:absolute!important;
    opacity:0!important;
    width:1px!important;
    height:1px!important;
    overflow:hidden!important;
    margin:0!important;
    padding:0!important;
}

/* Full-width activation button */

html body #nbsStudio label:has(#nbsSmart)::after {
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
    width:100%!important;
    min-height:52px!important;
    box-sizing:border-box!important;
    padding:14px 10px!important;
    border-radius:11px!important;
    background:linear-gradient(
        135deg,#8154f5,#6334d5
    )!important;
    color:#ffffff!important;
    -webkit-text-fill-color:#ffffff!important;
    font-size:16px!important;
    font-weight:800!important;
    line-height:1.6!important;
    box-shadow:0 4px 12px #7547e840!important;
    transition:transform .18s,box-shadow .18s!important;
}

html[lang^="ar"] body #nbsStudio
label:has(#nbsSmart)::after {
    content:"◎  تفعيل تتبع الوجوه"!important;
}

html[lang^="en"] body #nbsStudio
label:has(#nbsSmart)::after {
    content:"◎  Enable Face Tracking"!important;
}

/* Hover and keyboard focus */

html body #nbsStudio
label:has(#nbsSmart:not(:disabled)):hover::after {
    transform:translateY(-2px)!important;
    box-shadow:0 7px 20px #7547e850!important;
}

html body #nbsStudio
label:has(#nbsSmart:focus-visible) {
    outline:3px solid #a78bfa!important;
    outline-offset:3px!important;
}

/* Enabled state */

html body #nbsStudio
label:has(#nbsSmart:checked) {
    border-color:#22c55e!important;
    background:#f0fdf4!important;
}

html body #nbsStudio
label:has(#nbsSmart:checked)::after {
    background:linear-gradient(
        135deg,#16a34a,#15803d
    )!important;
    box-shadow:0 4px 14px #16a34a30!important;
}

html[lang^="ar"] body #nbsStudio
label:has(#nbsSmart:checked)::after {
    content:"✓  إيقاف تتبع الوجوه"!important;
}

html[lang^="en"] body #nbsStudio
label:has(#nbsSmart:checked)::after {
    content:"✓  Disable Face Tracking"!important;
}

/* Loading state */

html body #nbsStudio
label:has(#nbsSmart:disabled) {
    cursor:wait!important;
}

html body #nbsStudio
label:has(#nbsSmart:disabled)::after {
    opacity:.75!important;
    transform:none!important;
}

html[lang^="ar"] body #nbsStudio
label:has(#nbsSmart:disabled)::after {
    content:"جاري تهيئة التتبع..."!important;
}

html[lang^="en"] body #nbsStudio
label:has(#nbsSmart:disabled)::after {
    content:"Initializing tracking..."!important;
}

/* Dark mode */

html[data-theme="dark"] body #nbsStudio
label:has(#nbsSmart) {
    background:#241d36!important;
    border-color:#9674e5!important;
}

html[data-theme="dark"] body #nbsStudio
label:has(#nbsSmart) strong,
html[data-theme="dark"] body #nbsStudio
label:has(#nbsSmart) b {
    color:#ffffff!important;
    -webkit-text-fill-color:#ffffff!important;
}

html[data-theme="dark"] body #nbsStudio
label:has(#nbsSmart) small {
    color:#d8ccef!important;
    -webkit-text-fill-color:#d8ccef!important;
}

html[data-theme="dark"] body #nbsStudio
label:has(#nbsSmart:checked) {
    background:#152e24!important;
    border-color:#4ade80!important;
}

@media(max-width:600px) {

    html body #nbsStudio label:has(#nbsSmart) {
        padding:15px!important;
    }

    html body #nbsStudio
    label:has(#nbsSmart)::after {
        min-height:54px!important;
        font-size:16px!important;
    }

}

@media(prefers-reduced-motion:reduce) {
    html body #nbsStudio
    label:has(#nbsSmart)::after {
        transition:none!important;
    }
}

/* END NUJIZ SMART BUTTON V51 */



/* NUJIZ PROFESSIONAL MASK V52 */

html body #nbsMaskControls {
    display:grid!important;
    gap:15px!important;
    padding:15px!important;
    margin:12px 0!important;
    background:#f5f3ff!important;
    border:1px solid #c4b5fd!important;
    border-radius:12px!important;
}

html body #nbsMaskControls label {
    display:grid!important;
    grid-template-columns:1fr auto!important;
    align-items:center!important;
    gap:10px!important;
    font-size:14px!important;
}

html body #nbsMaskControls strong {
    color:#312e81!important;
    -webkit-text-fill-color:#312e81!important;
    font-size:14px!important;
}

html body #nbsMaskControls output {
    padding:5px 10px!important;
    background:#e0d7ff!important;
    color:#4c1d95!important;
    -webkit-text-fill-color:#4c1d95!important;
    border-radius:7px!important;
    font-size:14px!important;
    font-weight:800!important;
}

html body #nbsMaskControls input[type="range"] {
    grid-column:1/-1!important;
    width:100%!important;
    accent-color:#7950e8!important;
}

html body #nbsMaskControls small {
    color:#475569!important;
    -webkit-text-fill-color:#475569!important;
    font-size:12px!important;
    line-height:1.7!important;
}

html[data-theme="dark"] body #nbsMaskControls {
    background:#211c35!important;
    border-color:#66528e!important;
}

html[data-theme="dark"] body #nbsMaskControls strong {
    color:#ffffff!important;
    -webkit-text-fill-color:#ffffff!important;
}

html[data-theme="dark"] body #nbsMaskControls output {
    background:#403260!important;
    color:#ddd6fe!important;
    -webkit-text-fill-color:#ddd6fe!important;
}

html[data-theme="dark"] body #nbsMaskControls small {
    color:#cbd5e1!important;
    -webkit-text-fill-color:#cbd5e1!important;
}

