/* Custom CSS for Watch Your Health OAB Assessment App */

:root {
    --primary-color: #2c5282;
    --secondary-color: #4299e1;
    --success-color: #38a169;
    --warning-color: #d69e2e;
    --danger-color: #e53e3e;
    --light-bg: #f7fafc;
    --dark-text: #2d3748;
    --muted-text: #718096;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: #ffffff;
}

.main-content {
    min-height: calc(100vh - 200px);
}

/* Medical Navigation */
.medical-nav {
    border-bottom: 3px solid var(--primary-color);
}

.navbar-brand {
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-text) !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    min-height: 80vh;
}

.min-vh-75 {
    min-height: 75vh;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.hero-content .display-4 {
    line-height: 1.2;
}

/* Assessment Card */
.assessment-card .card {
    border-radius: 15px;
    overflow: hidden;
}

.assessment-card .card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.credential-badge {
    display: flex;
    align-items: center;
    padding: 0.5rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    font-weight: 500;
}

/* Feature Cards */
.feature-card {
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.feature-icon {
    opacity: 0.8;
}

/* About Section */
.about-section {
    background-color: var(--light-bg);
}

/* Assessment Form Styles */
.assessment-section {
    padding: 3rem 0;
}

.question-card {
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: slideInUp 0.6s ease forwards;
}

.question-card:nth-child(n) {
    animation-delay: calc(0.1s * var(--n));
}

@keyframes slideInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-card .card {
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.question-card.active .card {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.question-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-text);
    line-height: 1.4;
}

.answer-option {
    padding: 1rem;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.answer-option:hover {
    border-color: var(--secondary-color);
    background-color: #f8f9fa;
}

.answer-option input[type="radio"]:checked + .form-check-label {
    background-color: #e6f3ff;
    border-color: var(--primary-color);
}

.option-content {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
}

.option-text {
    font-weight: 500;
    color: var(--dark-text);
}

/* Progress Bar */
.progress-container {
    max-width: 400px;
    margin: 0 auto;
}

.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.5s ease;
}

/* Form Navigation */
.form-navigation {
    position: sticky;
    bottom: 2rem;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

/* Results Section */
.results-section {
    padding: 3rem 0;
}

.score-summary-card .card {
    border-radius: 15px;
    overflow: hidden;
}

.score-visual {
    position: relative;
}

.score-circle {
    width: 150px;
    height: 150px;
}

.score-progress {
    transition: stroke-dasharray 2s ease-in-out;
}

.score-text {
    font-size: 2.5rem;
    font-weight: bold;
    fill: var(--primary-color);
}

.score-max {
    font-size: 1rem;
    fill: var(--muted-text);
}

.severity-badge .badge {
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
}

/* Assessment Details */
.detail-item {
    padding: 0.75rem 0;
}

.detail-item strong {
    font-size: 1.1rem;
}

/* Recommendation Cards */
.recommendations-card .alert {
    border-radius: 12px;
}

.action-recommendation .alert {
    border-left: 4px solid var(--primary-color);
}

/* Response Breakdown */
.response-item {
    padding: 1.5rem 0;
}

.question-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.answer-text {
    color: var(--dark-text);
}

.score-badge .badge {
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Educational Content */
.educational-content h5 {
    color: var(--primary-color);
    font-weight: 600;
}

.educational-content .badge {
    min-width: 40px;
    text-align: center;
}

/* Admin Dashboard */
.admin-section {
    padding: 3rem 0;
}

.dashboard-header h1 {
    color: var(--primary-color);
    font-weight: 700;
}

/* Metric Cards */
.metric-card {
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.metric-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-icon {
    opacity: 0.7;
}

/* Charts */
.card-header {
    background-color: var(--light-bg) !important;
    border-bottom: 1px solid var(--border-color);
}

.card-title {
    font-weight: 600;
}

/* Tables */
.table th {
    font-weight: 600;
    color: var(--dark-text);
    border-top: none;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

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

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

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(44, 82, 130, 0.2);
}

.btn-primary:hover {
    background-color: #1a365d;
    border-color: #1a365d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(44, 82, 130, 0.3);
}

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

.alert-info {
    background-color: #e6f3ff;
    color: #0c5460;
}

.alert-success {
    background-color: #f0fff4;
    color: #22543d;
}

.alert-warning {
    background-color: #fefcbf;
    color: #744210;
}

.alert-danger {
    background-color: #fed7d7;
    color: #742a2a;
}

/* Medical Disclaimer */
.medical-disclaimer {
    font-size: 0.9rem;
}

.disclaimer-section {
    background-color: #f8f9fa;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-section {
        min-height: 90vh;
        padding: 2rem 0;
    }
    
    .assessment-card {
        margin-top: 2rem;
    }
    
    .form-navigation {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: 0;
        box-shadow: 0 -4px 8px rgba(0, 0, 0, 0.1);
    }
    
    .question-card {
        margin-bottom: 1rem;
    }
    
    .score-visual {
        margin-bottom: 2rem;
    }
    
    .metric-value {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .btn-lg {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .assessment-section {
        padding: 2rem 0;
    }
    
    .results-section {
        padding: 2rem 0;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .form-navigation,
    .action-buttons,
    footer {
        display: none !important;
    }
    
    .main-content {
        margin-top: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
    
    .bg-primary,
    .bg-success,
    .bg-warning,
    .bg-danger {
        color: #000 !important;
        background-color: #f8f9fa !important;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.2rem rgba(44, 82, 130, 0.25);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Custom Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

.slide-in-right {
    animation: slideInRight 0.6s ease-in-out;
}

/* PWA Specific Styles */
@media (display-mode: standalone) {
    .navbar {
        padding-top: env(safe-area-inset-top);
    }
    
    .main-content {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

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

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