/* PDF Tools Specific Styles */

/* PDF Drop Zone - Similar to image converter but for PDFs */
#pdfDropZone {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 3px dashed #3b82f6;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

#pdfDropZone:hover,
#pdfDropZone.dragover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(147, 51, 234, 0.1) 100%);
    border-color: #8b5cf6;
    transform: scale(1.02);
}

#pdfDropZone .pdf-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

/* PDF File Item */
.pdf-file-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    animation: fadeIn 0.3s ease-out;
}

.pdf-file-item .pdf-icon-small {
    font-size: 1.5rem;
    color: #ef4444;
}

.pdf-file-item .file-info {
    flex: 1;
    min-width: 0;
}

.pdf-file-item .file-name {
    font-weight: 500;
    color: #374151;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pdf-file-item .file-meta {
    font-size: 0.75rem;
    color: #6b7280;
}

.pdf-file-item .remove-btn {
    color: #ef4444;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
    border: none;
    background: none;
    font-size: 1rem;
}

.pdf-file-item .remove-btn:hover {
    background: #fee2e2;
}

/* Page Selector for multi-page PDFs */
.page-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    max-height: 200px;
    overflow-y: auto;
    padding: 8px;
    background: #f9fafb;
    border-radius: 8px;
}

.page-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 80px;
}

.page-btn:hover {
    border-color: #3b82f6;
}

.page-btn.selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.page-btn .page-thumb {
    width: 60px;
    height: 80px;
    object-fit: contain;
    background: #f3f4f6;
    border-radius: 4px;
}

.page-btn .page-num {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
}

/* Conversion Settings for PDF */
.pdf-settings {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pdf-settings .setting-group {
    margin-bottom: 1.5rem;
}

.pdf-settings .setting-group:last-child {
    margin-bottom: 0;
}

.pdf-settings label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.pdf-settings select,
.pdf-settings input[type="range"] {
    width: 100%;
    padding: 0.5rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    transition: border-color 0.2s;
}

.pdf-settings select:focus,
.pdf-settings input[type="range"]:focus {
    outline: none;
    border-color: #3b82f6;
}

/* Quality slider specific */
.quality-slider {
    -webkit-appearance: none;
    appearance: none;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    outline: none;
}

.quality-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: transform 0.2s;
}

.quality-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Result Cards for PDF */
.pdf-result-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s;
    animation: fadeIn 0.3s ease-out;
}

.pdf-result-card:hover {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.pdf-result-card .preview {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f9fafb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.pdf-result-card .file-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pdf-result-card .file-name {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.875rem;
}

.pdf-result-card .file-size {
    font-size: 0.75rem;
    color: #6b7280;
}

/* Progress Area */
.pdf-progress {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.pdf-progress .progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.pdf-progress .progress-bar-bg {
    width: 100%;
    height: 12px;
    background: #e5e7eb;
    border-radius: 9999px;
    overflow: hidden;
}

.pdf-progress .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    border-radius: 9999px;
    transition: width 0.3s ease;
}

/* Format badges */
.format-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
}

.format-badge-image {
    background: #dbeafe;
    color: #1e40af;
}

.format-badge-document {
    background: #dcfce7;
    color: #166534;
}

.format-badge-data {
    background: #fef3c7;
    color: #92400e;
}

/* Warning/Info boxes */
.info-box {
    background: #eff6ff;
    border-left: 4px solid #3b82f6;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
}

.info-box p {
    margin: 0;
    font-size: 0.875rem;
    color: #1e40af;
}

.warning-box {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin-bottom: 16px;
}

.warning-box p {
    margin: 0;
    font-size: 0.875rem;
    color: #92400e;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #pdfDropZone {
        padding: 1.5rem 1rem;
    }
    
    .page-selector {
        max-height: 150px;
    }
    
    .page-btn {
        min-width: 60px;
        padding: 6px;
    }
    
    .page-btn .page-thumb {
        width: 48px;
        height: 64px;
    }
    
    .pdf-result-card .preview {
        height: 150px;
    }
}

/* RTL Support */
.rtl .pdf-file-item {
    direction: rtl;
}

.rtl .pdf-result-card .file-info {
    direction: rtl;
}

.rtl .info-box,
.rtl .warning-box {
    border-left: none;
    border-right: 4px solid;
}

.rtl .info-box {
    border-right-color: #3b82f6;
}

.rtl .warning-box {
    border-right-color: #f59e0b;
}