/* 团队系统统一弹窗样式 - Team Modal Styles */
/* 主色调：橙色系 #D97D36，背景 #F5F5F5，文字 #333333 */

.team-modal-overlay {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: tmFadeIn 0.2s ease;
}

.team-modal {
  background-color: #FFFFFF;
  border-radius: 16px;
  width: 90%;
  max-width: 500px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
  animation: tmSlideUp 0.25s ease;
}

.team-modal-lg {
  max-width: 700px;
  max-height: 85vh;
}

.team-modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid #EEEEEE;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.team-modal-title {
  font-size: 18px;
  font-weight: 600;
  color: #333333;
}

.team-modal-close {
  width: 32px; height: 32px;
  border: none;
  background: none;
  font-size: 20px;
  color: #999999;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.team-modal-close:hover {
  background-color: #F5F5F5;
  color: #333333;
}

.team-modal-body {
  padding: 20px;
  max-height: 55vh;
  overflow-y: auto;
}

.team-modal-footer {
  padding: 12px 20px;
  border-top: 1px solid #EEEEEE;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* 按钮样式 */
.team-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.team-btn-primary {
  background-color: #D97D36;
  color: #FFFFFF;
}

.team-btn-primary:hover {
  background-color: #C06A2A;
}

.team-btn-outline {
  background-color: transparent;
  color: #D97D36;
  border: 1px solid #D97D36;
}

.team-btn-outline:hover {
  background-color: #FFF5EB;
}

.team-btn-gray {
  background-color: #F5F5F5;
  color: #666666;
}

.team-btn-gray:hover {
  background-color: #E8E8E8;
}

.team-btn-danger {
  background-color: #F56C6C;
  color: #FFFFFF;
}

.team-btn-danger:hover {
  background-color: #E05555;
}

.team-btn-sm {
  padding: 6px 14px;
  font-size: 12px;
  border-radius: 6px;
}

.team-btn-block {
  display: flex;
  width: 100%;
}

/* 成员列表项 */
.team-member-item {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #F5F5F5;
}

.team-member-item:last-child {
  border-bottom: none;
}

.team-member-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background-color: #F9B878;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
  margin-right: 12px;
  overflow: hidden;
}

.team-member-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.team-member-info {
  flex: 1;
  min-width: 0;
}

.team-member-name {
  font-size: 14px;
  font-weight: 500;
  color: #333333;
}

.team-member-meta {
  font-size: 12px;
  color: #999999;
  margin-top: 2px;
}

.team-member-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.team-badge-leader {
  background-color: #FFF5EB;
  color: #D97D36;
}

.team-badge-co-leader {
  background-color: #FFF3E0;
  color: #E87A2B;
}

.team-badge-admin {
  background-color: #EBF5FF;
  color: #409EFF;
}

.team-badge-member {
  background-color: #F5F5F5;
  color: #999999;
}

/* 动画 */
@keyframes tmFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tmSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 滚动条样式 */
.team-modal-body::-webkit-scrollbar {
  width: 4px;
}

.team-modal-body::-webkit-scrollbar-track {
  background: transparent;
}

.team-modal-body::-webkit-scrollbar-thumb {
  background: #DDDDDD;
  border-radius: 2px;
}

/* 消息列表样式（聊天弹窗内） */
.team-chat-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-chat-item {
  display: flex;
  gap: 10px;
  max-width: 85%;
}

.team-chat-item.own {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.team-chat-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background-color: #F9B878;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFF;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
  overflow: hidden;
}

.team-chat-avatar img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.team-chat-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  word-break: break-word;
}

.team-chat-item:not(.own) .team-chat-bubble {
  background-color: #F5F5F5;
  color: #333333;
}

.team-chat-item.own .team-chat-bubble {
  background-color: #D97D36;
  color: #FFFFFF;
}

.team-chat-time {
  font-size: 11px;
  color: #BBBBBB;
  margin-top: 4px;
  text-align: right;
}

.team-chat-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 0 0;
  border-top: 1px solid #EEEEEE;
  margin-top: 12px;
}

.team-chat-input-area textarea {
  flex: 1;
  border: 1px solid #E0E0E0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  resize: none;
  outline: none;
  font-family: inherit;
  min-height: 40px;
  max-height: 100px;
}

.team-chat-input-area textarea:focus {
  border-color: #D97D36;
}

/* 聊天消息列表滚动条美化 */
#chatModalMessages::-webkit-scrollbar {
  width: 6px;
}

#chatModalMessages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

#chatModalMessages::-webkit-scrollbar-thumb {
  background: #D97D36;
  border-radius: 3px;
}

#chatModalMessages::-webkit-scrollbar-thumb:hover {
  background: #b9692a;
}

/* 聊天消息淡入动画 */
.team-chat-item {
  animation: chatFadeInUp 0.3s ease;
}

@keyframes chatFadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 聊天弹窗 body 去除默认 padding */
.team-chat-body {
  padding: 0 !important;
}

/* 加载更多提示 */
.team-chat-loading-more {
  user-select: none;
}