/* 0.61.92-alpha — compact mobile handoff card + always-visible decision CTAs.
   Exact scope: Inbox human handoff only. */

@media (max-width: 900px) {
  .vchat-frontend-app .vchat-handoff-strip[data-state="waiting"],
  .vchat-frontend-app .vchat-handoff-strip[data-state="assigned"] {
    margin: 8px 10px 6px !important;
    padding: 10px 11px !important;
    grid-template-columns: 34px minmax(0,1fr) !important;
    gap: 8px 10px !important;
    align-items: start !important;
    max-height: none !important;
    overflow: hidden !important;
    border-radius: 15px !important;
  }

  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-mark {
    width: 34px !important;
    height: 34px !important;
    border-radius: 11px !important;
  }

  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-kicker {
    gap: 6px !important;
    flex-wrap: nowrap !important;
    min-width: 0 !important;
  }

  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-kicker span {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    font-size: 10px !important;
    letter-spacing: .075em !important;
  }

  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-kicker em {
    flex: 0 0 auto !important;
    padding: 3px 6px !important;
    font-size: 9.5px !important;
    white-space: nowrap !important;
  }

  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-copy > strong {
    font-size: 14px !important;
    line-height: 1.2 !important;
  }

  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-copy > small {
    font-size: 11px !important;
    line-height: 1.25 !important;
  }

  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-copy > p {
    margin-top: 2px !important;
    font-size: 11.5px !important;
    line-height: 1.35 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 2 !important;
    overflow: hidden !important;
  }

  /* The full transfer summary remains available in desktop/activity history.
     Mobile prioritizes the three decisions that must always be reachable. */
  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-summary {
    display: none !important;
  }

  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-actions {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0,1fr)) !important;
    gap: 6px !important;
    padding-top: 2px !important;
    margin: 0 !important;
  }

  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-actions button {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 34px !important;
    height: 34px !important;
    padding: 0 6px !important;
    border-radius: 10px !important;
    font-size: 11px !important;
    line-height: 1 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .vchat-frontend-app .vchat-handoff-strip #vchat-handoff-compact {
    display: none !important;
  }

  /* Keep the meaning but shorten the visual label on narrow screens. */
  .vchat-frontend-app .vchat-handoff-strip #vchat-handoff-return-ai {
    font-size: 0 !important;
  }
  .vchat-frontend-app .vchat-handoff-strip #vchat-handoff-return-ai::after {
    content: '↩ AI';
    font-size: 11px !important;
    font-weight: 850 !important;
    line-height: 1 !important;
  }
}

/* Phone landscape: use one-line context so the card never consumes the chat. */
@media (max-height: 650px) and (pointer: coarse) {
  .vchat-frontend-app .vchat-handoff-strip[data-state="waiting"],
  .vchat-frontend-app .vchat-handoff-strip[data-state="assigned"] {
    margin-top: 5px !important;
    margin-bottom: 4px !important;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
  }
  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-copy > p {
    -webkit-line-clamp: 1 !important;
  }
  .vchat-frontend-app .vchat-handoff-strip .vchat-handoff-copy > small {
    display: none !important;
  }
}
