/* Feature Geanne PDF (Extrator PDF) — Camada 7 (migração incremental, 6/13).
   Movido de public/geanne_pdf.css sem alteração de valores. */

/* ===== Geanne PDF Styles ===== */
.geanne-upload-section {
    width: 100%;
}

.geanne-drop-zone {
    border: 2px dashed var(--primary-orange);
    border-radius: 12px;
    padding: 64px 32px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #ffffff;
}

.geanne-drop-zone:hover,
.geanne-drop-zone.dragover {
    border-color: var(--primary-orange);
    background: rgba(230, 92, 0, 0.05);
    box-shadow: 0 4px 20px rgba(230, 92, 0, 0.15);
}

.geanne-drop-zone.dragover {
    transform: scale(1.01);
}

.geanne-drop-zone-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.geanne-drop-zone-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(230, 92, 0, 0.1);
    border-radius: 50%;
    color: var(--primary-orange);
    font-size: 32px;
}

.geanne-drop-zone h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0;
}

.geanne-drop-zone p {
    color: #64748b;
    font-size: 0.875rem;
}

/* ===== File Info ===== */
.geanne-file-info {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    margin-top: 20px;
    display: none;
    flex-direction: column;
}

.geanne-file-info-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.geanne-file-details {
    display: flex;
    align-items: center;
    gap: 16px;
}

.geanne-file-details i {
    color: var(--primary-orange);
    font-size: 24px;
}

.geanne-file-details h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0;
}

.geanne-file-details p {
    font-size: 0.875rem;
    color: #64748b;
    margin: 0;
}

/* ===== Progress ===== */
.geanne-progress-container {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    display: none;
}

.geanne-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.875rem;
}

#geanneProgressText {
    color: #64748b;
}

#geanneProgressCount {
    color: var(--primary-orange);
    font-weight: 600;
}

.geanne-progress-bar {
    height: 8px;
    background: #f1f5f9;
    border-radius: 4px;
    overflow: hidden;
}

.geanne-progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--primary-orange), #ff8c00);
    border-radius: 4px;
    transition: width 0.25s ease;
}

/* ===== Pages Section ===== */
.geanne-pages-section {
    flex: 1;
    margin-top: 30px;
    display: none;
}

.geanne-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.geanne-section-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0;
}

.geanne-pages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* ===== Page Card ===== */
.geanne-page-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.geanne-page-card:hover {
    border-color: var(--primary-orange);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.geanne-page-card-preview {
    aspect-ratio: 4/3;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

.geanne-page-card-preview canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.geanne-page-card-preview .placeholder {
    color: #94a3b8;
    font-size: 0.875rem;
}

.geanne-page-card-content {
    padding: 16px;
}

.geanne-page-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.geanne-page-number {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--primary-orange);
    background: rgba(230, 92, 0, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.geanne-page-status {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 500;
}

.geanne-page-status.pending { color: #64748b; }
.geanne-page-status.processing { color: #eab308; }
.geanne-page-status.success { color: #16a34a; }
.geanne-page-status.error { color: #ef4444; }

.geanne-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.geanne-page-status.processing .geanne-status-dot {
    animation: geanne-pulse 1s ease-in-out infinite;
}

@keyframes geanne-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.geanne-page-card-info {
    min-height: 60px;
}

.geanne-page-card-info h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin: 0 0 4px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.geanne-page-card-info p {
    font-size: 0.75rem;
    color: #64748b;
    margin: 0;
}

.geanne-page-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.geanne-page-card-actions .btn {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
}
