/* Demo-only pieces on top of the dashboard shell (dashboard.css) and Question bank styles
   (question-bank.css): header actions, overview cards, result banner and full-access prompt. */

/* Header: breadcrumb left, demo badge + account actions right */
.demo-header__actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.demo-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid hsl(var(--primary) / .2); border-radius: 999px; background: hsl(var(--primary) / .08); color: hsl(var(--primary)); font-size: 13px; font-weight: 600; white-space: nowrap; }
.demo-pill svg { width: 14px; height: 14px; }
.demo-header__signin { padding: 8px 10px; border-radius: 8px; color: hsl(var(--foreground)); font-size: 14px; font-weight: 600; white-space: nowrap; }
.demo-header__signin:hover { background: hsl(var(--muted)); }
.demo-header__actions .qb-btn { white-space: nowrap; }

/* Sidebar: DEMO badge on Try Quiz, demo user card */
.demo-nav-badge { margin-left: auto; padding: 2px 6px; border-radius: 999px; background: hsl(var(--warning) / .2); color: hsl(var(--warning)); font-size: 10px; font-weight: 500; line-height: 1.4; }
.demo-nav-badge.is-active { background: rgb(255 255 255 / .2); color: #fff; }
.sidebar-collapsed .demo-nav-badge { display: none; }

.demo-user-icon { width: 1.25rem; height: 1.25rem; color: #fff; }
.dashboard-user-plan.demo-user-plan { color: rgb(255 255 255 / .5); }

/* Overview: one card per exam */
.demo-exams { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.demo-exam { display: flex; align-items: center; gap: 14px; padding: 18px 20px; color: inherit; transition: border-color .15s, box-shadow .15s; }
.demo-exam:hover { border-color: hsl(var(--primary) / .5); box-shadow: 0 8px 20px -14px hsl(var(--primary) / .5); }
.demo-exam__icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; background: hsl(var(--primary) / .1); color: hsl(var(--primary)); }
.demo-exam__icon svg { width: 20px; height: 20px; }
.demo-exam__text { flex: 1; min-width: 0; }
.demo-exam__text strong { display: block; font-size: 16px; font-weight: 600; line-height: 1.35; }
.demo-exam__text small { display: block; margin-top: 2px; color: hsl(var(--muted-foreground)); font-size: 14px; }
.demo-exam__go { display: inline-flex; align-items: center; gap: 6px; color: hsl(var(--primary)); font-size: 14px; font-weight: 600; }
.demo-exam__go svg { width: 15px; height: 15px; transition: transform .15s; }
.demo-exam:hover .demo-exam__go svg { transform: translateX(2px); }

/* Overview: demo vs full access */
.demo-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.demo-compare__col { padding: 20px 24px 24px; }
.demo-compare__col + .demo-compare__col { border-left: 1px solid hsl(var(--border)); }
.demo-compare__col--full { background: hsl(var(--primary) / .03); border-radius: 0 0 12px 0; }
.demo-compare h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; color: hsl(var(--muted-foreground)); letter-spacing: 0; }
.demo-compare__col--full h3 { color: hsl(var(--primary)); }
.demo-compare ul { display: grid; gap: 10px; }
.demo-compare li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.45; }
.demo-compare li svg { width: 16px; height: 16px; margin-top: 2px; color: hsl(var(--success)); }

/* Finished-session banner */
.demo-result { display: flex; align-items: center; gap: 14px; padding: 16px 20px; border: 1px solid hsl(var(--success) / .35); border-radius: 12px; background: hsl(var(--success) / .08); }
.demo-result__icon { display: grid; place-items: center; width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: #fff; color: hsl(158 61% 32%); }
.demo-result__icon svg { width: 20px; height: 20px; }
.demo-result__text { flex: 1; min-width: 0; }
.demo-result__text h2 { font-size: 16px; font-weight: 600; line-height: 1.4; }
.demo-result__text p { margin-top: 2px; color: hsl(var(--foreground) / .8); font-size: 14px; }

/* Full-access prompt (bottom of each demo page) */
.demo-upsell { display: flex; align-items: center; gap: 16px; padding: 20px 24px; background: linear-gradient(110deg, hsl(var(--primary) / .06), #fff 70%); border-color: hsl(var(--primary) / .2); }
.demo-upsell__icon { display: grid; place-items: center; width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; background: hsl(var(--primary)); color: #fff; }
.demo-upsell__icon svg { width: 20px; height: 20px; }
.demo-upsell__text { flex: 1; min-width: 0; }
.demo-upsell__text h2 { font-size: 17px; font-weight: 600; line-height: 1.4; }
.demo-upsell__text p { margin-top: 2px; color: hsl(var(--muted-foreground)); font-size: 14px; }
.demo-upsell__actions { display: flex; gap: 10px; flex-shrink: 0; }

/* Session page subtitle */
.demo-session-sub { margin: 2px 0 0; color: hsl(var(--muted-foreground)); font-size: 14px; }

/* The Revise list uses links in the demo (sessions start with a plain GET). */
.qb-row__name:is(a) { display: inline; color: inherit; }
.qb-row__name:is(a):hover { color: hsl(var(--primary)); }
a.qb-quick { text-decoration: none; }

@media (max-width: 760px) {
    .demo-header__signin, .demo-pill { display: none; }
    .demo-compare { grid-template-columns: minmax(0, 1fr); }
    .demo-compare__col + .demo-compare__col { border-left: 0; border-top: 1px solid hsl(var(--border)); border-radius: 0 0 12px 12px; }
    .demo-upsell, .demo-result { flex-wrap: wrap; align-items: flex-start; }
    .demo-upsell__text, .demo-result__text { flex: 1 1 calc(100% - 60px); }
    .demo-result > .qb-btn, .demo-upsell__actions { width: 100%; }
    .demo-upsell__actions .qb-btn { flex: 1; }
}
@media (max-width: 420px) {
    .demo-header__actions .qb-btn { padding-inline: 10px; font-size: 13px; }
}
