/* ==========================================================================
   The guided tour of the meme editor - see meme-tour.js.

   Nothing in here takes clicks except the card itself: the dimming and the
   lit frame let everything through, so the part being explained can be
   used while it is being explained.
   ========================================================================== */

.mt-root {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
}

/* One sheet over the whole page, with a hole cut for each lit part (the
   holes are a clip-path set from the script). With nothing to point at,
   there are no holes and the page dims evenly. */
.mt-dim {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--tool-bg, #05030c) 60%, transparent);
}

/* A frame round each lit part. */
.mt-spot {
  position: fixed;
  border: 2px solid var(--tool-a1, #ff2d95);
  border-radius: 10px;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--tool-a1, #ff2d95) 25%, transparent);
  transition: left 0.25s ease, top 0.25s ease, width 0.25s ease, height 0.25s ease;
}

.mt-card {
  position: fixed;
  width: 22rem;
  max-width: calc(100vw - 16px);
  padding: 1rem 1.1rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: var(--tool-panel, #15121f);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  color: var(--tool-fg, #f2f0f7);
  font-size: 0.86rem;
  line-height: 1.5;
  pointer-events: auto;
  transition: left 0.25s ease, top 0.25s ease;
}

.mt-card.is-centred {
  left: 50% !important;
  top: 50% !important;
  transform: translate(-50%, -50%);
}

/* On a phone there is no room beside anything, so the card sits along the
   bottom and the lit part is above it. */
.mt-card.is-docked,
.mt-card.is-docked.is-centred {
  left: 8px !important;
  right: 8px;
  top: auto !important;
  bottom: 8px;
  width: auto;
  transform: none;
}

.mt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mt-count {
  color: var(--tool-mute, #8b889b);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
}

.mt-x {
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--tool-mute, #8b889b);
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.mt-x:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.mt-bar {
  height: 3px;
  margin: 0.45rem 0 0.75rem;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.mt-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--tool-a1, #ff2d95), var(--tool-a3, #ffc61a), var(--tool-a2, #19e3ff));
}

.mt-title {
  margin: 0 0 0.35rem;
  font-family: 'Unbounded', 'Space Grotesk', sans-serif;
  font-size: 1rem;
  font-weight: 700;
}

.mt-text {
  margin: 0;
  color: var(--tool-fg2, #d9d5e6);
}

.mt-text b,
.mt-try b {
  color: #fff;
}

.mt-note {
  margin: 0.6rem 0 0;
  color: var(--tool-a3, #ffc61a);
  font-size: 0.78rem;
}

.mt-try {
  margin: 0.7rem 0 0;
  padding: 0.5rem 0.65rem;
  border-left: 3px solid var(--tool-a2, #19e3ff);
  border-radius: 6px;
  background: color-mix(in srgb, var(--tool-a2, #19e3ff) 8%, transparent);
  font-size: 0.82rem;
}

.mt-try.is-done {
  border-left-color: var(--tool-a4, #2ee6a8);
  background: color-mix(in srgb, var(--tool-a4, #2ee6a8) 12%, transparent);
  color: var(--tool-a4, #2ee6a8);
  font-weight: 600;
}

.mt-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.mt-right {
  display: inline-flex;
  gap: 0.4rem;
}

.mt-btn {
  padding: 0.45rem 0.95rem;
  border: 1px solid var(--tool-a1, #ff2d95);
  border-radius: 999px;
  background: var(--tool-a1, #ff2d95);
  color: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.mt-btn:hover {
  filter: brightness(1.1);
}

.mt-btn.mt-ghost {
  background: transparent;
  color: var(--tool-fg, #f2f0f7);
  border-color: rgba(255, 255, 255, 0.22);
}

.mt-btn.is-ready {
  animation: mt-pulse 0.9s ease-in-out infinite alternate;
}

@keyframes mt-pulse {
  to { box-shadow: 0 0 0 6px color-mix(in srgb, var(--tool-a1, #ff2d95) 25%, transparent); }
}

/* --------------------------------------------------------- the button --- */

.meme-topbar {
  position: relative;
}

.meme-guide-btn {
  margin-left: 0.6rem;
  padding: 0.35rem 0.8rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: transparent;
  color: var(--tool-fg, #f2f0f7);
  font: inherit;
  font-size: 0.78rem;
  vertical-align: middle;
  cursor: pointer;
}

.meme-guide-btn:hover,
.meme-guide-btn.is-on {
  border-color: var(--tool-a1, #ff2d95);
  color: #fff;
}

/* The first-visit hint. Small, beside the button, and gone for good once
   closed. */
.mt-nudge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-left: 0.6rem;
  padding: 0.3rem 0.35rem 0.3rem 0.75rem;
  border-radius: 999px;
  background: var(--tool-a1, #ff2d95);
  color: #fff;
  font-size: 0.75rem;
  vertical-align: middle;
  animation: mt-pulse 1.1s ease-in-out infinite alternate;
}

.mt-nudge button {
  border: 0;
  background: transparent;
  color: #fff;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  cursor: pointer;
}

.mt-nudge .mt-nudge-x {
  text-decoration: none;
  font-size: 1rem;
  line-height: 1;
  opacity: 0.8;
}

@media (prefers-reduced-motion: reduce) {
  .mt-spot,
  .mt-card {
    transition: none;
  }
  .mt-btn.is-ready,
  .mt-nudge {
    animation: none;
  }
}

/* ------------------------------------------------------------ folding --- */

.mt-top-btns {
  display: inline-flex;
  gap: 0.15rem;
}

/* Tucked away, the card is a small pill in the bottom corner. */
.mt-card.is-folded {
  left: auto !important;
  top: auto !important;
  right: 16px;
  bottom: 16px;
  width: auto;
  padding: 0;
  border-radius: 999px;
  transform: none;
}

.mt-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

/* Short windows: a tighter card, so more of the picture stays clear. */
@media (max-height: 720px) {
  .mt-card {
    width: 19rem;
    padding: 0.75rem 0.9rem 0.7rem;
    font-size: 0.8rem;
    line-height: 1.42;
  }
  .mt-title {
    font-size: 0.92rem;
  }
  .mt-bar {
    margin: 0.35rem 0 0.55rem;
  }
  .mt-actions {
    margin-top: 0.65rem;
  }
}

/* Lists and asides inside a step's text. */
.mt-list {
  margin: 0.5rem 0 0;
  padding: 0 0 0 1.05rem;
}

.mt-list li {
  margin: 0 0 0.3rem;
}

.mt-list li::marker {
  color: var(--tool-a1, #ff2d95);
}

.mt-aside {
  margin: 0.55rem 0 0;
}

