/* Form Styles */

/* Survey Question Container */
.survey-question {
    margin-bottom: 2rem;
}

.survey-question-header {
    margin-bottom: 1.5rem;
}

.survey-question-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.survey-question-subtitle {
    font-size: 0.875rem;
    color: #64748b;
    line-height: 1.5;
}

.survey-question-required {
    color: #dc2626;
    font-weight: 600;
}

/* Question Types */
.question-type-text {
    margin-bottom: 1rem;
}

.question-type-text .form-control {
    min-height: 120px;
    resize: vertical;
}

.question-type-select {
    margin-bottom: 1rem;
}

.question-type-select .form-select {
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
    padding: 0.75rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.question-type-select .form-select:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 0.2rem rgba(30, 64, 175, 0.25);
}

/* Radio Button Groups */
.question-type-radio {
    margin-bottom: 1rem;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
}

.radio-option:hover {
    border-color: #1e40af;
    background-color: #f8fafc;
}

.radio-option.selected {
    border-color: #1e40af;
    background-color: #eff6ff;
}

.radio-option input[type="radio"] {
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #1e40af;
}

.radio-option-label {
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    flex: 1;
}

/* Checkbox Groups */
.question-type-checkbox {
    margin-bottom: 1rem;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
}

.checkbox-option:hover {
    border-color: #1e40af;
    background-color: #f8fafc;
}

.checkbox-option.selected {
    border-color: #1e40af;
    background-color: #eff6ff;
}

.checkbox-option input[type="checkbox"] {
    margin-right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #1e40af;
}

.checkbox-option-label {
    font-weight: 500;
    color: #1e293b;
    cursor: pointer;
    flex: 1;
}

/* Rating Scales */
.question-type-rating {
    margin-bottom: 1rem;
}

.rating-scale {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.rating-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: white;
    min-width: 60px;
    text-align: center;
}

.rating-option:hover {
    border-color: #1e40af;
    background-color: #f8fafc;
}

.rating-option.selected {
    border-color: #1e40af;
    background-color: #eff6ff;
}

.rating-option input[type="radio"] {
    margin-bottom: 0.5rem;
    width: 1.25rem;
    height: 1.25rem;
    accent-color: #1e40af;
}

.rating-value {
    font-weight: 600;
    color: #1e293b;
    font-size: 1.1rem;
}

.rating-label {
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    line-height: 1.2;
}

/* Consent Form */
.consent-form {
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.consent-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.consent-icon {
    color: #1e40af;
    font-size: 1.5rem;
}

.consent-title {
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.consent-content {
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.consent-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Form Validation */
.form-control.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 0.2rem rgba(220, 38, 38, 0.25);
}

.form-control.is-valid {
    border-color: #059669;
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.25);
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc2626;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #059669;
}

/* Form Groups */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1e293b;
}

.form-group .form-control {
    width: 100%;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
}

.form-actions .btn {
    min-width: 120px;
}

.form-actions .btn-secondary {
    background-color: #64748b;
    border-color: #64748b;
}

.form-actions .btn-secondary:hover {
    background-color: #475569;
    border-color: #475569;
}

/* Progress Indicators */
.question-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.question-progress-icon {
    color: #1e40af;
    font-size: 1.1rem;
}

.question-progress-text {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

/* Help Text */
.help-text {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
    line-height: 1.4;
}

.help-text i {
    margin-right: 0.25rem;
    color: #1e40af;
}

/* Form Sections */
.form-section {
    background-color: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.form-section-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e2e8f0;
}

.form-section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.form-section-description {
    color: #64748b;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Responsive Form Design */
@media (max-width: 768px) {
    .survey-question-title {
        font-size: 1.1rem;
    }
    
    .radio-option,
    .checkbox-option {
        padding: 0.75rem;
    }
    
    .rating-scale {
        flex-wrap: wrap;
        gap: 0.25rem;
    }
    
    .rating-option {
        min-width: 50px;
        padding: 0.75rem 0.25rem;
    }
    
    .consent-actions {
        flex-direction: column;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .survey-question {
        margin-bottom: 1.5rem;
    }
    
    .survey-question-header {
        margin-bottom: 1rem;
    }
    
    .radio-group,
    .checkbox-group {
        gap: 0.5rem;
    }
    
    .radio-option,
    .checkbox-option {
        padding: 0.75rem;
    }
    
    .rating-scale {
        justify-content: center;
    }
    
    .rating-option {
        min-width: 45px;
        padding: 0.5rem 0.25rem;
    }
    
    .rating-value {
        font-size: 1rem;
    }
    
    .rating-label {
        font-size: 0.7rem;
    }
}

/* Accessibility Improvements */
.radio-option:focus-within,
.checkbox-option:focus-within,
.rating-option:focus-within {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

.form-control:focus {
    outline: none;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .radio-option,
    .checkbox-option,
    .rating-option {
        border-width: 2px;
    }
    
    .radio-option.selected,
    .checkbox-option.selected,
    .rating-option.selected {
        border-width: 3px;
    }
    
    .form-control {
        border-width: 2px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .radio-option,
    .checkbox-option,
    .rating-option {
        transition: none;
    }
    
    .form-control {
        transition: none;
    }
} 