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

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

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 Bar */
.progress-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

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

.progress-text {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    display: block;
    text-align: right;
}

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

/* Multi-select check */
.check-icon {
    display: none;
    color: var(--primary);
    font-weight: bold;
}
.option-card.selected .check-icon {
    display: block;
}

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

/* 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);
}
.btn-secondary:hover {
    color: var(--text-main);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border-color);
    color: var(--text-main);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.w-full { width: 100%; }
.mt-2 { margin-top: 0.5rem; }

/* Results */
.score-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.05);
    text-align: center;
    margin-bottom: 2rem;
}

.gauge-container {
    width: 200px;
    margin: 0 auto 1rem;
    position: relative;
}

.gauge {
    display: block;
    width: 100%;
}

.gauge-fill {
    transition: stroke-dasharray 1s ease;
    stroke-dasharray: 0 126; /* 126 is approx length of semi-circle arc r=40 */
    stroke-linecap: round;
}

.score-text {
    position: absolute;
    bottom: 0;
    width: 100%;
    text-align: center;
}

#final-score {
    font-size: 3rem;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.score-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.score-badge {
    display: inline-block;
    padding: 0.25rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 1rem;
    color: white;
    background: var(--text-muted);
}

.score-description {
    font-size: 1.125rem;
    color: var(--text-main);
    max-width: 400px;
    margin: 0 auto;
}

.benchmark-section, .recommendations-section {
    margin-bottom: 2rem;
}

.recommendations-section h3, .benchmark-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary);
}

#recommendations-list {
    list-style: none;
    padding: 0;
}

#recommendations-list li {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

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

.modal-input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 1rem;
    box-sizing: border-box; /* Fix for padding increasing width */
}

.form-group {
    margin-bottom: 1rem;
}

.privacy-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1rem;
}

/* Utilities */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0,0,0,0);
    border: 0;
}
