/* Data Maturity Self-Assessment Questionnaire - Styles */

/* Metropolis Font */
@import url('https://fonts.cdnfonts.com/css/metropolis-2');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Metropolis', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 200; /* Extra Light */
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
}

/* Headings - Metropolis Bold Caps with 24% letter-spacing */
h1, h2, h3 {
    font-family: 'Metropolis', sans-serif;
    font-weight: 700; /* Bold */
    text-transform: uppercase;
    letter-spacing: 0.24em;
}

#app {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Screens */
.screen {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Start Screen */
.start-screen {
    text-align: center;
    margin-top: 60px;
}

.start-screen h1 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.start-screen .description {
    color: #666;
    margin-bottom: 16px;
    font-size: 1rem;
}

.start-screen .sections-list {
    color: #827A50;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 30px;
}

/* User Info Form */
.user-info-form {
    max-width: 400px;
    margin: 0 auto 30px;
    text-align: left;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Metropolis', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #827A50;
    box-shadow: 0 0 0 3px rgba(130, 122, 80, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

.form-group input.invalid {
    border-color: #ef4444;
}

.form-group input.invalid:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group select {
    width: 100%;
    padding: 12px 16px;
    font-family: 'Metropolis', sans-serif;
    font-size: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background-color: #fff;
    color: #333;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23827A50' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

.form-group select:focus {
    outline: none;
    border-color: #827A50;
    box-shadow: 0 0 0 3px rgba(130, 122, 80, 0.1);
}

.error-message {
    display: block;
    font-size: 0.8rem;
    color: #ef4444;
    margin-top: 6px;
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.error-message.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.btn {
    font-family: 'Metropolis', sans-serif;
    padding: 14px 32px;
    font-size: 1rem;
    font-weight: 600; /* Semi Bold */
    border: none;
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background-color: #827A50;
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background-color: #6b6442;
}

.btn-secondary {
    background-color: #827A50;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #6b6442;
}

.btn-back {
    background-color: #fff;
    color: #333;
    border: 1px solid #e5e7eb;
}

.btn-back:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

/* Navigation Buttons */
.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

/* Progress */
.progress-container {
    margin-bottom: 30px;
}

.progress-bar {
    height: 8px;
    background-color: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background-color: #827A50;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.875rem;
    color: #666;
}

/* Section Screen */
.section-screen h2 {
    font-size: 1.5rem;
    margin-bottom: 24px;
    color: #1a1a1a;
}

.questions {
    margin-bottom: 30px;
}

/* Question Group Card */
.question-group-card {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.question-group {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #827A50;
    background: #f5f4f0;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* Individual Question within Group */
.question-item {
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.question-item:first-of-type {
    padding-top: 0;
    border-top: none;
}

.question-text {
    font-weight: 500;
    margin-bottom: 8px;
    color: #1a1a1a;
}

.question-description {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 16px;
}

.answers {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.answer-option:hover {
    border-color: #827A50;
    background: #f8f7f4;
}

.answer-option:has(input[type="radio"]:checked) {
    border-color: #827A50;
    background: #f8f7f4;
}

.answer-option input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #827A50;
}

.answer-option input[type="radio"]:checked + .answer-text {
    color: #827A50;
    font-weight: 500;
}

.answer-text {
    font-size: 0.95rem;
    color: #333;
}

/* Results Screen */
.results-screen {
    text-align: center;
}

/* Results Top Bar */
.results-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 30px;
}

.report-sent-notice {
    background: #f5f4f0;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 12px 20px;
    font-size: 0.85rem;
    color: #666;
    flex: 1;
    text-align: left;
}

.report-sent-notice strong {
    color: #827A50;
    font-weight: 600;
}

/* Download Button */
.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-icon:hover {
    background: #f5f4f0;
    border-color: #827A50;
    color: #827A50;
}

.btn-icon:active {
    transform: scale(0.95);
}

.btn-icon svg {
    display: block;
}

.results-screen h1 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: #1a1a1a;
}

/* Circular Score Ring */
.score-ring-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 40px;
}

.score-ring {
    position: relative;
    width: 200px;
    height: 200px;
    margin-bottom: 24px;
}

.score-ring svg {
    transform: rotate(-90deg);
    width: 200px;
    height: 200px;
}

.score-ring-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 12;
}

.score-ring-fill {
    fill: none;
    stroke: #827A50;
    stroke-width: 12;
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease;
}

.score-ring-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.score-value {
    font-family: 'Metropolis', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1;
}

.score-max {
    font-size: 1rem;
    font-weight: 300;
    color: #666;
    margin-top: 4px;
}

.score-title {
    font-size: 1.4rem;
    margin-bottom: 12px;
    color: #1a1a1a;
}

.maturity-level {
    font-size: 1rem;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.maturity-level strong {
    font-weight: 700;
}

.maturity-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* Maturity Levels Info Section */
.maturity-levels-info {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 40px;
    text-align: left;
}

.maturity-levels-info h3 {
    font-size: 0.9rem;
    margin-bottom: 16px;
    color: #1a1a1a;
}

.maturity-levels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.maturity-level-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.maturity-level-item .maturity-dot {
    margin-top: 3px;
}

.maturity-level-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.maturity-level-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #1a1a1a;
}

.maturity-level-desc {
    font-size: 0.75rem;
    color: #666;
}

.total-score {
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.score-label {
    font-size: 1.2rem;
    font-weight: 500;
    margin-top: 8px;
}

/* Score Colors - for total score with background */
.total-score.score-high {
    background-color: #dcfce7;
    color: #22c55e;
}

.total-score.score-medium {
    background-color: #fef3c7;
    color: #f59e0b;
}

.total-score.score-low {
    background-color: #fee2e2;
    color: #ef4444;
}

/* Section Results */
.section-results {
    text-align: left;
    margin-bottom: 40px;
}

.section-results h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.section-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.section-result:last-child {
    border-bottom: none;
}

.section-result .maturity-dot {
    flex-shrink: 0;
}

.section-name {
    font-weight: 500;
    color: #333;
    width: 240px;
    flex-shrink: 0;
    font-size: 0.9rem;
    white-space: nowrap;
}

.section-score-container {
    display: flex;
    align-items: center;
    flex: 1;
    gap: 12px;
}

.section-score-bar {
    flex: 1;
    max-width: 300px;
    height: 10px;
    background-color: #e5e7eb;
    border-radius: 5px;
    overflow: hidden;
}

.section-score-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.5s ease;
    background-color: #1a1a1a;
}

.section-score-value {
    font-weight: 600;
    min-width: 45px;
    text-align: right;
    color: #1a1a1a;
}

/* Recommendations Section */
.recommendations-section {
    text-align: left;
    margin-bottom: 40px;
}

.recommendations-section h3 {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.recommendation-card {
    background: #fafafa;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 16px;
}

.recommendation-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.recommendation-header .maturity-dot {
    width: 10px;
    height: 10px;
}

.recommendation-section-name {
    font-weight: 600;
    color: #1a1a1a;
    flex-grow: 1;
}

.recommendation-section-score {
    font-weight: 600;
    color: #1a1a1a;
}

.recommendation-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recommendation-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.recommendation-icon {
    color: #827A50;
    font-size: 1rem;
    flex-shrink: 0;
}

.recommendation-text {
    color: #333;
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Results actions */
.results-actions {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.results-actions .btn {
    flex: 1;
    min-width: 200px;
    text-align: center;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-card {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    width: 100%;
    max-width: 520px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
    padding-right: 32px;
}

.modal-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* MoSCoW Priority */
.moscow-legend {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    font-size: 0.8rem;
    color: #666;
}

.moscow-legend-title {
    font-weight: 600;
    margin-right: 4px;
}

.moscow-legend-label {
    margin-right: 10px;
    color: #555;
}

.moscow-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    color: #fff;
    flex-shrink: 0;
}

.moscow-M { background-color: #242424; }
.moscow-S { background-color: #898989; }
.moscow-C { background-color: #AFAFAF; }
.moscow-W { background-color: #AFAFAF; }

/* Responsive */
@media (max-width: 600px) {
    #app {
        padding: 12px;
    }

    .screen {
        padding: 24px;
    }

    .start-screen h1,
    .results-screen h1 {
        font-size: 1.5rem;
    }

    .score-value {
        font-size: 2.5rem;
    }

    .section-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .section-name {
        width: auto;
    }

    .section-score-container {
        width: 100%;
        margin-left: 0;
    }
}
