/* ══════════════════════════════════════════
   Worksheets by MSL – Front-end Styles
   Dark theme matching the WORKSHEET REF
   ══════════════════════════════════════════ */

/* ─── Container ─── */
.wsm-container {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #fff;
    -webkit-font-smoothing: antialiased;
}

/* ─── Practice Trigger + Dropdown ─── */
.wsm-practice-wrap {
    position: relative;
    display: inline-block;
}

.wsm-practice-trigger {
    font-size: 18px;
    font-weight: 400;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    user-select: none;
    /* No blue hover */
    transition: none;
}

.wsm-dd-chevron {
    transition: transform .2s;
    color: inherit;
}

.wsm-practice-wrap.wsm-dd-open .wsm-dd-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.wsm-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: #0D0D0D;
    border: 1px solid #2a2a2a;
    border-radius: 14px;
    padding: 8px;
    min-width: 300px;
    z-index: 200;
    box-shadow: 0 16px 48px rgba(0, 0, 0, .7);
    transform-origin: top left;
    transform: scale(.95) translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), opacity .18s ease;
}

.wsm-practice-wrap.wsm-dd-open .wsm-dropdown {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.wsm-dropdown-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 12px;
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s;
    border-bottom: 1px solid #2a2a2a;
}

.wsm-dropdown-item:last-child {
    border-bottom: none;
}

.wsm-dropdown-item:hover {
    background: #282828;
}

.wsm-dd-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 8px;
    overflow: hidden;
}

.wsm-dd-title {
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    margin-bottom: 3px;
}

.wsm-dd-desc {
    font-size: 12px;
    font-weight: 400;
    color: #777;
    line-height: 1.4;
}

.wsm-login-notice {
    margin-top: 16px;
    font-size: 13px;
    color: #888;
    text-align: center;
}
.wsm-login-notice a {
    color: #2A62FF;
}

/* ─── Modal Overlay ─── */
.wsm-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 99999;
}

