/* ===== COMPONENTS STYLES ===== */
/**
 * @file: components/chat.css
 * @description: 채팅 컴포넌트의 읽지 않은 메시지 수 스타일
 * @components: 읽지 않은 메시지 수
 * @usage: 읽지 않은 메시지 수 스타일링
 */
.unread-count {
  position: absolute;
  top: -4px;
  right: -4px;
  background-color: #dc3545;
  color: white;
  font-size: 12px;
  min-width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  font-weight: 500;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  border: 2px solid white;
  transform-origin: center;
  animation: fadeIn 0.3s ease;
}

/* ===== COMPONENTS STYLES ===== */
/**
 * @file: components/chat.css
 * @description: 쪽지 관련 스타일
 * @components: 쪽지 관련
 * @usage: 쪽지 관련 스타일링
 */
.send-message-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #1a73e8;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9em;
  margin-top: 12px;
  transition: all 0.3s ease;
}

.send-message-btn:hover {
  background-color: #1557b0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(26, 115, 232, 0.2);
}

.message-form {
  max-width: 500px;
}

.message-input-container {
  margin-top: 20px;
}

.message-input-container textarea {
  width: 100%;
  height: 200px;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  resize: vertical;
  font-size: 0.95em;
  margin-bottom: 12px;
}

.message-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.message-box {
  max-width: 800px;
}

.message-tabs {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.9em;
  background-color: #f1f3f4;
  color: #666;
  transition: all 0.3s ease;
}

.tab-btn.active {
  background-color: #1a73e8;
  color: white;
}

.message-item {
  background-color: white;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid #e0e0e0;
}

.message-item.unread {
  background-color: #f0f7ff;
  border-color: #1a73e8;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.message-user {
  font-weight: 600;
  color: #1a73e8;
}

.message-date {
  color: #666;
  font-size: 0.9em;
}

.message-content {
  white-space: pre-wrap;
  line-height: 1.6;
}

.mark-read-btn {
  margin-top: 12px;
  padding: 4px 12px;
  border: 1px solid #1a73e8;
  border-radius: 16px;
  background-color: white;
  color: #1a73e8;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s ease;
}

.mark-read-btn:hover {
  background-color: #1a73e8;
  color: white;
}

.no-messages {
  text-align: center;
  color: #666;
  padding: 40px;
}

/* 쪽지 입력 컨테이너 스타일 */
.message-input-container {
  margin-top: 20px;
  width: 100%;
  box-sizing: border-box;
}

/* 쪽지 입력 textarea 스타일 */
.message-input-container textarea {
  width: 100%;
  height: 200px;
  padding: 12px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  resize: vertical;
  font-size: 0.95em;
  margin-bottom: 12px;
  box-sizing: border-box;
  word-break: break-all;
  overflow-wrap: break-word;
}

/* 쪽지 모달 컨텐츠 스타일 */
.message-form {
  max-width: 500px;
  width: 90%;
  padding: 20px;
  box-sizing: border-box;
}

/* 메시지 액션 버튼 스타일 수정 */
.message-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.delete-message-btn {
  padding: 4px 12px;
  border: 1px solid #dc3545;
  border-radius: 16px;
  background-color: white;
  color: #dc3545;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s ease;
}

.delete-message-btn:hover {
  background-color: #dc3545;
  color: white;
}

/* 메시지 사용 정보 스일 */
.message-user-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-user-info .author-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  border-radius: 20px;
}

.message-profile-image {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #e0e0e0;
}

.message-user {
  font-weight: 600;
  color: #1a73e8;
}

/* 메시지 헤더 스타일 수정 */
.message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

/* 인증 아이콘 위치 조정 */
.message-user-info .verification-icon {
  margin-left: 4px;
}

/* ===== COMPONENTS STYLES ===== */
/**
 * @file: components/chat.css
 * @description: 채팅 관련 스타일
 * @components: 채팅
 * @usage: 채팅 관련 스타일링
 */
.chat-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 320px;
  height: 480px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.chat-header {
  padding: 16px;
  background: #1a73e8;
  color: white;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  margin: 0;
  font-size: 1em;
}

.chat-close {
  cursor: pointer;
  color: white;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-message {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 16px;
  word-break: break-word;
}

.chat-message.sent {
  align-self: flex-end;
  background: #1a73e8;
  color: white;
}

.chat-message.received {
  align-self: flex-start;
  background: #f1f3f4;
  color: #333;
}

.chat-input-container {
  padding: 16px;
  border-top: 1px solid #eee;
  display: flex;
  gap: 8px;
}

.chat-input {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 20px;
  outline: none;
}

.chat-send {
  background: #1a73e8;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
}

.chat-send:hover {
  background: #1557b0;
}

.chat-toggle {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  background: #1a73e8;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.chat-toggle .material-icons-round {
  color: white;
  font-size: 24px;
}

.chat-user-info {
  font-size: 0.8em;
  color: #666;
  margin-bottom: 4px;
}

.chat-timestamp {
  font-size: 0.7em;
  color: #999;
  margin-top: 4px;
}
