/* RLI CE Assessment Styles */

.rli-ce-wrap {
    max-width: 680px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #333;
    line-height: 1.6;
}

.rli-ce-card {
    background: #fff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid #e8e8e8;
}

.rli-ce-card--success {
    border-top: 4px solid #2e7d32;
}

.rli-ce-card--fail {
    border-top: 4px solid #c62828;
}

/* Progress bar */
.rli-ce-progress {
    background: #e0e0e0;
    border-radius: 4px;
    height: 6px;
    margin-bottom: 8px;
    overflow: hidden;
}

.rli-ce-progress-bar {
    background: #1a3a5c;
    height: 100%;
    border-radius: 4px;
    transition: width 0.4s ease;
}

.rli-ce-step-label {
    display: block;
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Headings */
.rli-ce-card h2 {
    font-size: 24px;
    margin: 0 0 12px;
    color: #1a3a5c;
}

/* Icons */
.rli-ce-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    margin: 0 auto 20px;
    font-weight: bold;
}

.rli-ce-icon--success {
    background: #e8f5e9;
    color: #2e7d32;
}

.rli-ce-icon--error {
    background: #fce4ec;
    color: #c62828;
}

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

.rli-ce-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #1a3a5c;
    border-radius: 50%;
    animation: rli-spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

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

/* Form inputs */
.rli-ce-form-group {
    margin-bottom: 20px;
}

.rli-ce-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
    color: #444;
}

.rli-ce-input,
.rli-ce-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.rli-ce-input:focus,
.rli-ce-textarea:focus {
    border-color: #1a3a5c;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.1);
}

.rli-ce-input:disabled {
    background: #f5f5f5;
    color: #888;
}

/* Buttons */
.rli-ce-btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s, transform 0.1s;
    font-family: inherit;
}

.rli-ce-btn:active {
    transform: scale(0.98);
}

.rli-ce-btn--primary {
    background: #1a3a5c;
    color: #fff;
}

.rli-ce-btn--primary:hover {
    background: #244d73;
    color: #fff;
}

.rli-ce-btn--primary:disabled {
    background: #999;
    cursor: not-allowed;
}

.rli-ce-btn--secondary {
    background: #e8e8e8;
    color: #333;
}

.rli-ce-btn--secondary:hover {
    background: #d0d0d0;
}

.rli-ce-btn-row {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.rli-ce-btn-row .rli-ce-btn--primary {
    flex: 1;
}

/* Evaluation — NBCC format */
.rli-ce-eval-demographics {
    margin-bottom: 16px;
}

.rli-ce-divider {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 24px 0;
}

.rli-ce-likert-legend {
    font-size: 14px;
    color: #555;
    margin: 0 0 8px;
}

.rli-ce-likert-key {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
}

.rli-ce-eval-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
}

.rli-ce-eval-item:last-of-type {
    border-bottom: none;
}

.rli-ce-eval-label {
    display: block;
    font-size: 14px;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.4;
}

.rli-ce-likert-row {
    display: flex;
    gap: 6px;
}

.rli-ce-likert-option {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 40px;
    background: #f5f5f5;
    border: 2px solid transparent;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.15s;
}

.rli-ce-likert-option:hover {
    background: #e8e8e8;
}

.rli-ce-likert-option:has(input:checked) {
    background: #e3f0fc;
    border-color: #1a3a5c;
    font-weight: 700;
}

.rli-ce-likert-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.rli-ce-likert-option--na {
    width: auto;
    padding: 0 10px;
    font-size: 12px;
    color: #888;
}

.rli-ce-likert-option--na:has(input:checked) {
    color: #1a3a5c;
}

/* Assessment questions */
.rli-ce-question {
    margin-bottom: 28px;
    padding-bottom: 24px;
    border-bottom: 1px solid #eee;
}

.rli-ce-question:last-child {
    border-bottom: none;
}

.rli-ce-question-text {
    margin: 0 0 12px;
    font-size: 15px;
}

.rli-ce-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rli-ce-option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 14px;
    background: #f8f8f8;
    border: 2px solid #e8e8e8;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
}

.rli-ce-option:hover {
    background: #f0f0f0;
    border-color: #ccc;
}

.rli-ce-option:has(input:checked) {
    background: #e3f0fc;
    border-color: #1a3a5c;
}

.rli-ce-option input[type="radio"] {
    margin-top: 2px;
    flex-shrink: 0;
}

.rli-ce-option-text {
    flex: 1;
}

/* Certificate info */
.rli-ce-cert-info {
    background: #f8f8f8;
    padding: 16px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.rli-ce-cert-info p {
    margin: 4px 0;
    font-size: 14px;
}

/* Score text */
.rli-ce-score-text {
    font-size: 18px;
    margin: 8px 0 16px;
}

/* Error help */
.rli-ce-error-help {
    font-size: 14px;
    color: #666;
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 600px) {
    .rli-ce-wrap {
        padding: 12px;
    }

    .rli-ce-card {
        padding: 24px 20px;
    }

    .rli-ce-card h2 {
        font-size: 20px;
    }

    .rli-ce-likert {
        flex-direction: column;
    }

    .rli-ce-btn-row {
        flex-direction: column;
    }

    .rli-ce-btn {
        width: 100%;
    }
}
