/* ════════════════════════════════════════════════════════════
   LD SMW — Frontend: Select dropdowns inside LearnDash quizzes
   Designed to blend with LearnDash / BuddyBoss / Focus Mode
   ════════════════════════════════════════════════════════════ */

/* ── Hide the original cloze text input ─────────────────── */
.ld-smw-question .ld-smw-hidden-input {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    pointer-events: none !important;
}

/* ── Hide the cloze "correct answer" hint ───────────────── */
.ld-smw-question .wpProQuiz_clozeCorrect {
    display: none !important;
}

/* ── Select wrapper ─────────────────────────────────────── */
.ld-smw-select-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    vertical-align: middle;
    position: relative;
    margin: 0 2px;
}

/* ── The dropdown ───────────────────────────────────────── */
.ld-smw-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23555' stroke-width='1.5' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    border: 2px solid #c3cdd5;
    border-radius: 6px;
    padding: 6px 32px 6px 12px;
    font-size: inherit;
    font-weight: 600;
    font-family: inherit;
    color: #1a2e3b;
    min-width: 70px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    outline: none;
    line-height: 1.4;
}

.ld-smw-select:hover {
    border-color: #2271b1;
}

.ld-smw-select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 3px rgba(34, 113, 177, 0.2);
}

/* ── Correct / Wrong states ─────────────────────────────── */
.ld-smw-select.ld-smw-correct {
    border-color: #46a049 !important;
    background-color: #f0faf0 !important;
}

.ld-smw-select.ld-smw-wrong {
    border-color: #d63638 !important;
    background-color: #fef1f1 !important;
}

.ld-smw-select:disabled {
    opacity: 0.85;
    cursor: default;
}

/* ── Feedback icons ─────────────────────────────────────── */
.ld-smw-feedback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    opacity: 0;
    transform: scale(0.3);
    transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    flex-shrink: 0;
}

.ld-smw-feedback-icon.ld-smw-icon-show {
    opacity: 1;
    transform: scale(1);
}

.ld-smw-feedback-icon.ld-smw-icon-correct {
    background: #46a049;
    color: #fff;
}
.ld-smw-feedback-icon.ld-smw-icon-correct::after {
    content: "✓";
}

.ld-smw-feedback-icon.ld-smw-icon-wrong {
    background: #d63638;
    color: #fff;
}
.ld-smw-feedback-icon.ld-smw-icon-wrong::after {
    content: "✗";
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 600px) {
    .ld-smw-select {
        font-size: 14px;
        padding: 5px 28px 5px 8px;
        min-width: 60px;
    }

    .ld-smw-feedback-icon {
        width: 20px;
        height: 20px;
        font-size: 11px;
    }
}

/* ── LearnDash Focus Mode compatibility ─────────────────── */
.learndash-wrapper .ld-smw-select-wrap {
    display: inline-flex;
}

.learndash-wrapper .ld-smw-select {
    font-size: 16px;
}

/* ── BuddyBoss theme compatibility ──────────────────────── */
.bb-learndash-content-wrap .ld-smw-select {
    border-radius: 6px;
}
