/* ==========================================================
   V - CLASSIFY — front-end styles (lavender theme)
   Solid colours only: no gradients, glass, blur or transparency.
   Visual design only; markup and behaviour are unchanged.
   ========================================================== */

.xcl-wrap {
    --xc-lav: #E6E0F8;
    --xc-lav-mid: #B9AEE6;
    --xc-lav-pale: #F3F0FC;
    --xc-blue: #1D4ED8;
    --xc-blue-dark: #1E40AF;
    --xc-correct: #1B7A34;
    --xc-wrong: #C62828;
    --xc-shadow: 0 2px 6px rgba(60, 40, 120, .16);

    box-sizing: border-box;
    max-width: 1100px;
    margin: 20px auto;
    padding: 28px;
    background: var(--xc-lav);
    border-radius: 22px;
    box-shadow: 0 12px 28px rgba(60, 40, 120, .18), 0 3px 8px rgba(60, 40, 120, .12);
    color: #000;
    font-family: inherit;
    line-height: 1.4;
}

.xcl-wrap,
.xcl-wrap * {
    box-sizing: border-box;
}

/* All text black (the blue buttons are white-on-blue, below) */
.xcl-wrap *:not(button) {
    color: #000 !important;
}

/* ---------- Question card ---------- */

.xcl-wrap .xcl-question {
    margin-bottom: 20px;
    padding: 18px 22px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--xc-shadow);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.5;
}

/* ---------- Cards to classify ---------- */

.xcl-wrap .xcl-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 70px;
    margin-bottom: 20px;
}

.xcl-wrap .xcl-card {
    position: relative;
    padding: 14px 18px;
    background: #fff;
    border: 2px solid var(--xc-lav-mid);
    border-radius: 12px;
    box-shadow: var(--xc-shadow);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    line-height: 1.35;
    font-weight: 600;
    transition: box-shadow .12s ease, border-color .12s ease;
}

.xcl-wrap .xcl-card:hover {
    border-color: var(--xc-blue);
    box-shadow: 0 5px 12px rgba(60, 40, 120, .22);
}

/* Being dragged: stays fully opaque; stronger shadow + blue outline */
.xcl-wrap .xcl-card.xcl-drag {
    cursor: grabbing;
    border-color: var(--xc-blue);
    box-shadow: 0 8px 18px rgba(60, 40, 120, .3);
    outline: 2px solid var(--xc-blue);
    outline-offset: 0;
}

/* ---------- Category boxes (white cards with a coloured top band) ---------- */

.xcl-wrap .xcl-cats {
    display: grid;
    gap: 14px;
}

.xcl-wrap .xcl-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.xcl-wrap .xcl-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.xcl-wrap .xcl-cat {
    min-height: 190px;
    padding: 14px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--xc-shadow);
}

/* Same red / blue / green identity as the admin builder swatches */
.xcl-wrap .xcl-cat-0 { border-top: 8px solid #ef4444; }
.xcl-wrap .xcl-cat-1 { border-top: 8px solid #3b82f6; }
.xcl-wrap .xcl-cat-2 { border-top: 8px solid #22c55e; }

/* Card hovering over a box while dragging */
.xcl-wrap .xcl-cat.over {
    box-shadow: 0 0 0 3px var(--xc-blue), var(--xc-shadow);
}

.xcl-wrap .xcl-title {
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}

.xcl-wrap .xcl-drop {
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 9px;
    min-height: 125px;
    padding: 10px;
    background: var(--xc-lav-pale);
    border: 2px dashed var(--xc-lav-mid);
    border-radius: 10px;
}

/* Cards inside a box keep the same white card look */
.xcl-wrap .xcl-cat .xcl-card {
    background: #fff;
}

/* ---------- Results on cards ----------
   Solid green + ✓ = correct, dashed red + ✗ = wrong (never colour alone). */

.xcl-wrap .xcl-card.correct {
    border-color: var(--xc-correct);
    outline: 2px solid var(--xc-correct);
    outline-offset: 0;
}

.xcl-wrap .xcl-card.wrong {
    border: 2px dashed var(--xc-wrong);
    outline: 2px dashed var(--xc-wrong);
    outline-offset: 0;
}

.xcl-wrap .xcl-card.correct:after,
.xcl-wrap .xcl-card.wrong:after {
    position: absolute;
    top: -11px;
    right: -11px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    box-shadow: var(--xc-shadow);
    font-size: 14px;
    font-weight: 900;
    line-height: 24px;
    text-align: center;
}

.xcl-wrap .xcl-card.correct:after { content: "\2713"; }
.xcl-wrap .xcl-card.wrong:after   { content: "\2717"; }

/* ---------- Buttons (Submit + Reset, solid blue) ---------- */

.xcl-wrap .xcl-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.xcl-wrap .xcl-actions button,
.xcl-wrap .xcl-reset {
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
    padding: 12px 26px;
    background: var(--xc-blue) !important;
    border: 0;
    border-radius: 10px;
    color: #fff !important;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .4px;
    line-height: 1.2;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(60, 40, 120, .24);
    transition: background-color .12s ease, box-shadow .12s ease;
}

.xcl-wrap .xcl-actions button:hover,
.xcl-wrap .xcl-actions button:active,
.xcl-wrap .xcl-reset:hover,
.xcl-wrap .xcl-reset:active {
    background: var(--xc-blue-dark) !important;
    color: #fff !important;
    box-shadow: 0 4px 10px rgba(60, 40, 120, .3);
}

.xcl-wrap .xcl-actions button:focus-visible {
    outline: 3px solid #000;
    outline-offset: 2px;
}

/* ---------- Result card ---------- */

.xcl-wrap .xcl-result {
    margin-top: 16px;
    font-size: 18px;
    font-weight: 800;
    text-align: center;
}

.xcl-wrap .xcl-result:not(:empty) {
    padding: 16px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: var(--xc-shadow);
}

/* ---------- Message (shown when the quiz is incomplete) ---------- */

.xcl-message {
    max-width: 1100px;
    margin: 20px auto;
    padding: 15px 18px;
    background: #fff;
    border: 2px solid #C62828;
    border-radius: 12px;
    box-shadow: 0 2px 6px rgba(60, 40, 120, .16);
    color: #000;
}

/* ---------- Small screens ---------- */

@media (max-width: 700px) {
    .xcl-wrap {
        padding: 16px;
        border-radius: 18px;
    }

    .xcl-wrap .xcl-cols-2,
    .xcl-wrap .xcl-cols-3 {
        grid-template-columns: 1fr;
    }

    .xcl-wrap .xcl-cat {
        min-height: 150px;
    }

    .xcl-wrap .xcl-drop {
        min-height: 90px;
    }

    .xcl-wrap .xcl-actions button {
        flex: 1 1 auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .xcl-wrap .xcl-card,
    .xcl-wrap .xcl-actions button {
        transition: none;
    }
}
