.added-line {
    background-color: #e6ffed;
}
.added-text {
    background-color: #acf2bd;
}
.removed-line {
    background-color: #ffeef0;
}
.removed-text {
    background-color: #fdb8c0;
}

.loaded-entries-text {
    font-style: italic;
}

.error-text {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 12px 16px;
    border-radius: 4px;
    margin: 10px 0;
    font-weight: 500;
    display: block;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.4;
}

.error-text::before {
    content: "⚠️ ";
    font-size: 16px;
    margin-right: 8px;
}

.no-changes { 
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

.field-disabled {
    text-decoration: line-through;
}

.field-hover-disable {
    text-decoration: line-through;
    font-style: italic;
}

.field-hover-enable {
    text-decoration: none;
    font-style: italic;
}

table.result span {
    white-space: pre-wrap;
}

table.result {
    border: 1px solid gray;
    font-family: monospace;
    font-size: 14px;
    width: 100%;
    border-collapse: collapse;
}

table.result td {
    border: none;
    padding: 2px 4px;
}

table.result tr {
    border: none;
}

.result-divide {
    margin-top: 2rem;
}

.accept-change-radio {
    float: right;
}

div.accept-change-radio label {
    border-bottom-width: 0px;
}

/* Button group styles */
.btn-group {
    position: relative;
    display: inline-flex;
    vertical-align: middle;
}

.btn-group > .btn {
    position: relative;
    flex: 1 1 auto;
}

.btn-group > .btn:not(:first-child) {
    margin-left: -1px;
}

.btn-group > .btn:focus,
.btn-group > .btn:hover {
    z-index: 1;
}

.btn-group > .btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

/* Button group z-index: active button always wins */
.btn-group > .btn.active {
    z-index: 10;
}

/* Default: right button (reject) has higher z-index for overlap */
.btn-group > .btn-outline-danger {
    z-index: 2;
}

.btn-group > .btn-outline-success {
    z-index: 1;
}

.btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.btn-group > .btn:not(:first-child) {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

div.accept-change-radio > .btn-group > .btn-group:not(:last-child) > .btn, div.accept-change-radio > .btn-group > .btn:not(:last-child):not(.dropdown-toggle) {
    border-bottom-left-radius: 0px;
}

div.accept-change-radio > .btn-group > .btn-group:not(:first-child) > .btn, div.accept-change-radio > .btn-group > .btn:not(:first-child) {
    border-bottom-right-radius: 0px;
}

.change-i-of-n {
    font-weight: bold;
    font-size: 18px;
    margin-bottom: 0.5rem;
}

.hidden-table {
    opacity: 0.7;
}

#feedback {
    position: absolute;
    font-size: x-small;
    bottom: 1px;
    left: 4px;
}

#main-content { 
    margin: 2rem auto;
    padding: 2rem;
    max-width: 800px;
    position: relative;
    min-height: 600px;
}

#do-conversion-button {
    display: none !important;
}

#upload-form { 
    margin-bottom: 0;
}

.download-button {
    float: right;
}

/* Bootstrap replacement styles */

