/* ── INPUT AREA ──────────────────────────────────────────────── */
.input-area {
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input-container-max {
  width: 100%;
  max-width: 800px;
}

.quick-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 12px;
  justify-content: center;
}

.chip {
  font-size: 12px;
  padding: 4px 12px;
  border: 1px solid var(--border2);
  border-radius: 16px;
  background: var(--surface2);
  color: var(--text-dim);
  cursor: pointer;
  font-family: 'Crimson Pro', serif;
  transition: all 0.2s ease;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.chip:hover { 
  color: var(--gold); 
  border-color: var(--gold-dim);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.chip.locked {
  opacity: 0.4;
  cursor: not-allowed;
  border-style: dashed;
  background: none;
}
.chip.locked:hover { 
  color: var(--text-muted); 
  border-color: var(--border2); 
  transform: none;
  box-shadow: none;
}

.input-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  background: var(--surface2);
  border: 1px solid var(--border2);
  padding: 8px 8px 8px 16px;
  border-radius: 24px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: border-color 0.3s, box-shadow 0.3s;
}
.input-row:focus-within {
  border-color: var(--gold-dim);
  box-shadow: 0 4px 20px var(--gold-glow);
}

textarea {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-family: 'Crimson Pro', serif;
  font-size: 16px;
  padding: 8px 4px;
  resize: none;
  outline: none;
  min-height: 24px;
  max-height: 160px;
  line-height: 1.5;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar) transparent;
}
textarea::placeholder { color: var(--text-muted); font-style: italic; opacity: 0.7; }

.char-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  opacity: 0.6;
  margin-right: 6px;
  margin-bottom: 4px;
}

.send-btn {
  background: var(--gold-dim);
  color: var(--bg);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  flex-shrink: 0;
  margin-bottom: 2px;
  padding: 0;
  font-size: 0; /* esconde o texto "Enviar" */
}

.send-btn::before {
  content: "↑";
  font-size: 20px;
  font-weight: bold;
}

.send-btn:hover { 
  background: var(--gold); 
  transform: scale(1.1);
}
.send-btn:active { transform: scale(0.95); }
.send-btn:disabled { 
  background: var(--border2); 
  color: var(--text-muted);
  cursor: not-allowed; 
  transform: none;
}

/* ── MIC BUTTON ──────────────────────────────────────────────── */
.mic-btn {
  position: relative;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--border2);
  background: var(--surface2);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
  overflow: visible;
}

.mic-btn:hover {
  color: var(--gold);
  border-color: var(--gold-dim);
  background: var(--gold-glow);
}

.mic-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.mic-pulse {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 2px solid var(--gold);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
}

/* Estado gravando */
.mic-btn.recording {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--gold-glow);
}

.mic-btn.recording .mic-pulse {
  opacity: 1;
  animation: mic-ring 1.2s ease-out infinite;
}

@keyframes mic-ring {
  0%   { transform: scale(1);    opacity: 0.8; }
  100% { transform: scale(1.65); opacity: 0; }
}

/* Erro de permissão — pisca em vermelho */
.mic-btn.denied {
  color: var(--red);
  border-color: var(--red);
  animation: mic-deny 0.4s ease 2;
}

@keyframes mic-deny {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-3px); }
  75%       { transform: translateX(3px); }
}