/* Title bar styles */
.title-bar {
    background-color: #2c3e50;
    color: white;
    padding: 15px 0;
    text-align: center;
    margin-bottom: 0;
}
.title-bar h1 {
    color: white;
    margin: 0;
    font-size: 24px;
    font-weight: bold;
}

/* Navigation bar styles */
.nav-bar {
    background-color: #34495e;
    padding: 10px 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #2c3e50;
}
.nav-bar ul {
    list-style-type: none;
    margin: 0;
    padding: 0 20px;
    display: flex;
}
.nav-bar li {
    margin-right: 20px;
    border-bottom: none;
    padding: 0;
}
.nav-bar a {
    text-decoration: none;
    color: white;
    font-weight: bold;
}
.nav-bar a:hover {
    color: #3498db;
}
.nav-bar .active {
    color: #3498db;
}

/* Reset button styles */
.reset-button {
    background-color: transparent;
    border: none;
    color: #007bff;
    cursor: pointer;
    margin-right: 10px;
    font-size: 0.9em;
    text-decoration: none;
}
.reset-button:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Inspect button styles */
.inspect-button {
    background-color: transparent;
    border: none;
    color: #007bff;
    cursor: pointer;
    margin-right: 10px;
    font-size: 0.9em;
    text-decoration: none;
}
.inspect-button:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* Status badge styles */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 8px;
    display: inline-block;
}
.status-pending {
    background-color: #ffd700;
    color: #000;
}
.status-processing {
    background-color: #007bff;
    color: white;
}
.status-completed {
    background-color: #28a745;
    color: white;
}
.status-failed {
    background-color: #dc3545;
    color: white;
}
.status-removed {
    background-color: #6c757d;
    color: white;
}

/* Divider style */
.divider {
    display: inline-block;
    color: #ccc;
    margin: 0 8px;
}

/* Progress bar styles */
.progress-container {
    height: 4px;
    width: 100px;
    background-color: #f0f0f0;
    border-radius: 2px;
    margin-left: 10px;
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background-color: #4CAF50;
    width: 0%;
    transition: width 0.3s;
}

/* File item layout */
.file-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}
.file-name {
    flex: 1;
    min-width: 200px;
}
.file-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Base styles */
body {
    font-family: Arial, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}
h1, h2 {
    color: #333;
}
ul {
    list-style-type: none;
    padding: 0;
}
li {
    padding: 12px 16px;
    border-bottom: 1px solid #ddd;
}
li:last-child {
    border-bottom: none;
}
#notification, .notification {
    background-color: #f8f9fa;
    border-left: 4px solid #28a745;
    padding: 10px;
    margin-bottom: 20px;
    display: none;
}
.button {
    background-color: #4CAF50;
    border: none;
    color: white;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 16px;
    margin: 10px 0;
    cursor: pointer;
    border-radius: 4px;
}

/* Form styles */
.form-group {
    margin-bottom: 15px;
}
label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}
input[type="number"], input[type="text"], select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Settings styles */
.settings-section {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

/* OCR button styles */
.ocr-button {
    background-color: #9c27b0;
    color: white;
    border: none;
    padding: 3px 8px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: 10px;
    font-size: 0.8em;
}
.ocr-button:hover {
    background-color: #7b1fa2;
}

/* Queue status panel */
.queue-status-panel {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
}

.queue-status-panel h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

#queueDetails {
    margin-top: 10px;
}

#currentlyProcessing {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.source-label {
    display: inline-block;
    padding: 2px 6px;
    border-radius: 3px;
    margin-right: 5px;
    font-size: 0.8em;
    color: white;
}
.source-label.extracted {
    background-color: #6c757d;
}
.source-label.ocr {
    background-color: #28a745;
}

/* Document image styles */
.document-image {
    text-align: center;
    margin: 20px 0;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #f8f9fa;
}

.page-image {
    max-width: 100%;
    height: auto;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* Update page-text style to have a border to separate it from the image */
.page-text {
    line-height: 1.6;
    white-space: pre-wrap;
    border-top: 1px solid #eee;
    margin-top: 20px;
    padding-top: 20px;
}

/* Page content styles */
.page-content {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.page-header {
    background-color: #f8f9fa;
    padding: 10px;
    border-left: 4px solid #007bff;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.source-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    color: white;
    background-color: #6c757d;
}

.source-label.ocr {
    background-color: #28a745;
}

.source-label.extracted {
    background-color: #6c757d;
}

.text-display {
    line-height: 1.6;
    white-space: pre-wrap;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
    max-height: 300px;
    overflow-y: auto;
}

.comparison-content {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

/* Fix button styles */
.fix-button {
    background-color: transparent;
    border: none;
    cursor: pointer;
    margin-right: 10px;
    font-size: 0.9em;
    text-decoration: none;
}

.fix-html-button {
    color: #9c27b0; /* Purple for HTML */
}

.fix-html-button:hover {
    color: #7b1fa2;
    text-decoration: underline;
}

.fix-pdf-button {
    color: #e91e63; /* Pink for PDF */
}

.fix-pdf-button:hover {
    color: #c2185b;
    text-decoration: underline;
}

/* Annotation type styles */
.annotation-type-green_box {
    background-color: #c8e6c9;
    color: #1b5e20;
    border: 1px solid #81c784;
}

.annotation-type-yellow_highlight {
    background-color: #fff9c4;
    color: #f57f17;
    border: 1px solid #ffd54f;
}

.annotation-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.delete-annotation-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.delete-annotation-btn:hover {
    background-color: #c82333;
}

.annotation-card.deleting {
    opacity: 0.5;
    pointer-events: none;
}