/* Dallas has no brand of its own: it lives in Discord. The name takes the bot's
   embed purple, set in Noto Sans, the open font Discord falls back to. */
@font-face {
  font-family: 'Dallas Noto';
  font-weight: 800;
  font-display: swap;
  src: url('/fonts/signoffs/dallas-noto-800.woff2') format('woff2');
}
@font-face {
  font-family: 'Dallas Noto';
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/signoffs/dallas-noto-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Dallas Noto';
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/signoffs/dallas-noto-600.woff2') format('woff2');
}

[data-signoff='dallas'] {
  --dl-purple: #7b68ee;
  --dl-card: #f2f3f5;
  --dl-head: #060607;
  --dl-muted: #5c5e66;
  --dl-link: #006ce7;
  --dl-react-bg: rgba(88, 101, 242, 0.12);
  --dl-react-ink: #4752c4;
}
.dark [data-signoff='dallas'] {
  --dl-card: #2b2d31;
  --dl-head: #f2f3f5;
  --dl-muted: #949ba4;
  --dl-link: #00a8fc;
  --dl-react-bg: rgba(88, 101, 242, 0.15);
  --dl-react-ink: #dee0fc;
}

[data-signoff='dallas'] .dl-name {
  --b-font: 'Dallas Noto', 'Noto Sans', system-ui, sans-serif;
  --b-weight: 800;
  --b-fit: 0.2;
  --b-crop: 14%;
  --b-tracking: -0.045em;
  --b-ink: var(--dl-purple);
  --b-ink-dark: #9d8ff3;
  align-items: flex-start;
}

[data-signoff='dallas'] .dl-word {
  all: unset;
  pointer-events: auto;
  cursor: pointer;
  border-radius: 0.06em;
}
[data-signoff='dallas'] .dl-word:focus-visible {
  outline: 2px solid var(--dl-purple);
  outline-offset: 4px;
}

/* Everything beside the name: idle typing dots, then the reaction and thread.
   Noto's line box puts the ascender top 0.03em below the row's top, so the
   column starts on the line the d and the l's start on. */
[data-signoff='dallas'] .dl-side {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0.05em 0 0 0.1em;
  font-family: 'Dallas Noto', 'Noto Sans', system-ui, sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 18px;
  letter-spacing: 0;
  color: var(--dl-muted);
  pointer-events: auto;
}

[data-signoff='dallas'] .dl-side > * {
  transition: opacity 0.3s ease-out;
}
[data-signoff='dallas'] .dl-side[data-leaving] > * {
  opacity: 0;
}

[data-signoff='dallas'] .dl-dots {
  display: inline-flex;
  animation: dl-in 0.3s ease-out;
  gap: 3px;
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--dl-card);
}
[data-signoff='dallas'] .dl-typing .dl-dots {
  padding: 0;
  background: none;
}
[data-signoff='dallas'] .dl-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.3;
  animation: dl-blink 1.4s infinite both;
}
[data-signoff='dallas'] .dl-dots i:nth-child(2) {
  animation-delay: 0.2s;
}
[data-signoff='dallas'] .dl-dots i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes dl-blink {
  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: scale(0.85);
  }
  30% {
    opacity: 1;
    transform: scale(1);
  }
}

[data-signoff='dallas'] .dl-react {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 2px 8px 2px 6px;
  border: 1px solid #5865f2;
  border-radius: 8px;
  background: var(--dl-react-bg);
  color: var(--dl-react-ink);
  font-weight: 600;
  animation: dl-pop 0.35s cubic-bezier(0.3, 1.6, 0.5, 1);
}
[data-signoff='dallas'] .dl-react img {
  width: 16px;
  height: 16px;
}
@keyframes dl-pop {
  from {
    transform: scale(0.4);
    opacity: 0;
  }
}

[data-signoff='dallas'] .dl-thread {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: min(300px, 30cqw);
  padding: 8px;
  border-radius: 4px;
  background: var(--dl-card);
  animation: dl-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes dl-in {
  from {
    transform: translateY(4px);
    opacity: 0;
  }
}
[data-signoff='dallas'] .dl-tn,
[data-signoff='dallas'] .dl-last {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  white-space: nowrap;
}
[data-signoff='dallas'] .dl-tn b {
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--dl-head);
  font-weight: 600;
}
[data-signoff='dallas'] .dl-tn span {
  color: var(--dl-link);
  font-weight: 600;
}
[data-signoff='dallas'] .dl-last i {
  flex: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--dl-purple);
}
[data-signoff='dallas'] .dl-last b {
  color: var(--dl-purple);
  font-weight: 600;
}
[data-signoff='dallas'] .dl-last span {
  overflow: hidden;
  text-overflow: ellipsis;
  animation: dl-in 0.25s ease-out;
}
[data-signoff='dallas'] .dl-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}
[data-signoff='dallas'] .dl-typing b {
  color: var(--dl-head);
  font-weight: 600;
}

/* On a phone the name fills the width, so the chat sits above it, right-aligned. */
@container (max-width: 640px) {
  [data-signoff='dallas'] .dl-side {
    position: absolute;
    right: 0;
    bottom: calc(100% - 0.03em + 10px);
    align-items: flex-end;
    margin: 0;
    font-size: 13px;
  }
  [data-signoff='dallas'] .dl-thread {
    width: min(280px, 100cqw - 48px);
  }
}

[data-signoff='dallas'] .dl-scene {
  background: linear-gradient(transparent 30%, #efedfd);
}
.dark [data-signoff='dallas'] .dl-scene {
  background: linear-gradient(transparent 30%, #221f36);
}
