﻿/* Performance-first UI: remove expensive visual effects from interface only */
:root {
    --glass-blur: none;
}

.panel,
.toolbar,
.group,
.dropdown,
.menu,
.context-menu,
.modal,
.dialog,
.btn,
button,
input,
select,
textarea,
.icon-btn,
.tool-btn,
.subtool-btn {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
    filter: none !important;
    transition: none !important;
    animation: none !important;
}

/* Stricter lightweight pass: strip remaining glow/shadows from UI descendants */
.header, .header *,
.panel, .panel *,
.timeline-panel, .timeline-panel *,
.toolbar, .toolbar *,
.menu, .menu *,
.context-menu, .context-menu *,
.modal, .modal *,
.dialog, .dialog *,
[class*="panel"], [class*="panel"] *,
[class*="menu"], [class*="menu"] *,
[class*="toolbar"], [class*="toolbar"] * {
    box-shadow: none !important;
    text-shadow: none !important;
    filter: none !important;
}

/* ===== [v4.2.9] خفّة إضافية: تقليل كلفة إعادة الطلاء (لا يكسر أي ميزة) ===== */
/* تلميح للمتصفح بعزل طبقات إعادة الرسم المتكرّر على الـ GPU. */
.timeline-panel,
.frames-container,
.frame {
    contain: layout style;
}
/* الإطارات الكثيرة: نتجنّب رسم ما هو خارج الشاشة (أخفّ بكثير مع المشاريع الضخمة). */
.frames-container .frame {
    content-visibility: auto;
    contain-intrinsic-size: 64px 48px;
}

/* ===== [v4.3.0] Ultra Fast Frames + Smooth Zoom (lightweight, non-breaking) ===== */
/* عزل طبقة الكانفاس على الـ GPU لتسريع الزوم/التحريك مع الكانفاس الكبير جدًا. */
#canvas, .main-canvas, canvas.drawing-canvas {
    will-change: transform;
    transform: translateZ(0);
}
/* أثناء التنقّل السريع: نوقف الانتقالات المكلفة على الإطارات لتفادي أي ثقل. */
body.anima-rapid-nav .frame,
body.anima-rapid-nav .frames-container .frame {
    transition: none !important;
    animation: none !important;
}
/* الخط الزمني الضخم: حاوية قابلة للتمرير معزولة لتقليل كلفة الرسم. */
.timeline-scroll-area, #timelineScrollArea {
    contain: layout style paint;
    overscroll-behavior: contain;
}

/* ===== [v4.7.3] إخفاء صور الفريمات لتسريع الأداء مع بقاء المقابض والأشرطة ===== */
body.anima-hide-thumbs .frame {
    background-image: none !important;
    background-color: transparent !important;
}
body.anima-hide-thumbs .frame::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: rgba(140, 145, 160, 0.25);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}
body.anima-hide-thumbs .draw-frame-thumb {
    display: none !important;
}
body.anima-hide-thumbs .draw-frame {
    background: #0c0e1a !important;
}
