/* =====================================================
   Reverse PDF Tool - Additional Styles
   ===================================================== */

/* شبكة المصغرات */
.page-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

/* بطاقة المصغرة الواحدة */
.page-thumbnail {
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 12px;
    padding: 12px;
    background: white;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    cursor: pointer;
}

.page-thumbnail:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-shadow, 0 4px 6px rgba(0,0,0,0.1));
}

/* رقم الصفحة فوق المصغرة */
.page-thumbnail .page-number {
    position: absolute;
    top: -10px;
    left: -10px;
    background: var(--primary, #00008B);
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* الصورة المصغرة */
.page-image {
    width: 100%;
    height: 140px;
    object-fit: contain;
    margin-bottom: 8px;
    background: var(--bg-light, #f9fafb);
    border-radius: 6px;
    border: 1px solid var(--border, #e5e7eb);
}

/* معلومات حجم الصفحة */
.page-size {
    font-size: 11px;
    color: var(--text-light, #6b7280);
    margin-top: 6px;
}

/* تنسيق قسم المعاينة (اختياري) */
.preview-section {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid var(--border, #e5e7eb);
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.preview-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text, #111827);
}

.preview-count {
    font-size: 13px;
    color: var(--text-light, #6b7280);
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 640px) {
    .page-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }
    .page-image {
        height: 100px;
    }
}