/* LearnX AI meaningful LMS graphics: SVG/HTML visuals, no stock decoration. */

:root {
    --lxg-bg: rgba(255, 255, 255, .88);
    --lxg-panel: #fff;
    --lxg-line: rgba(31, 111, 235, .2);
    --lxg-ink: #172033;
    --lxg-muted: #667085;
    --lxg-primary: #1f6feb;
    --lxg-accent: #0f766e;
    --lxg-warning: #b45309;
    --lxg-danger: #c2410c;
}

[data-bs-theme="dark"] {
    --lxg-bg: rgba(15, 23, 42, .78);
    --lxg-panel: rgba(24, 35, 54, .96);
    --lxg-line: rgba(125, 169, 255, .22);
    --lxg-ink: #edf4ff;
    --lxg-muted: #9fb0c7;
    --lxg-primary: #7dabff;
    --lxg-accent: #5eead4;
    --lxg-warning: #fbbf24;
    --lxg-danger: #fb7185;
}

.lxp-graphic {
    --lxg-radius: 8px;
    position: relative;
    width: min(320px, 100%);
    min-height: 132px;
    color: var(--lxg-ink);
    border: 1px solid var(--lxg-line);
    border-radius: var(--lxg-radius);
    background:
        linear-gradient(135deg, rgba(31, 111, 235, .1), rgba(15, 118, 110, .08)),
        var(--lxg-bg);
    box-shadow: 0 18px 34px rgba(23, 32, 51, .09);
    overflow: hidden;
}

.lxp-graphics-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.lxp-graphics-strip .lxp-graphic {
    width: 100%;
    min-height: 118px;
}

.lxp-graphic--compact {
    min-height: 104px;
}

.lxp-graphic__stage {
    position: relative;
    display: grid;
    height: 100%;
    min-height: inherit;
    padding: 14px;
}

.lxp-graphic__card,
.lxp-graphic__node,
.lxp-graphic__sheet,
.lxp-graphic__screen,
.lxp-graphic__seal {
    border: 1px solid var(--lxg-line);
    border-radius: 8px;
    background: var(--lxg-panel);
    box-shadow: 0 10px 22px rgba(23, 32, 51, .07);
}

.lxp-graphic__label {
    color: var(--lxg-muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.lxp-graphic__value {
    color: var(--lxg-ink);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.lxp-graphic__line {
    position: absolute;
    border-color: var(--lxg-line);
    pointer-events: none;
}

.lxp-graphic--assessment-flow .lxp-graphic__stage {
    grid-template-columns: repeat(4, 1fr);
    align-items: center;
    gap: 8px;
}

.lxp-graphic--assessment-flow .lxp-graphic__node {
    display: grid;
    place-items: center;
    min-height: 58px;
    font-size: 18px;
}

.lxp-graphic--assessment-flow .lxp-graphic__node small {
    display: block;
    margin-top: 4px;
    color: var(--lxg-muted);
    font-size: 9px;
    font-weight: 800;
}

.lxp-graphic--assessment-flow .lxp-graphic__rail {
    position: absolute;
    left: 34px;
    right: 34px;
    top: 50%;
    height: 2px;
    background: linear-gradient(90deg, var(--lxg-primary), var(--lxg-accent));
    opacity: .4;
    transform-origin: left center;
    animation: lxgRail 1.1s var(--lxp-motion-ease-out, ease) both;
}

.lxp-graphic--correction-timeline .lxp-graphic__stage {
    gap: 9px;
}

.lxp-graphic--correction-timeline .lxp-graphic__card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px;
}

.lxp-graphic--correction-timeline .lxp-graphic__card:nth-child(2) {
    margin-left: 18px;
}

.lxp-graphic--correction-timeline .lxp-graphic__delta {
    color: var(--lxg-primary);
    font-weight: 900;
}

.lxp-graphic--result-export .lxp-graphic__stage {
    grid-template-columns: 1.25fr .75fr;
    gap: 12px;
    align-items: center;
}

.lxp-graphic--result-export .lxp-graphic__sheet {
    padding: 10px;
}

.lxp-graphic__sheet-row {
    display: grid;
    grid-template-columns: 1fr .45fr .45fr;
    gap: 5px;
    margin-bottom: 5px;
}

.lxp-graphic__cell {
    height: 8px;
    border-radius: 3px;
    background: rgba(31, 111, 235, .15);
}

.lxp-graphic__cell:nth-child(2n) {
    background: rgba(15, 118, 110, .16);
}

.lxp-graphic__export-stack {
    display: grid;
    gap: 8px;
}

.lxp-graphic__export-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--lxg-line);
    border-radius: 8px;
    background: var(--lxg-panel);
    color: var(--lxg-ink);
    font-size: 11px;
    font-weight: 800;
}

