/* ============================================================
   leo.css — Shared Leo chat example component.

   The single source of truth for every "Leo" conversation
   example across the site (capability pages, homepage, and any
   future placements). Include after style.css:

     <link rel="stylesheet" href="/leo.css" />

   Markup pattern:

     <div class="leo-chat" aria-hidden="true">
       <div class="leo-chat__msg leo-chat__msg--user">Question…</div>
       <div class="leo-chat__msg leo-chat__msg--bot">
         <span class="leo-chat__tag">Leo</span>
         <p class="leo-chat__body">Answer…</p>
         <a class="leo-chat__link">View details <span class="leo-chat__arrow">&rarr;</span></a>
       </div>
     </div>

   For action confirmations, replace the body/link with:

     <div class="leo-chat__confirm">
       <div class="leo-chat__confirm-check">…check svg…</div>
       <span class="leo-chat__confirm-text">Done &mdash; <span class="leo-chat__confirm-link">view</span></span>
     </div>

   Design contract: dark grid panel, copper user bubble,
   translucent Leo bubble, white text, copper links.
============================================================ */

.leo-chat {
  position: relative;
  width: 100%;
  min-height: 280px;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 50%, rgba(252, 147, 101, 0.18), transparent 65%),
    linear-gradient(135deg, #1a1a1a, #2a2320);
  padding: 1.5rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  justify-content: center;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
}

.leo-chat::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(252, 147, 101, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(252, 147, 101, 0.05) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
}

.leo-chat__msg {
  position: relative;
  padding: 0.625rem 0.875rem;
  border-radius: 10px;
  max-width: 80%;
  font-size: 0.6875rem;
  line-height: 1.4;
}

.leo-chat__msg--user {
  background: rgba(252, 147, 101, 0.18);
  color: var(--color-white);
  align-self: flex-end;
  border: 0.5px solid rgba(252, 147, 101, 0.3);
  border-bottom-right-radius: 3px;
}

.leo-chat__msg--bot {
  background: rgba(255, 255, 255, 0.06);
  color: var(--color-white);
  align-self: flex-start;
  border: 0.5px solid rgba(255, 255, 255, 0.1);
  border-bottom-left-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 0.3125rem;
}

.leo-chat__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.46875rem;
  color: rgba(252, 147, 101, 0.85);
  font-weight: var(--weight-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.leo-chat__tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fc9365, #b25d42);
}

.leo-chat__body {
  margin: 0;
  color: var(--color-white); /* beats the global p color on the dark panel */
}

.leo-chat__link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.125rem;
  font-size: 0.625rem;
  color: rgba(252, 147, 101, 0.95);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.leo-chat__link:hover {
  color: rgba(252, 147, 101, 1);
}

.leo-chat__arrow {
  display: inline-block;
  transition: transform var(--transition-fast);
}

.leo-chat__link:hover .leo-chat__arrow {
  transform: translateX(3px);
}

/* Confirmation card embedded inside a bot message */
.leo-chat__confirm {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.625rem;
  margin-top: 0.25rem;
  background: rgba(252, 147, 101, 0.1);
  border: 0.5px solid rgba(252, 147, 101, 0.35);
  border-radius: 6px;
}

.leo-chat__confirm-check {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #fc9365, #b25d42);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
  flex-shrink: 0;
}

.leo-chat__confirm-text {
  font-size: 0.625rem;
  color: var(--color-white);
  font-weight: var(--weight-semibold);
}

.leo-chat__confirm-link {
  color: rgba(252, 147, 101, 1);
  text-decoration: underline;
  cursor: pointer;
}

/* Linked-entity list inside a bot message (e.g. drivers -> loads) */
.leo-chat__list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 0.25rem 0 0;
  padding: 0.5rem 0.625rem;
  background: rgba(255, 255, 255, 0.04);
  border: 0.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  list-style: none;
}

.leo-chat__list-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.625rem;
  color: rgba(255, 255, 255, 0.85);
}

.leo-chat__list-link {
  color: rgba(252, 147, 101, 0.95);
  text-decoration: underline;
  cursor: pointer;
  font-weight: var(--weight-semibold);
}

.leo-chat__list-sep {
  color: rgba(255, 255, 255, 0.4);
}

.leo-chat__list-muted {
  color: rgba(255, 255, 255, 0.55);
}
