/* A featured world's guided tour (app/views/worlds/_guide.html.erb, world_guide_controller.js):
   Take the tour under the bar on the left, and while it's on, a panel over the box at the bottom
   with where she's got to, her captions and a box to ask her. Over the world, like the page's own
   bar and box (worlds.css .wd-stage). */
.gd { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.gd > * { pointer-events: auto; }

.gd-start { position: absolute; top: 60px; left: 12px; display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 9px 16px; border: 0; border-radius: 999px;
  background: #ffd166; color: #1b1d24; font: 700 14.5px/1.2 system-ui, -apple-system, sans-serif; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3); }
.gd-start:hover { filter: brightness(1.05); }
.gd-start:focus-visible { outline: 2px solid var(--wd-focus); outline-offset: 2px; }
.gd-start[hidden] { display: none; }

.gd-panel { position: absolute; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); box-sizing: border-box;
  width: min(720px, calc(100% - 24px)); display: grid; gap: 8px; justify-items: center; }
.gd-panel[hidden] { display: none; }
.gd-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.gd-where { margin: 0; padding: 7px 14px; border-radius: 999px; background: rgba(20, 22, 28, 0.78); color: #fff; font: 600 13.5px/1.3 system-ui, -apple-system, sans-serif; }
.gd-button { margin: 0; padding: 7px 14px; border: 0; border-radius: 999px; background: rgba(20, 22, 28, 0.78); color: #fff; font: 600 13.5px/1.3 system-ui, -apple-system, sans-serif; cursor: pointer; }
.gd-button:hover { background: rgba(20, 22, 28, 0.92); }
.gd-button:focus-visible { outline: 2px solid var(--wd-focus); outline-offset: 2px; }
.gd-button[hidden] { display: none; }
.gd-skip { background: #ffd166; color: #1b1d24; }
.gd-skip:hover { background: #ffd166; filter: brightness(1.05); }
.gd-pause { background: #fff; color: #1b1d24; }
.gd-pause:hover { background: #f1f3f6; }
.gd-pause[aria-pressed="true"] { background: var(--wd-accent); color: var(--wd-accent-ink); }

/* her captions: the words said so far bright, the rest of the line faint */
.gd-captions { box-sizing: border-box; max-width: 100%; padding: 8px 16px; border-radius: 12px; background: rgba(12, 13, 17, 0.78); color: #fff;
  font: 600 clamp(16px, 2.2vmin, 22px)/1.4 system-ui, -apple-system, sans-serif; text-align: center; text-wrap: balance; opacity: 0; transition: opacity 0.25s; }
.gd-captions:empty { display: none; }
.gd-captions.gd-on { opacity: 1; }
.gd-captions .gd-later { color: rgba(255, 255, 255, 0.4); }

.gd-ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.gd-ideas[hidden] { display: none; }
.gd-idea { padding: 6px 12px; border: 0; border-radius: 999px; background: rgba(20, 22, 28, 0.7); color: #fff; font: 600 12.5px/1.25 system-ui, -apple-system, sans-serif; cursor: pointer; }
.gd-idea:hover { background: rgba(20, 22, 28, 0.9); }

/* Her box, at the foot of the world where the box for changing a world goes (worlds.css .wd-signup-bar), in its look.
   Signed in, you type a question; signed out, the whole box opens Sign up. */
.gd-box { position: absolute; left: 0; right: 0; bottom: 18px; box-sizing: border-box; display: flex; align-items: center; gap: 8px; width: min(640px, calc(100% - 380px)); min-width: 340px;
  margin: 0 auto; padding: 6px 6px 6px 14px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 16px; background: rgba(16, 18, 23, 0.84);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); font: 500 15px system-ui, -apple-system, sans-serif; }
.gd-box[hidden] { display: none; }
.gd-box:focus-within, .gd-box:focus-visible { outline: 2px solid var(--wd-focus); outline-offset: 2px; }
.gd-box input { flex: 1; min-width: 0; height: 34px; padding: 7px 0; box-sizing: border-box; border: 0; background: transparent; color: #fff; font: inherit; outline: none; }
.gd-box input::placeholder { color: #c3c8d0; opacity: 1; }
.gd-box-send { flex: none; display: inline-flex; align-items: center; height: 34px; padding: 0 16px; border: 0; border-radius: 10px; background: var(--wd-accent); color: var(--wd-accent-ink);
  font: 700 14px system-ui, sans-serif; white-space: nowrap; cursor: pointer; }
.gd-box-send:hover { filter: brightness(1.06); }
.gd-box-signup { cursor: pointer; }
.gd-box-signup:hover { border-color: rgba(95, 227, 106, 0.55); }
.gd-box-short { display: none; }
.gd-box-text { flex: 1; min-width: 0; padding: 7px 0; color: #c3c8d0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* back from signing up part way round: the touch that lets her voice start */
.gd-carry { background: #ffd166; color: #1b1d24; }
.gd-carry:hover { background: #ffd166; filter: brightness(1.05); }

/* Tour mode: what would change the world is for your own copy, once the tour's over */
.wd-stage.gd-touring .wd-signup-bar, .wd-stage.gd-touring .wd-copy-form, .wd-stage.gd-touring [data-world-target="copyButton"] { display: none; }

.gd-note { margin: 0; padding: 6px 14px; border-radius: 10px; background: rgba(20, 22, 28, 0.85); color: #ffe9b0; font: 600 13px/1.4 system-ui, -apple-system, sans-serif; text-align: center; }
.gd-note[hidden], .gd-note-link[hidden] { display: none; }
.gd-note-link { color: var(--wd-accent); font-weight: 700; }

/* a phone (worlds.css's own): the box above the world's stick and buttons, the panel above that */
@media (max-width: 760px), (max-height: 520px) and (pointer: coarse) {
  .gd-box { bottom: calc(152px + env(safe-area-inset-bottom, 0px)); width: calc(100% - 24px); min-width: 0; }
  .gd-panel { bottom: calc(212px + env(safe-area-inset-bottom, 0px)); }
  .gd-box-long { display: none; }
  .gd-box-short { display: inline; }
}
@media (max-width: 600px) {
  .gd-start { top: auto; bottom: calc(150px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); }
}