.lxp-graphic--course-map .lxp-graphic__stage,
.lxp-graphic--learning-journey .lxp-graphic__stage {
    gap: 9px;
}

.lxp-graphic__map-section {
    padding: 8px;
    border: 1px solid var(--lxg-line);
    border-radius: 8px;
    background: var(--lxg-panel);
}

.lxp-graphic__map-lessons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-top: 8px;
}

.lxp-graphic__map-dot {
    height: 16px;
    border-radius: 5px;
    background: rgba(31, 111, 235, .18);
}

.lxp-graphic__map-dot.is-done {
    background: rgba(15, 118, 110, .34);
}

.lxp-graphic__map-dot.is-locked {
    background: rgba(180, 83, 9, .28);
}

.lxp-graphic--learning-journey .lxp-graphic__screen {
    display: grid;
    grid-template-columns: 58px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px;
}

.lxp-graphic__avatar {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(31, 111, 235, .2), rgba(15, 118, 110, .2));
    color: var(--lxg-primary);
    font-size: 24px;
}

.lxp-graphic__progress-line {
    height: 8px;
    margin-top: 8px;
    border-radius: 999px;
    background: rgba(31, 111, 235, .14);
    overflow: hidden;
}

.lxp-graphic__progress-line span {
    display: block;
    width: 68%;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--lxg-primary), var(--lxg-accent));
    animation: lxpProgressFill .9s var(--lxp-motion-ease-out, ease) both;
}

.lxp-graphic--locked-preview .lxp-graphic__stage {
    grid-template-columns: 1fr 74px;
    gap: 12px;
    align-items: center;
}

.lxp-graphic__preview-lines {
    display: grid;
    gap: 7px;
}

.lxp-graphic__preview-line {
    height: 9px;
    border-radius: 999px;
    background: rgba(31, 111, 235, .18);
}

.lxp-graphic__preview-line.is-hidden {
    background: repeating-linear-gradient(90deg, rgba(180, 83, 9, .22), rgba(180, 83, 9, .22) 7px, transparent 7px, transparent 13px);
}

.lxp-graphic__lock {
    display: grid;
    place-items: center;
    width: 66px;
    height: 66px;
    border: 1px solid var(--lxg-line);
    border-radius: 8px;
    background: var(--lxg-panel);
    color: var(--lxg-warning);
    font-size: 26px;
}

.lxp-graphic--certificate-seal .lxp-graphic__stage {
    grid-template-columns: 92px 1fr;
    gap: 12px;
    align-items: center;
}

.lxp-graphic__seal {
    display: grid;
    place-items: center;
    width: 82px;
    height: 82px;
    border-radius: 50%;
    color: var(--lxg-accent);
    outline: 4px double rgba(15, 118, 110, .24);
    animation: lxgSeal 1.8s var(--lxp-motion-ease-out, ease) both;
}

.lxp-graphic__qr {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
}

.lxp-graphic__qr span {
    width: 9px;
    height: 9px;
    border-radius: 2px;
    background: var(--lxg-primary);
    opacity: .28;
}

.lxp-graphic__qr span:nth-child(2n),
.lxp-graphic__qr span:nth-child(7),
.lxp-graphic__qr span:nth-child(19) {
    opacity: .86;
}

.lxp-graphic--analytics-trend .lxp-graphic__stage {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    align-items: end;
}

.lxp-graphic__bar {
    position: relative;
    min-height: 88px;
    border: 1px solid var(--lxg-line);
    border-radius: 8px;
    background: var(--lxg-panel);
    overflow: hidden;
}

.lxp-graphic__bar span {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, var(--lxg-primary), var(--lxg-accent));
    border-radius: 8px 8px 0 0;
    animation: lxgBar .9s var(--lxp-motion-ease-out, ease) both;
}

@keyframes lxgRail {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes lxgBar {
    from { transform: scaleY(.15); transform-origin: bottom; }
    to { transform: scaleY(1); transform-origin: bottom; }
}

@keyframes lxgSeal {
    from { transform: scale(.86) rotate(-8deg); opacity: .4; }
    to { transform: scale(1) rotate(0); opacity: 1; }
}

@media (max-width: 768px) {
    .lxp-graphic {
        width: 100%;
        min-height: 112px;
    }

    .mphb__right .lxp-graphic {
        display: none;
    }
}

@media print {
    .lxp-graphic,
    .lxc-page .lxp-graphic {
        animation: none !important;
    }

    .no-print .lxp-graphic,
    .lxc-page .lxc-hero .lxp-graphic {
        display: none !important;
    }
}