/* Alert styles */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* Button styles */
.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover:not(:disabled) {
    color: #fff;
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-success {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover:not(:disabled) {
    color: #fff;
    background-color: #218838;
    border-color: #1e7e34;
}

/* Utility classes */
.d-block {
    display: block !important;
}

.d-sm-none {
    display: none !important;
}

@media (max-width: 576px) {
    .d-sm-none {
        display: block !important;
    }
}

.clearfix::after {
    display: block;
    clear: both;
    content: "";
}


/* Custom file input styles */
.custom-file {
    position: relative;
    display: inline-block;
    width: 100%;
    height: 2.5rem;
    margin-bottom: 1rem;
}

.custom-file-input {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 2.5rem;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

.custom-file-label {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    z-index: 1;
    height: 2.5rem;
    padding: 0;
    font-weight: 400;
    line-height: 2.5rem;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding-left: 0.75rem;
}

.custom-file-label::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 2.5rem;
    padding: 0 0.75rem;
    line-height: 1;
    color: #495057;
    content: "Browse";
    background-color: #e9ecef;
    border-left: 1px solid #ced4da;
    border-radius: 0 0.375rem 0.375rem 0;
}

/* Grid system replacements */
.col-12 {
    width: 100%;
}

.col-sm-8 {
    width: 100%;
}

.offset-sm-2 {
    margin-left: 0;
}

@media (min-width: 576px) {
    .col-sm-8 {
        width: 66.66667%;
    }
    .offset-sm-2 {
        margin-left: 16.66667%;
    }
}

@media (min-width: 992px) {
    .col-lg-6 {
        width: 50%;
    }
    .offset-lg-3 {
        margin-left: 25%;
    }
}

/* Fix for the file input container */
#upload-form > div {
    margin: 0 auto;
}

/* Loading box styles */
#anthology-loading-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1), 0 0.125rem 0.5rem rgba(0, 0, 0, 0.05);
    margin: 1.5rem auto;
    padding: 1.5rem;
    max-width: 480px;
    text-align: center;
    transition: all 0.3s ease;
}

#anthology-loading-box:hover {
    transform: translateY(-1px);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.12), 0 0.25rem 0.75rem rgba(0, 0, 0, 0.08);
}

.loading-header {
    padding: 0;
    border: none;
    background: transparent;
    margin-bottom: 1rem;
}

.loading-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #495057;
    letter-spacing: -0.025em;
}

.loading-body {
    padding: 0;
}

.loading-body p {
    margin-bottom: 1.25rem;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

.loading-body small {
    display: block;
    margin-top: 0.75rem;
    color: #868e96;
    font-size: 0.8rem;
}

/* Progress bar styles */
#anthology-loading-box .progress {
    display: flex;
    height: 0.5rem;
    overflow: hidden;
    font-size: 0.75rem;
    background-color: #f1f3f4;
    border-radius: 1rem;
    margin: 1rem 0;
}

#anthology-loading-box .progress-bar {
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    color: transparent;
    text-align: center;
    white-space: nowrap;
    background: linear-gradient(90deg, #34a853, #4285f4);
    transition: width 0.3s ease;
    border-radius: 1rem;
    position: relative;
}

#anthology-loading-box .progress-bar::after {
    content: attr(data-percentage);
    position: absolute;
    top: -1.5rem;
    right: 0;
    font-size: 0.75rem;
    font-weight: 600;
    color: #495057;
}

.progress-bar-striped {
    background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
    background-size: 1rem 1rem;
}

.progress-bar-animated {
    animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
    from {
        background-position: 1rem 0;
    }
    to {
        background-position: 0 0;
    }
}

/* Progress bar color variations */
.bg-info {
    background: #17a2b8 !important;
}

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

.bg-success {
    background: #28a745 !important;
}

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

