/**
 * Report Display Styles
 * Follows the established design system from global.css
 */

/* CSS Variables */
:root {
    --primary-color: #8B5CF6;
    --secondary-color: #3B82F6;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --dark-color: #1F2937;
    --light-gray: #F3F4F6;
    --border-color: #E5E7EB;
}

/* Page Layout */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
    padding-top: 80px; /* Account for fixed navbar */
}

.report-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 0 50px 0;
    margin-bottom: 40px;
    border-radius: 16px;
    min-height: 70vh !important;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    pointer-events: none;
}

.hero-section .container {
    padding-top: 0;
    padding-bottom: 0;
    position: relative;
    z-index: 1;
}

.assessment-type {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.score-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.5rem;
    font-weight: 800;
    margin: 0 auto 30px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
    border: 6px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
    cursor: pointer;
}

.score-circle:hover {
    transform: scale(1.05);
}

.hero-section h1 {
    margin-bottom: 20px;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.hero-section .lead {
    margin-bottom: 25px;
    font-size: 1.25rem;
    opacity: 0.95;
    line-height: 1.6;
}

.hero-section .badge {
    padding: 10px 20px;
    font-size: 1rem;
    border-radius: 25px;
}

.key-metric {
    margin-top: 30px;
}

.key-metric .badge {
    font-size: 1.1rem;
    padding: 12px 24px;
    border-radius: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Score Definition Styling */
.score-definition .card {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.score-factor {
    padding: 10px 5px;
}

.score-factor i {
    font-size: 1.5rem;
    margin-bottom: 5px;
    display: block;
}

.score-breakdown {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    margin-top: 15px;
}

/* Custom text utilities for hero section */
.hero-section .text-white-opacity {
    color: white !important;
    opacity: 0.9;
}

/* Next Steps Styling */
.next-steps-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border-left: 5px solid var(--primary-color);
}

.next-steps-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.immediate-actions ul {
    margin: 0;
    padding-left: 20px;
}

.immediate-actions li {
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.section-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.section-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    margin-right: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.section-icon-primary {
    background: linear-gradient(135deg, var(--primary-color), #A855F7);
}

.section-icon-success {
    background: linear-gradient(135deg, var(--success-color), #34D399);
}

.section-icon-info {
    background: linear-gradient(135deg, var(--secondary-color), #60A5FA);
}

.section-icon-warning {
    background: linear-gradient(135deg, var(--warning-color), #FBBF24);
}

.section-icon-dark {
    background: linear-gradient(135deg, var(--dark-color), #4B5563);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

/* Process Cards */
.process-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 5px solid var(--primary-color);
}

.process-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.15);
}

.process-card .card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-radius: 12px;
}

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

.process-card .card-header {
    border-radius: 12px 12px 0 0 !important;
    border-bottom: none;
    padding: 20px 25px;
}

.process-card .card-body {
    padding: 25px;
}

.readiness-score {
    display: inline-flex;
    align-items: center;
    background: var(--success-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Phase Timeline */
.phase-timeline {
    display: flex;
    justify-content: space-around;
    margin-bottom: 40px;
    position: relative;
    padding: 0 30px;
}

.phase-timeline::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 15%;
    right: 15%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    z-index: 1;
    border-radius: 2px;
}

.phase-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
    max-width: 200px;
    margin: 0 10px;
}

.phase-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
    border: 3px solid white;
}

.phase-step h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 5px;
    text-align: center;
}

.phase-step small {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Small phase numbers in detailed roadmap cards */
.process-card .phase-number {
    width: 35px !important;
    height: 35px !important;
    font-size: 1rem !important;
    margin: 0 !important;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(139, 92, 246, 0.3) !important;
    border: 2px solid white !important;
}

/* Metrics Grid */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

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

.metric-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 8px;
    line-height: 1;
}

.metric-label {
    font-size: 0.9rem;
    color: #6B7280;
    line-height: 1.4;
}

.metric-highlight {
    padding: 12px 16px;
    background: rgba(139, 92, 246, 0.1);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    margin-bottom: 15px;
}

/* Loading and Error States */
.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.error-message {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    color: #B91C1C;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    margin: 20px 0;
}

/* Alert Styling */
.alert {
    border-radius: 12px;
    border: none;
    padding: 20px 25px;
}

.alert-info {
    background: linear-gradient(135deg, #DBEAFE, #EFF6FF);
    color: #1E40AF;
}

.alert-success {
    background: linear-gradient(135deg, #D1FAE5, #ECFDF5);
    color: #065F46;
}

/* List Group Styling */
.list-group-item {
    border: none;
    padding: 12px 0;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.list-group-item:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .report-container {
        padding: 10px;
    }
    
    .hero-section {
        padding: 40px 0 30px 0;
        min-height: 60vh !important;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .lead {
        font-size: 1.1rem;
    }
    
    .score-circle {
        width: 120px;
        height: 120px;
        font-size: 2.5rem;
    }
    
    .section-card {
        padding: 20px;
    }
    
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-icon {
        margin-right: 0;
        margin-bottom: 15px;
    }
    
    .phase-timeline {
        flex-direction: column;
        gap: 20px;
        padding: 0;
    }
    
    .phase-timeline::before {
        display: none;
    }
    
    .phase-step {
        max-width: none;
        margin: 0;
        text-align: left;
    }
    
    .metric-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .section-header {
        flex-direction: column;
        text-align: center;
    }
    
    .section-icon {
        margin: 0 0 10px 0;
    }
    
    .score-circle {
        width: 100px;
        height: 100px;
        font-size: 2rem;
    }
}