/* Custom styles for ManuscriptWriter */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --info-color: #0dcaf0;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}

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

/* Navigation Styles */
.navbar-brand {
    font-size: 1.5rem;
}

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

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

/* Button Enhancements */
.btn {
    transition: all 0.15s ease-in-out;
}

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

/* Editor Specific Styles */
#editor {
    border: 2px solid transparent;
    transition: border-color 0.15s ease-in-out;
    font-family: 'Times New Roman', serif;
    background: white;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

#editor:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

#editor p {
    margin-bottom: 1rem;
}

#editor h1, #editor h2, #editor h3, #editor h4, #editor h5, #editor h6 {
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Toolbar Styles */
.toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.toolbar .btn {
    border-radius: 0.25rem;
}

.toolbar .btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Manuscript List Styles */
.manuscript-item {
    transition: background-color 0.15s ease-in-out;
}

.manuscript-item:hover {
    background-color: #f8f9fa;
}

.manuscript-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

/* Stats Cards */
.stats-card {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

/* Auto-save indicator */
.auto-save-indicator {
    position: fixed;
    top: 70px;
    right: 20px;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    #editor {
        padding: 1rem;
        font-size: 14px;
    }
    
    .toolbar {
        padding: 0.5rem;
    }
    
    .toolbar .btn-group {
        margin-bottom: 0.5rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
}

@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .stats-row .col-md-4 {
        margin-bottom: 1rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .toolbar,
    .btn,
    .modal {
        display: none !important;
    }
    
    #editor {
        border: none !important;
        box-shadow: none !important;
        max-width: none !important;
        padding: 0 !important;
    }
    
    body {
        background: white !important;
    }
}

/* Dark mode support (for future enhancement) */
@media (prefers-color-scheme: dark) {
    :root {
        --bs-body-bg: #212529;
        --bs-body-color: #ffffff;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in {
    animation: slideIn 0.3s ease-in-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Focus States */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

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

.min-vh-100 {
    min-height: 100vh;
}

.cursor-pointer {
    cursor: pointer;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-color), #0056b3) !important;
}
