/* Custom styles for AI Tax Analyst SA */

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

/* Global styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
}

/* Feature icons */
.feature-icon {
    width: 48px;
    height: 48px;
    color: var(--primary-color);
}

/* Document cards */
.document-card {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

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

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

/* Loading spinner customization */
.spinner-border {
    width: 2rem;
    height: 2rem;
}

/* Alert styling */
.alert {
    border: none;
    border-radius: 8px;
}

.alert-info {
    background-color: rgba(13, 202, 240, 0.1);
    color: #0c4a6e;
}

.alert-success {
    background-color: rgba(25, 135, 84, 0.1);
    color: #065f46;
}

.alert-warning {
    background-color: rgba(255, 193, 7, 0.1);
    color: #92400e;
}

.alert-danger, .alert-error {
    background-color: rgba(220, 53, 69, 0.1);
    color: #991b1b;
}

/* Card styling */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.2s ease-in-out;
}

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

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

/* Button styling */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: all 0.2s ease-in-out;
}

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

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-outline-primary:hover {
    transform: translateY(-1px);
}

/* Navigation styling */
.navbar-brand {
    font-weight: 600;
    font-size: 1.3rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.2s ease-in-out;
}

/* Input group styling */
.input-group-text {
    background-color: rgba(108, 117, 125, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Table styling */
.table {
    border-radius: 8px;
    overflow: hidden;
}

.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Badge styling */
.badge {
    font-weight: 500;
    padding: 0.4em 0.6em;
}

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

.form-control[type="file"]::-webkit-file-upload-button {
    background-color: var(--secondary-color);
    border: none;
    border-radius: 4px;
    color: white;
    padding: 0.375rem 0.75rem;
    margin-right: 0.75rem;
    font-weight: 500;
}

.form-control[type="file"]::-webkit-file-upload-button:hover {
    background-color: #5a6268;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1rem;
    }
    
    .feature-icon {
        width: 36px;
        height: 36px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

/* Dark theme adjustments */
[data-bs-theme="dark"] .card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .bg-light {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: inherit;
}

[data-bs-theme="dark"] .text-muted {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* Animation for loading states */
@keyframes pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        opacity: 1;
    }
}

.loading {
    animation: pulse 1.5s ease-in-out infinite;
}

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

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Focus indicators for accessibility */
.btn:focus,
.form-control:focus,
.form-check-input:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .btn,
    #upload-loading,
    #ai-loading {
        display: none !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
}

/* Action Cards */
.action-card {
    transition: all 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
}

.action-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.2);
}

.action-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    background: linear-gradient(135deg, var(--primary-color), #4a90e2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-icon {
    width: 36px;
    height: 36px;
    color: white;
    stroke-width: 2.5;
}

/* Enhanced AI Assistant Card */
.ai-assistant-card {
    border: none;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 16px;
    overflow: hidden;
}

.ai-assistant-card .card-header {
    background: linear-gradient(135deg, var(--primary-color), #0a58ca) !important;
    border: none;
    padding: 2rem;
}

.form-control-xl {
    font-size: 1.1rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-xl {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
}

/* Trust Indicators */
.trust-indicators {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.trust-metric {
    text-align: center;
}

.trust-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.trust-label {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

/* Demo Interface Styling */
.demo-interface .form-control-xl {
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
}

.demo-notice {
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Demo Scenarios */
.demo-scenarios {
    max-height: 200px;
    overflow-y: auto;
}

.scenario-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
}

.scenario-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

.scenario-question {
    font-size: 0.9rem;
    line-height: 1.4;
    margin-bottom: 0.5rem;
    font-style: italic;
}

.scenario-tag {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

/* Hero Section Enhancements */
.hero-cta {
    margin: 2rem 0;
}

.trial-details {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
    padding: 0.75rem 1.5rem;
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Demo Showcase Card */
.demo-showcase-card {
    border: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    overflow: hidden;
}

.demo-showcase-card .card-header {
    background: linear-gradient(135deg, #1e3c72, #2a5298) !important;
    border: none;
    padding: 2.5rem;
}

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

/* Demo CTA Section */
.demo-cta-section {
    padding: 2rem;
    background: rgba(13, 110, 253, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(13, 110, 253, 0.1);
}

/* Smooth scroll function */
html {
    scroll-behavior: smooth;
}

/* Enhanced button styling */
.btn-lg {
    font-size: 1.125rem;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.025em;
}

.btn-success {
    background: linear-gradient(135deg, #198754, #20c997);
    border: none;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #157347, #198754);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Utility classes */
.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all 0.2s ease-in-out;
}

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

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

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

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
