/* Custom styles for PDF Data Extraction application */

/* Add some padding to the body */
body {
    padding-bottom: 50px;
}

/* Card styling */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1.5rem;
}

.card-header {
    font-weight: 500;
}

/* Table styling */
.table th {
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0;
    border-radius: 0.25rem;
    max-height: 600px;
    overflow-y: auto;
}

.table thead th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa;
    z-index: 1;
}

/* Dashboard tabs */
.nav-tabs .nav-link {
    color: #495057;
}

.nav-tabs .nav-link.active {
    font-weight: 600;
}

/* File upload styling */
.custom-file-input:focus ~ .custom-file-label {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Preview section */
.preview-section {
    background-color: #f8f9fa;
    border-radius: 0.25rem;
    padding: 1rem;
}

/* Transaction table */
.transaction-positive {
    color: #28a745;
}

.transaction-negative {
    color: #dc3545;
}

.transaction-count {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Alert styling */
.alert-permanent {
    margin-bottom: 1rem;
    border-left: 5px solid;
}

.alert-permanent.alert-warning {
    border-left-color: #ffc107;
}

.alert-permanent.alert-success {
    border-left-color: #28a745;
}

.alert-permanent.alert-info {
    border-left-color: #17a2b8;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card-title {
        font-size: 1.25rem;
    }
    
    .table th, .table td {
        padding: 0.5rem;
    }
}

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.spinner-message {
    text-align: center;
    margin-top: 1rem;
}

/* Processing steps styling */
.processing-steps {
    font-size: 0.9rem;
}

.processing-steps .step {
    padding: 0.25rem 0;
    color: #6c757d;
    transition: color 0.3s ease;
}

.processing-steps .step.active {
    color: #007bff;
    font-weight: 500;
}

.processing-steps .step.completed {
    color: #28a745;
}

.processing-steps .step i {
    width: 16px;
    text-align: center;
}

/* Progress bar enhancements */
.progress {
    background-color: #e9ecef;
    border-radius: 0.5rem;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

/* PDF preview */
.pdf-preview {
    width: 100%;
    height: 500px;
    border: 1px solid #dee2e6;
    border-radius: 0.25rem;
}

/* Highlight irregular transactions */
.irregular-transaction {
    background-color: rgba(255, 193, 7, 0.2);
}

/* Footer styling */
footer {
    margin-top: 3rem;
}

/* Pagination styling */
.pagination {
    margin-bottom: 0;
}

.page-link {
    color: #0d6efd;
    border-color: #dee2e6;
}

.page-item.active .page-link {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
    border-color: #dee2e6;
}
