/* Custom styles for Market Research Bot */

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

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.navbar-brand {
    font-weight: 600;
    font-size: 1.4rem;
}

/* Hero Section */
.display-4 {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Analysis Option Cards */
.analysis-option {
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid #e9ecef !important;
}

.analysis-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.analysis-option.border-primary {
    border-color: var(--primary-color) !important;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

/* Button Styles */
.btn-lg {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border: none;
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #0056b3, var(--primary-color));
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(13, 110, 253, 0.4);
}

/* Card Styles */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card.shadow-lg {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    border-bottom: none;
    font-weight: 600;
}

/* Report Content Styles */
.report-content h1, .report-content h2, .report-content h3, 
.report-content h4, .report-content h5, .report-content h6 {
    color: var(--dark-color);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.report-content h1 {
    border-bottom: 3px solid var(--primary-color);
    padding-bottom: 0.5rem;
}

.report-content h2 {
    color: var(--primary-color);
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.3rem;
}

.report-content h3 {
    color: var(--success-color);
}

.report-content table {
    margin: 2rem 0;
    font-size: 0.95rem;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    background: white;
}

.report-content table th,
.report-content table thead tr td {
    background: linear-gradient(135deg, var(--dark-color), #495057) !important;
    color: white !important;
    font-weight: 700 !important;
    border: none !important;
    padding: 1.2rem 1.5rem !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.85rem;
    text-align: left;
    position: relative;
}

.report-content table th:after,
.report-content table thead tr td:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), #0056b3);
}

.report-content table td {
    vertical-align: top;
    border-color: #e9ecef !important;
    padding: 1.2rem 1.5rem !important;
    line-height: 1.6;
    border-bottom: 1px solid #f1f3f4;
}

.report-content table tr:nth-child(even) {
    background-color: #fafbfc;
}

.report-content table tr:hover {
    background-color: rgba(13, 110, 253, 0.05);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
    transition: all 0.2s ease;
}

.report-content table tr:last-child td {
    border-bottom: none;
}

/* Enhanced table typography */
.report-content table th strong,
.report-content table td strong {
    color: var(--primary-color);
    font-weight: 700;
}

.report-content table td em {
    color: #6c757d;
    font-style: italic;
}

/* Table column spacing and alignment */
.report-content table th:nth-child(1),
.report-content table td:nth-child(1) {
    width: 20%;
    font-weight: 600;
}

.report-content table th:nth-child(2),
.report-content table td:nth-child(2) {
    width: 25%;
}

.report-content table th:nth-child(3),
.report-content table td:nth-child(3) {
    width: 55%;
    color: #495057;
}

.report-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.report-content ul {
    margin-bottom: 1rem;
}

.report-content li {
    margin-bottom: 0.5rem;
}

/* Decision Card Styles */
.card .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Feature Icons */
.rounded-circle {
    transition: all 0.3s ease;
}

.rounded-circle:hover {
    transform: scale(1.1);
}

/* Form Styles */
.form-control-lg {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

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

/* Alert Styles */
.alert {
    border: none;
    border-radius: 8px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

.alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Footer Styles */
footer {
    margin-top: auto;
}

/* Loading Spinner */
.spinner-border {
    animation: spinner-border 0.75s linear infinite;
}

/* Progress Bar Enhancements */
#progressContainer {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#progressContainer .progress {
    border-radius: 6px;
    background-color: #e9ecef;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

#progressContainer .progress-bar {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: 6px;
    transition: width 0.3s ease;
}

#progressText {
    font-weight: 500;
    color: #495057;
    margin-top: 0.5rem;
}

/* Spinner styling when visible */
#btnSpinner {
    margin-left: 0.5rem;
}

/* Print Styles */
@media print {
    .navbar, footer, .btn, .alert {
        display: none !important;
    }
    
    .card {
        border: 1px solid #ddd !important;
        box-shadow: none !important;
    }
    
    .card-header {
        background-color: #f8f9fa !important;
        color: #333 !important;
    }
    
    .report-content table {
        font-size: 0.8rem;
    }
    
    .report-content h1, .report-content h2 {
        color: #333 !important;
    }
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .display-4 {
        font-size: 2.5rem;
    }
    
    .card-body {
        padding: 2rem 1.5rem;
    }
    
    .btn-lg {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
    }
    
    .report-content table {
        font-size: 0.85rem;
        margin: 1rem 0;
    }
    
    .report-content table th,
    .report-content table tr:first-child td,
    .report-content table td {
        padding: 0.8rem 1rem !important;
    }
    
    .table-responsive {
        font-size: 0.85rem;
        border-radius: 8px;
    }
}

@media (max-width: 576px) {
    .container {
        padding: 0 1rem;
    }
    
    .card-body {
        padding: 1.5rem 1rem;
    }
    
    .display-6 {
        font-size: 2rem;
    }
    
    .analysis-option .card-body {
        padding: 2rem 1rem;
    }
    
    .report-content table {
        font-size: 0.8rem;
        margin: 0.8rem 0;
    }
    
    .report-content table th,
    .report-content table tr:first-child td,
    .report-content table td {
        padding: 0.6rem 0.8rem !important;
    }
}

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

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

/* Enhanced table spacing for different table types */
.report-content table.valuation-table th:nth-child(1),
.report-content table.valuation-table td:nth-child(1) {
    width: 25%;
}

.report-content table.valuation-table th:nth-child(2),
.report-content table.valuation-table td:nth-child(2) {
    width: 20%;
}

.report-content table.valuation-table th:nth-child(3),
.report-content table.valuation-table td:nth-child(3) {
    width: 55%;
}

/* News table specific styling */
.report-content table.news-table th:nth-child(1),
.report-content table.news-table td:nth-child(1) {
    width: 8%;
    text-align: center;
}

.report-content table.news-table th:nth-child(2),
.report-content table.news-table td:nth-child(2) {
    width: 45%;
}

.report-content table.news-table th:nth-child(3),
.report-content table.news-table td:nth-child(3) {
    width: 15%;
    text-align: center;
}

.report-content table.news-table th:nth-child(4),
.report-content table.news-table td:nth-child(4) {
    width: 12%;
    text-align: center;
}

.report-content table.news-table th:nth-child(5),
.report-content table.news-table td:nth-child(5) {
    width: 12%;
    text-align: center;
}

.report-content table.news-table th:nth-child(6),
.report-content table.news-table td:nth-child(6) {
    width: 8%;
    text-align: center;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--success-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-custom {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--success-color)) 1;
}

.report-content table tbody tr td {
    background: white;
    color: #333;
    font-weight: normal;
}

.report-content table tbody tr:nth-child(even) td {
    background-color: #fafbfc;
}

.report-content table tbody tr:hover td {
    background-color: rgba(13, 110, 253, 0.05);
}
