/* Custom styles for PDF Processor */

body {
    background-color: #f8f9fa;
}

.card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

.navbar-brand {
    font-weight: bold;
}

/* Person rows styling */
.person-row {
    background-color: #fff;
    border-left: 4px solid #0d6efd;
}

.person-row:hover {
    background-color: #f8f9fa;
}

/* Form styling */
.form-control:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Page gallery styling */
.page-item {
    transition: all 0.3s ease;
}

.page-card {
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.page-card:hover {
    border-color: #0d6efd;
    transform: translateY(-2px);
}

.page-checkbox:checked ~ * .page-card {
    border-color: #198754;
    background-color: #f8fff8;
}

.thumbnail-img {
    max-height: 120px;
    max-width: 100%;
    object-fit: contain;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.thumbnail-img:hover {
    transform: scale(1.05);
}

.thumbnail-placeholder {
    height: 120px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Badge styling */
.badge {
    font-size: 0.7em;
    margin-bottom: 2px;
}

/* Loading states */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Sortable ghost effect */
.sortable-ghost {
    opacity: 0.4;
    background-color: #e9ecef;
}

.sortable-chosen {
    background-color: #fff3cd;
    border-color: #ffc107;
}

/* Drag handle */
.drag-handle {
    cursor: move;
    user-select: none;
    color: #6c757d;
    font-size: 1.2em;
}

.drag-handle:hover {
    color: #0d6efd;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-card .card-body {
        padding: 0.75rem;
    }
    
    .thumbnail-img,
    .thumbnail-placeholder {
        max-height: 100px;
    }
    
    .matches-info .badge {
        font-size: 0.6em;
        margin: 1px;
    }
}

/* Table responsive improvements */
.table-responsive {
    border-radius: 0.375rem;
}

.table th {
    border-top: none;
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Alert improvements */
.alert {
    border-radius: 0.5rem;
    border-left: 4px solid;
}

.alert-danger {
    border-left-color: #dc3545;
}

.alert-success {
    border-left-color: #198754;
}

/* Button improvements */
.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1.1rem;
}

/* Modal improvements */
.modal-content {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    border-bottom: 2px solid #e9ecef;
}

/* File input styling */
input[type="file"] {
    cursor: pointer;
}

input[type="file"]::-webkit-file-upload-button {
    background-color: #0d6efd;
    color: white;
    border: none;
    padding: 0.375rem 0.75rem;
    border-radius: 0.25rem;
    cursor: pointer;
    margin-right: 0.5rem;
}

input[type="file"]::-webkit-file-upload-button:hover {
    background-color: #0b5ed7;
}

/* Statistics cards */
.text-center h4 {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.text-center small {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.card {
    animation: fadeIn 0.5s ease-out;
}

/* Focus improvements for accessibility */
.btn:focus,
.form-control:focus,
.form-check-input:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar, .btn, .modal {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
        break-inside: avoid;
    }
}