/* LumorowLMS — Flashcard Block Frontend Styles */

.llmsb-flashcard-block {
    margin: 0 auto 2rem;
}

.llmsb-flashcard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 12px;
}

.llmsb-fc-controls-top {
    display: flex;
    align-items: center;
    gap: 12px;
}

.llmsb-fc-shuffle {
    display: flex;
    align-items: center;
    gap: 6px;
    background: var(--llmsb-primary);
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 25px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity .2s;
}
.llmsb-fc-shuffle:hover { opacity: .85; }

.llmsb-fc-counter {
    display: inline-flex;
    align-items: center;
    background: #fff;
    border: 2px solid var(--llmsb-primary);
    color: var(--llmsb-primary);
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1;
}
.llmsb-fc-counter .llmsb-fc-total { opacity: .8; }

/* Progress bar */
.llmsb-fc-progress-wrap {
    height: 5px;
    background: var(--llmsb-primary-lt);
    border-radius: 3px;
    margin-bottom: 16px;
    overflow: hidden;
}
.llmsb-fc-progress-bar {
    height: 100%;
    background: var(--llmsb-primary);
    border-radius: 3px;
    transition: width .35s ease;
    width: 0%;
}

/* Card scene + flip */
.llmsb-fc-scene {
    perspective: 1100px;
    height: 400px;
    margin-bottom: 18px;
}

.llmsb-fc-card {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform .6s cubic-bezier(.4,0,.2,1);
    cursor: pointer;
    outline: none;
}

.llmsb-fc-card.llmsb-fc-flipped {
    transform: rotateY(180deg);
}

.llmsb-fc-card.llmsb-fc-shuffle-anim {
    animation: llmsb-fc-shake .4s ease-in-out;
}
@keyframes llmsb-fc-shake {
    0%,100% { transform: translateX(0); }
    25%      { transform: translateX(-6px) rotate(-1deg); }
    75%      { transform: translateX(6px)  rotate(1deg); }
}

.llmsb-fc-face {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,.1);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    background: #fff;
    border: 2px solid var(--llmsb-primary);
}

.llmsb-fc-back {
    transform: rotateY(180deg);
    align-items: flex-start;
    justify-content: flex-start;
    overflow-y: auto;
}

.llmsb-fc-word {
    font-size: 3rem;
    font-weight: 800;
    color: var(--llmsb-primary);
    text-align: center;
    line-height: 1.2;
}

.llmsb-fc-hint {
    position: absolute;
    bottom: 14px;
    font-size: 11px;
    color: #9ca3af;
    pointer-events: none;
}

/* Back content */
.llmsb-fc-back-content { width: 100%; }

.llmsb-fc-phonetic-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.llmsb-fc-phonetic {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--llmsb-muted);
}

.llmsb-fc-form {
    display: inline-block;
    background: #fef3c7;
    color: #92400e;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .4px;
    margin-bottom: 10px;
}

.llmsb-fc-definition {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--llmsb-dark);
    font-weight: 500;
    margin-bottom: 14px;
}

.llmsb-fc-example-wrap {
    background: var(--llmsb-primary-pale);
    padding: 10px 14px;
    border-radius: 8px;
    border-left: 4px solid var(--llmsb-primary);
}

