/* ---- The client brain's own look ------------------------------------------------------------------------
   Brad is the brain's face: one mark, one accent, used wherever Brad speaks or is offered, so the brain
   reads as a product of its own inside RADAR. Everything else on its pages is the UI kit. */

@layer components {
  .brad-mark {
    background-image: linear-gradient(135deg, #2563eb 0%, #6366f1 55%, #22d3ee 130%);
  }
  /* While Brad is working, a soft ring breathes around the mark. */
  .brad-mark-working::after {
    content: "";
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid color-mix(in oklab, #6366f1 60%, transparent);
    animation: brad-breathe 1.6s ease-in-out infinite;
  }
  @keyframes brad-breathe {
    0%, 100% { opacity: 0.15; transform: scale(0.96); }
    50% { opacity: 0.9; transform: scale(1.06); }
  }

  /* The welcome's backdrop: a faint glow behind Brad, the same in both themes. */
  .brad-stage {
    background-image: radial-gradient(60rem 22rem at 50% -6rem, color-mix(in oklab, #6366f1 14%, transparent), transparent 70%);
  }

  /* The ask box: the question in one roomy field, with the client it's about and the send button on a bar
     beneath, all inside one border that lights up while either has focus. */
  .brad-composer {
    border: 1px solid var(--color-gray-300);
    border-radius: 0.875rem;
    background-color: var(--color-surface);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.05), 0 8px 24px -12px color-mix(in oklab, #6366f1 35%, transparent);
    transition: border-color 150ms, box-shadow 150ms;
  }
  .brad-composer:focus-within {
    border-color: var(--color-blue-600);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-blue-600) 22%, transparent), 0 8px 24px -12px color-mix(in oklab, #6366f1 35%, transparent);
  }
  .brad-composer-input {
    display: block;
    width: 100%;
    min-height: 3.25rem;
    padding: 0.875rem 1rem 0.625rem;
    border: 0;
    border-radius: 0.875rem 0.875rem 0 0;
    background: transparent;
    font-size: 1rem;
    line-height: 1.5rem;
    color: var(--color-gray-900);
    outline: none;
  }
  .brad-composer-input::placeholder { color: var(--color-gray-400); }
  .brad-composer-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-top: 1px solid var(--color-gray-100);
  }

  /* The brain's name, in Brad's colours. */
  .brad-wordmark {
    background-image: linear-gradient(90deg, #2563eb, #6366f1 60%, #0891b2);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  html.dark .brad-wordmark {
    background-image: linear-gradient(90deg, #60a5fa, #a5b4fc 60%, #67e8f9);
  }

  /* A search hit's matched words. */
  .brain-excerpt mark {
    border-radius: 0.25rem;
    padding: 0 0.125rem;
    background-color: color-mix(in oklab, #facc15 35%, transparent);
    color: inherit;
  }
}

/* The client switcher's rows (brad-switcher). The row picked with the arrow keys is the highlighted one. */
@layer components {
  .brad-switcher-option {
    display: flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.75rem;
    border-radius: 0.625rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--color-gray-800);
  }
  .brad-switcher-option:hover {
    background-color: var(--color-gray-50);
  }
  .brad-switcher-option[aria-selected="true"] {
    background-color: color-mix(in oklab, #6366f1 12%, transparent);
    color: var(--color-gray-900);
  }
}