/* ─── Modal Box ─── */
.wsm-modal {
    background: #0D0D0D;
    border: 1px solid #262626;
    border-radius: 18px;
    width: 680px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: #333 transparent;
}
.wsm-modal::-webkit-scrollbar { width: 5px; }
.wsm-modal::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* ─── Modal Header ─── */
.wsm-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #222;
    position: sticky;
    top: 0;
    background: #0D0D0D;
    z-index: 10;
    border-radius: 18px 18px 0 0;
}
.wsm-modal-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
}
.wsm-modal-close {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #222;
    border: none;
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: background .15s, color .15s;
}
.wsm-modal-close:hover { background: #333; color: #fff; }

/* ─── Modal Body ─── */
.wsm-modal-body {
    padding: 24px;
}

/* ─── Question Block ─── */
.wsm-q-block {
    background: #1a1a1a;
    border: 1px solid #242424;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
}

.wsm-q-label {
    font-size: 12px;
    font-weight: 700;
    color: #666;
    letter-spacing: .5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.wsm-q-text {
    font-size: 14px;
    color: #ccc;
    margin-bottom: 14px;
    line-height: 1.6;
}

.wsm-chart-img {
    width: 100%;
    border-radius: 10px;
    margin-bottom: 16px;
    display: block;
}

.wsm-empty {
    color: #555;
    text-align: center;
    padding: 40px 0;
    font-size: 14px;
}

/* ─── Options Grid (Guess Chart) ─── */
.wsm-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.wsm-option-btn {
    background: #222;
    border: 1px solid #303030;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 13px;
    color: #bbb;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: left;
    font-family: inherit;
    transition: border-color .18s, background .18s, color .18s;
}
.wsm-option-btn:hover:not(:disabled) { border-color: #2A62FF; color: #fff; }
.wsm-option-btn.wsm-selected { border-color: #2A62FF; background: rgba(42,98,255,.1); color: #fff; }
.wsm-option-btn.wsm-correct { border-color: #2A62FF; background: rgba(42,98,255,.1); color: #6b92ff; }
.wsm-option-btn.wsm-wrong { border-color: #ef4444; background: rgba(239,68,68,.1); color: #ef4444; }
.wsm-option-btn:disabled { cursor: default; }

/* Option label (A, B, C, D) */
.wsm-opt-label {
    font-size: 12px;
    font-weight: 700;
    color: #666;
    min-width: 14px;
}

/* Radio circle */
.wsm-radio {
    width: 15px;
    height: 15px;
    min-width: 15px;
    border-radius: 50%;
    border: 2px solid #444;
    transition: all .15s;
}
.wsm-option-btn.wsm-selected .wsm-radio { border-color: #2A62FF; background: #2A62FF; }
.wsm-option-btn.wsm-correct .wsm-radio { border-color: #2A62FF; background: #2A62FF; }
.wsm-option-btn.wsm-wrong .wsm-radio { border-color: #ef4444; background: #ef4444; }

/* ─── Trivia Options (vertical) ─── */
.wsm-trivia-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wsm-trivia-opt {
    background: #222;
    border: 1px solid #303030;
    border-radius: 8px;
    padding: 11px 14px;
    font-size: 13px;
    color: #bbb;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: border-color .18s, background .18s, color .18s;
}
.wsm-trivia-opt:hover:not([data-disabled="1"]) { border-color: #2A62FF; color: #fff; }
.wsm-trivia-opt.wsm-selected { border-color: #2A62FF; background: rgba(42,98,255,.1); color: #fff; }
.wsm-trivia-opt.wsm-correct  { border-color: #2A62FF; background: rgba(42,98,255,.1); color: #6b92ff; }
.wsm-trivia-opt.wsm-wrong    { border-color: #ef4444; background: rgba(239,68,68,.1); color: #ef4444; }
.wsm-trivia-opt[data-disabled="1"] { cursor: default; }

.wsm-trivia-opt .wsm-radio { width: 15px; height: 15px; min-width: 15px; border-radius: 50%; border: 2px solid #444; transition: all .15s; }
.wsm-trivia-opt.wsm-selected .wsm-radio { border-color: #2A62FF; background: #2A62FF; }
.wsm-trivia-opt.wsm-correct .wsm-radio  { border-color: #2A62FF; background: #2A62FF; }
.wsm-trivia-opt.wsm-wrong .wsm-radio    { border-color: #ef4444; background: #ef4444; }

/* ─── Feedback Message ─── */
.wsm-feedback {
    font-size: 12.5px;
    margin-top: 10px;
    padding: 0;
    border-radius: 8px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .3s ease, opacity .3s ease, padding .3s ease;
}
.wsm-feedback.wsm-show {
    max-height: 80px;
    opacity: 1;
    padding: 10px 14px;
}
.wsm-feedback.wsm-fb-correct {
    background: rgba(42,98,255,.08);
    color: #6b92ff;
    border: 1px solid rgba(42,98,255,.25);
}
.wsm-feedback.wsm-fb-wrong {
    background: rgba(239,68,68,.08);
    color: #f87171;
    border: 1px solid rgba(239,68,68,.25);
}

/* ─── Case Study ─── */
.wsm-case-desc {
    font-size: 14px;
    color: #ccc;
    line-height: 1.75;
    margin-bottom: 10px;
}
.wsm-case-sub {
    font-size: 13px;
    color: #777;
    font-style: italic;
    margin-bottom: 20px;
}

.wsm-form-label {
    font-size: 13px;
    font-weight: 600;
    color: #aaa;
    margin-bottom: 8px;
    display: block;
}

.wsm-form-textarea {
    width: 100%;
    background: #1e1e1e;
    border: 1px solid #2e2e2e;
    border-radius: 10px;
    padding: 14px;
    color: #fff;
    font-size: 13px;
    line-height: 1.65;
    resize: vertical;
    min-height: 130px;
    outline: none;
    font-family: inherit;
    transition: border-color .2s;
    box-sizing: border-box;
}
.wsm-form-textarea:focus { border-color: #2A62FF; }

.wsm-file-zone {
    border: 1.5px dashed #2e2e2e;
    border-radius: 10px;
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color .2s, background .2s;
}
.wsm-file-zone:hover { border-color: #2A62FF; background: rgba(42,98,255,.04); }
.wsm-fz-text { font-size: 13px; color: #555; }
.wsm-fz-hint { font-size: 11px; color: #3a3a3a; margin-top: 4px; }
.wsm-file-chosen { font-size: 12px; color: #6b92ff; margin-top: 6px; }

/* Buttons */
.wsm-btn-row {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}
.wsm-btn-primary {
    background: #2A62FF;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 9px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s, opacity .15s;
}
.wsm-btn-primary:hover { background: #2A62FF; }
.wsm-btn-primary:disabled { background: #1e1e1e; color: #444; cursor: not-allowed; }

/* ─── Elementor override: neutralize inherited hover styles ─── */
.wsm-container button:hover,
.wsm-container button:focus,
.wsm-container .wsm-btn-primary:hover,
.wsm-container .wsm-btn-primary:focus {
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
}
.wsm-container a:hover,
.wsm-container a:focus {
    color: inherit !important;
    text-decoration: none !important;
    box-shadow: none !important;
    outline: none !important;
}

/* ─── Responsive ─── */
@media (max-width: 600px) {
    .wsm-practice-grid { flex-direction: column; }
    .wsm-options-grid { grid-template-columns: 1fr; }
    .wsm-modal { border-radius: 14px; }
    .wsm-modal-body { padding: 16px; }
}
