/* ============================================================================
   Capi Când-IA Pro — Chat Input (Fase 2)
   Container único arredondado (radius 14) com textarea em cima e
   toolbar embaixo (clip+mic à esquerda, ⭐+send à direita).
   Focus ring dourado. File badges no topo do container.
   ============================================================================ */

.ds-chat-input-area {
  padding: 14px 28px 22px;
}

.ds-chat-input-wrap {
  background: var(--ds-surface);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 0;
  max-width: 780px;
  margin: 0 auto;
  transition: border 0.18s ease, box-shadow 0.18s ease;
}

.ds-chat-input-wrap:focus-within {
  border-color: rgba(212,160,23,0.45);
  box-shadow: 0 0 0 3px rgba(212,160,23,0.08);
}

.ds-chat-input-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px 0;
}

.ds-chat-input-files:empty {
  display: none;
}

.ds-chat-input-text {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--ds-text);
  font-family: var(--ds-font-sans);
  font-size: 14.5px;
  line-height: 1.6;
  padding: 14px 16px 4px;
  resize: none;
  outline: none;
  min-height: 24px;
  max-height: 240px;
  box-sizing: border-box;
}

.ds-chat-input-text::placeholder {
  color: var(--ds-text-muted);
}

.ds-chat-input-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px 8px;
}

.ds-chat-input-actions-left,
.ds-chat-input-actions-right {
  display: flex;
  align-items: center;
  gap: 2px;
}

.ds-chat-input-actions-right { gap: 6px; }

.ds-chat-input-icon-btn {
  background: transparent;
  border: none;
  color: var(--ds-text-2);
  padding: 7px;
  border-radius: var(--ds-radius);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.12s ease, background 0.12s ease;
  font-family: inherit;
}

.ds-chat-input-icon-btn:hover {
  color: var(--ds-text);
  background: rgba(255,255,255,0.04);
}

.ds-chat-input-icon-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
}

.ds-chat-input-favorite {
  color: var(--ds-text-muted);
}

.ds-chat-input-favorite:hover {
  color: var(--ds-gold);
}

.ds-chat-input-favorite.is-active {
  color: var(--ds-gold);
}

.ds-chat-input-send {
  background: linear-gradient(180deg, var(--ds-gold) 0%, #B8860B 100%);
  color: #0a0a0a;
  border: 1px solid rgba(255,225,150,0.20);
  width: 32px;
  height: 32px;
  border-radius: var(--ds-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15);
  transition: all 0.15s ease;
}

.ds-chat-input-send:hover:not(:disabled) {
  background: linear-gradient(180deg, var(--ds-gold-hover) 0%, var(--ds-gold) 100%);
}

.ds-chat-input-send:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.ds-chat-input-send svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: currentColor;
}

.ds-chat-input-mic-recording {
  color: var(--ds-error) !important;
  animation: ds-mic-pulse 1.2s ease-in-out infinite;
}

@keyframes ds-mic-pulse {
  0%, 100% { opacity: 1 }
  50% { opacity: 0.5 }
}

/* Hint do teclado embaixo */
.ds-chat-input-hint {
  text-align: center;
  font-size: 11px;
  color: #555;
  font-family: var(--ds-font-mono);
  margin-top: 8px;
}

.ds-chat-input-hint kbd {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 3px;
  padding: 1px 5px;
  font-size: 10px;
  font-family: inherit;
}

/* Mobile */
@media (max-width: 600px) {
  .ds-chat-input-area { padding: 10px 14px 16px }
  .ds-chat-input-text { font-size: 14px; padding: 12px 14px 4px }
  .ds-chat-input-hint { display: none }
}
