
/* NUJIZ BLUR VIDEO PREMIUM UI V1 */

html body {
    --nbv-text: #172033;
    --nbv-muted: #475569;
    --nbv-surface: #f8fafc;
    --nbv-input: #ffffff;
    --nbv-border: #cbd5e1;
    --nbv-accent: #7045e8;
}

html[data-theme="dark"] body,
html.dark body,
body.dark,
body.dark-mode,
body[data-theme="dark"] {
    --nbv-text: #f8fafc;
    --nbv-muted: #cbd5e1;
    --nbv-surface: #1c2330;
    --nbv-input: #111827;
    --nbv-border: #475569;
    --nbv-accent: #a78bfa;
}

/* Instruction card */

html body #videoBlurRegionControls
.video-mark-instruction {
    position: relative;
    padding: 18px !important;
    margin: 16px 0 !important;
    border: 1px solid #8b5cf6 !important;
    border-radius: 16px !important;
    background: linear-gradient(
        135deg,#241d3d,#181e30
    ) !important;
    box-shadow: 0 5px 18px #00000012;
}

html body #videoBlurRegionControls
.video-mark-instruction b {
    display: block !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    line-height: 1.8 !important;
    margin-bottom: 8px !important;
}

html body #videoBlurRegionControls
.video-mark-instruction b::before {
    content: "✥";
    display: inline-block;
    color: #b8ff35 !important;
    -webkit-text-fill-color: #b8ff35 !important;
    margin-inline-end: 9px;
    font-size: 20px;
}

html body #videoBlurRegionControls
.video-mark-instruction span {
    display: block !important;
    color: #e2e8f0 !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    line-height: 1.9 !important;
    opacity: 1 !important;
}

/* Position and dimensions */

html body #videoBlurRegionControls
.video-control-grid {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr));
    gap: 12px !important;
}

html body #videoBlurRegionControls
.video-control-grid label {
    padding: 12px !important;
    margin: 0 !important;
    border: 1px solid var(--nbv-border) !important;
    background: var(--nbv-surface) !important;
    border-radius: 14px !important;
    min-width: 0;
}

html body #videoBlurRegionControls
.video-control-grid label > span {
    display: block;
    color: var(--nbv-text) !important;
    -webkit-text-fill-color: var(--nbv-text) !important;
    font-size: 13px !important;
    font-weight: 800 !important;
    margin-bottom: 8px !important;
    opacity: 1 !important;
}

/* Numeric inputs */

html body :is(
    #videoMarkX,
    #videoMarkY,
    #videoMarkW,
    #videoMarkH
) {
    width: 100% !important;
    min-height: 48px !important;
    box-sizing: border-box !important;
    border: 1px solid var(--nbv-border) !important;
    border-radius: 10px !important;
    background: var(--nbv-input) !important;
    color: var(--nbv-text) !important;
    -webkit-text-fill-color: var(--nbv-text) !important;
    font-size: 19px !important;
    font-weight: 800 !important;
    font-variant-numeric: tabular-nums;
    text-align: center !important;
    direction: ltr !important;
}

/* Dropdowns */

html body :is(
    #videoBlurMode,
    #videoBlurBlock,
    #videoExportQuality
) {
    min-height: 54px !important;
    border: 1px solid var(--nbv-border) !important;
    border-radius: 13px !important;
    background-color: var(--nbv-input) !important;
    color: var(--nbv-text) !important;
    -webkit-text-fill-color: var(--nbv-text) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

html body :is(
    #videoBlurMode,
    #videoBlurBlock,
    #videoExportQuality,
    #videoMarkX,
    #videoMarkY,
    #videoMarkW,
    #videoMarkH
):focus {
    outline: none !important;
    border-color: #8b5cf6 !important;
    box-shadow: 0 0 0 3px #8b5cf633 !important;
}

/* Blur selection frame */

html body [data-label="منطقة تمويه الفيديو"],
html body [data-label="Video blur area"] {
    border: 2px dashed #b8ff35 !important;
    border-radius: 5px !important;
    box-shadow:
        0 0 0 2px #7045e8,
        0 0 16px #7045e855 !important;
    cursor: move !important;
}

/* Readable overlay label */

html body [data-label="منطقة تمويه الفيديو"]::after,
html body [data-label="Video blur area"]::after,
html body [data-label="منطقة تمويه الفيديو"]::before,
html body [data-label="Video blur area"]::before {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    font-size: 12px !important;
    font-weight: 800 !important;
    opacity: 1 !important;
    text-shadow: none !important;
}

/* Resize handles */

html body [data-label="منطقة تمويه الفيديو"] [data-handle],
html body [data-label="Video blur area"] [data-handle] {
    background: #b8ff35 !important;
    border: 2px solid #172033 !important;
    border-radius: 50% !important;
    box-shadow: 0 0 0 2px #ffffff66 !important;
}

/* Video player */

html body #videoPreview {
    border-radius: 12px !important;
    color: #ffffff !important;
}

html body video::-webkit-media-controls-current-time-display,
html body video::-webkit-media-controls-time-remaining-display {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
    text-shadow: 0 1px 3px #000000 !important;
}

/* Processing and download buttons */

html body #videoProcessButton {
    min-height: 56px !important;
    border-radius: 14px !important;
    font-size: 17px !important;
    font-weight: 800 !important;
}

html body #videoDownloadButton.visible {
    background: #b8ff35 !important;
    border-radius: 14px !important;
    min-height: 56px !important;
}

html body #videoDownloadButton.visible,
html body #videoDownloadButton.visible * {
    color: #142509 !important;
    -webkit-text-fill-color: #142509 !important;
    font-weight: 800 !important;
    opacity: 1 !important;
}

html body:has(#videoDownloadButton.visible)
#videoProcessButton {
    display: none !important;
}

/* Mobile */

@media(max-width:600px) {
    html body #videoBlurRegionControls
    .video-mark-instruction {
        padding: 14px !important;
    }

    html body #videoBlurRegionControls
    .video-control-grid {
        gap: 8px !important;
    }

    html body #videoBlurRegionControls
    .video-control-grid label {
        padding: 9px !important;
    }

    html body #videoBlurRegionControls
    .video-mark-instruction span {
        font-size: 13px !important;
    }
}
