/* Custom CSS for Work Accident Indemnity Calculator */

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

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--light-color) 0%, #e3f2fd 100%);
    border-bottom: 1px solid #e0e0e0;
}

.hero-section .display-1 {
    color: var(--primary-color);
    opacity: 0.1;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
}

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

.card-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: none;
    padding: 1.5rem;
}

/* Forms */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

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

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.75rem;
}

.form-text {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

/* Buttons */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border-width: 2px;
}

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

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: rgba(255,255,255,0.8) !important;
}

/* Results Section */
.results-card {
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--success-color);
}

.result-label {
    font-size: 0.9rem;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alerts */
.alert {
    border-radius: 12px;
    border: none;
    padding: 1.25rem;
}

.alert-heading {
    margin-bottom: 1rem;
}

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

.table th {
    background-color: var(--dark-color);
    color: white;
    font-weight: 600;
    border: none;
    padding: 1rem;
}

.table td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
}

/* Accordion */
.accordion-item {
    border-radius: 8px !important;
    margin-bottom: 0.5rem;
    border: 2px solid #e9ecef !important;
}

.accordion-button {
    font-weight: 600;
    border-radius: 8px !important;
    padding: 1.25rem;
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.accordion-body {
    padding: 1.5rem;
}

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

/* Badges */
.badge {
    padding: 0.75rem 1rem;
    border-radius: 20px;
    font-weight: 500;
}

/* Loading States */
.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section .display-5 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1rem;
    }
    
    .result-value {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        box-shadow: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        width: 100% !important;
        max-width: none !important;
    }
}

/* Focus Styles for Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid var(--dark-color);
    }
    
    .form-control {
        border: 2px solid var(--dark-color);
    }
}

/* 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;
    }
}
