/* Exam Focus — powered by Mentigo. Setup card, in-exam badge, and the
   stay-on-task overlay. Theme-aware; readable at 400px. */

/* ── Setup card ── */
.xf-card {
    background: rgba(99,102,241,0.07);
    border: 1px solid rgba(99,102,241,0.35);
    border-radius: 14px;
    padding: 16px 18px;
    margin: 4px 0 16px;
}
.xf-card.xf-off { opacity: 0.55; }
.xf-card.xf-off .xf-chips,
.xf-card.xf-off .xf-add { pointer-events: none; }

.xf-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.xf-toggle { display: flex; align-items: center; gap: 9px; cursor: pointer; user-select: none; }
.xf-toggle input { accent-color: #818cf8; width: 16px; height: 16px; cursor: pointer; }
.xf-title { font-size: 15px; font-weight: 800; color: var(--tool-ink, #f3efe7); }
.xf-brand {
    font-size: 11px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase;
    color: #a5b4fc; text-decoration: none; flex-shrink: 0;
}
.xf-brand:hover { text-decoration: underline; }
.xf-sub { font-size: 12.5px; line-height: 1.55; color: var(--sd-muted); margin: 8px 0 12px; }
.xf-sub b { color: #c7d2fe; font-weight: 700; }

.xf-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.xf-chip {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.14);
    border-radius: 999px; padding: 6px 12px 6px 9px;
    font-size: 12.5px; color: var(--tool-ink, #f3efe7); cursor: pointer; user-select: none;
}
.xf-chip input { accent-color: #818cf8; cursor: pointer; margin: 0; }
.xf-chip:hover { border-color: rgba(129,140,248,0.6); }
.xf-chip.xf-custom span { font-style: italic; }

.xf-add { display: flex; gap: 8px; margin-top: 11px; }
.xf-add input {
    flex: 1; min-width: 0;
    background: rgba(0,0,0,0.25); border: 1px solid rgba(255,255,255,0.16);
    border-radius: 9px; padding: 8px 12px; font: inherit; font-size: 12.5px;
    color: var(--tool-ink, #f3efe7);
}
.xf-add input:focus { outline: none; border-color: rgba(129,140,248,0.7); }
.xf-add button {
    flex-shrink: 0; background: rgba(129,140,248,0.18); border: 1px solid rgba(129,140,248,0.5);
    color: #c7d2fe; border-radius: 9px; padding: 8px 16px;
    font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer;
}
.xf-add button:hover { background: rgba(129,140,248,0.3); }

.xf-ext, .xf-upsell { font-size: 12px; line-height: 1.55; margin-top: 11px; color: var(--sd-muted); }
.xf-ext b { color: var(--tool-ink, #f3efe7); }
.xf-ext a, .xf-upsell a { color: #a5b4fc; font-weight: 700; text-decoration: none; }
.xf-ext a:hover, .xf-upsell a:hover { text-decoration: underline; }
.xf-ext-on { color: var(--sd-ok); font-weight: 600; }
.xf-upsell { padding-top: 9px; border-top: 1px solid rgba(255,255,255,0.09); }

/* ── In-exam badge, next to the timer ── */
.xf-badge {
    display: none; align-items: center; gap: 5px;
    font-size: 11px; font-weight: 700; letter-spacing: 0.3px;
    color: #c7d2fe; background: rgba(99,102,241,0.16);
    border: 1px solid rgba(129,140,248,0.4);
    padding: 3px 10px; border-radius: 999px; margin-left: 10px;
    text-decoration: none;
}
.xf-badge.active { display: inline-flex; }
.xf-badge:hover { background: rgba(99,102,241,0.28); }

/* ── Stay-on-task overlay ── */
.xf-overlay {
    display: none; position: fixed; inset: 0; z-index: 10000;
    background: rgba(8,10,20,0.93);
    align-items: center; justify-content: center; padding: 24px;
    backdrop-filter: blur(3px);
}
.xf-overlay.active { display: flex; }
.xfo-box {
    max-width: 440px; width: 100%; text-align: center;
    background: var(--tool-surface, #151e2b);
    border: 1px solid rgba(129,140,248,0.45);
    border-radius: 20px; padding: 30px 26px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.6);
}
.xfo-shield { font-size: 40px; line-height: 1; margin-bottom: 10px; }
.xfo-box h2 { color: var(--tool-ink, #f3efe7); font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.xfo-reason { color: #fbbf24; font-size: 14px; font-weight: 600; margin: 0 0 14px; }
.xfo-sub { color: var(--sd-muted); font-size: 13px; margin: 0 0 10px; }
.xfo-sites { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
.xfo-sites span {
    font-size: 11.5px; color: #c7d2fe;
    background: rgba(99,102,241,0.15); border: 1px solid rgba(129,140,248,0.3);
    border-radius: 999px; padding: 4px 11px;
}
.xfo-count { color: var(--sd-warn); font-size: 14px; font-weight: 700; margin-bottom: 18px; }
.xfo-box button {
    background: linear-gradient(135deg, #6366f1, #4f46e5); color: #fff;
    border: none; border-radius: 999px; padding: 12px 30px;
    font: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
}
.xfo-box button:hover { filter: brightness(1.08); }
.xfo-brand { margin-top: 14px; font-size: 11px; color: var(--sd-dim); }
.xfo-brand a { color: #a5b4fc; text-decoration: none; font-weight: 700; }

/* ── Results line ── */
.xf-result {
    background: rgba(99,102,241,0.08); border: 1px solid rgba(129,140,248,0.3);
    border-radius: 12px; padding: 12px 16px; margin-bottom: 18px;
    font-size: 13.5px; color: var(--tool-ink, #f3efe7); text-align: center;
}
.xf-result.xf-good { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.35); }
.xf-result span { display: block; margin-top: 3px; font-size: 11px; color: var(--sd-dim); }

/* ── The sidebar has no business being on screen mid-exam ── */
body.sd-exam-running #sdSidebar,
body.sd-exam-running .sd-sidebar { display: none !important; }
body.sd-exam-running.sd-shell-shifted { padding-left: 0 !important; margin-left: 0 !important; }
body.sd-exam-running .sd-shell-hamburger,
body.sd-exam-running #sdShellHamburger { display: none !important; }

@media (max-width: 420px) {
    .xf-card { padding: 14px; }
    .xfo-box { padding: 24px 18px; }
}
