/* Site pages about dictation and tidying: the task window with the text, the dictation layer and the tidy button. */

.feature-window { display: flex; flex-direction: column; gap: 10px; min-height: 420px; }
.feature-window--short { min-height: 0; }
.feature-window .panel-modes { margin-left: -12px; }
/* In the app the buttons light up when the text is hovered; here they are always in sight, with the label. */
.feature-stage :is(.dictation, .tidy) { opacity: 1; }
.feature-stage .dictation-label { max-width: none; margin-left: 9px; }
.feature-stage .dictation-layer { padding: 24px; }

/* The task text as #prompt-text shows it. */
.feature-prompt {
  flex-grow: 1; margin: 0; padding: 16px 0;
  border-block: 1px solid var(--rule);
  font-size: 15px; line-height: 1.65; color: var(--fg-prompt); white-space: pre-line; overflow-wrap: anywhere;
}
.feature-prompt--empty { min-height: 120px; color: var(--tick); }
.feature-prompt--typing::after { content: ""; display: inline-block; width: 1px; height: 1.2em; margin-left: 2px; vertical-align: text-bottom; background: var(--fg-strong); animation: feature-caret 1s steps(1) infinite; }
@keyframes feature-caret { 50% { opacity: 0; } }

/* The wave slides by one period of its lines; the edges fade like the app's wave. */
.feature-wave {
  color: var(--fg-strong);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 28%, #000 72%, transparent);
}
.feature-wave path { stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; animation: feature-wave 6s linear infinite; }
.feature-wave .feature-wave-b { animation-duration: 8s; animation-direction: reverse; }
.feature-wave .feature-wave-c { animation-duration: 11s; }
@keyframes feature-wave { to { transform: translateX(-720px); } }

/* Before and after tidying, side by side. */
.feature-compare { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(24px, 4vw, 56px); padding-bottom: 72px; }
.feature-compare .prompt-box { gap: 12px; }
.feature-compare .feature-prompt { color: var(--muted); }
.feature-compare .prompt-box + .prompt-box .feature-prompt { color: var(--fg-prompt); }
.feature-toast { position: absolute; bottom: 22px; }

.feature-states { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 18px; padding-block: 48px; }
.feature-states .prompt-box { flex: 0 0 auto; }
.feature-states-arrow { color: var(--tick); }

@media (prefers-reduced-motion: reduce) {
  .feature-wave path, .feature-prompt--typing::after { animation: none; }
}

@media (max-width: 768px) {
  .feature-window { min-height: 360px; }
  .feature-window--short { min-height: 0; }
  .feature-compare { grid-template-columns: 1fr; }
  .feature-states { flex-direction: column; padding-block: 28px; }
  .feature-states-arrow { transform: rotate(90deg); }
}
