/* ----------------------------------------------------------------------------
   composer.css — The message composer row: input bar, send button, attach button and the
   Gmail connect/disconnect pill.
   Slice 11 of 16 (see css/tokens.css for the full load order).
   ------------------------------------------------------------------------- */
/* Matches the input/send height so the three sit on one line. The svg rule is
   load-bearing: without an explicit size the icon renders at its intrinsic
   32px and fills the button edge to edge. 18/38 keeps the same glyph-to-button
   ratio as .icon-btn (15/30). */
.attach-btn {
  flex-shrink: 0;
  height: 38px;
  width: 38px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.attach-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.attach-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

/* Gmail connect/disconnect, sitting beside .attach-btn in the composer. A pill
   rather than a circle because it carries a label: disconnected it has to SAY
   what it does, and connected it shows which mailbox the assistant can read —
   an icon alone would leave that ambiguous, which is the one thing this control
   must never be. Height matches .attach-btn so the row stays on one line. */
.gmail-btn {
  flex-shrink: 0;
  height: 38px;
  max-width: 40%;
  padding: 0 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  border-radius: var(--radius-pill);
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}

.gmail-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  flex-shrink: 0;
}

/* A long address must shrink the label, never the icon or the message input. */
.gmail-btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gmail-btn:hover {
  color: var(--text);
  background: var(--surface-2);
  border-color: var(--border-strong);
}

.gmail-btn:disabled {
  opacity: 0.6;
  cursor: default;
}

/* Connected reads as a live capability, not a call to action — so it collapses
   to the lit icon alone and gives the width back to the message input. Which
   mailbox is connected stays available in the button's tooltip, and in the
   disconnect dialog; it does not need to sit in the composer permanently. */
.gmail-btn.connected {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  width: 38px;
  padding: 0;
  justify-content: center;
}

.gmail-btn.connected span {
  display: none;
}

.gmail-btn.connected:hover {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
}

@media (max-width: 640px) {
  /* Phone composer: the address would crowd the input off the row. */
  .gmail-btn {
    padding: 0;
    width: 38px;
    justify-content: center;
  }

  .gmail-btn span {
    display: none;
  }
}

.chat-view.dragover .chat-messages {
  outline: 2px dashed var(--accent);
  outline-offset: -8px;
  border-radius: var(--radius);
}

