/* Custom styles for Credit Card Statement Processor */
/* Light theme design */

/* Body and layout adjustments */
body {
    font-family: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: #f8f9fa;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Typography hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 600;
    line-height: 1.3;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

.card-title {
    font-size: 1rem;
    font-weight: 600;
}

.btn {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 500;
    font-size: 0.875rem;
}

.navbar-brand {
    font-size: 1.2rem;
    font-weight: 700;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
}

table {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.875rem;
}

th {
    font-weight: 600;
    font-size: 0.8rem;
}

.badge {
    font-family: 'Inter Tight', sans-serif;
    font-weight: 500;
    font-size: 0.75rem;
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control, .form-select {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.9rem;
}

.alert {
    font-family: 'Inter Tight', sans-serif;
    font-size: 0.9rem;
}

small, .small {
    font-size: 0.8rem;
}

.text-muted {
    font-size: 0.85rem;
}

/* Navigation enhancements */
.navbar-brand {
    font-weight: 700;
    color: #495057 !important;
    font-size: 1.2rem;
}

.navbar-light .navbar-nav .nav-link {
    color: #495057;
}

.navbar-light .navbar-nav .nav-link.active {
    color: #0d6efd;
    font-weight: 500;
}

/* Card enhancements */
.card {
    border: 1px solid #dee2e6;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 1rem;
    background-color: white;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-weight: 500;
}

/* Chart containers */
.chart-container {
    position: relative;
    height: 300px;
    margin: 1rem 0;
}

/* Transaction table enhancements */
.table th {
    border-top: none;
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table-responsive {
    border-radius: 0.375rem;
}

/* Badge enhancements */
.badge {
    font-weight: 500;
    font-size: 0.75rem;
}

/* Button group enhancements */
.btn-group-sm .btn {
    font-size: 0.75rem;
}

/* Alert enhancements */
.alert {
    border: none;
    border-radius: 0.5rem;
}

/* Modal styling for light theme */
.modal-content {
    background-color: white;
    border: 1px solid #dee2e6;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.modal-title {
    color: #495057;
    font-weight: 600;
}

.modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

.modal-body {
    background-color: white;
}

/* Progress step styling */
.progress-step {
    padding: 0.5rem 0;
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.step-icon.active {
    background-color: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.step-icon.completed {
    background-color: #198754;
    color: white;
    border-color: #198754;
}

.step-title {
    font-weight: 500;
    color: #495057;
    font-size: 0.9rem;
}

.step-status {
    font-size: 0.8rem;
    color: #6c757d;
}

.step-indicator .fa-check {
    color: #198754;
}

.step-indicator .fa-spinner {
    color: #0d6efd;
}

/* Progress bar enhancements */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
    background-color: #e9ecef;
}

.progress-bar {
    border-radius: 0.25rem;
}

/* Form enhancements */
.form-control, .form-select {
    border: 1px solid #ced4da;
    background-color: white;
    color: #495057;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
    background-color: white;
    color: #495057;
}

.form-text {
    color: var(--bs-gray-400);
}

/* Modal enhancements */
.modal-content {
    background-color: var(--bs-gray-900);
    border: 1px solid var(--bs-gray-700);
}

.modal-header {
    border-bottom: 1px solid var(--bs-gray-700);
}

.modal-footer {
    border-top: 1px solid var(--bs-gray-700);
}

/* Breadcrumb enhancements */
.breadcrumb {
    background-color: transparent;
    padding: 0;
    margin-bottom: 1rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--bs-gray-500);
}

/* Spinner customization */
.spinner-border {
    width: 1.5rem;
    height: 1.5rem;
}

/* Custom utility classes */
.text-truncate-custom {
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

/* Chart responsive adjustments */
@media (max-width: 576px) {
    .chart-container {
        height: 250px;
    }
}

/* Dashboard specific styles */
.dashboard-card {
    transition: transform 0.2s ease-in-out;
}

.dashboard-card:hover {
    transform: translateY(-2px);
}

/* Category legend styles */
.category-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-evenly;
    max-height: none;
    overflow-y: visible;
    width: 100%;
}

.category-legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 0;
    font-size: 0.875rem;
    white-space: nowrap;
}

.category-legend-color {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

/* Transaction status indicators */
.sync-status-synced {
    color: var(--bs-success);
}

.sync-status-pending {
    color: var(--bs-warning);
}

.sync-status-failed {
    color: var(--bs-danger);
}

/* Loading states */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Analytics page specific styles */
.analytics-card {
    height: 100%;
}

.analytics-chart-container {
    position: relative;
    min-height: 300px;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    .pagination,
    .modal {
        display: none !important;
    }
    
    .card {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
    
    .table {
        color: #000 !important;
    }
}

/* Dark mode specific adjustments */
[data-bs-theme="dark"] {
    /* Ensure consistent dark theme across all components */
    --custom-bg-primary: #212529;
    --custom-bg-secondary: #343a40;
    --custom-border-color: #495057;
}

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bs-gray-800);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: var(--bs-gray-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-gray-500);
}

/* Focus states for accessibility */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid var(--bs-primary);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--bs-light);
    }
    
    .btn {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dashboard-card {
        transition: none;
    }
    
    .spinner-border {
        animation: none;
    }
}
