/* Custom styles for Invoice Processor Web Application */

/* Global styles */
body {
    background-color: #f8f9fa;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Navigation */
.navbar-brand {
    font-weight: 600;
}

/* Cards */
.card {
    border: none;
    border-radius: 10px;
}

.card-header {
    border-radius: 10px 10px 0 0 !important;
    border-bottom: none;
    font-weight: 600;
}

/* Upload area */
.border-dashed {
    border-style: dashed !important;
    transition: all 0.3s ease;
}

.border-dashed:hover {
    border-color: #004976 !important;
    background-color: #e6f0f7 !important;
}

/* Confidence score badges */
.confidence-excellent {
    background-color: #198754 !important;
}

.confidence-good {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.confidence-fair {
    background-color: #fd7e14 !important;
}

.confidence-poor {
    background-color: #dc3545 !important;
}

/* Bootstrap badge overrides for confidence scores */
.bg-orange {
    background-color: #fd7e14 !important;
    color: #fff !important;
}

.bg-warning {
    background-color: #ffc107 !important;
    color: #000 !important;
}

.bg-success {
    background-color: #198754 !important;
    color: #fff !important;
}

.bg-danger {
    background-color: #dc3545 !important;
    color: #fff !important;
}

/* Status badges */
.status-pending {
    background-color: #6c757d !important;
}

.status-reviewed {
    background-color: #198754 !important;
}

.status-rejected {
    background-color: #dc3545 !important;
}

.status-approved {
    background-color: #004976 !important;
}

/* Form styling */
.form-control:focus {
    border-color: #004976;
    box-shadow: 0 0 0 0.2rem rgba(0, 73, 118, 0.25);
}

/* Progress bars */
.progress {
    height: 8px;
    border-radius: 4px;
}

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

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 500;
}

.btn-sm {
    font-size: 0.8rem;
}

/* Alerts */
.alert {
    border-radius: 8px;
    border: none;
}

/* Footer */
footer {
    margin-top: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Loading spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* File upload drag and drop */
.upload-zone {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    cursor: pointer;
}

.upload-zone.dragover {
    border-color: #004976 !important;
    background-color: #e6f0f7 !important;
}

/* Review interface - removed max-height to allow full-page PDF viewer */
/* .pdf-viewer styles are now defined in templates/review/document.html */

.field-confidence {
    font-size: 0.8rem;
    font-weight: 600;
}

/* Pagination */
.pagination .page-link {
    border-radius: 6px;
    margin: 0 2px;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: #004976;
    border-color: #004976;
}

/* Utility classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Brand Color Override - Pantone 7693C */
/* Override Bootstrap's primary color with James Imaging Systems brand blue */
.bg-primary {
    background-color: #004976 !important;
}

.btn-primary {
    background-color: #004976 !important;
    border-color: #004976 !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: #003558 !important;
    border-color: #003558 !important;
}

.btn-outline-primary {
    color: #004976 !important;
    border-color: #004976 !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: #004976 !important;
    border-color: #004976 !important;
    color: #fff !important;
}

.text-primary {
    color: #004976 !important;
}

.border-primary {
    border-color: #004976 !important;
}

.navbar-dark.bg-primary {
    background-color: #004976 !important;
}

.badge.bg-primary {
    background-color: #004976 !important;
}

.alert-primary {
    background-color: #e6f0f7 !important;
    border-color: #004976 !important;
    color: #003558 !important;
}

a {
    color: #004976;
}

a:hover {
    color: #003558;
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    /* Dark mode styles can be added here */
}
