/* allianceChat.css - Alliance chat widget styles — COMD_CHANNEL terminal aesthetic */

/* ===== MENU CHAT BUTTON NOTIFICATION ===== */
#chatBtn.has-notification .menu-item-icon {
  animation: chat-notify-icon 1.5s ease-in-out infinite;
}

#chatBtn.has-notification .menu-item-text::after {
  content: ' ●';
  color: #00ff88;
  font-size: 0.7em;
}

@keyframes chat-notify-icon {
  0%, 100% { filter: none; }
  50%       { filter: drop-shadow(0 0 4px rgba(0, 255, 136, 0.8)); }
}

/* ===== CHAT PANEL ===== */
.alliance-chat {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 340px;
  height: 480px;
  background: rgba(2, 12, 18, 0.97);
  border: 1px solid rgba(0, 212, 255, 0.25);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.7), 0 0 12px rgba(0, 212, 255, 0.08);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow: hidden;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.alliance-chat.hidden {
  display: none;
}

/* ===== HEADER ===== */
.alliance-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(0, 20, 30, 0.95);
  border-bottom: 1px solid rgba(0, 212, 255, 0.15);
  flex-shrink: 0;
}

.alliance-chat-title {
  font-family: 'Share Tech Mono', 'IBM Plex Mono', monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #00d4ff;
  display: flex;
  align-items: center;
  gap: 7px;
}

.alliance-chat-title::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00ff88;
  box-shadow: 0 0 6px rgba(0, 255, 136, 0.7);
  flex-shrink: 0;
}

.alliance-chat-close {
  background: none;
  border: none;
  color: #484f58;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
  font-family: monospace;
}

.alliance-chat-close:hover {
  color: #00d4ff;
}

/* ===== MESSAGES AREA ===== */
.alliance-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: 'IBM Plex Mono', 'Fira Mono', monospace;
  font-size: 11px;
}

.alliance-chat-messages::-webkit-scrollbar { width: 4px; }
.alliance-chat-messages::-webkit-scrollbar-track { background: transparent; }
.alliance-chat-messages::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.2); }
.alliance-chat-messages::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.4); }

/* ===== EMPTY STATE ===== */
.chat-empty {
  color: #484f58;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  text-align: center;
  padding: 40px 20px;
  letter-spacing: 0.05em;
}

/* ===== MESSAGE ROWS ===== */
.chat-message {
  background: transparent;
  border: none;
  padding: 3px 0;
  max-width: 100%;
  align-self: stretch;
  animation: msg-in 0.15s ease;
  border-bottom: 1px solid rgba(0, 212, 255, 0.04);
}

.chat-message.own-message {
  background: transparent;
}

@keyframes msg-in {
  from { opacity: 0; transform: translateX(6px); }
  to   { opacity: 1; transform: translateX(0); }
}

.chat-message-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1px;
  gap: 8px;
}

.chat-sender {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #2a7a96;
}

.chat-message.own-message .chat-sender {
  color: #00d4ff;
}

.chat-time {
  font-size: 9px;
  color: #484f58;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.chat-message-text {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.5;
  word-break: break-word;
  padding-left: 8px;
  border-left: 2px solid rgba(0, 212, 255, 0.08);
}

.chat-message.own-message .chat-message-text {
  color: #b0bec5;
  border-left-color: rgba(0, 212, 255, 0.25);
}

/* ===== INPUT AREA ===== */
.alliance-chat-input {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 10px 14px;
  background: rgba(0, 10, 15, 0.98);
  border-top: 1px solid rgba(0, 212, 255, 0.12);
  flex-shrink: 0;
}

.alliance-chat-input::before {
  content: '>';
  color: #00d4ff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
  flex-shrink: 0;
}

.alliance-chat-input input {
  flex: 1;
  padding: 7px 0;
  border: none;
  border-bottom: 1px solid rgba(0, 212, 255, 0.2);
  background: transparent;
  color: #e6edf3;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  outline: none;
  transition: border-color 0.2s;
  letter-spacing: 0.03em;
}

.alliance-chat-input input:focus {
  border-bottom-color: rgba(0, 212, 255, 0.7);
}

.alliance-chat-input input::placeholder {
  color: #484f58;
  letter-spacing: 0.05em;
}

.alliance-chat-input button {
  padding: 6px 12px;
  border: 1px solid rgba(0, 212, 255, 0.3);
  background: transparent;
  color: #00d4ff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: 10px;
  flex-shrink: 0;
}

.alliance-chat-input button:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.7);
  box-shadow: 0 0 8px rgba(0, 212, 255, 0.2);
}

.alliance-chat-input button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .alliance-chat {
    width: calc(100vw - 40px);
    height: 380px;
    bottom: 24px;
    right: 20px;
    left: 20px;
    clip-path: none;
  }
}
