/* ============================================================
   TEAM CHAT STYLES
   ============================================================ */

.team-chat-fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 150;
  height: 48px;
  border-radius: 24px;
  background: var(--gold);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 22px 0 16px;
  font-family: var(--mono);
  font-size: var(--font-control);
  font-weight: var(--weight-control);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  box-shadow: 0 4px 24px rgba(184, 137, 42, 0.4);
  transition: transform 0.3s, box-shadow 0.3s;
}

.team-chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 32px rgba(184, 137, 42, 0.5);
}

.team-chat-fab.open {
  transform: scale(0);
  pointer-events: none;
}

.team-chat-panel {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 160;
  width: 420px;
  height: 600px;
  max-height: calc(100vh - 80px);
  background: var(--ink);
  border: 1px solid var(--rule);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.4);
}

.team-chat-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.team-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--rule);
  background: rgba(184, 137, 42, 0.06);
  flex-shrink: 0;
}

.team-chat-header-title {
  font-family: var(--mono);
  font-size: var(--font-label);
  font-weight: var(--weight-readable);
  letter-spacing: 0.15em;
  color: var(--gold);
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 10px;
}

.team-chat-icon {
  font-size: 18px;
}

.team-chat-close {
  background: none;
  border: 1px solid rgba(245, 242, 236, 0.15);
  color: var(--stone);
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 18px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.team-chat-close:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.team-chat-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--rule);
  background: rgba(245, 242, 236, 0.02);
  flex-shrink: 0;
}

.team-chat-tab {
  flex: 1;
  padding: 12px 16px;
  background: none;
  border: none;
  color: var(--stone);
  font-family: var(--mono);
  font-size: var(--font-control);
  font-weight: var(--weight-readable);
  cursor: pointer;
  transition: all 0.2s;
  border-bottom: 2px solid transparent;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.team-chat-tab:hover {
  color: var(--paper);
}

.team-chat-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  background: rgba(184, 137, 42, 0.04);
}

.team-chat-content {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.team-chat-messages-container {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.team-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.team-chat-empty-messages {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: rgba(138, 130, 120, 0.5);
  font-style: italic;
  font-size: 14px;
}

.team-chat-message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.team-chat-message.me {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.team-chat-message-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: var(--font-meta);
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0;
}

.team-chat-message-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 280px;
}

.team-chat-message-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--font-meta);
}

.team-chat-message-name {
  font-family: var(--mono);
  font-weight: var(--weight-readable);
  color: var(--paper);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.team-chat-message-time {
  font-family: var(--mono);
  font-size: var(--font-meta);
  color: rgba(138, 130, 120, 0.5);
  letter-spacing: 0.05em;
}

.team-chat-message-text {
  background: rgba(245, 242, 236, 0.06);
  padding: 10px 12px;
  border-radius: 6px;
  line-height: 1.5;
  word-wrap: break-word;
  font-size: 13px;
  color: var(--paper);
}

.team-chat-input-container {
  display: flex;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--rule);
  background: rgba(26, 22, 18, 0.5);
  flex-shrink: 0;
}

.team-chat-input {
  flex: 1;
  background: rgba(245, 242, 236, 0.05);
  border: 1px solid rgba(245, 242, 236, 0.12);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  padding: 10px 14px;
  outline: none;
  resize: none;
  min-height: 40px;
  max-height: 100px;
  border-radius: 6px;
  transition: border-color 0.2s;
}

.team-chat-input:focus {
  border-color: var(--gold);
}

.team-chat-input::placeholder {
  color: rgba(138, 130, 120, 0.5);
}

.team-chat-send-btn {
  background: var(--gold);
  border: none;
  color: var(--ink);
  padding: 10px 16px;
  cursor: pointer;
  font-family: var(--mono);
  font-size: var(--font-control);
  font-weight: var(--weight-control);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 6px;
  transition: background 0.2s;
  flex-shrink: 0;
  height: 40px;
  display: flex;
  align-items: center;
}

.team-chat-send-btn:hover {
  background: var(--gold-light);
}

.team-chat-members-container {
  padding: 16px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.team-chat-members-list {
  flex: 1;
  overflow-y: auto;
}

.team-chat-member-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245, 242, 236, 0.04);
  position: relative;
}

.team-chat-member-item:last-child {
  border-bottom: none;
}

.team-chat-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: var(--font-control);
  font-weight: 700;
  color: white;
  flex-shrink: 0;
  letter-spacing: 0;
}

.team-chat-member-info {
  flex: 1;
}

.team-chat-member-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--paper);
}

.team-chat-member-role {
  font-family: var(--mono);
  font-size: var(--font-meta);
  color: rgba(138, 130, 120, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
}

.team-chat-member-remove {
  background: rgba(155, 45, 63, 0.1);
  border: 1px solid rgba(155, 45, 63, 0.3);
  color: #9B2D3F;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.team-chat-member-remove:hover {
  background: rgba(155, 45, 63, 0.2);
  border-color: #9B2D3F;
}

.team-chat-add-member {
  padding: 16px;
  background: rgba(184, 137, 42, 0.04);
  border: 1px solid rgba(184, 137, 42, 0.2);
  border-radius: 8px;
}

.team-chat-select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(245, 242, 236, 0.05);
  border: 1px solid rgba(245, 242, 236, 0.12);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 13px;
  border-radius: 6px;
  outline: none;
}

.team-chat-select:focus {
  border-color: var(--gold);
}

.team-chat-danger-zone {
  padding: 16px;
  background: rgba(155, 45, 63, 0.04);
  border: 1px solid rgba(155, 45, 63, 0.2);
  border-radius: 8px;
}

.team-chat-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 20px;
}

.team-chat-empty-content {
  text-align: center;
}

.team-chat-empty-content h3 {
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 300;
  margin: 0 0 12px;
  color: var(--paper);
}

.team-chat-empty-content p {
  color: rgba(138, 130, 120, 0.6);
  font-size: 13px;
  margin: 0;
  line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
  .team-chat-panel {
    width: calc(100vw - 32px);
    height: calc(100vh - 100px);
    right: 16px;
    bottom: 16px;
  }

  .team-chat-message-content {
    max-width: 200px;
  }
}
