:host {
  --input-bg: #f5f5f5;
  --input-border: #e0e0e0;
  --input-border-radius: 20px;
  --input-focus-border: #007bff;
  --input-disabled-bg: #f0f0f0;
  --input-text-color: #333;
  --input-placeholder-color: #999;
  --send-button-bg: #007bff;
  --send-button-hover-bg: #0056b3;
  --send-button-disabled-bg: #ccc;
  --send-button-text: white;
  --char-count-color: #666;
}

.message-input-container {
  padding: 12px;
  background: var(--input-bg);
  border-top: 1px solid var(--input-border);
}

.input-wrapper {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.message-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--input-border-radius);
  font-size: 14px;
  line-height: 1.4;
  color: var(--input-text-color);
  background: white;
  resize: none;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
}

.message-input::placeholder {
  color: var(--input-placeholder-color);
}

.message-input:focus {
  border-color: var(--input-focus-border);
}

.message-input:disabled {
  background: var(--input-disabled-bg);
  cursor: not-allowed;
  color: var(--input-placeholder-color);
}

.send-button {
  padding: 8px 16px;
  background: var(--send-button-bg);
  color: var(--send-button-text);
  border: none;
  border-radius: var(--input-border-radius);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
}

.send-button:hover:not(:disabled) {
  background: var(--send-button-hover-bg);
}

.send-button:disabled {
  background: var(--send-button-disabled-bg);
  cursor: not-allowed;
}

.char-count {
  margin-top: 4px;
  font-size: 12px;
  color: var(--char-count-color);
  text-align: right;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .message-input-container {
    padding: 8px;
  }
  
  .input-wrapper {
    gap: 6px;
  }
  
  .message-input {
    font-size: 16px; /* 防止 iOS 缩放 */
  }
  
  .send-button {
    padding: 8px 12px;
    font-size: 14px;
  }
}
