/* PDF Editor Tool Specific Styles */

/* PDF Editor Page Specific Styles */

.pdf-editor-section {
    padding: 40px 0;
    min-height: 350px;
    background: white;
}

.pdf-editor-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.main-body .pdf-editor-section {
    padding-top: 16px;
}

/* Upload State */
.upload-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.upload-box {
    background: linear-gradient(135deg, #667eea 0%, #2563eb 100%);
    border-radius: 20px;
    padding: 20px 20px;
    text-align: center;
    color: white;
    width: 800px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-box:hover {
    transform: translateY(-5px);
    border-color: #e0e7ff;
}

.upload-box.drag-over {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: #fbbf24;
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 30px;
    opacity: 0.9;
}

.upload-icon svg {
    width: 80px;
    height: 80px;
    stroke: white;
}

.upload-box h2 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 600;
}

.upload-box p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.upload-btn {
    background: white;
    color: #667eea;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-btn:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

.upload-subtext {
    font-size: 16px;
    opacity: 0.8;
    margin: 0;
}

/* Editor State */
.editor-state {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
}

/* Toolbar */
.pdf-toolbar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
}

.toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.toolbar-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.toolbar-btn.btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.toolbar-btn.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.toolbar-btn.btn-success {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}

.toolbar-btn.btn-success:hover:not(:disabled) {
    background: #15803d;
    border-color: #15803d;
}

.toolbar-btn.btn-danger {
    background: #dc2626;
    color: white;
    border-color: #dc2626;
}

.toolbar-btn.btn-danger:hover:not(:disabled) {
    background: #b91c1c;
    border-color: #b91c1c;
}

.toolbar-btn svg {
    width: 20px;
    height: 20px;
}

.toolbar-spacer {
    flex: 1;
}

.toolbar-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 8px;
}

/* PDF Canvas Container */
.pdf-canvas-container {
    background: #f1f5f9;
    padding: 20px;
    min-height: 500px;
    overflow: auto;
    position: relative;
}

.pdf-canvas-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 500px;
    position: relative;
}

#pdfCanvas {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    cursor: crosshair;
    max-width: 100%;
    height: auto;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8fafc;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: #e2e8f0;
}

.zoom-level {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    min-width: 40px;
    text-align: center;
}

/* Page Navigation */
.page-navigation {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
}

.page-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #f8fafc;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.page-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.page-info {
    font-size: 12px;
    font-weight: 500;
    color: #475569;
    min-width: 60px;
    text-align: center;
}

/* Text Annotation */
.text-annotation {
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #2563eb;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 14px;
    color: #1e293b;
    cursor: move;
    min-width: 100px;
    min-height: 20px;
    outline: none;
    z-index: 10;
}

.text-annotation:focus {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.text-annotation.selected {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

/* Resize Handle */
.resize-handle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: #2563eb;
    border: 1px solid white;
    border-radius: 50%;
    cursor: nwse-resize;
    bottom: -4px;
    right: -4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.text-annotation:hover .resize-handle,
.text-annotation.selected .resize-handle {
    opacity: 1;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}

.empty-state svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #475569;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 20px;
}

/* Progress Bar */
.progress-container {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #3b82f6);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #64748b;
}

/* Color Picker */
.color-picker {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 4px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.color-option {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #1e293b;
    box-shadow: 0 0 0 2px rgba(30, 41, 59, 0.2);
}

/* Stroke Width Picker */
.stroke-width-picker {
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 4px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
}

.stroke-option {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.stroke-option:hover {
    background: #f8fafc;
}

.stroke-option.selected {
    border-color: #2563eb;
    background: #eff6ff;
}

.stroke-line {
    background: #1e293b;
    border-radius: 2px;
}

/* How to Use PDF Editor Section */
.how-to-use-pdf-editor {
    padding: 40px 0;
    background: #ffffff;
}

.how-to-use-pdf-editor .section-title {
    margin-bottom: 50px;
}

.steps-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.step-card {
    flex: 1 1 220px;
    max-width: 320px;
    text-align: center;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    margin: 0 auto 16px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
}

.step-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #1e293b;
}

.step-card p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pdf-editor-section {
        padding: 20px 0;
    }
    
    .upload-box {
        padding: 40px 20px;
        margin: 0 10px;
        width: 650px;
    }
    
    .upload-box h2 {
        font-size: 24px;
    }
    
    .upload-box p {
        font-size: 16px;
    }
    
    .pdf-toolbar {
        padding: 10px;
        gap: 5px;
    }
    
    .toolbar-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .toolbar-btn span {
        display: none;
    }
    
    .pdf-canvas-container {
        padding: 10px;
    }
    
    .zoom-controls,
    .page-navigation {
        bottom: 10px;
        right: 10px;
        left: auto;
    }
    
    .page-navigation {
        bottom: 50px;
        right: 10px;
        left: auto;
    }
}

@media (max-width: 480px) {
    .upload-box {
        padding: 30px 15px;
        width: 350px;
    }
    
    .upload-box h2 {
        font-size: 20px;
    }
    
    .pdf-toolbar {
        justify-content: center;
    }
    
    .toolbar-spacer {
        display: none;
    }
    
    .toolbar-divider {
        display: none;
    }
}
