/**
 * @package     com_cleverics_person_assessment
 *
 * @copyright   (C) 2026 Cleverics
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 *
 * Public part styles. All classes are prefixed with "cpa-" to avoid
 * conflicts with the site template.
 */

.cpa-test-list {
    list-style: none;
    margin: 0 0 1rem;
    padding: 0;
}

.cpa-test-list-item {
    margin-bottom: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.25rem;
}

.cpa-test-list-link {
    font-weight: 600;
    text-decoration: none;
}

.cpa-test-list-desc {
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.9em;
}

.cpa-empty {
    padding: 1rem 0;
    color: #666;
}

.cpa-test-title {
    margin-bottom: 1rem;
}

.cpa-intro-text {
    margin-bottom: 1.5rem;
}

.cpa-progress {
    margin-bottom: 1.25rem;
}

.cpa-progress-text {
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.cpa-progress-bar {
    height: 0.5rem;
    background: #e9ecef;
    border-radius: 0.25rem;
    overflow: hidden;
}

.cpa-progress-bar-inner {
    height: 100%;
    background: var(--bs-primary, #0d6efd);
    transition: width 0.3s ease;
}

.cpa-question-text {
    margin-bottom: 1rem;
    font-size: 1.15rem;
}

.cpa-answers {
    margin-bottom: 1.25rem;
}

.cpa-answer {
    margin-bottom: 0.5rem;
}

.cpa-answer-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.cpa-answer-label input {
    flex: 0 0 auto;
}

.cpa-attempt-nav {
    display: flex;
    gap: 0.5rem;
}

.cpa-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.cpa-field {
    margin-bottom: 1rem;
}

.cpa-field label {
    display: block;
    margin-bottom: 0.25rem;
}

.cpa-consent label {
    display: inline-flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
}

.cpa-consent input {
    flex: 0 0 auto;
    margin-top: 0.2rem;
}

.cpa-result-details {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 1rem;
    margin-bottom: 1.25rem;
}

.cpa-result-row {
    display: contents;
}

.cpa-result-row dt {
    font-weight: 600;
}

.cpa-status {
    font-weight: 600;
}

.cpa-status-passed {
    color: #198754;
}

.cpa-status-failed {
    color: #dc3545;
}

.cpa-recommendations {
    margin-bottom: 1.25rem;
    padding: 1rem;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 0.25rem;
}

.cpa-recommendations-title {
    margin-bottom: 0.5rem;
    font-size: 1.05rem;
}

.cpa-confirmation-box {
    padding: 1rem;
    border: 1px solid #198754;
    background: #f0fff4;
    border-radius: 0.25rem;
}

@media (max-width: 575.98px) {
    .cpa-attempt-nav {
        flex-direction: column;
    }

    .cpa-attempt-nav .btn {
        width: 100%;
    }
}
