/* ==========================================================
   T MATCH — Lavender theme
   Visual design only. Layout, markup and behaviour unchanged.
   Palette:
     Container lavender  #E6E0F8 (solid)
     Cards               #FFFFFF
     Text                #000000
     Buttons             #1D4ED8 (hover #1E40AF), white text
   ========================================================== */

.t-match {
    max-width: 1000px;
    margin: 25px auto;
    padding: 28px;
    background: #E6E0F8;
    border: 0;
    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;
}

.t-match * {
    box-sizing: border-box;
}

.t-match-title {
    font-size: 25px;
    font-weight: 800;
    margin-bottom: 7px;
    color: #000;
}

.t-match-instruction {
    color: #000;
    margin-bottom: 22px;
}

.t-match-table {
    width: 100%;
}

.t-match-head,
.t-match-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.t-match-head {
    margin-bottom: 10px;
    font-weight: 800;
    font-size: 14px;
    letter-spacing: .5px;
    color: #000;
}

.t-match-column-a,
.t-match-column-b {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ---------- Question & answer cards: white, rounded, soft shadow ---------- */

.t-match-static-card,
.t-match-card {
    min-height: 64px;
    padding: 14px 16px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #fff;
    box-shadow: 0 2px 6px rgba(60, 40, 120, .14);
    color: #000;
    font-weight: 700;
}

.t-match-card {
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: none;
    transition: transform .12s ease, box-shadow .12s ease;
}

.t-match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(60, 40, 120, .2);
}

/* Dragging: stays fully opaque, lifted with a stronger shadow + blue outline */
.t-match-card.t-dragging,
.t-match-card.t-touch-dragging {
    transform: scale(1.025);
    cursor: grabbing;
    box-shadow: 0 10px 22px rgba(60, 40, 120, .28);
    outline: 2px solid #1D4ED8;
    outline-offset: 0;
}

.t-match-drag-icon {
    margin-right: 12px;
    font-size: 19px;
    line-height: 1;
    letter-spacing: -3px;
    color: #000;
}

/* ---------- Buttons ---------- */

.t-match-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.t-match .t-match-actions button {
    border: 0;
    border-radius: 10px;
    padding: 12px 24px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: .3px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(60, 40, 120, .22);
    transition: background-color .12s ease, box-shadow .12s ease;
}

.t-match .t-match-submit,
.t-match .t-match-reset {
    background: #1D4ED8;
    color: #fff;
}

.t-match .t-match-submit:hover,
.t-match .t-match-reset:hover {
    background: #1E40AF;
    color: #fff;
    box-shadow: 0 4px 10px rgba(60, 40, 120, .28);
}

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

/* ---------- Feedback: cards stay white; state shown by border ---------- */

.t-match-card.t-correct {
    background: #fff;
    border: 2px solid #25823b;
}

.t-match-card.t-wrong {
    background: #fff;
    border: 2px solid #c62828;
}

/* ---------- Result panel ---------- */

.t-match-result {
    display: none;
    margin-top: 18px;
    padding: 16px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #fff;
    box-shadow: 0 2px 6px rgba(60, 40, 120, .14);
    color: #000;
}

.t-match-result.t-scored,
.t-match-result.t-perfect {
    display: block;
}

.t-match-result.t-perfect {
    border: 2px solid #25823b;
}

.t-match-score {
    font-size: 30px;
    font-weight: 900;
    color: #000;
}

.t-match-percent {
    font-size: 17px;
    margin: 2px 0 5px;
    color: #000;
}

/* ---------- Error message (shortcode misconfiguration) ---------- */

.t-match-error {
    padding: 14px;
    border-radius: 12px;
    background: #fff;
    border: 2px solid #c62828;
    box-shadow: 0 2px 6px rgba(60, 40, 120, .14);
    color: #000;
}

/* ---------- Mobile ---------- */

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

    .t-match-head,
    .t-match-body {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .t-match-static-card,
    .t-match-card {
        min-height: 60px;
        padding: 12px 10px;
        font-size: 14px;
    }

    .t-match-drag-icon {
        margin-right: 7px;
    }
}
