/* LumorowLMS — Antonyms / Synonyms Block Styles
 * Visual language matches the Matching and Complete-the-Sentence blocks:
 * outer border in theme primary, white background, generous padding,
 * primary-pale row stripes, primary-dk header band.
 */

.llmsb-antonyms-block {
    border: 2px solid var(--llmsb-primary);
    border-radius: 12px;
    background: #fff;
    padding: 28px;
    overflow: hidden;
}

.llmsb-antonyms-header {
    margin-bottom: 12px;
}

.llmsb-ant-instruction {
    font-size: .95rem;
    font-style: italic;
    color: var(--llmsb-mid);
    line-height: 1.65;
    margin: 0 0 22px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--llmsb-border);
}
.llmsb-ant-instruction em { font-style: italic; font-weight: 600; color: var(--llmsb-primary-dk); }

/* Header band over the rows — same primary-pale strip as the matching table. */
.llmsb-ant-rows {
    border-top: 2px solid var(--llmsb-primary);
    border-bottom: 2px solid var(--llmsb-primary);
}

.llmsb-ant-row {
    display: grid;
    grid-template-columns: 3em 1fr;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-bottom: 1px solid var(--llmsb-border);
    transition: background .15s;
}
.llmsb-ant-row:last-child { border-bottom: none; }
.llmsb-ant-row:nth-child(odd) { background: #fafaf8; }
.llmsb-ant-row:hover { background: var(--llmsb-primary-pale); }

.llmsb-ant-num {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: .95rem;
    color: var(--llmsb-primary);
    text-align: right;
}

.llmsb-ant-words {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.llmsb-ant-word {
    background: #fff;
    border: 2px solid var(--llmsb-border);
    border-radius: 999px;
    padding: 8px 14px;
    font-size: .98rem;
    font-weight: 500;
    cursor: pointer;
    color: var(--llmsb-dark);
    font-family: inherit;
    text-align: center;
    transition: background .12s, border-color .12s, color .12s, transform .08s;
    line-height: 1.3;
}
.llmsb-ant-word:hover:not(:disabled) {
    background: var(--llmsb-primary-pale);
    border-color: var(--llmsb-primary);
    transform: translateY(-1px);
}
.llmsb-ant-word.selected {
    background: var(--llmsb-primary);
    color: #fff;
    border-color: var(--llmsb-primary);
    transform: none;
}
.llmsb-ant-word:disabled { cursor: default; transform: none; }

/* Results state — applied only after Check Answers fires. */
.llmsb-ant-word.correct {
    background: #dcfce7;
    color: #166534;
    border-color: var(--llmsb-correct);
}
.llmsb-ant-word.wrong {
    background: #fee2e2;
    color: #991b1b;
    border-color: var(--llmsb-wrong);
    text-decoration: line-through;
}

/* Score panel — matches the score styles used by other blocks. */
.llmsb-ant-results {
    margin: 18px 0 0;
    padding: 16px 22px;
    background: var(--llmsb-primary-pale);
    border: 2px solid var(--llmsb-primary);
    border-radius: var(--llmsb-radius);
    text-align: center;
    line-height: 1.4;
}
.llmsb-ant-score-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--llmsb-primary);
    display: block;
    line-height: 1;
}
.llmsb-ant-score-pct {
    font-size: .9rem;
    color: var(--llmsb-mid);
    margin-top: 4px;
}

/* The block's own check button uses the shared .llmsb-check-btn style
   from shared.css — no override here. The shared.js global manager
   handles visibility on multi-block pages. */

@media (max-width: 700px) {
    .llmsb-antonyms-block { padding: 18px; }
    .llmsb-ant-words { grid-template-columns: repeat(2, 1fr); }
    .llmsb-ant-row { grid-template-columns: 2.5em 1fr; gap: 8px; padding: 8px 6px; }
    .llmsb-ant-word { font-size: .9rem; padding: 7px 10px; }
}
