rob-revisited/ide/ui/css/tutorial.css

46 lines
4.2 KiB
CSS

/* The interactive tutorial (ide/ui/js/tutorial/): the floating panel and the ghost mouse */
.tour-panel { position: fixed; z-index: 100000; width: 380px; max-height: min(80vh, 760px); display: flex; flex-direction: column; background: var(--panel); color: var(--text); border: 1px solid var(--accent); border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45); font-size: 13px; outline: none; }
.tour-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: move; border-bottom: 1px solid var(--border-2); user-select: none; }
.tour-head .ico { width: 16px; height: 16px; color: var(--accent); }
.tour-title { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tour-progress { font-size: 11px; color: var(--text-2); white-space: nowrap; }
.tour-icon { width: 24px; height: 24px; border: 0; background: transparent; color: var(--text); border-radius: 5px; cursor: pointer; }
.tour-icon:hover { background: var(--hover); }
.tour-panel.collapsed { width: 300px; }
.tour-panel.collapsed .tour-body { display: none; }
.tour-body { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 10px; overflow: auto; min-height: 0; }
.tour-toc { max-height: 190px; overflow: auto; border: 1px solid var(--border-2); border-radius: 8px; padding: 4px; background: var(--bg); }
.tour-chap-title { display: flex; align-items: center; gap: 6px; padding: 3px 6px; border-radius: 5px; cursor: pointer; }
.tour-chap-title .ico { width: 12px; height: 12px; color: var(--green); }
.tour-chap-title:hover { background: var(--hover); }
.tour-chap.on > .tour-chap-title { font-weight: 600; }
.tour-chap.done > .tour-chap-title { color: var(--text-2); }
.tour-steps { padding: 0 0 4px 20px; }
.tour-step { display: flex; gap: 6px; padding: 2px 6px; border-radius: 5px; color: var(--text); text-decoration: none; font-size: 12px; }
.tour-step:hover { background: var(--hover); }
.tour-step.on { background: var(--accent); color: #fff; }
.tour-step.done .tour-tick { color: var(--green); }
.tour-step.on .tour-tick { color: #fff; }
.tour-text { line-height: 1.5; }
.tour-text h3 { margin: 2px 0 6px; font-size: 15px; }
.tour-text p { margin: 0 0 8px; }
.tour-text code { background: var(--bg); padding: 0 4px; border-radius: 4px; }
.tour-chapter { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-2); }
.tour-tip { font-size: 12px; padding: 6px 8px; border-radius: 6px; background: var(--bg); border-left: 3px solid var(--yellow); }
.tour-wait { font-size: 12px; color: var(--text-2); }
.tour-lost { margin-top: 6px; padding: 6px 8px; font-size: 12px; border-left: 3px solid var(--warn, #e0a030); background: rgba(224, 160, 48, 0.12); border-radius: 4px; }
.tour-lost[hidden] { display: none; }
.tour-ok { font-size: 12px; color: var(--green); font-weight: 600; display: flex; align-items: center; gap: 4px; }
.tour-actions, .tour-nav { display: flex; gap: 6px; }
.tour-nav { justify-content: space-between; }
.tour-foot { display: flex; align-items: center; gap: 10px; font-size: 11px; }
.tour-keys { margin-left: auto; color: var(--text-3); }
.tour-link { border: 0; background: transparent; color: var(--accent); cursor: pointer; padding: 0; font-size: 11px; }
.tour-layer { position: fixed; inset: 0; z-index: 99999; pointer-events: none; }
.tour-spot { position: fixed; border-radius: 8px; opacity: 0; box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45), 0 0 0 3px var(--accent); transition: opacity 0.25s, left 0.5s, top 0.5s, width 0.5s, height 0.5s; }
.tour-spot.on { opacity: 1; animation: tour-pulse 1.2s ease-in-out infinite; }
@keyframes tour-pulse { 50% { box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45), 0 0 0 7px rgba(53, 116, 240, 0.55); } }
.tour-ghost { position: fixed; left: 0; top: 0; width: 26px; height: 26px; margin: -3px 0 0 -3px; opacity: 0; transform: translate(60vw, 60vh); transition: transform 0.85s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6)); }
.tour-ghost.on { opacity: 1; }
.tour-ripple { position: fixed; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 3px solid var(--accent); animation: tour-ripple 0.8s ease-out forwards; }
@keyframes tour-ripple { to { transform: scale(4.5); opacity: 0; } }