/* The Hands-On Demo (/demo, public/demo.js): the slim bar on top of the planner and the Start Planning sheet. Only demo.html loads this file.
   Light: a plum bar, white text, a white pill. Dark: the elevated surface, warm off-white text, the lavender pill with deep plum text (the design system). */
:root { --sdb-t: var(--safe-area-inset-top, env(safe-area-inset-top, 0px)); --sdb-h: 3rem; --sdb-bg: var(--ds-plum, #3E1F47); --sdb-ink: #FFFFFF; --sdb-btn: #FFFFFF; --sdb-on-btn: var(--ds-plum, #3E1F47); }
:root[data-theme=dark] { --sdb-bg: #2C2C2E; --sdb-ink: #F5F1EA; --sdb-btn: #C9A6D6; --sdb-on-btn: #2A1430; }
#sp-demo-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 45; height: calc(var(--sdb-h) + var(--sdb-t)); padding: var(--sdb-t) max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px)); display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--sdb-bg); color: var(--sdb-ink); font: 500 .875rem/1.25 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, Roboto, "Segoe UI", sans-serif; letter-spacing: -.005em; box-sizing: border-box; }
#sp-demo-bar p { margin: 0; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#sp-demo-bar .sdb-s { display: none; }
#sp-demo-bar .sdb-go { flex: none; display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--sdb-on-btn); font-weight: 600; font-size: .875rem; text-decoration: none; -webkit-tap-highlight-color: transparent; }
#sp-demo-bar .sdb-go span { display: inline-flex; align-items: center; height: 2rem; padding: 0 1rem; border-radius: 999px; background: var(--sdb-btn); transition: transform .1s ease-out; } /* a 32pt pill in a 44pt target */
#sp-demo-bar .sdb-go:active span { transform: scale(.97); }
#sp-demo-bar .sdb-go:focus-visible { outline: none; }
#sp-demo-bar .sdb-go:focus-visible span { outline: 2px solid var(--sdb-ink); outline-offset: 2px; }
@media (max-width: 429px) { #sp-demo-bar { gap: 8px; font-size: .8125rem; } #sp-demo-bar .sdb-go { font-size: .8125rem; } #sp-demo-bar .sdb-go span { padding: 0 .875rem; } }
@media (max-width: 379px) { #sp-demo-bar .sdb-l { display: none; } #sp-demo-bar .sdb-s { display: inline; } }
@media (prefers-contrast: more) { #sp-demo-bar { box-shadow: inset 0 -1px 0 var(--sdb-ink); } }

/* the planner moves down by the bar: the page, the sticky header, the sticky tool bar and table heads, and the computer's side menu */
html.sp-demo body { padding-top: calc(var(--sdb-h) + env(safe-area-inset-top, 0px)); }
html.sp-demo #app .hdr { top: calc(var(--sdb-h) + env(safe-area-inset-top, 0px)); }
html.sp-demo .tool { top: calc(64px + var(--sdb-h)); }
html.sp-demo #t-guests .cpl-tbl:not(.cpl-bt) thead th { top: calc(64px + var(--sdb-h)); }
@media (min-width: 860px) { html.sp-demo #nav.links { top: calc(65px + var(--sdb-h)); } }
html.sp-demo #app #t-ask.adv-sheet:not([hidden]) { top: calc(var(--sdb-h) + env(safe-area-inset-top, 0px)); padding-top: 8px; } /* the Advisor's full-screen sheet on phones */
html.sp-demo #sp-load { z-index: 100; }
/* in the store apps (public/native.css): the bar is the top safe area, so the app's own top inset (--sa-t) becomes the bar and the notch together */
html.sp-demo body.native { --sa-t: calc(var(--sdb-h) + var(--sdb-t)); padding-top: 0; }
html.sp-demo body.native #app .hdr { top: 0; }

/* the sheet: a bottom sheet with a grabber on phones, a centered form sheet on computers */
dialog.sp-demo-sheet { width: min(420px, calc(100vw - 32px)); padding: 1.75rem 1.5rem 1.5rem; text-align: center; color: var(--ink); }
dialog.sp-demo-sheet h2 { font: 700 1.375rem/1.2 -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, Roboto, "Segoe UI", sans-serif; letter-spacing: -.01em; margin: 0 0 .5rem; }
dialog.sp-demo-sheet p { margin: 0 0 1.25rem; color: var(--mute, #5E5750); font-size: 1rem; line-height: 1.4; }
dialog.sp-demo-sheet .row { display: flex; flex-direction: column; gap: .5rem; }
dialog.sp-demo-sheet .row > * { flex: none; width: 100%; min-height: 2.75rem; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; box-sizing: border-box; }
:root body dialog.sp-demo-sheet .sds-no { background: transparent !important; color: var(--ui-tint, #3E1F47) !important; box-shadow: none !important; border: 0 !important; font-weight: 600; }
@media (max-width: 599px) {
  dialog.sp-demo-sheet[open] { position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: 100%; border-radius: var(--r-sheet, 16px) var(--r-sheet, 16px) 0 0 !important; padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px)); animation: sds-up .3s cubic-bezier(.25, .8, .3, 1); }
  dialog.sp-demo-sheet[open]::before { content: ""; position: absolute; top: 6px; left: 50%; width: 36px; height: 5px; margin-left: -18px; border-radius: 3px; background: var(--ds-ink-3, #8A827A); opacity: .55; }
}
@keyframes sds-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { dialog.sp-demo-sheet[open] { animation: sds-fade .2s ease-out; } #sp-demo-bar .sdb-go span { transition: none; } }
@keyframes sds-fade { from { opacity: 0; } to { opacity: 1; } }
