/* clir Dictate's moving demo (js/dictate/demo.js): a Mac window, the right ⌥
   key, the listening pill. Used by the product page (clir.ai/dictate) and the
   checkout (clir.ai/dictate/start); its colours are its own, so it looks the
   same on both. */

.dd {
  --dd-mint: #22D3A0;
  --dd-on-mint: #04140E;
  --dd-line: rgba(255, 255, 255, 0.10);
  --dd-text-2: #A1A1A6;
  --dd-text-3: #8E8E93;
  --dd-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dd-font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, sans-serif;
  color: #fff;
  font-family: var(--dd-font);
  text-align: left;
}
.dd { position: relative; padding-top: 4px; }
.dd__window {
  border-radius: 14px; overflow: hidden; background: #1C1C1E;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.10), 0 24px 60px rgba(0, 0, 0, 0.6);
  transition: opacity 0.25s var(--dd-ease);
}
.dd.is-switching .dd__window { opacity: 0.35; }
.dd__bar { position: relative; display: flex; align-items: center; gap: 7px; padding: 10px 12px; background: #2A2A2C; }
.dd__bar i { width: 11px; height: 11px; border-radius: 50%; background: #FF5F57; }
.dd__bar i:nth-child(2) { background: #FEBC2E; }
.dd__bar i:nth-child(3) { background: #28C840; }
.dd__app { position: absolute; left: 50%; transform: translateX(-50%); font-size: 12.5px; font-weight: 700; color: var(--dd-text-2); }
.dd__where { padding: 9px 16px; border-bottom: 1px solid var(--dd-line); font-size: 13px; color: var(--dd-text-3); }
.dd__field { padding: 14px 16px 20px; min-height: 118px; font-size: 15.5px; line-height: 1.5; color: #fff; }
.dd__text { border-radius: 4px; }
.dd[data-state="done"] .dd__text { animation: dd-paste 0.9s var(--dd-ease); }
@keyframes dd-paste { from { background: rgba(34, 211, 160, 0.38); } to { background: rgba(34, 211, 160, 0); } }
.dd__caret { display: inline-block; width: 2px; height: 1.15em; margin-left: 1px; vertical-align: -3px; background: var(--dd-mint); animation: dd-blink 1s steps(1) infinite; }
@keyframes dd-blink { 50% { opacity: 0; } }

.dd__pill {
  position: absolute; left: 50%; bottom: 64px; z-index: 2;
  display: flex; align-items: center; gap: 9px; max-width: 90%;
  padding: 8px 14px 8px 10px; border-radius: 999px;
  background: rgba(24, 24, 26, 0.94); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14), 0 10px 28px rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transform: translate(-50%, 8px); transition: opacity 0.2s var(--dd-ease), transform 0.2s var(--dd-ease);
  white-space: nowrap; pointer-events: none;
}
.dd[data-state="listening"] .dd__pill { opacity: 1; transform: translate(-50%, 0); }
.dd__mic { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--dd-mint); color: var(--dd-on-mint); flex: none; }
.dd__mic svg { width: 13px; height: 13px; }
.dd__wave { display: flex; align-items: center; gap: 2.5px; height: 18px; flex: none; }
.dd__wave i { width: 3px; height: 5px; border-radius: 2px; background: var(--dd-mint); animation: dd-wave 0.9s ease-in-out infinite; }
.dd__wave i:nth-child(2) { animation-delay: 0.15s; }
.dd__wave i:nth-child(3) { animation-delay: 0.3s; }
.dd__wave i:nth-child(4) { animation-delay: 0.45s; }
.dd__wave i:nth-child(5) { animation-delay: 0.6s; }
@keyframes dd-wave { 0%, 100% { height: 5px; } 50% { height: 17px; } }
.dd__live { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13.5px; font-weight: 600; color: #fff; }

.dd__key { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 18px; color: var(--dd-text-2); font-size: 14.5px; font-weight: 700; }
.dd__cap {
  min-width: 44px; height: 38px; padding: 0 12px; border-radius: 9px; display: grid; place-items: center;
  font: 600 18px var(--dd-font); color: #fff; background: linear-gradient(#3A3A3C, #2C2C2E);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 0 0 1px rgba(255, 255, 255, 0.12), 0 3px 0 #0B0B0C;
  transition: transform 0.12s, box-shadow 0.12s, background 0.12s, color 0.12s;
}
.dd[data-state="listening"] .dd__cap { transform: translateY(2px); background: var(--dd-mint); color: var(--dd-on-mint); box-shadow: 0 1px 0 #0B0B0C; }
.dd[data-state="done"] .dd__hint { color: var(--dd-mint); }

.dd--large .dd__field { min-height: 150px; font-size: 17px; }
.dd--large .dd__where { font-size: 14px; }
