/*
 * ================================
 * LOADER FLUENT FORMS
 * ================================
 */
.cj-loading {
    display: none;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    padding: 18px 20px;
    background: #f7f9fb;
    border: 1px solid #dce3ea;
    border-radius: 6px;
}
.cj-loading.cj-active {
    display: flex;
}
.cj-spinner {
    width: 28px;
    height: 28px;
    border: 4px solid #d7dee5;
    border-top-color: #003b70;
    border-radius: 50%;
    animation:
        cj-spin 0.8s
        linear infinite;
    flex-shrink: 0;
}
.cj-loading p {
    margin: 0;
    font-size: 16px;
    color: #334155;
}
@keyframes cj-spin {
    to {
        transform:
            rotate(360deg);
    }
}
/*
 * ================================
 * RESULTADO PDF
 * ================================
 */
.cj-pdf-result {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px;
    margin-top: 30px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #d7dee7;
    border-left: 5px solid #003b70;
    border-radius: 6px;
}
.cj-pdf-result-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #18733f;
    font-size: 26px;
    font-weight: bold;
}
.cj-pdf-result-content {
    min-width: 0;
    flex: 1;
}
.cj-pdf-result-content h3 {
    margin: 0 0 6px;
    color: #1f2937;
    font-size: 21px;
    font-weight: 600;
}
.cj-pdf-result-content p {
    margin: 0 0 16px;
    color: #4b5563;
    font-size: 16px;
}
.cj-pdf-download {
    display: inline-block;
    padding: 12px 24px;
    background: #003b70;
    color: #ffffff !important;
    border-radius: 6px;
    text-decoration: none !important;
    font-weight: 600;
    transition:
        background 0.2s ease;
}
.cj-pdf-download:hover {
    background: #002a50;
}
/*
 * ================================
 * ERROR
 * ================================
 */
.cj-pdf-error {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-top: 25px;
    padding: 20px;
    background: #fff6f6;
    border: 1px solid #efcaca;
    border-left: 5px solid #b42318;
    border-radius: 6px;
}
.cj-pdf-error-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    background: #b42318;
    color: white;
    border-radius: 50%;
    font-weight: bold;
}
.cj-pdf-error-content strong {
    display: block;
    margin-bottom: 5px;
    color: #991b1b;
}
.cj-pdf-error-content p {
    margin: 0;
    color: #7f1d1d;
}
/*
 * ================================
 * SHORTCODE VALIDACIÓN QR
 * ================================
 */
.cj-validador-wrap {
    max-width: 600px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow:
        0 4px 20px
        rgba(0, 0, 0, 0.08);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        sans-serif;
}
.cj-alerta {
    margin-bottom: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: 500;
}
.cj-error {
    background: #fee2e2;
    color: #991b1b;
    border:
        1px solid #f87171;
}
.cj-success-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom:
        2px solid #f1f5f9;
}
.cj-icon-check {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #e8f5e9;
    color: #18733f;
    font-size: 34px;
    font-weight: bold;
}
.cj-valid-text {
    margin: 0;
    color: #166534;
    font-size: 22px;
    font-weight: bold;
}
.cj-valid-subtitle {
    margin: 5px 0 0;
    color: #64748b;
    font-size: 14px;
}
.cj-student-info {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8fafc;
    border-left:
        4px solid #003366;
    border-radius: 8px;
}
.cj-student-info p {
    margin: 5px 0;
    color: #334155;
    font-size: 15px;
}
.cj-student-info strong {
    color: #0f172a;
}
.cj-year-group {
    margin-bottom: 20px;
}
.cj-year-title {
    display: inline-block;
    margin-bottom: 10px;
    padding: 8px 15px;
    background: #003366;
    color: white;
    border-radius: 6px;
    font-size: 16px;
}
.cj-course-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.cj-course-list li {
    position: relative;
    margin: 0;
    padding:
        10px
        15px
        10px
        30px;
    border-bottom:
        1px solid #e2e8f0;
    color: #475569;
    font-size: 15px;
}
.cj-course-list li::before {
    content: "•";
    position: absolute;
    left: 10px;
    top: 7px;
    color: #003366;
    font-size: 22px;
    font-weight: bold;
}
.cj-course-list li:last-child {
    border-bottom: none;
}
.cj-demo-badge {
    display: inline-block;
    margin-bottom: 15px;
    padding: 5px 10px;
    background: #f59e0b;
    color: white;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}
/*
 * ================================
 * RESPONSIVE
 * ================================
 */
@media (max-width: 600px) {
    .cj-pdf-result {
        flex-direction: column;
    }
    .cj-validador-wrap {
        padding: 20px;
    }
}

@media (prefers-reduced-motion: reduce) { .cj-spinner { animation: none; } }

.cj-pdf-result > .cj-pdf-preview { flex: 0 0 100%; box-sizing: border-box; }
.cj-pdf-preview { display: block; width: 100%; height: 70vh; min-height: 360px; margin-top: 20px; border: 1px solid #cbd5e1; border-radius: 8px; background: #f8fafc; }
.cj-pdf-preview[hidden] { display: none; }
.cj-code-details { margin: 1.5rem 0; }
.cj-code-details dt { font-weight: 600; margin-top: 1rem; }
.cj-code-details dd { margin: .4rem 0; overflow-wrap: anywhere; }
.cj-code-details code { white-space: normal; }
.cj-legacy-notice { padding: 1rem; background: #f1f5f9; color: #334155; border-left: 4px solid #64748b; }
.cj-academic-title { color: #003366; }
