/* ── HAR MCQs – Public Styles v1.5 ──────────────────────── */

/* ══ 10 TEMPLATES ════════════════════════════════════════ */
.amcq-quiz-container,.amcq-template-1{--pri:#4361ee;--pri-lt:#eef1ff;--pri-dk:#3a56d4;--opt-bg:#f0f2ff;--opt-bdr:#c7d0ff;--opt-sel:#dbeafe;--opt-sel-bdr:#4361ee;--correct:#22c55e;--wrong:#ef4444;--txt:#1e293b;--muted:#64748b;--bg:#fff;--surface:#f8fafc;--radius:16px;}
.amcq-template-2{--pri:#059669;--pri-lt:#ecfdf5;--pri-dk:#047857;--opt-bg:#f0fdf4;--opt-bdr:#a7f3d0;--opt-sel:#d1fae5;--opt-sel-bdr:#059669;--correct:#16a34a;--wrong:#dc2626;--txt:#1e293b;--muted:#64748b;--bg:#fff;--surface:#f0fdf4;--radius:14px;}
.amcq-template-3{--pri:#475569;--pri-lt:#f1f5f9;--pri-dk:#334155;--opt-bg:#f8fafc;--opt-bdr:#cbd5e1;--opt-sel:#e2e8f0;--opt-sel-bdr:#475569;--correct:#16a34a;--wrong:#dc2626;--txt:#0f172a;--muted:#64748b;--bg:#fff;--surface:#f1f5f9;--radius:8px;}
.amcq-template-4{--pri:#ea580c;--pri-lt:#fff7ed;--pri-dk:#c2410c;--opt-bg:#fffbf0;--opt-bdr:#fed7aa;--opt-sel:#ffedd5;--opt-sel-bdr:#ea580c;--correct:#16a34a;--wrong:#dc2626;--txt:#1e293b;--muted:#78716c;--bg:#fff;--surface:#fffbeb;--radius:12px;}
.amcq-template-5{--pri:#7c3aed;--pri-lt:#f5f3ff;--pri-dk:#6d28d9;--opt-bg:#faf5ff;--opt-bdr:#c4b5fd;--opt-sel:#ede9fe;--opt-sel-bdr:#7c3aed;--correct:#22c55e;--wrong:#ef4444;--txt:#1e1b4b;--muted:#6b7280;--bg:#fefefe;--surface:#f5f3ff;--radius:16px;}
.amcq-template-6{--pri:#2563eb;--pri-lt:#eff6ff;--pri-dk:#1d4ed8;--opt-bg:#ffffff;--opt-bdr:#e2e8f0;--opt-sel:#f0f9ff;--opt-sel-bdr:#2563eb;--correct:#16a34a;--wrong:#dc2626;--txt:#1e293b;--muted:#94a3b8;--bg:#fff;--surface:#fff;--radius:10px;}
.amcq-template-7{--pri:#dc2626;--pri-lt:#fef2f2;--pri-dk:#b91c1c;--opt-bg:#fff5f5;--opt-bdr:#fecaca;--opt-sel:#fee2e2;--opt-sel-bdr:#dc2626;--correct:#16a34a;--wrong:#b91c1c;--txt:#1e293b;--muted:#6b7280;--bg:#fff;--surface:#fef2f2;--radius:12px;}
.amcq-template-8{--pri:#0d9488;--pri-lt:#f0fdfa;--pri-dk:#0f766e;--opt-bg:#f0fdfa;--opt-bdr:#99f6e4;--opt-sel:#ccfbf1;--opt-sel-bdr:#0d9488;--correct:#059669;--wrong:#dc2626;--txt:#134e4a;--muted:#64748b;--bg:#fff;--surface:#f0fdfa;--radius:14px;}
.amcq-template-9{--pri:#db2777;--pri-lt:#fdf2f8;--pri-dk:#be185d;--opt-bg:#fdf2f8;--opt-bdr:#f9a8d4;--opt-sel:#fce7f3;--opt-sel-bdr:#db2777;--correct:#16a34a;--wrong:#e11d48;--txt:#1e293b;--muted:#9ca3af;--bg:#fff;--surface:#fdf2f8;--radius:16px;}
.amcq-template-10{--pri:#18181b;--pri-lt:#f4f4f5;--pri-dk:#09090b;--opt-bg:#fafafa;--opt-bdr:#d4d4d8;--opt-sel:#e4e4e7;--opt-sel-bdr:#18181b;--correct:#16a34a;--wrong:#dc2626;--txt:#09090b;--muted:#71717a;--bg:#fff;--surface:#f4f4f5;--radius:10px;}

/* ══ BASE ════════════════════════════════════════════════ */
.amcq-quiz-container{
    font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
    max-width:740px;margin:30px auto;border-radius:var(--radius);overflow:hidden;
    box-shadow:0 8px 40px rgba(0,0,0,.12);background:var(--bg);border:1px solid var(--opt-bdr);
}
.amcq-quiz-inner{background:var(--bg);padding:36px 40px;min-height:400px;position:relative;}
@media(max-width:600px){.amcq-quiz-inner{padding:24px 18px;}}

/* ══ LOGO — Start screen centered ════════════════════════ */
.amcq-start-logo{text-align:center;margin-bottom:16px;}
.amcq-start-logo img{display:inline-block;border-radius:8px;object-fit:contain;}

/* ══ QUIZ TOP BAR — logo + counter + timer in ONE row ════
   This is the FIX for the overlap issue.
   Logo and "Question X of Y" sit side-by-side, never on top.
══════════════════════════════════════════════════════════ */
.amcq-quiz-top-bar{
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:12px;
    margin-bottom:12px;
    min-height:40px;
    flex-wrap:nowrap;
}
.amcq-top-left,.amcq-top-right{
    display:flex;
    align-items:center;
    gap:10px;
    flex-shrink:0;
}
.amcq-bar-logo{
    display:block;
    border-radius:6px;
    object-fit:contain;
    flex-shrink:0;
}
.amcq-progress-text{
    font-size:.9rem;
    color:var(--muted);
    font-weight:600;
    white-space:nowrap;
}

/* ══ FULLSCREEN ══════════════════════════════════════════ */
.amcq-quiz-container.amcq-fullscreen{
    position:fixed!important;inset:0!important;z-index:999999!important;
    max-width:100%!important;margin:0!important;border-radius:0!important;
    overflow-y:auto!important;box-shadow:none!important;border:none!important;
}
.amcq-quiz-container.amcq-fullscreen .amcq-quiz-inner{max-width:800px;margin:0 auto;min-height:100vh;padding:48px 60px;}
.amcq-fullscreen-toggle,.amcq-btn-fullscreen-start{
    background:var(--surface);border:1px solid var(--opt-bdr);border-radius:6px;
    cursor:pointer;font-size:1.1rem;padding:6px 10px;color:var(--muted);transition:.15s;
}
.amcq-fullscreen-toggle:hover,.amcq-btn-fullscreen-start:hover{background:var(--pri-lt);color:var(--pri);}
.amcq-btn-fullscreen-start{font-size:.9rem;padding:12px 20px;border-radius:50px;}

/* ══ START SCREEN ════════════════════════════════════════ */
.amcq-screen-start{text-align:center;}
.amcq-title{font-size:2rem;font-weight:700;margin:0 0 10px;color:var(--txt);}
.amcq-desc{color:var(--muted);margin-bottom:20px;font-size:1.05rem;}
.amcq-meta{list-style:none;padding:0;display:flex;justify-content:center;gap:24px;flex-wrap:wrap;margin-bottom:28px;}
.amcq-meta li{color:var(--txt);font-size:.97rem;}
.amcq-start-actions{display:flex;gap:12px;justify-content:center;align-items:center;}

/* ══ BUTTONS ═════════════════════════════════════════════ */
.amcq-btn{
    display:inline-block;padding:12px 28px;border-radius:50px;border:none;
    font-size:1rem;font-weight:600;cursor:pointer;transition:.2s;font-family:inherit;
}
.amcq-btn-start,.amcq-btn-submit,.amcq-btn-retake,.amcq-btn-send-cert,.amcq-btn-download-cert{background:var(--pri);color:#fff;}
.amcq-btn-start:hover,.amcq-btn-submit:hover,.amcq-btn-retake:hover,.amcq-btn-send-cert:hover,.amcq-btn-download-cert:hover{
    transform:translateY(-2px);box-shadow:0 6px 20px rgba(0,0,0,.15);background:var(--pri-dk);
}
.amcq-btn-prev,.amcq-btn-next{background:var(--surface);color:var(--pri);border:2px solid var(--opt-bdr);}
.amcq-btn-prev:hover,.amcq-btn-next:hover{background:var(--pri-lt);}
.amcq-btn:disabled{opacity:.45;cursor:not-allowed;transform:none!important;}

/* ══ TIMER ═══════════════════════════════════════════════ */
.amcq-timer-wrap{display:flex;align-items:center;gap:6px;font-size:1.1rem;font-weight:700;color:#e74c3c;}
.amcq-timer.warning{color:#e74c3c;animation:amcq-pulse 1s ease infinite;}
@keyframes amcq-pulse{0%,100%{opacity:1}50%{opacity:.4}}

/* ══ PROGRESS BAR ════════════════════════════════════════ */
.amcq-progress-bar{height:6px;background:var(--surface);border-radius:99px;margin-bottom:28px;overflow:hidden;border:1px solid var(--opt-bdr);}
.amcq-progress-fill{height:100%;background:var(--pri);border-radius:99px;transition:width .4s ease;}

/* ══ QUESTION ════════════════════════════════════════════ */
.amcq-question-text{font-size:1.15rem;font-weight:600;color:var(--txt);margin-bottom:20px;line-height:1.6;}
.amcq-question-text img{max-width:100%;border-radius:8px;margin:10px 0;}
.amcq-options{list-style:none;padding:0;margin:0 0 24px;display:flex;flex-direction:column;gap:12px;}
.amcq-options li{
    padding:13px 18px;border-radius:10px;border:2px solid var(--opt-bdr);
    cursor:pointer;transition:.18s;display:flex;align-items:center;gap:14px;
    font-size:1rem;color:var(--txt);background:var(--opt-bg);
}
.amcq-options li:hover{background:var(--pri-lt);border-color:var(--pri);}
.amcq-options li.selected{background:var(--opt-sel);border-color:var(--opt-sel-bdr);font-weight:600;}
.amcq-option-letter{
    width:30px;height:30px;border-radius:50%;border:2px solid currentColor;
    display:flex;align-items:center;justify-content:center;font-weight:700;font-size:.85rem;flex-shrink:0;
}
.amcq-nav{display:flex;gap:10px;flex-wrap:wrap;align-items:center;}
.amcq-btn-flag{background:#fffbeb;color:#d97706;border:2px solid #fde68a;font-size:.88rem;padding:10px 16px;}
.amcq-btn-flag:hover{background:#fef3c7;}
.amcq-btn-flag.flagged{background:#fde68a;color:#92400e;border-color:#f59e0b;}
.amcq-btn-review-open{background:var(--surface);color:var(--pri);border:2px solid var(--opt-bdr);font-size:.88rem;padding:10px 16px;}
.amcq-btn-review-open:hover{background:var(--pri-lt);}

/* ══ REVIEW PANEL (during quiz) ══════════════════════════ */
.amcq-review-panel{
    margin-top:20px;background:var(--surface);border:2px solid var(--opt-bdr);
    border-radius:var(--radius);padding:20px 24px;animation:amcq-slide-in .25s ease;
}
@keyframes amcq-slide-in{from{opacity:0;transform:translateY(-10px)}to{opacity:1;transform:translateY(0)}}
.amcq-review-panel-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px;}
.amcq-review-panel-header h3{margin:0;font-size:1.05rem;color:var(--txt);}
.amcq-btn-review-close{background:none;border:1px solid var(--opt-bdr);border-radius:6px;padding:4px 12px;cursor:pointer;font-size:.85rem;color:var(--muted);transition:.15s;}
.amcq-btn-review-close:hover{background:#fee2e2;color:#dc2626;border-color:#fecaca;}
.amcq-review-panel-hint{font-size:.82rem;color:var(--muted);margin:0 0 10px;}
.amcq-review-panel-legend{display:flex;gap:16px;align-items:center;font-size:.78rem;color:var(--muted);margin-bottom:14px;flex-wrap:wrap;}
.amcq-rp-dot{width:12px;height:12px;border-radius:50%;display:inline-block;margin-right:4px;}
.amcq-rp-answered{background:var(--correct);}
.amcq-rp-unanswered{background:#cbd5e1;}
.amcq-rp-flagged{background:#f59e0b;}
.amcq-review-panel-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:6px;max-height:320px;overflow-y:auto;}
.amcq-rp-item{
    display:flex;align-items:center;gap:10px;padding:10px 14px;
    border-radius:8px;border:1px solid var(--opt-bdr);cursor:pointer;
    transition:.15s;background:#fff;font-size:.88rem;color:var(--txt);
}
.amcq-rp-item:hover{background:var(--pri-lt);border-color:var(--pri);}
.amcq-rp-item.rp-current{background:var(--pri-lt);border-color:var(--pri);font-weight:700;}
.amcq-rp-num{
    width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;
    font-size:.78rem;font-weight:700;flex-shrink:0;color:#fff;
}
.amcq-rp-num.rp-s-answered{background:var(--correct);}
.amcq-rp-num.rp-s-unanswered{background:#cbd5e1;color:#475569;}
.amcq-rp-num.rp-s-flagged{background:#f59e0b;}
.amcq-rp-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.amcq-rp-badge{font-size:.7rem;padding:2px 8px;border-radius:99px;font-weight:700;white-space:nowrap;}
.amcq-rp-badge-answered{background:#dcfce7;color:#15803d;}
.amcq-rp-badge-flagged{background:#fef3c7;color:#92400e;}
.amcq-rp-badge-empty{background:#f1f5f9;color:#94a3b8;}

/* ══ SCORECARD ═══════════════════════════════════════════ */
.amcq-screen-result{text-align:center;}
.amcq-result-title{font-size:1.8rem;color:var(--txt);margin-bottom:20px;}
.amcq-scorecard{margin-bottom:30px;}
.amcq-score-circle{
    width:130px;height:130px;border-radius:50%;margin:0 auto 16px;
    background:conic-gradient(var(--pri) var(--pct,0%),var(--surface) 0%);
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    box-shadow:0 4px 20px rgba(0,0,0,.1);position:relative;
}
.amcq-score-circle::before{content:'';position:absolute;inset:14px;border-radius:50%;background:var(--bg);}
.amcq-pct{font-size:1.7rem;font-weight:800;color:var(--pri);position:relative;z-index:1;}
.amcq-score-label{font-size:.72rem;color:var(--muted);position:relative;z-index:1;}
.amcq-score-detail{font-size:1rem;color:var(--txt);margin:8px 0 4px;}
.amcq-grade-msg{font-size:1.1rem;font-weight:600;}

/* ══ CERTIFICATE SECTION ═════════════════════════════════ */
.amcq-cert-section{
    background:linear-gradient(135deg, var(--pri-lt), var(--surface));
    border:2px solid var(--opt-bdr);border-radius:var(--radius);
    padding:28px 24px;margin:24px 0;text-align:center;
}
.amcq-cert-section h3{margin:0 0 16px;font-size:1.2rem;color:var(--txt);}
.amcq-btn-download-cert{margin-bottom:16px;}
.amcq-cert-email-box{
    border-top:1px solid var(--opt-bdr);margin-top:18px;padding-top:18px;
}
.amcq-cert-email-box p{margin:0 0 14px;font-size:.9rem;color:var(--muted);}
.amcq-cert-form{display:flex;flex-direction:column;gap:10px;max-width:360px;margin:0 auto;}
.amcq-input{
    padding:11px 14px;border:1px solid var(--opt-bdr);border-radius:8px;
    font-size:.93rem;font-family:inherit;color:var(--txt);outline:none;transition:.15s;
}
.amcq-input:focus{border-color:var(--pri);box-shadow:0 0 0 3px var(--pri-lt);}
.amcq-cert-status{margin-top:12px;font-weight:600;font-size:.9rem;}
.amcq-cert-sent{color:#16a34a;}
.amcq-cert-err{color:#dc2626;}

/* ══ REVIEW ══════════════════════════════════════════════ */
.amcq-review{text-align:left;margin-top:20px;}
.amcq-review h3{font-size:1.1rem;border-bottom:2px solid var(--opt-bdr);padding-bottom:8px;margin-bottom:16px;color:var(--txt);}
.amcq-review-item{padding:14px 16px;border-radius:10px;margin-bottom:12px;border-left:4px solid #ccc;}
.amcq-review-item.correct-item{background:#f0fdf4;border-color:var(--correct);}
.amcq-review-item.wrong-item{background:#fff5f5;border-color:var(--wrong);}
.amcq-review-q{font-weight:600;margin-bottom:8px;color:var(--txt);}
.amcq-review-tags{display:flex;gap:10px;flex-wrap:wrap;font-size:.85rem;margin-bottom:6px;}
.amcq-tag{padding:3px 10px;border-radius:99px;font-weight:600;}
.amcq-tag-correct{background:#dcfce7;color:#15803d;}
.amcq-tag-wrong{background:#fee2e2;color:#b91c1c;}
.amcq-tag-your{background:var(--pri-lt);color:var(--pri);}
.amcq-explanation{font-size:.88rem;color:var(--muted);margin-top:4px;font-style:italic;}
.amcq-correct-answer-row{margin-top:6px;padding:6px 10px;background:#f0fdf4;border-radius:6px;font-size:.85rem;color:#15803d;font-weight:600;}

/* ══ PERFORMANCE ═════════════════════════════════════════ */
.amcq-performance{text-align:left;margin-top:28px;}
.amcq-performance h3{color:var(--txt);font-size:1.1rem;margin-bottom:16px;}
.amcq-chart-wrap{background:var(--surface);border:1px solid var(--opt-bdr);border-radius:var(--radius);padding:20px;overflow:hidden;}
.amcq-perf-chart{width:100%;height:200px;}

/* ══ RESULT ACTIONS ══════════════════════════════════════ */
.amcq-result-actions{margin-top:24px;display:flex;flex-direction:column;gap:10px;align-items:center;}
.amcq-retake-note{font-size:.82rem;color:var(--muted);margin:0;font-style:italic;}

/* ══ LOADING ═════════════════════════════════════════════ */
.amcq-loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background:rgba(255,255,255,.85);}
.amcq-spinner{width:44px;height:44px;border-radius:50%;border:4px solid var(--opt-bdr);border-top-color:var(--pri);animation:amcq-spin .8s linear infinite;}
@keyframes amcq-spin{to{transform:rotate(360deg);}}
.amcq-error{color:var(--wrong);font-weight:600;padding:20px;text-align:center;}

@media(max-width:600px){
    .amcq-quiz-top-bar{flex-wrap:wrap;}
    .amcq-bar-logo{max-height:40px!important;}
}
