/* Demo guide: a clear way into the constructor, and a guide through the app once it is built. */

/* ---- The way into the constructor ---- */
html.dg-ready:not(.dg-started) .hero-actions .button.dark { animation: dg-cta 2.4s ease-out infinite; }

.dg-entry { cursor: pointer; }
.dg-entry:focus-visible { outline: 3px solid var(--app-color, #ca377f); outline-offset: 4px; }
.dg-chip b { font-weight: inherit; }
.dg-chip { position: absolute; z-index: 5; left: 50%; bottom: 16px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: #1f1a26; color: #fff; font: 800 12px/1 Manrope, Arial, sans-serif; white-space: nowrap; box-shadow: 0 10px 24px -10px #1f1a26cc; }
.dg-chip i, .dg-live i { width: 8px; height: 8px; border-radius: 50%; background: #35d07f; animation: dg-dot 1.6s ease-out infinite; }
.dg-entry:hover .dg-chip { background: var(--app-color, #ca377f); }

.dg-start { margin: 22px 0 26px; padding: 22px 20px 20px; border-radius: 24px; background: #251d31; color: #fff; font-family: Manrope, Arial, sans-serif; }
.dg-start-eyebrow { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: color-mix(in srgb, var(--app-color, #ca377f) 45%, white); }
.dg-start h3 { margin: 8px 0 14px; font-size: 28px; line-height: 1.05; letter-spacing: -.04em; font-weight: 800; color: #fff; text-wrap: balance; }
.dg-start ol { display: flex; gap: 8px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: dg-step; }
.dg-start li { counter-increment: dg-step; flex: 1; padding: 10px 8px; border-radius: 14px; background: #ffffff14; font-size: 12px; font-weight: 700; text-align: center; }
.dg-start li::before { content: counter(dg-step); display: grid; place-items: center; width: 22px; height: 22px; margin: 0 auto 6px; border-radius: 50%; background: #fff; color: #251d31; font-size: 11px; font-weight: 800; }
.dg-start-button, .dg-sheet-go { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 56px; border: 0; border-radius: 16px; background: var(--app-color, #ca377f); color: #fff; font: 800 17px/1 Manrope, Arial, sans-serif; cursor: pointer; touch-action: manipulation; }
html:not(.dg-started) .dg-start-button { animation: dg-cta 2.4s ease-out infinite; }
.dg-start-button:focus-visible, .dg-sheet-go:focus-visible, .dg-dock-main:focus-visible, .dg-sheet-no:focus-visible { outline: 3px solid color-mix(in srgb, var(--app-color, #ca377f) 60%, white); outline-offset: 3px; }

/* The name field that asks to be finished: it looks focused, the cursor blinks, the last word keeps leaving. */
.dg-name-live { position: relative; }
.dg-name-live input { border-color: var(--app-color, #ca377f) !important; box-shadow: 0 0 0 4px color-mix(in srgb, var(--app-color, #ca377f) 16%, transparent); caret-color: var(--app-color, #ca377f); }
.dg-caret { position: absolute; width: 2px; border-radius: 2px; background: var(--app-color, #ca377f); pointer-events: none; animation: dg-blink 1.05s steps(1, end) infinite; }
.dg-ruler { position: absolute; left: 0; top: 0; max-width: 100%; overflow: hidden; visibility: hidden; white-space: pre; pointer-events: none; }
.dg-rename { position: absolute; right: 2px; top: 0; font: 800 11px/1.4 Manrope, Arial, sans-serif; letter-spacing: .02em; color: var(--app-color, #ca377f); pointer-events: none; }
.dg-rename::before { content: '✎ '; }

/* The bar that follows the visitor on phones */
.dg-dock { position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); z-index: 45; font-family: Manrope, Arial, sans-serif; animation: dg-rise .35s cubic-bezier(.2, .8, .2, 1); }
.dg-dock[hidden], .dg-sheet[hidden] { display: none; }
.dg-dock-main { display: flex; align-items: center; gap: 12px; width: 100%; padding: 9px 9px 9px 11px; border: 1px solid #e6dde9; border-radius: 20px; background: #fff; box-shadow: 0 14px 40px -12px #45273c66; text-align: left; cursor: pointer; }
.dg-dock-icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; overflow: hidden; background: var(--app-color, #ca377f); }
.dg-dock-icon > * { width: 100%; height: 100%; }
.dg-dock-copy { flex: 1; min-width: 0; }
.dg-dock-copy b { display: block; font-size: 14px; letter-spacing: -.01em; color: #251d31; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dg-dock-copy small { display: block; font-size: 12px; font-weight: 600; color: #746b80; }
.dg-dock-go { flex: none; padding: 12px 18px; border-radius: 14px; background: #29343e; color: #fff; font-size: 14px; font-weight: 800; }

/* Near the constructor the bar opens into a sheet, once */
.dg-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 46; padding: 10px 20px calc(18px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; background: #fff; box-shadow: 0 -20px 60px -10px #2a1b3066; font-family: Manrope, Arial, sans-serif; animation: dg-rise .45s cubic-bezier(.2, .8, .2, 1); }
.dg-sheet-handle { display: block; width: 44px; height: 5px; margin: 0 auto 14px; border-radius: 5px; background: #e3dbe6; }
.dg-sheet-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.dg-sheet-row .dg-dock-icon { width: 48px; height: 48px; border-radius: 14px; }
.dg-sheet h3 { margin: 0; font-size: 21px; line-height: 1.1; letter-spacing: -.03em; font-weight: 800; color: #251d31; text-wrap: balance; }
.dg-sheet small { font-size: 13px; font-weight: 600; color: #746b80; }
.dg-sheet-go { background: #29343e; }
.dg-sheet-no { display: block; width: 100%; margin-top: 6px; padding: 10px; border: 0; background: none; font: 700 13px/1 Manrope, Arial, sans-serif; color: #746b80; cursor: pointer; }
/* The old floating pill gives way to the bar; the page keeps room for it at the bottom. */
html.dg-ready .mobile-preview-button { display: none !important; }
@media (max-width: 760px) { html.dg-ready body { padding-bottom: 84px; } }
@media (min-width: 761px) { .dg-dock, .dg-sheet { display: none !important; } }

/* On wide screens the start card is a slim strip above the constructor */
@media (min-width: 761px) {
  .dg-start { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px 28px; margin: 0 0 28px; padding: 18px 20px 18px 26px; }
  .dg-start-eyebrow { grid-column: 1; grid-row: 1; }
  .dg-start h3 { grid-column: 1; grid-row: 2; margin: 2px 0 0; font-size: 24px; }
  .dg-start ol { grid-column: 2; grid-row: 1 / span 2; margin: 0; max-width: 460px; }
  .dg-start li { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 10px; font-size: 13px; }
  .dg-start li::before { margin: 0; }
  .dg-start-button { grid-column: 3; grid-row: 1 / span 2; width: auto; height: 52px; padding: 0 26px; font-size: 16px; }
}

/* ---- The guide inside the built app ---- */
.dg-bar { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; padding: 10px 14px 10px 10px; border-radius: 18px; background: #1f1a26; color: #fff; font: 600 13px/1.35 Manrope, Arial, sans-serif; box-shadow: 0 14px 30px -18px #1f1a2699; }
.dg-live { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; background: #ffffff1f; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.dg-text { flex: 1; min-width: 0; margin: 0; font-size: 13.5px; font-weight: 700; }
.dg-count { flex: none; font-size: 12px; font-weight: 700; color: #ffffff99; font-variant-numeric: tabular-nums; }
.dg-cta, .dg-again { flex: none; border: 0; border-radius: 999px; padding: 8px 14px; font: 800 12.5px/1 Manrope, Arial, sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; }
.dg-cta { background: #fff; color: #1f1a26; }
.dg-again { background: #ffffff1f; color: #fff; }
.dg-cta[hidden], .dg-again[hidden], .dg-count[hidden] { display: none; }
.dg-bar[data-state="done"] { background: var(--app-color, #1f1a26); flex-wrap: wrap; }
.dg-bar[data-state="done"] .dg-text { flex-basis: 60%; }
[data-dg-focus] { position: relative; z-index: 3; outline: 2px solid var(--app-color, #ca377f); outline-offset: 3px; border-radius: 14px; animation: dg-ring 1.5s ease-out infinite; }
#app-nav [data-dg-focus] { outline-offset: -2px; border-radius: 16px; }
.ms-result > .dg-bar { margin: 8px 12px 0; padding: 8px 12px 8px 8px; border-radius: 14px; }
.ms-result > .dg-bar .dg-text { font-size: 12.5px; }
.ms-result > .dg-bar .dg-live { padding: 5px 8px; font-size: 10px; }
/* The phone flow already counts its own tour steps in the header. */
.ms-result > .dg-bar .dg-count { display: none; }
.workspace-dialog .dg-bar { max-width: 430px; margin: 0 auto 14px; }

@keyframes dg-dot { 0% { box-shadow: 0 0 0 0 #35d07f99; } 70% { box-shadow: 0 0 0 9px #35d07f00; } 100% { box-shadow: 0 0 0 0 #35d07f00; } }
@keyframes dg-ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--app-color, #ca377f) 55%, transparent); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes dg-cta { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--app-color, #ca377f) 40%, transparent); } 60% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes dg-blink { 0%, 55% { opacity: 1; } 56%, 100% { opacity: 0; } }
@keyframes dg-rise { from { transform: translateY(24px); opacity: 0; } to { transform: none; opacity: 1; } }

@media (max-width: 760px) { .dg-chip { bottom: 12px; font-size: 11px; padding: 8px 12px; } .dg-bar { gap: 8px; } }
@media (prefers-reduced-motion: reduce) {
  .dg-chip i, .dg-live i, [data-dg-focus], .dg-start-button, .hero-actions .button.dark, .dg-dock, .dg-sheet, .dg-caret { animation: none !important; }
  [data-dg-focus] { box-shadow: 0 0 0 5px color-mix(in srgb, var(--app-color, #ca377f) 30%, transparent); }
}
