/* ================================================================
   REVIEW QUEUE
   Shared styles for wrong-answer review section in dashboard
   ================================================================ */

/* -- Section Container -------------------------------------------- */
.rq-section {
    margin-top: 12px;
    padding: 14px;
    border-radius: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
}
.rq-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.rq-count {
    font-weight: 400;
    font-size: 0.82rem;
    opacity: 0.6;
    margin-left: 6px;
}

/* -- Topic Pills -------------------------------------------------- */
.rq-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}
.rq-prefix-btn {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: inherit;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.rq-prefix-btn:hover {
    background: rgba(255,255,255,0.12);
}
.rq-prefix-btn.active {
    background: var(--primary, #4f8cff);
    border-color: var(--primary, #4f8cff);
    color: #fff;
}
.rq-prefix-count {
    font-size: 0.72rem;
    opacity: 0.6;
    margin-left: 4px;
}

/* -- Practice Card ------------------------------------------------ */
.rq-practice {
    display: none;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
}
.rq-practice.open { display: block; }
.rq-question-text {
    font-size: 0.92rem;
    line-height: 1.5;
    margin-bottom: 10px;
}
.rq-question-text em,
.rq-question-text blockquote {
    opacity: 0.85;
}
.rq-question-text blockquote {
    border-left: 3px solid rgba(255,255,255,0.2);
    padding-left: 12px;
    margin: 8px 0;
}
.rq-rule-tag {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(255,255,255,0.08);
    margin-bottom: 8px;
    opacity: 0.7;
}

/* -- MC Option Buttons -------------------------------------------- */
.rq-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 10px;
}
.rq-opt-btn {
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
    color: inherit;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, border-color 0.2s;
    line-height: 1.4;
}
.rq-opt-btn:hover:not(.correct):not(.incorrect) {
    background: rgba(255,255,255,0.1);
}
.rq-opt-btn.correct {
    background: rgba(34,197,94,0.18);
    border-color: #22c55e;
    color: #22c55e;
    cursor: default;
}
.rq-opt-btn.incorrect {
    background: rgba(239,68,68,0.18);
    border-color: var(--error);
    color: var(--error);
    cursor: default;
}

/* -- Free Input Area ---------------------------------------------- */
.rq-input-area {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}
.rq-input-area math-field {
    flex: 1;
    font-size: 1.1rem;
    border-radius: 10px;
    min-height: 42px;
}
.rq-input-area input[type="text"] {
    flex: 1;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: inherit;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.2s;
}
.rq-input-area input[type="text"]:focus {
    border-color: var(--primary, #4f8cff);
}
.rq-check-btn {
    padding: 10px 18px;
    border-radius: 10px;
    border: none;
    background: var(--primary, #4f8cff);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
    white-space: nowrap;
}
.rq-check-btn:hover { opacity: 0.85; }

/* -- Feedback ----------------------------------------------------- */
.rq-feedback {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 10px;
    margin-bottom: 10px;
    display: none;
}
.rq-feedback.show { display: block; }
.rq-feedback.correct {
    background: rgba(34,197,94,0.15);
    color: #22c55e;
}
.rq-feedback.incorrect {
    background: rgba(239,68,68,0.15);
    color: var(--error);
}

/* -- Next Button -------------------------------------------------- */
.rq-next-btn {
    padding: 8px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.06);
    color: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    display: none;
    transition: background 0.2s;
}
.rq-next-btn.show { display: inline-block; }
.rq-next-btn:hover { background: rgba(255,255,255,0.12); }

/* -- Cleared Message ---------------------------------------------- */
.rq-cleared {
    text-align: center;
    padding: 20px 10px;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* -- Light / non-dark overrides ----------------------------------- */
body:not(.dark-mode) .rq-section {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.08);
}
body:not(.dark-mode) .rq-prefix-btn {
    border-color: rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.04);
}
body:not(.dark-mode) .rq-prefix-btn:hover {
    background: rgba(0,0,0,0.08);
}
body:not(.dark-mode) .rq-practice {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.06);
}
body:not(.dark-mode) .rq-opt-btn {
    border-color: rgba(0,0,0,0.1);
    background: rgba(0,0,0,0.03);
}
body:not(.dark-mode) .rq-opt-btn:hover:not(.correct):not(.incorrect) {
    background: rgba(0,0,0,0.06);
}
body:not(.dark-mode) .rq-input-area input[type="text"] {
    border-color: rgba(0,0,0,0.15);
    background: rgba(0,0,0,0.03);
}
body:not(.dark-mode) .rq-next-btn {
    border-color: rgba(0,0,0,0.12);
    background: rgba(0,0,0,0.04);
}
body:not(.dark-mode) .rq-next-btn:hover {
    background: rgba(0,0,0,0.08);
}
body:not(.dark-mode) .rq-question-text blockquote {
    border-left-color: rgba(0,0,0,0.2);
}
body:not(.dark-mode) .rq-rule-tag {
    background: rgba(0,0,0,0.06);
}

/* -- Mobile ------------------------------------------------------- */
@media (max-width: 600px) {
    .rq-options { grid-template-columns: 1fr; }
    .rq-input-area { flex-direction: column; }
    .rq-input-area math-field,
    .rq-input-area input[type="text"] { width: 100%; }
    .rq-check-btn { width: 100%; }
}
