/* Public Test Styles */
.wai-test-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Screens */
.wai-screen {
    display: none;
}

.wai-screen-active {
    display: block;
    animation: fadeIn 0.3s ease-in;
}

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

/* Card */
.wai-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 40px;
}

/* Test Title */
.wai-test-title {
    font-size: 28px;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Test Info */
.wai-test-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.wai-info-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.wai-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.wai-info-item strong {
    display: block;
    color: #1a1a1a;
    font-size: 14px;
    margin-bottom: 4px;
}

.wai-info-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

/* Intro Text */
.wai-intro-text {
    background: #f8f9fa;
    border-left: 4px solid #2271b1;
    padding: 20px;
    margin: 30px 0;
    border-radius: 4px;
}

.wai-intro-text p {
    margin: 0;
    color: #444;
    line-height: 1.6;
}

/* Buttons */
.wai-btn {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.wai-btn-primary {
    background: #2271b1;
    color: #fff;
}

.wai-btn-primary:hover {
    background: #135e96;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.wai-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

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

.wai-btn-large {
    width: 100%;
    padding: 16px 32px;
    font-size: 18px;
    margin-top: 20px;
}

/* Form */
.wai-subtitle {
    color: #666;
    font-size: 16px;
    margin: 0 0 30px 0;
    text-align: center;
}

.wai-form {
    margin-top: 30px;
}

.wai-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.wai-form-group {
    margin-bottom: 20px;
}

.wai-form-group label {
    display: block;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 8px;
    font-size: 14px;
}

.wai-form-group input[type="text"],
.wai-form-group input[type="email"] {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
}

.wai-form-group input:focus {
    outline: none;
    border-color: #2271b1;
}

.wai-consent {
    margin-top: 30px;
}

.wai-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
}

.wai-checkbox-label input[type="checkbox"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.wai-checkbox-label span {
    color: #444;
    font-size: 14px;
    line-height: 1.5;
}

/* Progress Bar */
.wai-progress-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.wai-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2271b1, #4CAF50);
    transition: width 0.4s ease;
}

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

/* Question */
.wai-question-container {
    min-height: 400px;
}

.wai-question-text {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 30px 0;
    line-height: 1.4;
}

/* Options */
.wai-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.wai-option {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    width: 100%;
}

.wai-option:hover {
    border-color: #2271b1;
    background: #f8f9fa;
}

.wai-option.selected {
    border-color: #2271b1;
    background: #e7f3ff;
}

.wai-option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #666;
    flex-shrink: 0;
}

.wai-option.selected .wai-option-letter {
    background: #2271b1;
    color: #fff;
}

.wai-option-text {
    flex: 1;
    color: #333;
    font-size: 16px;
}

/* Loading */
.wai-loading {
    text-align: center;
    padding: 60px 20px;
}

.wai-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f0f0f0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.wai-spinner-large {
    width: 60px;
    height: 60px;
    border: 5px solid #f0f0f0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 30px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Processing */
.wai-text-center {
    text-align: center;
}

.wai-processing-animation {
    margin: 40px 0;
}

.wai-processing-steps {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.wai-step-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.wai-step-done {
    background: #e8f5e9;
}

.wai-step-active {
    background: #e7f3ff;
}

.wai-step-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Result */
.wai-result-header {
    text-align: center;
    margin-bottom: 40px;
}

.wai-result-header h2 {
    font-size: 32px;
    color: #4CAF50;
    margin: 0 0 10px 0;
}

.wai-result-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    margin: 40px 0;
}

.wai-score-circle {
    position: relative;
    width: 150px;
    height: 150px;
}

.wai-score-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.wai-score-number {
    display: block;
    font-size: 48px;
    font-weight: 700;
    color: #4CAF50;
    line-height: 1;
}

.wai-score-total {
    display: block;
    font-size: 24px;
    color: #666;
}

.wai-level-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 24px;
    font-size: 18px;
    font-weight: 700;
}

.wai-level-avance {
    background: #e7f3ff;
    color: #2271b1;
}

.wai-level-icon {
    font-size: 24px;
}

/* Synthesis */
.wai-synthesis {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin: 30px 0;
}

.wai-synthesis h3 {
    margin: 0 0 20px 0;
    color: #1a1a1a;
}

.wai-synthesis-content {
    color: #444;
    line-height: 1.7;
}

.wai-synthesis-content strong {
    color: #1a1a1a;
}

.wai-synthesis-content ul {
    margin: 10px 0;
    padding-left: 20px;
}

.wai-synthesis-content li {
    margin: 8px 0;
}

/* Result Actions */
.wai-result-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.wai-result-actions .wai-btn {
    flex: 1;
}

/* Utility */
.wai-hidden {
    display: none !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .wai-card {
        padding: 24px;
    }
    
    .wai-test-title {
        font-size: 24px;
    }
    
    .wai-test-info {
        grid-template-columns: 1fr;
    }
    
    .wai-form-row {
        grid-template-columns: 1fr;
    }
    
    .wai-question-text {
        font-size: 18px;
    }
    
    .wai-result-actions {
        flex-direction: column;
    }
}
