/* ═══════════════════════════════════════════════════ */
/* الملف التعريفي للتصميم - أدوات الأستاذ */
/* ═══════════════════════════════════════════════════ */

/* الإعدادات العامة */
#covers-tool {
    font-family: 'Cairo', sans-serif;
    color: #1e293b;
    background: #f8fafc;
}
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════ */
/* الواجهة 1: اختيار المادة */
/* ═══════════════════════════════════════════════════ */
.main-layout {
    display: flex;
    gap: 30px;
    padding: 30px;
    max-width: 1600px;
    margin: 0 auto;
}
.subjects-col { flex: 1; }
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 24px;
}
.subject-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.subject-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    border-color: #6366f1;
}

/* ═══════════════════════════════════════════════════ */
/* الواجهة 2: المحرر الاحترافي */
/* ═══════════════════════════════════════════════════ */

/* شريط الأدوات العلوي (خارج المحرر) */
.workspace-toolbar {
    height: 75px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-bottom: none;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 0 30px;
    box-shadow: 0 -4px 15px rgba(0,0,0,0.02);
}

.editor-layout {
    display: flex;
    height: 82vh;
    min-height: 700px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
}

/* عمود النماذج العريض */
.editor-sidebar-left {
    width: 750px;
    border-left: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}
.templates-grid {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
    display: grid;
    grid-template-columns: 1fr 1fr; /* صورتين كما طلب المستخدم */
    gap: 20px;
    align-content: flex-start;
}
.template-item {
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s;
    aspect-ratio: 1 / 1.414;
    background: #f1f5f9;
}
.template-item:hover { transform: scale(1.02); }
.template-item.active {
    border-color: #6366f1;
    box-shadow: 0 0 0 5px rgba(99, 102, 241, 0.15);
}
.template-item img { width: 100%; height: 100%; object-fit: cover; }

/* منطقة العمل (Canvas) */
.editor-workspace {
    flex: 1;
    background: #f1f5f9;
    display: flex;
    flex-direction: column;
    position: relative;
}
.canvas-container-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 30px;
}
.canvas-container {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* عمود الخصائص */
.editor-sidebar-right {
    width: 480px;
    border-right: 1px solid #e2e8f0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
}

/* الأزرار والأيقونات */
.toolbar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    border-radius: 12px;
    border: none;
    background: none;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
}
.toolbar-btn:hover { background: #f1f5f9; color: #6366f1; }
.toolbar-btn i { font-size: 20px; }
.toolbar-btn span { font-size: 12px; font-weight: 700; }

/* التبويبات */
.properties-tabs { display: flex; border-bottom: 1px solid #f1f5f9; }
.prop-tab {
    flex: 1; padding: 15px; border: none; background: none;
    font-weight: 800; color: #64748b; cursor: pointer;
    border-bottom: 3px solid transparent;
}
.prop-tab.active { color: #6366f1; border-bottom-color: #6366f1; }

/* تذييل الصفحة */
.workspace-footer {
    height: 70px;
    background: #ffffff;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
}
.download-btn {
    background: #6366f1;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 800;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* التجاوب مع الجوال */
@media (max-width: 1100px) {
    .editor-layout { flex-direction: column; height: auto; }
    .editor-sidebar-left, .editor-sidebar-right { width: 100% !important; height: 350px; }
    .workspace-toolbar { flex-wrap: wrap; height: auto; padding: 15px; }
}

@media (min-width:768px){
.text-properties-bar,#text-properties,.toolbar-top{display:none!important;}
}
