/* File: techtoolshive/app/static/css/pdf-indexing.css */
/* Styles for client-side PDF indexing UI */
/* Location: techtoolshive/app/static/css/pdf-indexing.css */

/* Modal-specific styles for PDF indexing */
#pdfIndexingModal .modal-dialog {
    max-width: 900px;
}

#pdfIndexingModal .modal-body {
    padding: 0;
    max-height: 70vh;
    overflow-y: auto;
}

#pdfIndexingContainer {
    padding: 20px;
}

.pdf-indexing-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.pdf-indexing-header {
    text-align: center;
    margin-bottom: 30px;
}

.pdf-indexing-header h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 24px;
}

.pdf-indexing-header p {
    color: #7f8c8d;
    font-size: 16px;
}

/* Upload Area */
.pdf-upload-section {
    margin-bottom: 30px;
}

.upload-area {
    border: 3px dashed #bdc3c7;
    border-radius: 10px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.upload-area:hover {
    border-color: #3498db;
    background: #ecf0f1;
}

.upload-area.drag-over {
    border-color: #2ecc71;
    background: #d5f4e6;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 48px;
    margin-bottom: 15px;
    color: #7f8c8d;
}

.upload-text {
    color: #34495e;
    line-height: 1.5;
}

.upload-text strong {
    color: #2c3e50;
}

/* Product Selection */
.product-selection {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.product-selection h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #34495e;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(149, 165, 166, 0.3);
}

/* Progress Section */
.indexing-progress {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.indexing-progress h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background: #ecf0f1;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 15px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    width: 0%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

.progress-text {
    text-align: center;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 10px;
}

.progress-details {
    text-align: center;
    color: #7f8c8d;
    font-size: 14px;
}

/* Results Section */
.indexing-results {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.indexing-results h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
}

.success-message {
    background: #d5f4e6;
    border: 1px solid #2ecc71;
    border-radius: 6px;
    padding: 20px;
    color: #27ae60;
}

.success-message h5 {
    margin-bottom: 15px;
    color: #27ae60;
}

.success-message p {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Cache Status */
.cache-status {
    background: #fff;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cache-status h4 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 18px;
}

.cache-info p {
    margin-bottom: 10px;
    color: #34495e;
}

.cached-items {
    margin-top: 15px;
}

.cached-items strong {
    color: #2c3e50;
    display: block;
    margin-bottom: 8px;
}

.cached-items ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cached-items li {
    background: #f8f9fa;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
    color: #34495e;
    font-family: monospace;
    font-size: 13px;
}

/* Messages */
.message {
    padding: 12px 20px;
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

.message-success {
    background: #d5f4e6;
    color: #27ae60;
    border: 1px solid #2ecc71;
}

.message-error {
    background: #fadbd8;
    color: #e74c3c;
    border: 1px solid #e74c3c;
}

.message-info {
    background: #d6eaf8;
    color: #2980b9;
    border: 1px solid #3498db;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .pdf-indexing-container {
        padding: 15px;
    }
    
    .upload-area {
        padding: 30px 15px;
    }
    
    .upload-icon {
        font-size: 36px;
    }
    
    .product-selection,
    .indexing-progress,
    .indexing-results,
    .cache-status {
        padding: 20px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    /* Modal responsive adjustments */
    #pdfIndexingModal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    #pdfIndexingModal .modal-body {
        max-height: 60vh;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* File Input Styling */
input[type="file"] {
    display: none;
}

/* Focus States */
.upload-area:focus-within {
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .upload-area,
    .btn,
    .progress-fill,
    .message {
        transition: none;
    }
    
    .loading {
        animation: none;
    }
}

/* Integration with existing PDF readers styles */
.pdf-indexing-container .card {
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.pdf-indexing-container .btn {
    font-size: 14px;
    font-weight: 500;
}

/* Modal backdrop improvements */
#pdfIndexingModal .modal-backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Scrollbar styling for modal */
#pdfIndexingModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#pdfIndexingModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#pdfIndexingModal .modal-body::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

#pdfIndexingModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
} 