/* Message Input Styles */
.message-input-container {
  position: relative;
  width: 100%;
  max-width: none;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.message-input-container:focus-within {
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
  border-color: rgba(102, 126, 234, 0.3);
}

.image-preview {
  position: relative;
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(248, 250, 252, 0.5);
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.image-preview img {
  max-width: 120px;
  max-height: 80px;
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.remove-image {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #ef4444;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  transition: all 0.3s ease;
}

.remove-image:hover {
  background: #dc2626;
}

.input-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  width: 100%;
  box-sizing: border-box;
}

.message-textarea {
  flex: 1;
  min-height: 44px;
  max-height: 120px;
  padding: 1rem 1.25rem;
  border: none;
  background: transparent;
  resize: none;
  outline: none;
  font-size: 1rem;
  line-height: 1.5;
  color: #1f2937;
  font-family: inherit;
  border-radius: 12px;
  transition: all 0.3s ease;
  width: 100%;
  box-sizing: border-box;
  vertical-align: bottom;
}

.message-textarea::placeholder {
  color: #9ca3af;
}

.message-textarea:focus {
  background: #f8fafc;
}

.message-textarea:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: #f1f5f9;
}

.input-actions {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding-bottom: 2px;
}

/* 通用按钮样式 */
.voice-button,
.image-button,
.send-button {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(248, 250, 252, 0.8);
  border: 1px solid rgba(226, 232, 240, 0.6);
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 18px;
  backdrop-filter: blur(10px);
  flex-shrink: 0;
  align-self: flex-end;
}

.voice-button:hover,
.image-button:hover,
.send-button:hover {
  background: rgba(241, 245, 249, 0.9);
  color: #475569;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.voice-button:disabled,
.image-button:disabled,
.send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.send-button {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.send-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.voice-button.recording {
  background: #ef4444;
  color: white;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0% { 
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); 
  }
  70% { 
    box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); 
  }
  100% { 
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); 
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .input-wrapper {
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }
  
  .voice-button,
  .image-button,
  .send-button {
    width: 42px;
    height: 42px;
    font-size: 17px;
  }
  
  .message-textarea {
    font-size: 16px; /* 防止iOS缩放 */
    min-height: 42px;
    padding: 0.875rem 1.125rem;
  }
}

@media (max-width: 480px) {
  .input-wrapper {
    padding: 0.875rem 1rem;
    gap: 0.5rem;
  }
  
  .message-textarea {
    padding: 0.75rem 1rem;
    font-size: 16px; /* 防止iOS缩放 */
    min-height: 40px;
  }
  
  .voice-button,
  .image-button,
  .send-button {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
} 