/* Import shared variables */
@import '../../../_shared/variables.css';

:root {
    --bg-page: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --primary: var(--sl-blue-primary);
    --border-color: #e2e8f0;
    --success: #059669;
    --warning: #d97706;
    --danger: #dc2626;
    
    --cat-infra: #3b82f6;
    --cat-content: #8b5cf6;
    --cat-org: #10b981;
    --cat-tech: #f59e0b;
}

[data-theme="dark"] {
    --bg-page: #0f172a;
    --card-bg: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --danger: #ef4444;
    --success: #10b981;
    --primary: #60a5fa;
    --cat-infra: #60a5fa;
    --cat-content: #a78bfa;
    --cat-org: #34d399;
    --cat-tech: #fbbf24;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* Header */
.header {
    background: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header__logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
}

.header__title-group {
    display: flex;
    flex-direction: column;
}

.header__brand {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

.header__title {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
}

.btn--icon {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}
.btn--icon:hover { color: var(--primary); }

.theme-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
}
.theme-toggle:hover { color: var(--text-main); }
.icon-sun { display: none; }
.icon-moon { display: block; }
[data-theme="dark"] .icon-sun { display: block; }
[data-theme="dark"] .icon-moon { display: none; }

/* App Container */
.app-container {
    max-width: 600px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

/* Progress Area */
.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 0.5rem;
}

.category-badge {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--primary);
}

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

.progress-bar {
    height: 6px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    width: 0%;
    transition: width 0.3s ease;
}

/* Question Styles */
.question-container h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.options-grid {
    display: grid;
    gap: 1rem;
}

.option-card {
    background: white;
    border: 2px solid var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.option-card:hover { border-color: var(--sl-blue-light); transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.option-card.selected { border-color: var(--primary); background-color: #f0f9ff; }
.option-text { font-weight: 500; }

/* Navigation */
.navigation-controls { margin-top: 2rem; display: flex; justify-content: flex-start; }

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background-color: var(--sl-blue-dark); }
.btn-secondary { background: transparent; color: var(--text-muted); border: 1px solid transparent; }
.btn-secondary:hover { color: var(--text-main); border-color: var(--border-color); }
.btn-outline { background: transparent; border: 2px solid var(--border-color); color: var(--text-main); box-sizing: border-box; }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.w-full { width: 100%; }

/* Results */
.score-circle-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}
.score-circle {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg); /* Start at top */
}
.circle-bg { fill: none; stroke: #e2e8f0; stroke-width: 2.5; }
.circle-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2.5;
    stroke-linecap: round;
    transition: stroke-dasharray 1s ease;
}
.score-content {
    position: absolute;
    text-align: center;
}
.score-number {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
}
.score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.results-header { text-align: center; margin-bottom: 2rem; }
.status-badge {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 99px;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    background: #e2e8f0; 
    color: var(--text-main);
}
.status-message { font-size: 1.1rem; color: var(--text-muted); max-width: 400px; margin: 0 auto; }

/* Category Breakdown */
.breakdown-section {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.breakdown-section h3 { margin-top: 0; margin-bottom: 1rem; font-size: 1.1rem; }

.cat-bar-row { margin-bottom: 1rem; }
.cat-label-row { display: flex; justify-content: space-between; font-size: 0.85rem; margin-bottom: 0.25rem; }
.cat-name { font-weight: 600; }
.cat-val { color: var(--text-muted); }
.cat-track { height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden; }
.cat-fill { height: 100%; border-radius: 4px; width: 0%; transition: width 1s ease; }

/* Gaps Section */
.gaps-section { margin-bottom: 2rem; }
.gaps-section h3 { font-size: 1.25rem; margin-bottom: 0.25rem; color: var(--danger); }
.section-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1.5rem; }

.gap-card {
    background: white;
    border-left: 4px solid var(--danger);
    padding: 1rem;
    border-radius: 0 8px 8px 0;
    margin-bottom: 1rem;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}
.gap-header { font-weight: 700; display: block; margin-bottom: 0.25rem; color: var(--text-main); }
.gap-desc { font-size: 0.9rem; color: var(--text-muted); margin: 0; }
.gap-action { 
    margin-top: 0.75rem; 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: var(--primary); 
    display: flex; align-items: center; gap: 0.25rem; 
}

/* Actions */
.action-caption { text-align: center; font-size: 0.85rem; color: var(--text-muted); margin-top: 0.5rem; }
.primary-action { margin-bottom: 1.5rem; }

/* Modal */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
    display: none; justify-content: center; align-items: center;
    z-index: 1000;
}
.modal-overlay.active { display: flex; }
.modal {
    background: white; padding: 2rem; border-radius: 16px;
    width: 90%; max-width: 450px; position: relative;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}
.modal__close {
    position: absolute; top: 1rem; right: 1rem;
    background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted);
}
.modal__title { font-size: 1.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.modal__subtitle { color: var(--text-muted); margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1rem; }
.modal-input {
    width: 100%; padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px; font-size: 1rem; box-sizing: border-box;
}
.privacy-note { font-size: 0.75rem; color: var(--text-muted); text-align: center; margin-top: 1rem; }
.sr-only { position: absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }

/* Utilities */
.fade-in { animation: fadeIn 0.5s ease-in; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
