/* =====================================================
   OCR PDF Tool - Additional Styles
   ===================================================== */

/* تنسيق المعاينة */
.preview-section {
    margin-top: 24px;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border, #e5e7eb);
    padding: 20px;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    flex-wrap: wrap;
    gap: 12px;
}

.preview-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text, #111827);
}

.preview-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.preview-controls span {
    font-size: 14px;
    color: var(--text-light, #6b7280);
}

.btn-icon {
    background: var(--bg-light, #f9fafb);
    border: 1px solid var(--border, #e5e7eb);
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    transition: 0.2s;
    color: var(--text, #111827);
}

.btn-icon:hover:not(:disabled) {
    background: var(--primary, #00008B);
    color: white;
    border-color: var(--primary, #00008B);
}

.btn-icon:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.preview-content {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--bg-light, #f9fafb);
    border-radius: 8px;
    padding: 20px;
    min-height: 400px;
}

.preview-canvas {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background: white;
}

/* OCR Overlay */
.ocr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    z-index: 10;
}

.ocr-loading {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.ocr-loading i {
    font-size: 32px;
    color: var(--primary, #00008B);
}

.ocr-loading span {
    font-size: 14px;
    color: var(--text, #111827);
}

/* Option Hint */
.option-hint {
    display: block;
    font-size: 11px;
    color: var(--text-light, #6b7280);
    margin-top: 4px;
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: normal;
    font-size: 13px;
    color: var(--text, #111827);
    padding: 6px 0;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary, #00008B);
}

/* Info Box */
.info-box {
    margin-top: 20px;
    padding: 12px 16px;
    background: #e6f7ff;
    border-left: 4px solid #1890ff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    color: #0050b3;
}

.info-box i {
    font-size: 18px;
    color: #1890ff;
}


/* OCR Statistics Cards */
.ocr-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 20px 0;
    padding: 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    transition: background 0.3s;
}

.stats-card {
    flex: 1;
    min-width: 120px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.stats-card i {
    font-size: 28px;
    color: var(--primary, #00008B);
}

.stats-card div {
    display: flex;
    flex-direction: column;
}

.stats-card span {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary, #00008B);
    line-height: 1.2;
}

.stats-card small {
    font-size: 11px;
    color: var(--text-light, #6b7280);
}

/* Extracted Text Sample */
.extracted-sample {
    margin: 20px 0;
    background: white;
    border-radius: 12px;
    border: 1px solid var(--border, #e5e7eb);
    overflow: hidden;
}

.sample-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    background: var(--bg-light, #f9fafb);
    border-bottom: 1px solid var(--border, #e5e7eb);
}

.sample-header i {
    color: var(--primary, #00008B);
}

.sample-header span {
    flex: 1;
    font-weight: 500;
}

.copy-sample-btn {
    background: none;
    border: none;
    color: var(--primary, #00008B);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    transition: 0.2s;
}

.copy-sample-btn:hover {
    background: var(--border, #e5e7eb);
}

.sample-content {
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.5;
    white-space: pre-wrap;
    font-family: monospace;
    background: #fafafa;
}
/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .preview-controls {
        width: 100%;
        justify-content: center;
    }
    
    .preview-content {
        min-height: 300px;
        padding: 12px;
    }
}