/* ---------- Composer ---------- */
.chat:empty { display: none; }

.page:has(.chat:empty) .composer-wrap {
  margin: auto;
  width: 100%;
  max-width: 720px;
}

.page:has(.chat:empty) .footer-note {
  position: absolute;
  bottom: 14px;
  left: 0;
  right: 0;
  width: auto;
  max-width: none;
  margin: 0 auto;
  text-align: center;
}

.composer-wrap {
  padding: 12px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.composer-wrap > * {
  width: 100%;
  max-width: 900px;
}

.footer-note {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  margin-top: 10px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-warn { font-size: 0.7rem; opacity: 0.85; }

.file-chip { align-self: flex-start; width: auto; max-width: 100%; }

.file-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-size: 0.82rem;
  margin-bottom: 10px;
  max-width: 100%;
}

.file-chip.hidden { display: none; }

.file-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 260px;
}

.file-remove {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: none;
  background: #f0f1f6;
  color: var(--text-muted);
  font-size: 0.65rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.file-remove:hover { background: #d1fae5; color: #047857; }

.composer {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f0f1f5;
  border: 1px solid #e2e4ec;
  border-radius: 24px;
  padding: 6px 6px 6px 12px;
}

.composer:focus-within { border-color: var(--accent); }

.composer-btn {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.95rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.composer-btn:hover {
  color: var(--accent-dark);
  background: #f0f1f6;
}

.input-wrap {
  position: relative;
  flex: 1;
  display: flex;
}

#input {
  flex: 1;
  background: transparent;
  color: var(--text);
  border: none;
  padding: 10px 4px;
  font-size: 0.95rem;
  font-family: inherit;
  resize: none;
  max-height: 140px;
  outline: none;
}

#input::placeholder { color: var(--text-muted); }

.send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 0.95rem;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.send-btn svg { display: block; }

.send-btn:hover { background: var(--accent-dark); }
.send-btn:disabled { opacity: 0.5; cursor: default; }
