/**
 * Frontend Questionnaire Styles
 */

.asq-questionnaire-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.asq-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #0073aa;
}

.asq-title {
    font-size: 24px;
    color: #23282d;
    margin-bottom: 10px;
}

.asq-subtitle {
    font-size: 14px;
    color: #666;
}

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

.asq-progress-text {
    text-align: center;
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    font-weight: 600;
}

.asq-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e5e5;
    border-radius: 4px;
    overflow: hidden;
}

.asq-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0073aa, #00a0d2);
    transition: width 0.3s ease;
}

/* Steps */
.asq-step {
    display: none;
}

.asq-step-active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Questions */
.asq-question {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.asq-question.asq-error {
    background: #ffebee;
    border-left: 4px solid #d32f2f;
}

.asq-question-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    margin-bottom: 15px;
}

.asq-required {
    color: #d32f2f;
    margin-left: 3px;
}

/* Fields */
.asq-field {
    margin-top: 10px;
}

/* Radio buttons */
.asq-radio-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.asq-radio-label:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.asq-radio-label input[type="radio"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.asq-radio-label span {
    flex: 1;
}

.asq-radio-other {
    flex-wrap: wrap;
}

.asq-other-text {
    width: 100%;
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Checkboxes */
.asq-checkbox-label {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.asq-checkbox-label:hover {
    border-color: #0073aa;
    background: #f0f8ff;
}

.asq-checkbox-label input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.asq-checkbox-label span {
    flex: 1;
}

.asq-checkbox-other {
    flex-wrap: wrap;
}

/* Matrix */
.asq-matrix-table {
    overflow-x: auto;
}

.asq-matrix-table table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.asq-matrix-table th,
.asq-matrix-table td {
    padding: 12px;
    text-align: center;
    border: 1px solid #ddd;
}

.asq-matrix-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #23282d;
}

.asq-matrix-row-label {
    text-align: left !important;
    font-weight: 500;
}

.asq-matrix-cell input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.asq-matrix-comment input {
    width: 100%;
    padding: 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Text inputs */
.asq-input,
.asq-textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
}

.asq-input:focus,
.asq-textarea:focus {
    outline: none;
    border-color: #0073aa;
}

.asq-textarea {
    resize: vertical;
    min-height: 100px;
}

.asq-input-small {
    padding: 6px 10px;
    font-size: 13px;
}

/* Navigation */
.asq-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.asq-btn {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.asq-btn-primary {
    background: #0073aa;
    color: #fff;
}

.asq-btn-primary:hover {
    background: #005a87;
}

.asq-btn-secondary {
    background: #f0f0f0;
    color: #23282d;
}

.asq-btn-secondary:hover {
    background: #e0e0e0;
}

/* Consent */
.asq-consent {
    margin-top: 20px;
    padding: 15px;
    background: #f0f8ff;
    border-left: 3px solid #0073aa;
    font-size: 13px;
    color: #666;
}

/* Alerts */
.asq-alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
}

.asq-alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #c62828;
}

.asq-alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

/* Success/Error messages */
.asq-success,
.asq-error {
    max-width: 600px;
    margin: 60px auto;
    padding: 40px;
    text-align: center;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.asq-success-icon,
.asq-error-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.asq-success-icon {
    color: #2e7d32;
}

.asq-error-icon {
    color: #c62828;
}

.asq-success h2,
.asq-error h2 {
    margin-bottom: 15px;
    color: #23282d;
}

/* Responsive */
@media (max-width: 768px) {
    .asq-questionnaire-container {
        padding: 20px;
        margin: 20px 15px;
    }
    
    .asq-title {
        font-size: 20px;
    }
    
    .asq-navigation {
        flex-direction: column;
    }
    
    .asq-btn {
        width: 100%;
    }
    
    .asq-matrix-table {
        font-size: 13px;
    }
    
    .asq-matrix-table th,
    .asq-matrix-table td {
        padding: 8px 4px;
    }
}
