/* ==========================================================================
   ZYNROS CONNECT — In-Browser & Mobile Team Messaging System
   Glassmorphic cyberpunk styling matching Zynros Browser Design Language
   ========================================================================== */

:root {
  --zc-bg: rgba(10, 13, 20, 0.94);
  --zc-surface: #121726;
  --zc-surface-hover: #1b233a;
  --zc-border: rgba(0, 240, 255, 0.2);
  --zc-border-active: #00f0ff;
  --zc-primary: #00f0ff;
  --zc-accent: #7928ca;
  --zc-text: #f1f5f9;
  --zc-text-muted: #94a3b8;
  --zc-shadow: 0 12px 40px rgba(0, 0, 0, 0.7);
}

/* Floating Launch Button */
.zc-launcher-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--zc-primary), var(--zc-accent));
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 24px rgba(0, 240, 255, 0.4);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}

.zc-launcher-btn:hover {
  transform: scale(1.08) translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.6);
}

.zc-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff0055;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #07090e;
}

/* Main Chat Drawer / Window */
.zc-drawer {
  position: fixed;
  bottom: 90px;
  right: 24px;
  width: 380px;
  height: 540px;
  max-height: calc(100vh - 120px);
  background: var(--zc-bg);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--zc-border);
  border-radius: 16px;
  box-shadow: var(--zc-shadow);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 9998;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.zc-drawer.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* Header */
.zc-header {
  padding: 14px 16px;
  background: rgba(18, 23, 38, 0.85);
  border-bottom: 1px solid var(--zc-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.zc-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.zc-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00f0ff, #7928ca);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: bold;
}

.zc-title-text {
  display: flex;
  flex-direction: column;
}

.zc-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--zc-text);
  letter-spacing: 0.5px;
}

.zc-status {
  font-size: 11px;
  color: #10b981;
  display: flex;
  align-items: center;
  gap: 5px;
}

.zc-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.zc-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.zc-icon-btn {
  background: transparent;
  border: none;
  color: var(--zc-text-muted);
  font-size: 16px;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.zc-icon-btn:hover {
  background: var(--zc-surface-hover);
  color: var(--zc-text);
}

/* Channel Bar */
.zc-channels {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  background: rgba(14, 18, 28, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  overflow-x: auto;
}

.zc-channel-chip {
  background: var(--zc-surface);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--zc-text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
}

.zc-channel-chip:hover {
  background: var(--zc-surface-hover);
  color: var(--zc-text);
}

.zc-channel-chip.active {
  background: rgba(0, 240, 255, 0.15);
  color: var(--zc-primary);
  border-color: var(--zc-primary);
}

/* Message Feed */
.zc-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.zc-message-row {
  display: flex;
  flex-direction: column;
  max-width: 85%;
}

.zc-message-row.outgoing {
  align-self: flex-end;
}

.zc-message-row.incoming {
  align-self: flex-start;
}

.zc-message-sender {
  font-size: 11px;
  color: var(--zc-text-muted);
  margin-bottom: 3px;
  padding: 0 4px;
}

.zc-message-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.zc-message-row.outgoing .zc-message-bubble {
  background: linear-gradient(135deg, rgba(0, 240, 255, 0.25), rgba(121, 40, 202, 0.35));
  border: 1px solid rgba(0, 240, 255, 0.4);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.zc-message-row.incoming .zc-message-bubble {
  background: var(--zc-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--zc-text);
  border-bottom-left-radius: 4px;
}

.zc-message-bubble code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
  color: #00f0ff;
}

.zc-message-bubble pre {
  background: rgba(0, 0, 0, 0.45);
  padding: 8px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 6px 0 0 0;
  font-family: monospace;
  font-size: 11px;
  border-left: 2px solid var(--zc-primary);
}

.zc-message-time {
  font-size: 10px;
  color: var(--zc-text-muted);
  margin-top: 3px;
  align-self: flex-end;
  padding: 0 4px;
}

/* Input Area */
.zc-input-bar {
  padding: 12px;
  background: rgba(18, 23, 38, 0.95);
  border-top: 1px solid var(--zc-border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.zc-input {
  flex: 1;
  background: rgba(10, 13, 20, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 9px 12px;
  color: var(--zc-text);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.zc-input:focus {
  border-color: var(--zc-primary);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.2);
}

.zc-send-btn {
  background: linear-gradient(135deg, var(--zc-primary), var(--zc-accent));
  border: none;
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s;
}

.zc-send-btn:hover {
  transform: scale(1.05);
}

/* Mobile Responsive Drawer Mode (< 640px) */
@media (max-width: 640px) {
  .zc-launcher-btn {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .zc-drawer {
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    height: 80vh;
    max-height: 85vh;
    border-radius: 20px 20px 0 0;
    border-left: none;
    border-right: none;
    border-bottom: none;
  }
}
