/* The guided showcase of the sign in page (public/assets/js/showcase/showcase.js): a compact row of tabs above
   one Discord window, with one sentence below. Around the window only the panel's tokens are used; inside it
   discord.css draws Discord. Motion is 180 to 260ms on the panel's easing and stops with reduced motion. */

.showcase { width: min(560px, 100%); min-width: 0; display: grid; align-content: start; gap: var(--space-3); }
.sc-guide, .sc-panel, .sc-bot-panel { display: grid; gap: var(--space-3); min-width: 0; }

/* Tabs: the bots as two labelled cards, the steps as a quiet underlined row. */
.sc-tabs { display: flex; min-width: 0; }
.sc-tabs button {
  margin: 0; border: 0; background: none; color: var(--ink-3); font: inherit; cursor: pointer;
  transition: color 180ms cubic-bezier(0.2, 0, 0, 1), border-color 180ms cubic-bezier(0.2, 0, 0, 1), box-shadow 180ms cubic-bezier(0.2, 0, 0, 1);
}
.sc-tabs button:hover { color: var(--ink); }
.sc-tabs button[aria-selected='true'] { color: var(--ink); }

.sc-bots { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--space-2); }
.sc-bots button {
  display: grid; gap: 2px; align-content: start; padding: var(--space-2) var(--space-3); text-align: left;
  border: 1px solid var(--rule); border-radius: var(--radius-s);
}
.sc-bots button:hover { border-color: var(--rule-strong); }
.sc-bots button[aria-selected='true'] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sc-bot-name { font-family: var(--font-display); font-size: var(--step-0); font-weight: 650; color: var(--ink); line-height: 1.25; }
.sc-bot-what { font-size: var(--step--1); line-height: 1.35; }

.sc-steps { flex-wrap: wrap; gap: 0 var(--space-1); border-bottom: 1px solid var(--rule); }
.sc-steps button {
  position: relative; padding: 6px var(--space-2) 8px; font-size: var(--step--1); font-weight: 550; white-space: nowrap;
}
.sc-steps button::after {
  content: ''; position: absolute; left: var(--space-2); right: var(--space-2); bottom: -1px; height: 2px; border-radius: 2px;
  background: var(--accent); transform: scaleX(0); transition: transform 220ms cubic-bezier(0.2, 0, 0, 1);
}
.sc-steps button[aria-selected='true']::after { transform: scaleX(1); }
.sc-steps button[aria-selected='true'] { color: var(--accent-text); }

/* The options of a command (the moderation action, the leaderboard type). */
.sc-choice { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.sc-choice button {
  min-height: 32px; padding: 4px 12px; border: 1px solid var(--rule); border-radius: var(--radius-pill);
  background: none; color: var(--ink-2); font: inherit; font-size: var(--step--1); cursor: pointer;
  transition: color 180ms cubic-bezier(0.2, 0, 0, 1), background-color 180ms cubic-bezier(0.2, 0, 0, 1), border-color 180ms cubic-bezier(0.2, 0, 0, 1);
}
.sc-choice button:hover { border-color: var(--rule-strong); color: var(--ink); }
.sc-choice button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* The window keeps one height on every step and scrolls inside, like a Discord channel. */
.sc-window { min-width: 0; animation: sc-fade 220ms cubic-bezier(0.2, 0, 0, 1); }
.sc-window .dc-window { width: 100%; }
.sc-window .dc-body {
  height: clamp(360px, 56vh, 460px); overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  scrollbar-width: thin; scrollbar-color: #1a1b1e transparent;
}
.sc-window .dc-body:focus { outline: none; }
.sc-window .dc-body:focus-visible { outline: 2px solid #00a8fc; outline-offset: -2px; }
.sc-arrive > .dc-msg { animation: sc-arrive 240ms cubic-bezier(0.2, 0, 0, 1); }
@keyframes sc-arrive { from { opacity: 0; transform: translateY(6px); } }
@keyframes sc-fade { from { opacity: 0; } }

.sc-caption { margin: 0; min-height: calc(2 * 1.45em); font-size: var(--step--1); line-height: 1.45; color: var(--ink-2); text-wrap: pretty; }
.sc-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* While the language loads, the frame already has its final size, so nothing jumps. */
.sc-placeholder { height: 35px; }
.sc-guide[aria-busy='true'] .dc-head { height: 48px; }

@media (max-width: 480px) {
  .sc-window .dc-body { height: clamp(380px, 62vh, 480px); }
  .sc-steps button { padding-left: 6px; padding-right: 6px; }
  .sc-steps button::after { left: 6px; right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  .showcase *, .showcase *::before, .showcase *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
