/* Micro-16 Assessment - Frontend Styles */

.micro16-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.micro16-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e0e0e0;
}

.micro16-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: #2c3e50;
}

.micro16-intro {
    font-size: 18px;
    color: #7f8c8d;
    margin: 10px 0;
}

.micro16-instructions {
    text-align: left;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 6px;
    margin-top: 20px;
}

.micro16-scale-legend {
    list-style: none;
    padding: 0;
    margin: 15px 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

.micro16-scale-legend li {
    padding: 8px;
    background: white;
    border-radius: 4px;
    font-size: 14px;
}

/* Sections */
.micro16-section {
    margin: 30px 0;
    padding: 25px;
    background: #fafbfc;
    border-radius: 6px;
}

.micro16-section h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #34495e;
}

/* Form Fields */
.micro16-field {
    margin-bottom: 20px;
}

.micro16-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.micro16-field input[type="text"],
.micro16-field input[type="email"],
.micro16-field input[type="number"],
.micro16-field select {
    width: 100%;
    padding: 12px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.micro16-field input:focus,
.micro16-field select:focus {
    outline: none;
    border-color: #3498db;
}

.micro16-field-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.required {
    color: #e74c3c;
}

/* Questions */
.micro16-domain {
    margin-bottom: 30px;
}

.micro16-domain h4 {
    color: #3498db;
    font-size: 18px;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

.micro16-question {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.micro16-question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.micro16-question-number {
    font-weight: 700;
    color: #3498db;
    font-size: 14px;
}

.micro16-question-marker {
    font-size: 12px;
    color: #7f8c8d;
    font-style: italic;
}

.micro16-question-text {
    margin: 0 0 15px 0;
    font-size: 16px;
    line-height: 1.6;
    color: #2c3e50;
}

/* Scale */
.micro16-scale {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.micro16-scale-option {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
}

.micro16-scale-option input[type="radio"] {
    display: none;
}

.micro16-scale-label {
    display: block;
    width: 100%;
    padding: 12px;
    text-align: center;
    border: 2px solid #e0e0e0;
    border-radius: 4px;
    background: white;
    font-weight: 600;
    transition: all 0.3s;
}

.micro16-scale-option:hover .micro16-scale-label {
    border-color: #3498db;
    background: #ecf0f1;
}

.micro16-scale-option input[type="radio"]:checked + .micro16-scale-label {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

/* Consent */
.micro16-checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
}

.micro16-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 4px;
}

/* Submit */
.micro16-submit-section {
    text-align: center;
}

.micro16-submit-btn {
    background: #27ae60;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 18px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.micro16-submit-btn:hover {
    background: #229954;
}

.micro16-submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
}

/* Progress */
.micro16-progress {
    margin-top: 20px;
    height: 6px;
    background: #ecf0f1;
    border-radius: 3px;
    overflow: hidden;
}

.micro16-progress-bar {
    height: 100%;
    background: #3498db;
    width: 0;
    transition: width 0.3s;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Messages */
.micro16-message {
    margin: 20px 0;
    padding: 15px;
    border-radius: 6px;
}

.micro16-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.micro16-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Results */
.micro16-results {
    padding: 30px;
}

.micro16-results-header h2 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 30px;
}

.micro16-results-scores {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.micro16-score-box {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
}

.micro16-score-primary {
    background: #3498db;
    color: white;
}

.micro16-score-label {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 10px;
    opacity: 0.8;
}

.micro16-score-value {
    font-size: 36px;
    font-weight: 700;
}

.micro16-results-profile h3 {
    color: #3498db;
    font-size: 28px;
    margin-bottom: 20px;
}

.micro16-results-narrative {
    line-height: 1.8;
    font-size: 16px;
}

.micro16-results-narrative p {
    margin-bottom: 20px;
}

.micro16-results-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 20px;
    border-radius: 6px;
    margin-top: 30px;
}

/* Responsive */
@media (max-width: 768px) {
    .micro16-wrapper {
        padding: 20px;
    }
    
    .micro16-field-group {
        grid-template-columns: 1fr;
    }
    
    .micro16-scale {
        flex-wrap: wrap;
    }
    
    .micro16-scale-option {
        flex-basis: calc(33.333% - 10px);
    }
    
    .micro16-results-scores {
        grid-template-columns: 1fr;
    }
}