.llmsb-fc-example-label {
    font-size: 10px;
    color: var(--llmsb-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 700;
    margin-bottom: 3px;
}

.llmsb-fc-example {
    font-size: .95rem;
    line-height: 1.5;
    color: var(--llmsb-mid);
    font-style: italic;
}

/* Navigation buttons */
.llmsb-fc-nav {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.llmsb-fc-nav button {
    display: flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 2px solid var(--llmsb-primary);
    color: var(--llmsb-primary);
    padding: 11px 22px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s;
    font-family: inherit;
}

.llmsb-fc-nav button:hover:not(:disabled) {
    background: var(--llmsb-primary);
    color: #fff;
}

.llmsb-fc-nav button:disabled {
    opacity: .35;
    cursor: default;
}

.llmsb-fc-flip {
    background: var(--llmsb-primary) !important;
    color: #fff !important;
}
.llmsb-fc-flip:hover {
    opacity: .85;
}

@media (max-width: 480px) {
    .llmsb-fc-scene { height: 340px; }
    .llmsb-fc-word  { font-size: 2.2rem; }
    .llmsb-fc-nav button { padding: 10px 16px; font-size: 13px; }
}

/* ── MC mode ─────────────────────────────────────────── */
.llmsb-fc-mode-badge {
    font-size:.7rem;font-weight:700;letter-spacing:1px;text-transform:uppercase;
    background:var(--llmsb-primary);color:#fff;padding:2px 10px;border-radius:12px;
    margin-left:10px;vertical-align:middle;
}
.llmsb-fc-mc-area { padding:20px 24px 8px; }
.llmsb-fc-mc-word {
    font-size:2rem;font-weight:800;color:var(--llmsb-dark);text-align:center;
    margin-bottom:20px;line-height:1.2;
}
.llmsb-fc-mc-opts { display:flex;flex-direction:column;gap:10px; }
.llmsb-fc-mc-opt {
    display:flex;align-items:flex-start;gap:12px;text-align:left;width:100%;
    background:#f9fafb;border:2px solid #e5e7eb;border-radius:10px;
    padding:12px 16px;font-size:.95rem;font-family:inherit;color:var(--llmsb-dark);
    cursor:pointer;transition:background .12s,border-color .12s;line-height:1.4;
}
.llmsb-fc-mc-opt:hover:not(:disabled){background:var(--llmsb-pale,#fef3e2);border-color:var(--llmsb-primary);}
.llmsb-fc-mc-opt:disabled{cursor:default;}
.llmsb-fc-mc-label {
    min-width:26px;height:26px;border-radius:50%;background:#e5e7eb;color:#4b5563;
    font-size:.8rem;font-weight:700;display:inline-flex;align-items:center;
    justify-content:center;flex-shrink:0;margin-top:1px;
}
.llmsb-fc-mc-opt.chosen-correct{background:#dcfce7;border-color:#16a34a;}
.llmsb-fc-mc-opt.chosen-correct .llmsb-fc-mc-label{background:#16a34a;color:#fff;}
.llmsb-fc-mc-opt.chosen-wrong{background:#fee2e2;border-color:#dc2626;}
.llmsb-fc-mc-opt.chosen-wrong .llmsb-fc-mc-label{background:#dc2626;color:#fff;}
.llmsb-fc-mc-opt.reveal-correct{background:#dcfce7;border-color:#16a34a;}
.llmsb-fc-mc-opt.reveal-correct .llmsb-fc-mc-label{background:#16a34a;color:#fff;}
.llmsb-fc-mc-results { padding: 20px 24px; }
.llmsb-fc-mc-score { text-align: center; margin-bottom: 18px; }
.llmsb-fc-mc-score-n { font-size: 2.4rem; font-weight: 800; color: var(--llmsb-primary); line-height: 1; }
.llmsb-fc-mc-score-pct { font-size: .9rem; color: var(--llmsb-muted, #6b7280); margin-top: 4px; }

/* Results table — same visual language as the matching block. */
.llmsb-fc-mc-table-wrap { overflow-x: auto; margin-bottom: 16px; }
.llmsb-fc-mc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .92rem;
}
.llmsb-fc-mc-table thead tr {
    border-top: 2px solid var(--llmsb-primary);
    border-bottom: 2px solid var(--llmsb-primary);
    background: var(--llmsb-primary-pale);
}
.llmsb-fc-mc-table th {
    padding: 10px 14px;
    font-weight: 700;
    color: var(--llmsb-primary-dk);
    text-align: left;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.llmsb-fc-mc-th-num  { width: 40px; text-align: center; }
.llmsb-fc-mc-th-mark { width: 40px; text-align: center; }

.llmsb-fc-mc-table tbody tr {
    border-bottom: 1px solid var(--llmsb-border);
}
.llmsb-fc-mc-table tbody tr:last-child { border-bottom: 2px solid var(--llmsb-primary); }
.llmsb-fc-mc-table tbody tr.ok { background: #f0fdf4; }
.llmsb-fc-mc-table tbody tr.no { background: #fff8f8; }

.llmsb-fc-mc-table td {
    padding: 10px 14px;
    color: var(--llmsb-dark);
    vertical-align: middle;
}
.llmsb-fc-mc-td-num { text-align: center; color: var(--llmsb-muted, #6b7280); font-weight: 600; }
.llmsb-fc-mc-td-word { font-weight: 700; color: var(--llmsb-primary); white-space: nowrap; }
.llmsb-fc-mc-td-correct { color: var(--llmsb-mid); }
.llmsb-fc-mc-td-mark {
    text-align: center;
    font-weight: 800;
    font-size: 1.15rem;
}
.llmsb-fc-mc-table tr.ok .llmsb-fc-mc-td-mark { color: var(--llmsb-correct); }
.llmsb-fc-mc-table tr.no .llmsb-fc-mc-td-mark { color: var(--llmsb-wrong); }
.llmsb-fc-mc-noanswer { color: var(--llmsb-muted, #9ca3af); font-style: italic; }

.llmsb-fc-mc-restart {
    display: block;
    margin: 0 auto;
    background: var(--llmsb-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 10px 28px;
    font-size: .9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
}
.llmsb-fc-mc-restart:hover { filter: brightness(.9); }

@media (max-width: 540px) {
    .llmsb-fc-mc-table { font-size: .85rem; }
    .llmsb-fc-mc-table th, .llmsb-fc-mc-table td { padding: 8px 10px; }
}

/* ── MC card front ───────────────────────────────────── */
.llmsb-fc-mc-front {
    flex-direction: column;
    justify-content: center;
    gap: 20px;
    padding: 28px 24px 20px;
    cursor: default;
}
.llmsb-fc-mc-front .llmsb-fc-word { margin-bottom: 0; font-size: 2.2rem; }

/* 2×2 options grid */
.llmsb-fc-mc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    width: 100%;
}
.llmsb-fc-mc-opt {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 12px;
    background: #fff;
    border: 2px solid var(--llmsb-primary);
    border-radius: 10px;
    font-family: inherit;
    font-size: .85rem;
    color: var(--llmsb-dark);
    cursor: pointer;
    text-align: left;
    line-height: 1.4;
    transition: background .12s, transform .08s;
}
.llmsb-fc-mc-opt:hover:not(:disabled) {
    background: var(--llmsb-pale, #fef3e2);
    transform: translateY(-1px);
}
.llmsb-fc-mc-opt:disabled { cursor: default; }

.llmsb-fc-mc-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--llmsb-primary);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
    margin-top: 1px;
}
.llmsb-fc-mc-text { flex: 1; }

/* In-activity selection — orange highlight only, no correctness signal. */
.llmsb-fc-mc-opt.selected {
    background: var(--llmsb-primary);
    color: #fff;
    border-color: var(--llmsb-primary);
}
.llmsb-fc-mc-opt.selected .llmsb-fc-mc-label {
    background: #fff;
    color: var(--llmsb-primary);
}
.llmsb-fc-mc-opt.selected:hover { transform: none; }

/* MC text counter (replaces circle for MC mode) */
.llmsb-fc-mc-counter {
    font-family: 'DM Sans', sans-serif;
    font-size: .9rem;
    font-weight: 700;
    color: var(--llmsb-primary);
    white-space: nowrap;
}
