/* CM-PsychoTest Frontend Styles */

/* Kunden Spezifische Farben

Background Kunde: #52849d
Original: #52849d
Hover: #52849d

*/

/* Frontend Error Notices */
.cm-psychotest-error {
    background: #fcf2f2;
    border: 1px solid #dc3232;
    border-left: 4px solid #dc3232;
    padding: 10px 15px;
    margin: 15px 0;
    border-radius: 3px;
    color: #23282d;
    z-index: 99999999;
}

.cm-psychotest-error p {
    margin: 0;
    font-size: 14px;
}

.cm-psychotest-error strong {
    color: #dc3232;
}

/* Container */
.cm-psychotest-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Progress Bar */
.cm-psychotest-progress {
    margin-bottom: 30px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: #52849d;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.progress-text {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

/* Questions */
.cm-psychotest-questions {
    min-height: 300px;
    margin-bottom: 30px;
}

.cm-psychotest-question {
    display: none;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-text {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 24px;
    line-height: 1.4;
}

/* Answers */
.question-answers {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-answers.error {
    animation: shake 0.3s ease;
    border: 2px solid #ef4444;
    padding: 15px;
    border-radius: 8px;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.answer-option {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}


.answer-option :hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.answer-option input[type="radio"] {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #52849d;
}

.answer-option input[type="radio"]:checked + .answer-text {
    font-weight: 600;
    color: #1f2937;
}

.answer-option:has(input:checked) {
    background: #eff6ff;
    border-color: #52849d;
}

.answer-text {
    font-size: 16px;
    color: #4b5563;
    line-height: 1.5;
}

/* Navigation */
.cm-psychotest-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding-top: 0px;
    border-top: 1px solid #e5e7eb;
}

.cm-psychotest-prev,
.cm-psychotest-next,
.cm-psychotest-submit {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cm-psychotest-prev {
    background: #fff;
    color: #374151;
    border: 1px solid #d1d5db;
}

.cm-psychotest-prev:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.cm-psychotest-next,
.cm-psychotest-submit {
    background: #52849d;
    color: #fff;
    margin-left: auto;
}

.cm-psychotest-next:hover,
.cm-psychotest-submit:hover {
    background: #52849d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.cm-psychotest-submit {
    background: #10b981;
}

.cm-psychotest-submit:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Results */
.cm-psychotest-results {
    text-align: center;
    padding: 40px 0;
}

.results-loading {
    font-size: 18px;
    color: #6b7280;
    padding: 60px 0;
}

.cm-psychotest-result {
    animation: fadeIn 0.5s ease;
}

.result-title {
    font-size: 32px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 20px;
}

.result-score {
    font-size: 20px;
    color: #4b5563;
    margin-bottom: 30px;
}

.score-label {
    font-weight: 500;
}

.score-value {
    font-size: 28px;
    font-weight: 700;
    color: #52849d;
}

.result-description {
    font-size: 18px;
    line-height: 1.6;
    color: #374151;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.result-actions {
    margin-top: 40px;
}

.cm-psychotest-restart {
    padding: 12px 32px;
    font-size: 16px;
    font-weight: 500;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cm-psychotest-restart:hover {
    background: #e5e7eb;
    border-color: #9ca3af;
}

/* Error Messages */
.cm-psychotest-error {
    padding: 16px 20px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #b91c1c;
    text-align: center;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cm-psychotest-container {
        padding: 16px;
    }
    
    .question-text {
        font-size: 18px;
    }
    
    .answer-option {
        padding: 12px 16px;
    }
    
    .answer-text {
        font-size: 15px;
    }
    
    .cm-psychotest-navigation {
        flex-wrap: wrap;
    }
    
    .cm-psychotest-prev,
    .cm-psychotest-next,
    .cm-psychotest-submit {
        flex: 1;
        min-width: 120px;
    }
    
    .result-title {
        font-size: 24px;
    }
    
    .result-description {
        font-size: 16px;
    }
}

/* Print Styles */
@media print {
    .cm-psychotest-navigation,
    .cm-psychotest-restart,
    .progress-bar {
        display: none !important;
    }
    
    .cm-psychotest-question {
        display: block !important;
        page-break-inside: avoid;
        margin-bottom: 30px;
    }
    
    .answer-option {
        background: #fff;
        border: 1px solid #000;
    }
}

/* Accessibility */
.cm-psychotest-container *:focus {
    outline: 2px solid #52849d;
    outline-offset: 2px;
}

.cm-psychotest-container button:focus {
    outline-offset: 0;
}

/* Loading State */
.cm-psychotest-loading {
    pointer-events: none;
    opacity: 0.6;
}

/* Success Animation */
@keyframes success {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.result-success {
    animation: success 0.5s ease;
}