/* DrainBrain: Harry's live layer (pointer, ring, step panel), the walkthrough caption bar and the Demo mode menu.
   Navy surfaces with the logo green as the accent, so everything Harry does reads as DrainBrain. */

.brand-badge { background: var(--db-green-tint); color: var(--db-green-dark); }

/* ---------- Demo mode (header) ---------- */
.app-header .demo-mode .demo-mode-btn {
    gap: .45rem; height: 34px; padding: 0 .8rem; border-radius: 2rem; font-size: 12.5px; font-weight: 700;
    background: linear-gradient(120deg, #F3C969, var(--db-gold)); color: #3A2A05; box-shadow: 0 1px 0 rgba(0, 0, 0, .08);
}
.app-header .demo-mode .demo-mode-btn:hover, .app-header .demo-mode .demo-mode-btn:focus-visible { filter: brightness(1.04); color: #2A1E03; }
.demo-mode-menu { width: min(720px, calc(100vw - 1rem)); border: 0; border-radius: .9rem; overflow: hidden; }
.demo-mode-menu .dm-head { display: flex; gap: .75rem; align-items: center; padding: .9rem 1rem; background: var(--db-navy); color: #fff; }
.demo-mode-menu .dm-head img { background: #fff; border-radius: .5rem; padding: 3px; }
.demo-mode-menu .dm-head b { display: block; font-size: 15px; }
.demo-mode-menu .dm-head span { display: block; font-size: 12px; opacity: .8; }
.demo-mode-menu .dm-cols { display: grid; grid-template-columns: 1.35fr 1fr; gap: 0; }
.demo-mode-menu .dm-col { padding: .9rem 1rem; }
.demo-mode-menu .dm-say { background: #F6F8FA; border-left: 1px solid var(--bs-border-color); }
.demo-mode-menu .dm-item { display: flex; align-items: center; gap: .7rem; padding: .45rem 0; border-bottom: 1px solid var(--bs-border-color); }
.demo-mode-menu .dm-item:last-child { border-bottom: 0; }
.demo-mode-menu .dm-item > i { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; background: var(--db-green-tint); color: var(--db-green-dark); font-size: 13px; }
.demo-mode-menu .dm-item.star > i { background: var(--db-green); color: #fff; }
.demo-mode-menu .dm-item b { display: block; font-size: 13px; }
.demo-mode-menu .dm-item span { display: block; font-size: 11.5px; color: var(--bs-secondary-color); white-space: normal; }
.demo-mode-menu .dm-phrase { display: flex; gap: .5rem; align-items: center; width: 100%; text-align: left; border: 0; background: #fff; border-radius: .5rem; padding: .4rem .6rem; margin-bottom: .3rem; font-size: 12.5px; font-weight: 500; color: var(--db-navy); box-shadow: inset 0 0 0 1px var(--bs-border-color); }
.demo-mode-menu .dm-phrase i { color: var(--db-green); }
.demo-mode-menu .dm-phrase:hover, .demo-mode-menu .dm-phrase:focus-visible { box-shadow: inset 0 0 0 1px var(--db-green); background: var(--db-green-tint); }
@media (max-width: 767.98px) {
    .demo-mode-menu .dm-cols { grid-template-columns: 1fr; }
    .demo-mode-menu .dm-say { border-left: 0; border-top: 1px solid var(--bs-border-color); }
}

/* ---------- pointer and ring ---------- */
.harry-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1070; }
.harry-pointer {
    position: fixed; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; opacity: 0;
    background: radial-gradient(circle at 35% 35%, #5FE0C4, var(--db-green) 60%, #006B57);
    box-shadow: 0 0 0 4px rgba(var(--db-green-rgb), .25), 0 6px 18px rgba(var(--db-ink-rgb), .35);
    transition: left .55s cubic-bezier(.3, .8, .3, 1), top .55s cubic-bezier(.3, .8, .3, 1), opacity .25s;
}
.harry-pointer.on { opacity: 1; }
.harry-ring { position: fixed; border-radius: .7rem; opacity: 0; box-shadow: 0 0 0 3px var(--db-green), 0 0 0 8px rgba(var(--db-green-rgb), .18); transition: top .35s, left .35s, width .35s, height .35s, opacity .25s; }
.harry-ring.on { opacity: 1; }
.harry-ring-label { position: absolute; left: -3px; top: -28px; display: none; padding: .15rem .55rem; border-radius: .4rem; background: var(--db-green-dark); color: #fff; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.harry-ring.has-label .harry-ring-label { display: block; }
.harry-press { transform: scale(.96); box-shadow: 0 0 0 4px rgba(var(--db-green-rgb), .35) !important; transition: transform .12s; }
.harry-flash { animation: harryflash 1.6s ease; }
@keyframes harryflash { 0%, 40% { background-color: rgba(var(--db-green-rgb), .22); } 100% { background-color: transparent; } }
@media (prefers-reduced-motion: reduce) {
    .harry-pointer, .harry-ring { transition: none; }
    .harry-flash { animation: none; }
}

/* ---------- "Harry is working" ---------- */
.harry-steps {
    position: fixed; left: 1rem; bottom: 4.6rem; z-index: 1065; width: min(320px, calc(100vw - 2rem)); padding: .75rem .9rem; border: 0; border-radius: .9rem;
    background: var(--db-navy); color: #fff; font-size: 12.5px; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity .2s, transform .2s;
}
.harry-steps.on { opacity: 1; transform: none; }
.harry-steps-head { display: flex; align-items: center; gap: .5rem; margin-bottom: .4rem; font-size: 13px; }
.harry-dot { width: 9px; height: 9px; border-radius: 50%; background: #5FE0C4; box-shadow: 0 0 0 3px rgba(95, 224, 196, .25); animation: harrybeat 1s infinite; }
.harry-dot.done { animation: none; }
@keyframes harrybeat { 50% { opacity: .35; } }
.harry-chip { display: inline-block; margin-bottom: .4rem; padding: .1rem .5rem; border-radius: 1rem; background: rgba(255, 255, 255, .12); font-weight: 600; }
.harry-steps ol { list-style: none; margin: 0; padding: 0; }
.harry-steps li { position: relative; padding: .12rem 0 .12rem 1.2rem; color: rgba(255, 255, 255, .85); }
.harry-steps li::before { content: ""; position: absolute; left: 0; top: .45rem; width: 8px; height: 8px; border-radius: 50%; border: 2px solid #5FE0C4; }
.harry-steps li.done::before { background: #5FE0C4; }
.harry-outcome { margin-top: .45rem; padding-top: .45rem; border-top: 1px solid rgba(255, 255, 255, .15); font-weight: 600; color: #8DEBD6; }
.harry-outcome.bad { color: #FFB4AB; }

/* ---------- the caption bar for the tour, the brief and the workflows ---------- */
.narration-bar {
    position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 1066; width: min(760px, calc(100vw - 2rem));
    padding: .8rem 1rem .75rem; border-radius: 1rem; background: linear-gradient(120deg, var(--db-navy), #10264F); color: #fff;
    box-shadow: 0 18px 50px rgba(var(--db-ink-rgb), .45), inset 0 0 0 1px rgba(255, 255, 255, .08);
}
.narration-bar .nb-head { display: flex; align-items: center; gap: .55rem; font-size: 12px; color: rgba(255, 255, 255, .75); }
.narration-bar .nb-head b { color: #fff; }
.narration-bar .nb-mark { width: 26px; height: 26px; background: #fff; border-radius: .4rem; padding: 2px; }
.narration-bar .nb-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.narration-bar .nb-live { color: #8DEBD6; font-weight: 600; }
.narration-bar .nb-words { margin: .45rem 0 .5rem; font-size: 15px; line-height: 1.45; font-weight: 500; min-height: 2.2em; }
.narration-bar .nb-pips { display: flex; gap: 4px; margin-bottom: .55rem; }
.narration-bar .nb-pips span { flex: 1; height: 4px; border-radius: 2px; background: rgba(255, 255, 255, .18); }
.narration-bar .nb-pips span.done { background: var(--db-green); }
.narration-bar .nb-pips span.now { background: #8DEBD6; }
.narration-bar .nb-actions { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
body:has(.narration-bar) .demo-dock { display: none; }
body:has(.narration-bar) .harry-steps { bottom: 11rem; }
@media (max-width: 575.98px) { .narration-bar .nb-words { font-size: 13.5px; } }
@media print { .harry-layer, .harry-steps, .narration-bar { display: none !important; } }
