/* Assessment form: name, intro, questions and loading screens.
   Loaded after assessment.css, only with the form (it used to be an inline <style>). */

.sg-assessment-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.sg-screen {
    display: none;
}

.sg-screen.active {
    display: block;
}

/* Introduction Screen */
.sg-intro-content {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sg-existing-results {
    text-align: center;
    padding: 20px 0;
}

.sg-intro-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.sg-intro-buttons .button,
.sg-intro-buttons a.button {
    min-width: 180px;
    padding: 6px 12px;
    line-height: 1.4;
    height: 36px;
    box-sizing: border-box;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    white-space: nowrap;
    margin: 0;
    vertical-align: middle;
}

@media screen and (max-width: 600px) {
    .sg-intro-buttons {
        flex-direction: column;
    }
    
    .sg-intro-buttons .button {
        width: 100%;
    }
}

/* Name Input Screen */
.sg-name-input-content {
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    max-width: 500px;
    margin: 0 auto;
}

.sg-name-fields {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.sg-name-field {
    flex: 1;
}

.sg-name-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.sg-name-field input {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 16px;
    box-sizing: border-box;
}

.sg-name-field input:focus {
    border-color: var(--sg-primary, #2271b1);
    outline: none;
}

.sg-name-buttons {
    text-align: center;
}

.sg-name-buttons .button {
    min-width: 200px;
}

.required {
    color: #d63638;
}

@media screen and (max-width: 600px) {
    .sg-name-fields {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 20px;
    }
}

.sg-time-estimate {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 20px 0;
    color: #666;
}

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

.sg-progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.sg-progress-fill {
    height: 100%;
    background: var(--sg-primary, #2271b1);
    transition: width 0.3s ease;
}

.sg-progress-text {
    text-align: center;
    color: #666;
}

/* Questions */
.sg-question-group {
    display: none;
}

.sg-question-group.active {
    display: block;
}

.sg-question {
    background: #fff;
    padding: 20px;
    margin: 0 0 20px;
    border: 0;
    min-width: 0;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.sg-question-text {
    margin: 0 0 15px;
    font-size: 16px;
}

.sg-answers {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.sg-answer {
    flex: 1;
    display: flex;
    cursor: pointer;
}

.sg-answer-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 10px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    transition: all 0.2s ease;
    font-size: 18px;
    font-weight: bold;
}

.sg-answer-label {
    font-size: 12px;
    font-weight: normal;
    color: #666;
}

.sg-answer input[type="radio"]:checked + .sg-answer-text {
    border-color: var(--sg-primary, #2271b1);
    background: #f0f7fc;
}

/* Navigation */
.sg-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.sg-navigation button {
    min-width: 120px;
}

/* Loading Screen */
.sg-loading {
    text-align: center;
    padding: 50px 0;
}

.sg-loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--sg-primary, #2271b1);
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media screen and (max-width: 600px) {
    .sg-answers {
        flex-direction: column;
    }

    .sg-answer-text {
        flex-direction: row;
        justify-content: center;
    }

    .sg-navigation {
        flex-direction: column;
        gap: 10px;
    }

    .sg-navigation button {
        width: 100%;
    }
}
