/* Live exam card (includes/exam_card.php). Load after style.css. Uses the admin brand colour (--brand-rgb). */
.exam-card.xcard{ flex-direction:row; padding:0; gap:0; overflow:hidden; }
.xcard .xc-rail{ width:68px; flex:none; box-sizing:border-box; padding:4px 8px 10px; display:flex; flex-direction:column;
  background:rgba(var(--brand-rgb),0.10); border-right:1px dashed rgba(var(--brand-rgb),0.35); }
.xcard .xc-rail > span{ font-family:var(--font-mono); font-size:10.5px; letter-spacing:.04em; text-transform:uppercase; padding:9px 0;
  border-bottom:1px solid rgba(var(--brand-rgb),0.18); display:flex; align-items:center; gap:6px; overflow-wrap:anywhere; }
.xcard .xc-live{ color:#c62828; font-weight:900; text-shadow:0.4px 0 0 currentColor; }
.xcard .xc-live::before{ content:''; flex:none; width:7px; height:7px; border-radius:50%; background:#e53935; animation:pillLivePulse 1.4s ease-in-out infinite; }
.xcard .xc-it{ color:var(--green-dark); font-weight:600; }
.xcard .xc-general{ color:#6b5116; font-weight:600; }
.xcard .xc-type{ color:#3f4f47; font-weight:600; }
.xcard .xc-rail > .xc-points{ margin-top:auto; border-bottom:0; justify-content:center; padding:6px 0; border-radius:6px; font-size:10.5px;
  background:var(--paper-raised); color:#6b5116; font-weight:700; }
/* fix: style.css pins a card's last child to the bottom (margin-top:auto) - that pushed the body down and left a gap on top */
.exam-card.xcard > .xc-body{ margin-top:0; }
.xcard .xc-body{ position:relative; flex:1; min-width:0; box-sizing:border-box; padding:18px; display:flex; flex-direction:column; gap:10px; }
.xcard .xc-body > h3{ margin:0; }
.xcard .xc-foot > .btn{ min-height:34px; }
.xcard .xc-quiz{ display:flex; flex-wrap:wrap; gap:6px; font-size:11.5px; color:#6b5116; }
.xcard .xc-quiz span{ background:rgba(201,154,62,0.16); border-radius:20px; padding:3px 10px; }
.xcard .exam-desc{ margin:0; }
.xcard .see-details-btn{ margin-bottom:0; align-self:flex-start; }
.xcard .exam-meta{ margin-top:auto; display:flex; flex-wrap:nowrap; gap:14px; }
.xcard .exam-meta > div{ flex:1; min-width:0; }
.xcard .exam-meta span{ display:block; font-size:11.5px; color:var(--slate); padding-bottom:5px; border-bottom:1px solid var(--line); }
.xcard .exam-meta b{ display:block; padding-top:5px; font-size:13px; font-weight:700; font-family:var(--font-mono); color:var(--green); }
/* Start button: no background, outline only */
.xcard .xc-foot > .btn-primary{ background:transparent !important; color:var(--green) !important; border:1.5px solid var(--green) !important; box-shadow:none !important; }
.xcard .xc-foot > .btn-primary{ transition:background-color .2s ease, color .2s ease; }
.xcard .xc-foot > .btn-primary:hover, .xcard .xc-foot > .btn-primary:focus-visible{ background:var(--green) !important; color:#fff !important; transform:none !important; }
html[data-theme="dark"] .xcard .xc-foot > .btn-primary{ color:#8fd6b5 !important; border-color:#8fd6b5 !important; }
html[data-theme="dark"] .xcard .xc-foot > .btn-primary:hover, html[data-theme="dark"] .xcard .xc-foot > .btn-primary:focus-visible{ background:#8fd6b5 !important; color:#0b1a14 !important; }
/* Submitted / locked button: also no background */
.xcard .xc-foot > .btn-ghost{ background:transparent !important; color:var(--slate) !important; border:1.5px solid var(--slate) !important; box-shadow:none !important; }
.xcard .xc-foot > a.btn-ghost{ transition:background-color .2s ease, color .2s ease; }
.xcard .xc-foot > a.btn-ghost:hover, .xcard .xc-foot > a.btn-ghost:focus-visible{ background:var(--slate) !important; color:#fff !important; transform:none !important; }
html[data-theme="dark"] .xcard .xc-foot > .btn-ghost{ color:#c3cec8 !important; border-color:#c3cec8 !important; }
html[data-theme="dark"] .xcard .xc-foot > a.btn-ghost:hover, html[data-theme="dark"] .xcard .xc-foot > a.btn-ghost:focus-visible{ background:#c3cec8 !important; color:#0b1a14 !important; }
@media (max-width:640px){ .xcard .xc-rail{ width:64px; } .xcard .xc-body{ padding:14px; } }
html[data-theme="dark"] .xcard .xc-rail{ background:rgba(var(--brand-rgb),0.22); border-right-color:rgba(255,255,255,0.18); }
html[data-theme="dark"] .xcard .xc-rail > span{ border-bottom-color:rgba(255,255,255,0.12); }
html[data-theme="dark"] .xcard .xc-live{ color:#ff8a80; }
html[data-theme="dark"] .xcard .xc-it{ color:#8fd6b5; }
html[data-theme="dark"] .xcard .xc-general, html[data-theme="dark"] .xcard .xc-quiz{ color:#e3c47a; }
html[data-theme="dark"] .xcard .xc-type{ color:#c3cec8; }
html[data-theme="dark"] .xcard .xc-rail > .xc-points{ background:rgba(255,255,255,0.08); color:#e3c47a; }
html[data-theme="dark"] html[data-theme="dark"] @media (prefers-reduced-motion:reduce){ .xcard .xc-live::before{ animation:none; } }

/* ---- Archive variant (user/archived_exams.php): same card; "Archived" tag, Solution / PDF text links in the left rail ---- */
.xcard.xcard-archive .xc-rail{ width:78px; padding-left:6px; padding-right:6px; }
.xcard .xc-archived{ color:var(--slate); }
.xcard .xc-archived::before{ background:var(--slate); animation:none; }
.xcard .xc-rail > .xc-links{ margin-top:auto; display:flex; flex-direction:column; gap:0; padding:0; border:0; }
.xcard .xc-link{ display:block; padding:8px 0; border-top:1px solid rgba(var(--brand-rgb),0.18); font-family:var(--font-mono); font-size:10.5px; font-weight:700;
  letter-spacing:.04em; text-transform:uppercase; color:var(--green-dark, var(--green)); text-decoration:underline; text-underline-offset:3px; }
.xcard .xc-link:hover, .xcard .xc-link:focus-visible{ color:var(--ink); }
.xcard .xc-actions{ display:flex; flex-wrap:wrap; gap:8px; min-width:0; }
.xcard .xc-actions form{ margin:0; display:flex; }
.xcard .xc-actions .btn{ flex:0 1 auto; min-height:34px; padding:0 16px; justify-content:center; text-align:center; }
.xcard .xc-note{ font-size:12px; color:var(--slate); font-style:italic; }
.xcard .xc-actions .btn-primary{ background:transparent !important; color:var(--green) !important; border:1.5px solid var(--green) !important; box-shadow:none !important; transition:background-color .2s ease, color .2s ease; }
.xcard .xc-actions .btn-primary:hover, .xcard .xc-actions .btn-primary:focus-visible{ background:var(--green) !important; color:#fff !important; transform:none !important; }
.xcard .xc-actions .btn-ghost{ background:transparent !important; color:var(--slate) !important; border:1.5px solid var(--slate) !important; box-shadow:none !important; transition:background-color .2s ease, color .2s ease; }
.xcard .xc-actions .btn-ghost:hover, .xcard .xc-actions .btn-ghost:focus-visible{ background:var(--slate) !important; color:#fff !important; transform:none !important; }
html[data-theme="dark"] .xcard .xc-archived{ color:#c3cec8; }
html[data-theme="dark"] .xcard .xc-archived::before{ background:#c3cec8; }
html[data-theme="dark"] .xcard .xc-link{ color:#8fd6b5; border-top-color:rgba(255,255,255,0.12); }
html[data-theme="dark"] .xcard .xc-link:hover{ color:#fff; }
html[data-theme="dark"] .xcard .xc-actions .btn-primary{ color:#8fd6b5 !important; border-color:#8fd6b5 !important; }
html[data-theme="dark"] .xcard .xc-actions .btn-primary:hover, html[data-theme="dark"] .xcard .xc-actions .btn-primary:focus-visible{ background:#8fd6b5 !important; color:#0b1a14 !important; }
html[data-theme="dark"] .xcard .xc-actions .btn-ghost{ color:#c3cec8 !important; border-color:#c3cec8 !important; }
html[data-theme="dark"] .xcard .xc-actions .btn-ghost:hover, html[data-theme="dark"] .xcard .xc-actions .btn-ghost:focus-visible{ background:#c3cec8 !important; color:#0b1a14 !important; }
@media (max-width:640px){ .xcard.xcard-archive .xc-rail{ width:74px; } }

/* Bottom row: narrow button(s) on the left, share icon at the right (no longer top-right) */
.xcard .xc-foot{ margin-top:auto; display:flex; align-items:center; gap:8px; }
.xcard .xc-foot > .btn, .xcard .xc-actions .btn{ font-size:13px; line-height:1.2; }
.xcard .xc-foot > .btn{ flex:1 1 auto; width:auto; padding:0 20px; justify-content:center; }
.xcard .xc-foot > .xc-actions{ flex:1 1 auto; }
.xcard .xc-actions form{ flex:1 1 0; }
.xcard .xc-actions .btn{ flex:1 1 0; }
.xcard .xc-foot .share-btn{ margin-left:0; }
.xcard .xc-foot .share-btn{ position:static; flex:none; width:30px; height:30px; }
.xcard .xc-foot .share-btn svg{ width:12px; height:12px; }
.xcard .xc-foot .share-btn.copied::after{ top:auto; bottom:calc(100% + 6px); right:0; }

/* description: "…" at the end of a long text; the text itself opens / folds it (no See Details button) */
.exam-desc.can-expand{ cursor:pointer; border-radius:4px; }
.exam-desc.can-expand.clamped:hover{ color:var(--ink); }
.exam-desc.can-expand:focus-visible{ outline:2px solid var(--green); outline-offset:2px; }
.see-details-btn{ display:none !important; }