/* Four Percent Rule Analyzer - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #0dcaf0;
    --light-bg: #f8f9fa;
    --shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-lg: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

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

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

/* Cards */
.card {
    border: none;
    box-shadow: var(--shadow);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.card-header {
    background-color: var(--light-bg);
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    font-weight: 600;
}

/* Hero Section */
.jumbotron {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

/* Stat Boxes */
.stat-box {
    padding: 1rem;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #fff 0%, var(--light-bg) 100%);
    transition: all 0.3s ease;
}

.stat-box:hover {
    transform: scale(1.05);
}

.stat-box h2 {
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    border-radius: 0.5rem;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color) 0%, #146c43 100%);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color) 0%, #cc9a06 100%);
    color: #000;
}

.btn-info {
    background: linear-gradient(135deg, var(--info-color) 0%, #0aa2c0 100%);
    color: #000;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #b02a37 100%);
}

/* Form Controls */
.form-control, .form-select {
    border-radius: 0.5rem;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

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

.form-range {
    height: 0.5rem;
}

.form-range::-webkit-slider-thumb {
    background-color: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: var(--shadow);
    width: 1.5rem;
    height: 1.5rem;
}

.form-range::-moz-range-thumb {
    background-color: var(--primary-color);
    border: 2px solid #fff;
    box-shadow: var(--shadow);
    width: 1.5rem;
    height: 1.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.75rem;
    box-shadow: var(--shadow);
}

/* Tables */
.table {
    border-radius: 0.75rem;
    overflow: hidden;
}

.table th {
    background-color: var(--light-bg);
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
    color: #495057;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.025);
}

/* Badges */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.5em 0.75em;
    border-radius: 0.375rem;
}

/* Ad Zones */
.ad-zone {
    margin: 1rem 0;
}

.ad-banner {
    max-width: 728px;
    margin: 0 auto;
}

.ad-sidebar {
    max-width: 300px;
}

.ad-placeholder {
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.ad-placeholder:hover {
    opacity: 1;
}

.ad-placeholder .bg-secondary,
.ad-placeholder .bg-light {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 90px;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

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

canvas {
    border-radius: 0.5rem;
}

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

/* Footer */
footer {
    margin-top: auto;
    background: linear-gradient(135deg, #212529 0%, #495057 100%);
}

footer h6 {
    color: var(--info-color);
}

/* Sticky Sidebar */
.sticky-top {
    z-index: 1020;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jumbotron {
        padding: 2rem 1.5rem;
    }
    
    .jumbotron .display-4 {
        font-size: 2rem;
    }
    
    .stat-box h2 {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .ad-banner {
        max-width: 100%;
    }
    
    .ad-banner .ad-placeholder .bg-secondary {
        font-size: 0.8rem;
        min-height: 60px;
    }
}

@media (max-width: 576px) {
    .btn {
        font-size: 0.9rem;
        padding: 0.6rem 1.2rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
}

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

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

.slide-up {
    animation: slideUp 0.6s ease-out;
}

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

/* Accessibility */
.btn:focus, .form-control:focus, .form-select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.25);
}

/* Print Styles */
@media print {
    .ad-zone, .navbar, footer, .btn {
        display: none !important;
    }

    .card {
        box-shadow: none;
        border: 1px solid #dee2e6;
    }
}

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(100%);
        opacity: 0;
    }
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-consent-text {
    flex: 1;
}

.cookie-consent-text h6 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: white;
}

.cookie-consent-text p {
    margin-bottom: 0;
    opacity: 0.95;
}

.cookie-link {
    color: #3498db;
    text-decoration: underline;
    font-weight: 500;
}

.cookie-link:hover {
    color: #5dade2;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cookie-consent-actions .btn {
    white-space: nowrap;
    font-weight: 500;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        gap: 1rem;
    }

    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }

    .cookie-consent-actions .btn {
        flex: 1;
    }
}

/* Disclaimer Modal Styling */
#disclaimerModal .modal-content {
    border: 3px solid #dc3545;
}

#disclaimerModal .modal-header {
    border-bottom: 2px solid rgba(255, 255, 255, 0.2);
}

#disclaimerModal .modal-body {
    max-height: 70vh;
    overflow-y: auto;
}

#disclaimerModal .disclaimer-content ul {
    padding-left: 1.5rem;
}

#disclaimerModal .disclaimer-content li {
    line-height: 1.6;
}

#disclaimerModal .modal-footer {
    border-top: 2px solid #dee2e6;
    padding: 1.5rem;
}

/* Make modal backdrop darker for emphasis */
#disclaimerModal + .modal-backdrop {
    background-color: #000;
    opacity: 0.7;
}

/* Scrollbar styling for modal body */
#disclaimerModal .modal-body::-webkit-scrollbar {
    width: 8px;
}

#disclaimerModal .modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

#disclaimerModal .modal-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

#disclaimerModal .modal-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}