/* Text utilities */
.text-muted {
    color: #6c757d !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

/* Accept/Reject button styles */
.btn-outline-success {
    color: #28a745;
    border-color: #28a745;
    background-color: transparent;
}

.btn-outline-success:hover:not(:disabled) {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-outline-success.active {
    color: #fff;
    background-color: #28a745;
    border-color: #28a745;
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
    background-color: transparent;
}

.btn-outline-danger:hover:not(:disabled) {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger.active {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Hide radio buttons inside labels */
.btn-group input[type="radio"] {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    pointer-events: none;
    opacity: 0;
}

/* Priority-based UI Styles */
.priority-section {
    margin-bottom: 2rem;
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.priority-header {
    padding: 1rem 1.5rem;
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: background-color 0.2s ease;
}

.priority-header:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

.priority-toggle {
    font-size: 0.875rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.priority-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    flex-grow: 1;
}

.priority-description {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.8;
    margin-left: auto;
    text-align: right;
    max-width: 450px;
}

.priority-content {
    background-color: white;
    color: #333;
    padding: 1rem;
}

/* Priority color schemes */
.priority-high {
    background-color: white;
    border: 2px solid #dc3545;
    color: #333;
}

.priority-high .priority-header {
    background-color: white;
    border-bottom: 2px solid #dc3545;
}

/* Hide header bottom border when content is collapsed */
.priority-high .priority-header.collapsed {
    border-bottom: none;
}

.priority-high .priority-content {
    border-left: 4px solid #dc3545;
    background-color: white;
    color: #333;
}

.priority-arxiv {
    background-color: white;
    border: 2px solid #6f42c1;
    color: #333;
}

.priority-arxiv .priority-header {
    background-color: white;
    border-bottom: 2px solid #6f42c1;
}

.priority-arxiv .priority-header.collapsed {
    border-bottom: none;
}

.priority-arxiv .priority-content {
    border-left: 4px solid #6f42c1;
    background-color: white;
    color: #333;
}

.priority-review {
    background-color: white;
    border: 2px solid #fd7e14;
    color: #333;
}

.priority-review .priority-header {
    background-color: white;
    border-bottom: 2px solid #fd7e14;
}

.priority-review .priority-header.collapsed {
    border-bottom: none;
}

.priority-review .priority-content {
    border-left: 4px solid #fd7e14;
    background-color: white;
    color: #333;
}

.priority-medium {
    background-color: white;
    border: 2px solid #ffc107;
    color: #333;
}

.priority-medium .priority-header {
    background-color: white;
    border-bottom: 2px solid #ffc107;
}

.priority-medium .priority-header.collapsed {
    border-bottom: none;
}

.priority-medium .priority-content {
    border-left: 4px solid #ffc107;
    background-color: white;
    color: #333;
}

.priority-low {
    background-color: white;
    border: 2px solid #28a745;
    color: #333;
}

.priority-low .priority-header {
    background-color: white;
    border-bottom: 2px solid #28a745;
}

.priority-low .priority-header.collapsed {
    border-bottom: none;
}

.priority-low .priority-content {
    border-left: 4px solid #28a745;
    background-color: white;
    color: #333;
}

/* Priority badge */
.priority-badge {
    background-color: rgba(0, 0, 0, 0.1);
    color: #495057;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: inline-block;
}

/* Table container to keep accept/reject buttons aligned with table */
.table-container {
    clear: both;
    margin-top: 0.5rem;
}

/* Subgroup styles */
.priority-subgroup {
    margin: 1rem 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    overflow: hidden;
}

.subgroup-header {
    padding: 0.75rem 1rem;
    background-color: rgba(0, 0, 0, 0.05);
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: background-color 0.2s ease;
}

.subgroup-header:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.subgroup-toggle {
    font-size: 0.75rem;
    font-weight: bold;
    transition: transform 0.2s ease;
}

.subgroup-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    flex-grow: 1;
}

.subgroup-content {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    background-color: white;
    padding: 0.75rem;
}

/* Responsive design for priority sections */
@media (max-width: 768px) {
    .priority-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .priority-description {
        margin-left: 0;
        text-align: left;
        max-width: none;
    }
    
    .priority-title {
        font-size: 1.125rem;
    }
}

/* Drag and drop styles */
body.drag-over {
    position: relative;
}

body.drag-over::after {
    content: "📁 Drop your .bib file here to upload";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.08) 0%, rgba(40, 167, 69, 0.08) 100%);
    border: 3px dashed #007bff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: #0056b3;
    z-index: 9999;
    pointer-events: none;
    backdrop-filter: blur(3px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    animation: drag-pulse 2s ease-in-out infinite;
}

@keyframes drag-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.02);
        opacity: 0.9;
    }
}

@media (max-width: 768px) {
    body.drag-over::after {
        font-size: 1.8rem;
        padding: 1rem;
        text-align: center;
        border-radius: 8px;
    }
}

