/* Custom CSS for Academic Research Journal */
/* Using minimal custom styles to work with Bootstrap dark theme */

/* Timeline component for manuscript status */
.timeline {
    position: relative;
    padding-left: 1.5rem;
}

.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.timeline-item:before {
    content: '';
    position: absolute;
    left: -0.5rem;
    top: 0;
    bottom: -1.5rem;
    width: 2px;
    background-color: var(--bs-border-color);
}

.timeline-item:last-child:before {
    bottom: 0;
}

.timeline-item i {
    position: absolute;
    left: -1rem;
    top: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background-color: var(--bs-body-bg);
    border: 2px solid var(--bs-border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.timeline-content h6 {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

/* Custom focus styles for better accessibility */
.form-control:focus,
.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Status badges with better contrast */
.badge {
    font-weight: 500;
}

/* File upload styling */
.form-control[type="file"] {
    padding: 0.375rem 0.75rem;
}

/* Card hover effects */
.card {
    transition: box-shadow 0.15s ease-in-out;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Manuscript cards in lists */
.manuscript-card {
    border-left: 4px solid var(--bs-primary);
}

.manuscript-card.status-published {
    border-left-color: var(--bs-success);
}

.manuscript-card.status-accepted {
    border-left-color: var(--bs-info);
}

.manuscript-card.status-rejected {
    border-left-color: var(--bs-danger);
}

.manuscript-card.status-under-review {
    border-left-color: var(--bs-warning);
}

/* Responsive table improvements */
@media (max-width: 768px) {
    .table-responsive table {
        font-size: 0.875rem;
    }
    
    .btn-group-sm > .btn,
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Print styles for articles */
@media print {
    .navbar,
    .btn,
    .card-header,
    footer {
        display: none !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    .card {
        border: none !important;
        box-shadow: none !important;
    }
    
    .card-body {
        padding: 0 !important;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    .page-break-before {
        page-break-before: always;
    }
}

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

/* Custom utilities */
.text-justify {
    text-align: justify;
}

.word-break {
    word-break: break-word;
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators for keyboard navigation */
.btn:focus,
.nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Custom scrollbar for webkit browsers */
@media (prefers-color-scheme: dark) {
    ::-webkit-scrollbar {
        width: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: var(--bs-gray-800);
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--bs-gray-600);
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: var(--bs-gray-500);
    }
}

/* Animation for success/error states */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert {
    animation: fadeInUp 0.3s ease-out;
}

/* Custom spacing for better readability */
.lead {
    line-height: 1.6;
}

.card-text {
    line-height: 1.5;
}

/* Improved button states */
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Custom form validation styles */
.was-validated .form-control:valid,
.form-control.is-valid {
    border-color: var(--bs-success);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%23198754' d='m2.3 6.73.5-.5 1.6-1.6L6 3.08l.5-.5L7 2.1l.5.5-.5.5L5.2 5.2l-2 2-.5.5-.5-.5-.5-.5.5-.5z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    border-color: var(--bs-danger);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.2 0.4 0.4 0.4-0.4 0.4 0.4-0.4 0.4 0.4 0.4-0.4 0.4-0.4-0.4-0.4 0.4-0.4-0.4 0.4-0.4-0.4-0.4z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}
