/**
 * QA Maturity Form Styles
 * Salvar em: assets/css/qa-maturity.css
 */

.qa-form-container {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    padding: 40px;
    color: #333;
}

/* Progress Bar */
.progress-container {
    margin-bottom: 40px;
}

.progress-bar-bg {
    width: 100%;
    height: 8px;
    background: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    width: 14.28%;
    transition: width 0.3s ease;
}

.progress-text {
    text-align: center;
    margin-top: 10px;
    color: #667eea;
    font-weight: 600;
    font-size: 14px;
}

/* Steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 25px;
    margin: 0 -40px 30px -40px;
    font-size: 20px;
    font-weight: 600;
}

/* Questions */
.question {
    margin-bottom: 30px;
}

.question.has-error .question-label {
    color: #e53e3e;
}

.question.has-error .radio-group,
.question.has-error .checkbox-group {
    border: 2px solid #fed7d7;
    padding: 15px;
    border-radius: 8px;
    background: #fff5f5;
}

.question-label {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2d3748;
    font-size: 16px;
    line-height: 1.5;
}

.required {
    color: #e53e3e;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    font-family: inherit;
    background: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input[type="text"].error,
input[type="email"].error,
input[type="tel"].error {
    border-color: #e53e3e;
    background: #fff5f5;
}

/* Radio and Checkbox Groups */
.radio-group,
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: flex-start;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
}

.radio-option:hover,
.checkbox-option:hover {
    border-color: #667eea;
    background: #f7fafc;
    transform: translateX(5px);
}

.radio-option.selected,
.checkbox-option.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

input[type="radio"],
input[type="checkbox"] {
    margin-right: 12px;
    margin-top: 3px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: #667eea;
    flex-shrink: 0;
}

.option-text {
    flex: 1;
    line-height: 1.6;
    font-size: 15px;
    color: #2d3748;
}

/* Scale Options */
.scale-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scale-option {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.scale-option:hover {
    border-color: #667eea;
    background: #f7fafc;
    transform: translateX(5px);
}

.scale-option.selected {
    border-color: #667eea;
    background: #f0f4ff;
}

.scale-option input[type="radio"] {
    display: none;
}

.scale-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 18px;
}

.scale-text {
    flex: 1;
    line-height: 1.6;
    color: #2d3748;
}

/* Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 40px;
    gap: 15px;
}

.btn {
    padding: 14px 35px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
}

.btn-prev {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-prev:hover {
    background: #cbd5e0;
    transform: translateX(-3px);
}

.btn-next,
.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.btn-next:hover,
.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Success Screen */
.success-screen {
    display: none;
    text-align: center;
    padding: 60px 20px;
}

.success-screen.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    font-size: 40px;
    color: white;
}

.success-screen h2 {
    font-size: 32px;
    color: #2d3748;
    margin-bottom: 15px;
}

.success-screen p {
    font-size: 18px;
    color: #666;
    line-height: 1.6;
}

/* Error Message */
.error-message {
    background: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    border-left: 4px solid #c53030;
    animation: shake 0.5s;
}

.error-message.show {
    display: block;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

/* Field Error */
.field-error {
    color: #e53e3e;
    font-size: 13px;
    margin-top: 5px;
    display: none;
}

.field-error.show {
    display: block;
}

/* Loading State */
.btn.loading {
    position: relative;
    pointer-events: none;
    color: transparent;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .qa-form-container {
        padding: 20px;
    }

    .step-title {
        margin: 0 -20px 20px -20px;
        font-size: 18px;
        padding: 12px 20px;
    }

    .form-navigation {
        flex-direction: column;
    }

    .btn-next {
        order: -1;
    }
    
    .scale-number {
        min-width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .success-screen h2 {
        font-size: 24px;
    }
}

/* Elementor Editor */
.elementor-editor-active .qa-form-container {
    pointer-events: none;
}