/* ES8-2 Assessment Styles - Aligned with Official ACSC Model */

/* Assessment Layout */
.assessment-layout {
    display: grid;
    grid-template-columns: 320px 1fr 320px;
    min-height: calc(100vh - 80px);
    gap: 0;
}

/* Sidebar */
.sidebar {
    background: var(--color-bg-light);
    border-right: 1px solid var(--color-border);
    padding: 1.5rem;
    height: calc(100vh - 80px);
    overflow-y: auto;
    position: sticky;
    top: 80px;
}

.sidebar-sticky {
    position: sticky;
    top: 2rem;
}

.assessment-info h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.assessment-info p {
    color: var(--color-text-secondary);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Maturity Level Selector */
.maturity-level-selector {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
}

.maturity-level-selector label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--color-text-secondary);
}

.maturity-level-selector select {
    width: 100%;
    padding: 0.625rem;
    border-radius: 0.5rem;
    border: 1px solid var(--color-border);
    background: var(--color-bg-light);
    color: var(--color-text);
    font-size: 0.9rem;
    cursor: pointer;
}

.maturity-level-selector select:focus {
    outline: none;
    border-color: var(--color-primary);
}

/* Progress Section */
.progress-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.progress-percentage {
    color: var(--color-primary);
}

.progress-bar {
    height: 8px;
    background: var(--color-bg-lighter);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary));
    border-radius: 999px;
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Results Section */
.results-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.maturity-score {
    display: flex;
    justify-content: center;
    margin-bottom: 1rem;
}

.score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    border: 3px solid var(--color-primary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.score-label {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Strategies List */
.strategies-list {
    margin-bottom: 1rem;
}

.strategy-score {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    margin-bottom: 0.375rem;
    font-size: 0.8rem;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: all 0.2s;
}

.strategy-score:hover {
    background: var(--color-bg-lighter);
    border-color: var(--color-primary);
}

.strategy-info {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    flex: 1;
}

.strategy-name {
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
}

.strategy-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.strategy-progress {
    font-size: 0.7rem;
    color: var(--color-text-muted);
    margin-left: 1rem;
}

.strategy-progress .complete-check {
    color: var(--color-success);
    font-weight: 700;
}

.strategy-value {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.9rem;
}

/* Chart Container */
.chart-container {
    margin: 1rem 0;
    background: var(--color-bg);
    border-radius: 0.75rem;
    padding: 0.75rem;
    min-height: 180px;
}

/* Buttons */
.btn {
    width: 100%;
    padding: 0.625rem 1rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
    color: var(--color-text);
}

.btn-secondary {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg-lighter);
}

/* Export Buttons Row */
.export-buttons {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.export-buttons .btn {
    flex: 1;
    margin-bottom: 0;
}

.btn-reset {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.btn-reset:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

/* Main Content */
.main-content {
    padding: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.assessment-header {
    margin-bottom: 2rem;
}

.assessment-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.assessment-header p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Answer Legend */
.answer-legend {
    display: flex;
    gap: 2rem;
    padding: 1rem;
    background: var(--color-bg-light);
    border-radius: 0.75rem;
    border: 1px solid var(--color-border);
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-secondary);
}

.legend-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.375rem;
    font-weight: 600;
    font-size: 0.75rem;
}

/* Strategy Sections */
.strategy-section {
    margin-bottom: 3rem;
}

.strategy-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
}

.strategy-number {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.75rem;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.strategy-title {
    flex: 1;
}

.strategy-title h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.strategy-description {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
}

.strategy-progress-badge {
    background: var(--color-bg);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    border: 1px solid var(--color-border);
}

/* Level Sections */
.level-section {
    margin-bottom: 1.5rem;
}

.level-header {
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    display: inline-block;
}

.level-header.level-1 {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.level-header.level-2 {
    background: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(96, 165, 250, 0.3);
}

.level-header.level-3 {
    background: rgba(52, 211, 153, 0.15);
    color: #34d399;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

/* Requirements Container */
.requirements-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Requirement Card */
.requirement-card {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 0.75rem;
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s;
}

.requirement-card.answered.answer-yes {
    border-color: #34d399;
    background: rgba(52, 211, 153, 0.05);
}

.requirement-card.answered.answer-no {
    border-color: #f87171;
    background: rgba(239, 68, 68, 0.05);
}

.requirement-card.highlight {
    animation: highlightPulse 3s ease-out;
}

@keyframes highlightPulse {
    0% { box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.7); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.requirement-content {
    flex: 1;
}

.requirement-code {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-text-muted);
    background: var(--color-bg);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.requirement-text {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.5;
}

/* Answer Buttons */
.answer-buttons {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.answer-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: 0.5rem;
    background: var(--color-bg);
    color: var(--color-text);
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 50px;
}

.answer-btn:hover {
    border-color: var(--color-primary);
}

.answer-no-btn.selected {
    background: #ef4444;
    border-color: #ef4444;
    color: white;
}

.answer-yes-btn.selected {
    background: #10b981;
    border-color: #10b981;
    color: white;
}

/* Recommendations Sidebar */
.recommendations-sidebar {
    background: var(--color-bg-light);
    border-left: 1px solid var(--color-border);
    padding: 1.5rem;
    height: calc(100vh - 80px);
    overflow-y: auto;
    position: sticky;
    top: 80px;
}

.recommendations-header {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-border);
}

.recommendations-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.recommendations-body {
    font-size: 0.875rem;
}

.empty-state {
    text-align: center;
    color: var(--color-text-muted);
    padding: 2rem 1rem;
}

.congratulations {
    text-align: center;
    padding: 2rem 1rem;
}

.congrats-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--color-success);
    color: white;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.congratulations h3 {
    color: var(--color-success);
    margin-bottom: 0.5rem;
}

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

.recommendation-group {
    margin-bottom: 1.25rem;
}

.group-title {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    display: inline-block;
}

.group-title.level-1 {
    background: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.group-title.level-2 {
    background: rgba(96, 165, 250, 0.2);
    color: #60a5fa;
}

.group-title.level-3 {
    background: rgba(52, 211, 153, 0.2);
    color: #34d399;
}

.recommendation-card {
    background: var(--color-bg);
    border-radius: 0.5rem;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #ef4444;
    cursor: pointer;
    transition: all 0.2s;
}

.recommendation-card:hover {
    background: var(--color-bg-lighter);
    transform: translateX(4px);
}

.rec-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.375rem;
}

.rec-practice {
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
    border-left: 2px solid;
}

.rec-level {
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--color-text-muted);
    background: var(--color-bg-light);
    padding: 0.125rem 0.375rem;
    border-radius: 0.25rem;
}

.rec-question {
    font-size: 0.75rem;
    color: var(--color-text);
    line-height: 1.4;
}

.more-gaps {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    padding: 0.5rem;
}

/* Responsive */
@media (max-width: 1200px) {
    .assessment-layout {
        grid-template-columns: 280px 1fr 280px;
    }
}

@media (max-width: 1024px) {
    .assessment-layout {
        grid-template-columns: 1fr;
    }

    .sidebar, .recommendations-sidebar {
        position: relative;
        top: 0;
        height: auto;
        border: none;
        border-bottom: 1px solid var(--color-border);
    }

    .sidebar-sticky {
        position: static;
    }
}

@media (max-width: 768px) {
    .requirement-card {
        flex-direction: column;
    }

    .answer-buttons {
        width: 100%;
        justify-content: flex-end;
    }

    .answer-legend {
        flex-direction: column;
        gap: 0.5rem;
    }
}
