/* Capital Gains Statement Processor - Custom Styles */

:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-radius: 8px;
    --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Global Styles */
body {
    background-color: #f5f7fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 1.5rem;
    transition: var(--transition);
}

.card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-header {
    background-color: white;
    border-bottom: 2px solid var(--light-color);
    font-weight: 600;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 2rem 0;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background-color: #f5f7fa;
    padding: 0 20px;
}

.step-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 10px;
    transition: var(--transition);
}

.step-label {
    font-weight: 500;
    color: #6c757d;
    text-align: center;
    font-size: 0.9rem;
}

.step.active .step-circle {
    background-color: var(--primary-color);
    color: white;
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed .step-circle {
    background-color: var(--success-color);
    color: white;
}

.step.completed .step-label {
    color: var(--success-color);
}

/* Upload Zone */
.upload-zone {
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    padding: 3rem 2rem;
    text-align: center;
    transition: var(--transition);
    background-color: #fdfdfe;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background-color: #f8f9ff;
}

.upload-zone.dragover {
    border-color: var(--primary-color);
    background-color: #e7f3ff;
    transform: scale(1.02);
}

.upload-content h4 {
    color: #495057;
    margin-bottom: 1rem;
}

.upload-content p {
    margin-bottom: 1.5rem;
}

.upload-progress {
    width: 100%;
    max-width: 400px;
}

/* Info Boxes */
.info-box {
    background-color: #f8f9fa;
    border-left: 4px solid var(--info-color);
    padding: 1rem;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
}

.info-box h6 {
    color: var(--info-color);
    margin-bottom: 0.5rem;
}

.info-box ul {
    margin-bottom: 0;
}

.info-box li {
    margin-bottom: 0.25rem;
    color: #6c757d;
}

/* Status Indicators */
.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 8px;
}

.status-uploaded { background-color: var(--info-color); }
.status-extracting { background-color: var(--warning-color); }
.status-extracted { background-color: var(--primary-color); }
.status-converting { background-color: var(--warning-color); }
.status-completed { background-color: var(--success-color); }
.status-error { background-color: var(--danger-color); }

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    border: none;
}

.btn-warning {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    border: none;
}

/* File History Table */
.table-hover tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.file-actions {
    white-space: nowrap;
}

.file-actions .btn {
    margin: 0 2px;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

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

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    border-left: 4px solid;
}

.alert-success {
    border-left-color: var(--success-color);
    background-color: #d4edda;
}

.alert-warning {
    border-left-color: var(--warning-color);
    background-color: #fff3cd;
}

.alert-danger {
    border-left-color: var(--danger-color);
    background-color: #f8d7da;
}

.alert-info {
    border-left-color: var(--info-color);
    background-color: #d1ecf1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .progress-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .step {
        padding: 0;
    }
    
    .upload-zone {
        padding: 2rem 1rem;
        min-height: 200px;
    }
    
    .card-body {
        padding: 1rem;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

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

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

/* Markdown Content Styles */
.markdown-content {
    line-height: 1.6;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
    color: #2c3e50;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}

.markdown-content table th,
.markdown-content table td {
    border: 1px solid #dee2e6;
    padding: 0.75rem;
    text-align: left;
}

.markdown-content table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
}

.markdown-content table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.markdown-content table tbody tr:hover {
    background-color: #e3f2fd;
}

/* Data Table Styles */
.dataTables_wrapper {
    font-size: 0.9rem;
}

.dataTables_filter input {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
}

.dataTables_length select {
    border-radius: var(--border-radius);
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
}

.dataTables_info {
    color: #6c757d;
}

.pagination .page-link {
    border-radius: var(--border-radius);
    margin: 0 2px;
    border: 1px solid #dee2e6;
}

.pagination .page-item.active .page-link {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Section Headers */
.section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 0.75rem 1rem;
    margin: 1.5rem 0 0.5rem 0;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 1.1rem;
}

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

.cursor-pointer {
    cursor: pointer;
}

.border-dashed {
    border-style: dashed !important;
}

.bg-light-blue {
    background-color: #f8f9ff;
}

.text-primary-dark {
    color: #0056b3;
}

.shadow-sm {
    box-shadow: var(--box-shadow) !important;
}

/* Cost Calculator Styles */
.cost-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.cost-item h6 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.total-cost {
    background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 2px solid var(--primary-color);
}

.total-cost h5 {
    color: var(--primary-color);
    font-weight: 700;
}

.total-cost h4 {
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

#detailed-cost .card-body {
    background: #f8f9fa;
    border-radius: 8px;
}

#detailed-cost h6.small {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#detailed-cost ul.small {
    font-size: 0.875rem;
    line-height: 1.4;
}

#detailed-cost ul.small li {
    margin-bottom: 0.25rem;
    color: #6c757d;
}

/* Cost status indicators */
.cost-completed {
    border-left-color: #28a745 !important;
    background: linear-gradient(135deg, #d4edda 0%, #f8f9fa 100%);
}

.cost-estimated {
    border-left-color: #ffc107 !important;
    background: linear-gradient(135deg, #fff3cd 0%, #f8f9fa 100%);
}

.cost-pending {
    border-left-color: #6c757d !important;
    background: linear-gradient(135deg, #e2e6ea 0%, #f8f9fa 100%);
}

.cost-completed::before {
    content: "✓ ";
    color: #28a745;
    font-weight: bold;
}

.cost-estimated::before {
    content: "⚡ ";
    color: #ffc107;
    font-weight: bold;
}

.cost-pending::before {
    content: "⏳ ";
    color: #6c757d;
    font-weight: bold;
}

/* Cost calculator responsive adjustments */
@media (max-width: 768px) {
    .cost-item {
        margin-bottom: 0.75rem;
        padding: 0.75rem;
    }
    
    .total-cost {
        padding: 1rem;
    }
    
    #detailed-cost .row {
        margin: 0;
    }
    
    #detailed-cost .col-md-6 {
        padding: 0.5rem;
    }
}

/* About Page Styles */
.feature-box, .future-item {
    text-align: center;
    padding: 1.5rem;
    border-radius: 10px;
    background: #f8f9fa;
    height: 100%;
    border: 1px solid #e9ecef;
    transition: transform 0.2s ease;
}

.feature-box:hover, .future-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.challenge-box {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid #ffc107;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-color) 0%, #6c757d 100%);
}

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

.timeline-marker {
    position: absolute;
    left: -23px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.timeline-content {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-left: 3px solid var(--primary-color);
}

.timeline-content h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.process-flow .process-step {
    text-align: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 1rem;
    position: relative;
}

.process-step .step-number {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    line-height: 40px;
    font-weight: bold;
    margin-bottom: 1rem;
}

.process-step h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.text-purple {
    color: #6f42c1 !important;
}

.bg-purple {
    background-color: #6f42c1 !important;
}

/* Responsive adjustments for About page */
@media (max-width: 768px) {
    .timeline {
        padding-left: 1rem;
    }
    
    .timeline::before {
        left: 8px;
    }
    
    .timeline-marker {
        left: -15px;
        width: 12px;
        height: 12px;
    }
    
    .timeline-content {
        padding: 1rem;
    }
    
    .feature-box, .future-item, .challenge-box {
        margin-bottom: 1rem;
    }
}
