/* ichigo-ichie-chat/frontend/style.css (最終目標UI版 - テキスト左端開始) */

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Helvetica Neue", Arial, sans-serif;
  background-color: #f8f9fa;
}

#chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 800px;
  margin: 0 auto;
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

#chatbox {
  flex-grow: 1;
  overflow-y: auto;
  padding: 20px 15px 10px 15px;
  display: flex;
  flex-direction: column;
}

/* --- Message Styles --- */
#chatbox div {
  padding: 10px 15px;
  border-radius: 18px;
  margin-bottom: 10px;
  max-width: 75%;
  word-wrap: break-word;
  line-height: 1.4;
}

.other-message {
  background-color: #f1f0f0;
  color: #333;
  align-self: flex-start;
  margin-right: auto;
  border-bottom-left-radius: 4px;
}

.my-message {
  background-color: #007bff;
  color: white;
  align-self: flex-end;
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.system-message {
  font-style: italic;
  color: #6c757d;
  align-self: center;
  font-size: 0.9em;
  padding: 5px 0;
  background-color: transparent;
  max-width: 100%;
}

/* --- Input Area Styles (Absolute Positioning Buttons, Text Left-Aligned) --- */
#input-area-container {
  padding: 10px 15px 15px 15px;
  background-color: #fff;
  margin-top: auto;
}

#inputArea {
  position: relative;
  border-radius: 24px;
  padding: 0; /* Container padding removed */
  background-color: #f0f4f9;
  border: 1px solid #dfe1e5;
  min-height: 54px;
}

#messageInput {
  display: block;
  width: 100%;
  min-height: 52px;
  max-height: 180px;
  /* ★ padding-left を削除し、padding-right のみを維持 */
  padding: 16px 55px 16px 15px; /* Top, Right(for button), Bottom, Left (minimal) */
  margin: 0;
  border: none;
  outline: none;
  border-radius: 24px;
  font-size: 1rem;
  line-height: 1.5;
  resize: none;
  overflow-y: auto;
  background-color: transparent;
  color: #333;
}

/* Icon Button Base Styles */
.icon-button {
  position: absolute;
  bottom: 7px;
  z-index: 1;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  font-size: 1.3rem;
  background-color: transparent;
  border: none;
  border-radius: 50%;
  color: #5f6368;
  cursor: pointer;
  transition: background-color 0.2s ease;
}
.icon-button:hover {
  background-color: #e8e8e8;
}
.icon-button:disabled {
  color: #bdc1c6;
  background-color: transparent;
  cursor: not-allowed;
}
.icon-button:disabled:hover {
  background-color: transparent;
}

/* Attach Button Position */
#attachButton {
  left: 10px;
}

/* Send Button Position & Style */
#sendButton.send-icon {
  right: 10px;
  font-size: 1.5rem;
  padding-left: 2px;
  color: #1a73e8;
}
#sendButton.send-icon:hover {
  background-color: #e8f0fe;
}
#sendButton.send-icon:disabled {
  color: #bdc1c6;
}
#sendButton.send-icon:disabled:hover {
  background-color: transparent;
}
