/* ================================
   CHAT OVERLAY & MODAL
   Vollständiges Chat-System mit WebSocket-Support
   ================================ */

/* ================================
   V-LOGO ANIMATION IM CHAT HEADER
   Exakt wie Navbar V-Logo Animation
   ================================ */
.chat-header-v-logo {
  width: 125px;
  height: 125px;
  flex-shrink: 0;
  position: absolute;
  left: 50%;
  top: -27px;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
}

.chat-header-v-logo svg {
  width: 100%;
  height: 100%;
}

/* Linke V-Hälfte Animation - Exakt wie Navbar */
.chat-v-left {
  opacity: 0;
}

.chat-overlay.active .chat-v-left {
  animation: chatVLeftRotate 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes chatVLeftRotate {
  0% {
    transform: rotate(-180deg) translateX(-120px) scale(0.3);
    opacity: 0;
    filter: blur(10px) brightness(2);
  }
  30% {
    opacity: 0.5;
    filter: blur(5px) brightness(1.5);
  }
  60% {
    transform: rotate(-20deg) translateX(-10px) scale(1.1);
    opacity: 1;
    filter: blur(0px) brightness(1.2);
  }
  80% {
    transform: rotate(5deg) translateX(5px) scale(1.05);
    filter: blur(0px) brightness(1);
  }
  100% {
    transform: rotate(0deg) translateX(0) scale(1);
    opacity: 1;
    filter: blur(0px) brightness(1);
  }
}

/* Rechte V-Hälfte Animation - Exakt wie Navbar */
.chat-v-right {
  opacity: 0;
}

.chat-overlay.active .chat-v-right {
  animation: chatVRightRotate 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) 0.15s forwards;
}

@keyframes chatVRightRotate {
  0% {
    transform: rotate(180deg) translateX(120px) scale(0.3);
    opacity: 0;
    filter: blur(10px) brightness(2);
  }
  30% {
    opacity: 0.5;
    filter: blur(5px) brightness(1.5);
  }
  60% {
    transform: rotate(20deg) translateX(10px) scale(1.1);
    opacity: 1;
    filter: blur(0px) brightness(1.2);
  }
  80% {
    transform: rotate(-5deg) translateX(-5px) scale(1.05);
    filter: blur(0px) brightness(1);
  }
  100% {
    transform: rotate(0deg) translateX(0) scale(1);
    opacity: 1;
    filter: blur(0px) brightness(1);
  }
}

/* V-Shape Glow Effects */
.chat-v-shape {
  filter: drop-shadow(0 0 8px rgba(0, 116, 217, 0.4));
}

.chat-v-shape-left {
  filter: drop-shadow(0 0 10px rgba(0, 116, 217, 0.5));
}

.chat-v-shape-right {
  filter: drop-shadow(0 0 8px rgba(123, 44, 191, 0.3));
}

/* Dark Mode: Rechte V-Hälfte weiß statt schwarz */
body.dark-mode .chat-v-right-path,
[data-theme="dark"] .chat-v-right-path {
  fill: url(#chatVGrad2Dark) !important;
  stroke: url(#chatVGrad2Dark) !important;
}

/* Chat Overlay - Fullscreen */
.chat-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #fff;
  z-index: 1500;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

.chat-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Chat Modal - Fullscreen */
.chat-modal {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  overflow: visible; /* Erlaubt V-Logo overflow */
  transform: translateY(20px);
  transition: transform 0.3s ease;
  margin-top: 0;
}

.chat-overlay.active .chat-modal {
  transform: translateY(0);
}

/* Chat Header - Fullscreen */
.chat-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  padding-top: max(15px, env(safe-area-inset-top));
  background: transparent;
  color: #1a1a1a;
  border-radius: 0;
  position: relative;
  overflow: visible;
  border-bottom: 2px solid #0074D9;
}

/* Dark Mode Chat Header */
body.dark-mode .chat-modal-header,
[data-theme="dark"] .chat-modal-header {
  color: #fff;
  border-bottom-color: #1E90FF;
}

.chat-header-user {
  display: flex;
  align-items: center;
}

.chat-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50%;
  overflow: visible;
  margin-right: 12px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  position: relative;
}

.chat-avatar > img#recipient-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
}

/* Group Avatar im Header */
.gc-header-avatar {
  width: 42px;
  height: 42px;
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
}

.gc-header-avatar .gc-event-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.7);
  margin-right: 0;
}

.gc-header-avatar .group-avatar-grid {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  gap: 1px;
  background: rgba(255,255,255,0.2);
}

.gc-header-avatar .gc-grid-1 {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.gc-header-avatar .gc-grid-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.gc-header-avatar .gc-grid-3 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

.gc-header-avatar .gc-grid-3 .group-mini-avatar:first-child {
  grid-column: 1 / -1;
}

.gc-header-avatar .gc-grid-4 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

.gc-header-avatar .group-avatar-grid .group-mini-avatar {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  border-radius: 0;
  border: none;
  display: block;
  overflow: hidden;
}

.gc-header-avatar .group-avatar-icon {
  width: 42px;
  height: 42px;
  font-size: 16px;
}

.chat-username {
  font-weight: 600;
  font-size: 16px;
}

.chat-status {
  font-size: 12px;
  opacity: 0.8;
}

/* Chat Actions */
.chat-actions {
  display: flex;
  gap: 10px;
}

.chat-action-btn {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-action-btn:hover {
  color: #0074D9;
  transform: scale(1.15);
}

/* Dark Mode Buttons */
body.dark-mode .chat-action-btn,
[data-theme="dark"] .chat-action-btn {
  color: #e2e8f0;
}

body.dark-mode .chat-action-btn:hover,
[data-theme="dark"] .chat-action-btn:hover {
  color: #1E90FF;
}

/* Chat Content Wrapper */
.chat-content-wrapper {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Chat Users List */
.chat-users-list {
  width: 0;
  background: #f8f9fa;
  border-right: 1px solid #eee;
  overflow: hidden;
  transition: width 0.3s ease;
}

.chat-users-list.expanded {
  width: 280px;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}

.chat-users-list.expanded::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.chat-list-header {
  padding: 16px 16px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #f0f2f5;
  background: #fff;
}

.chat-list-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  letter-spacing: -0.2px;
}

.chat-list-header .btn,
.chat-new-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  font-size: 18px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #0ea5e9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  cursor: pointer;
}

.chat-list-header .btn:hover,
.chat-new-btn:hover {
  background: rgba(14, 165, 233, 0.08);
  color: #0284c7;
}

/* Chat Search */
.chat-search {
  padding: 10px;
}

.chat-search input {
  width: 100%;
  padding: 8px 12px;
  border-radius: 20px;
  border: 1px solid #ddd;
  outline: none;
  transition: border 0.3s ease;
}

.chat-search input:focus {
  border-color: var(--primary-blue);
}

/* Chat Contacts */
.chat-contacts {
  padding: 10px;
}

.chat-contact-item {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.chat-contact-item:hover {
  background: #e9ecef;
}

.chat-contact-item.active {
  background: rgba(0, 123, 255, 0.1);
}

.contact-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  margin-right: 10px;
}

.contact-details {
  flex: 1;
  min-width: 0;
}

.contact-name {
  font-weight: 500;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-last-message {
  font-size: 12px;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-metadata {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 50px;
}

.contact-time {
  font-size: 11px;
  color: #adb5bd;
  margin-bottom: 5px;
}

.contact-badge {
  min-width: 18px;
  height: 18px;
  border-radius: 9px;
  background: var(--primary-gradient);
  color: white;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

/* ============================================
   GROUP CHAT ITEMS IN OVERLAY
   ============================================ */
.group-chat-item .contact-avatar-wrapper {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  margin-right: 10px;
  flex-shrink: 0;
  overflow: visible;
}

/* Event-Bild als rundes Avatar (gleiche Größe wie Private Chat) */
.gc-event-avatar {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 0;
}

/* ── Mitglieder-Grid (Fallback wenn kein Event-Bild) ── */
.group-avatar-grid {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  overflow: hidden;
  display: grid;
  gap: 1.5px;
  background: #e0e0e0;
}

.gc-grid-1 {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.gc-grid-2 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr);
}

.gc-grid-3 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

.gc-grid-3 .group-mini-avatar:first-child {
  grid-column: 1 / -1;
}

.gc-grid-4 {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

.group-mini-avatar {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
  display: block;
  overflow: hidden;
}

/* Twinkle/Funkeln Animation für Avatar-Rotation */
@keyframes avatarTwinkleIn {
  0% {
    opacity: 0;
    transform: scale(0.7);
    filter: brightness(1.8);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
    filter: brightness(1.3);
  }
  100% {
    opacity: 1;
    transform: scale(1);
    filter: brightness(1);
  }
}

@keyframes avatarTwinkleOut {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(0.7);
  }
}

.group-mini-avatar.twinkle-in {
  animation: avatarTwinkleIn 0.45s ease-out forwards;
}

.group-mini-avatar.twinkle-out {
  animation: avatarTwinkleOut 0.25s ease-in forwards;
}

/* Legacy stack (nicht mehr verwendet) */
.group-avatar-stack-overlay {
  display: none;
}

.group-avatar-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff5722, #ff9800);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
}

.group-member-count {
  font-size: 10px;
  color: #999;
  font-weight: 400;
  margin-left: 4px;
}

.group-member-count i {
  font-size: 9px;
  margin-right: 2px;
}

.group-plan-badge {
  font-size: 10px;
  color: #ff9800;
  margin-left: 4px;
}

.group-chat-item .contact-name {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* Dark Mode */
body.dark-mode .group-avatar-grid {
  background: #444;
}

body.dark-mode .group-avatar-icon {
  background: linear-gradient(135deg, #e04819, #e08600);
}

body.dark-mode .group-member-count {
  color: #888;
}

/* Chat Messages Container */
.chat-messages-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: white;
}

.chat-messages {
  flex: 1;
  padding: 16px 20px;
  overflow-y: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
  background: #f0f2f5;
  display: flex;
  flex-direction: column;
}

.chat-messages::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

.chat-welcome {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: #6c757d;
  padding: 20px;
}

.chat-welcome-icon {
  font-size: 50px;
  margin-bottom: 15px;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Messages */
.message {
  margin-bottom: 4px;
  display: flex;
  flex-direction: column;
  max-width: 75%;
}

.message-sent {
  align-self: flex-end;
  align-items: flex-end;
}

.message-received {
  align-self: flex-start;
  align-items: flex-start;
}

.message-content {
  padding: 8px 14px;
  border-radius: 18px;
  word-break: break-word;
  font-size: 15px;
  line-height: 1.4;
}

.message-sent .message-content {
  background: rgba(0, 116, 217, 0.1);
  color: #1a1a1a;
  border-bottom-right-radius: 4px;
}

.message-received .message-content {
  background: #e8e8ed;
  border-bottom-left-radius: 4px;
}

.message-timestamp {
  font-size: 10px;
  margin-top: 2px;
  margin-bottom: 4px;
  color: #adb5bd;
  padding: 0 4px;
}

.message-sent .message-timestamp {
  text-align: right;
}

.message-received .message-timestamp {
  text-align: left;
}

/* Chat Input Area - State of the Art Fullscreen Design */
.chat-input-area {
  padding: 16px 20px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  background: transparent;
  border-top: none;
}

.chat-input-wrapper {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 28px;
  padding: 6px 12px;
  transition: all 0.25s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.chat-input-wrapper:focus-within {
  background: #fff;
  box-shadow: 0 2px 12px rgba(0, 116, 217, 0.15), 0 0 0 2px rgba(0, 116, 217, 0.1);
}

#chat-message-input,
#message-input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 10px 12px;
  outline: none;
  font-size: 16px;
  line-height: 1.4;
  color: #1a1a1a;
  min-height: 24px;
  max-height: 120px;
  resize: none;
}

#chat-message-input::placeholder,
#message-input::placeholder {
  color: #9ca3af;
}

.chat-plus-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #0074D9;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-plus-btn:hover {
  color: #1E90FF;
  transform: scale(1.08);
}

.chat-plus-btn:active {
  transform: scale(0.95);
}

.chat-plus-btn i {
  font-size: 20px;
}

.chat-send-btn {
  width: 38px;
  height: 38px;
  min-width: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: #0074D9;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.chat-send-btn i {
  font-size: 20px;
}

.chat-send-btn:hover {
  color: #1E90FF;
  transform: scale(1.1);
}

.chat-send-btn:active {
  transform: scale(0.95);
}

.chat-send-btn:disabled {
  color: #d1d5db;
  cursor: not-allowed;
  transform: none;
}

/* Chat Options Menu */
.chat-options-menu {
  position: absolute;
  bottom: 70px;
  left: 20px;
  background: white;
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  width: 240px;
  padding: 10px;
  display: none;
  flex-wrap: wrap;
  justify-content: space-between;
  z-index: 10;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-options-menu.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
}

.chat-option {
  width: 70px;
  height: 70px;
  margin: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chat-option:hover {
  background-color: #f0f2f5;
  transform: translateY(-3px);
}

.chat-option i {
  font-size: 24px;
  margin-bottom: 5px;
}

.chat-option .option-name {
  font-size: 11px;
  text-align: center;
}

/* Option Colors */
.chat-option.option-photo i { color: #4CAF50; }
.chat-option.option-video i { color: #FF5722; }
.chat-option.option-camera i { color: #2196F3; }
.chat-option.option-event i { color: #9C27B0; }
.chat-option.option-location i { color: #F44336; }
.chat-option.option-emoji i { color: #FFC107; }
.chat-option.option-contact i { color: #00BCD4; }
.chat-option.option-document i { color: #795548; }
.chat-option.option-poll i { color: #607D8B; }

/* New Chat Modal */
.new-chat-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  z-index: 1600;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.new-chat-modal.active {
  opacity: 1;
  visibility: visible;
}

.new-chat-content {
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transform: translateY(20px);
  transition: transform 0.3s ease;
}

.new-chat-modal.active .new-chat-content {
  transform: translateY(0);
}

.new-chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
  background: var(--primary-gradient);
  color: white;
}

.close-new-chat-btn {
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
}

.new-chat-search {
  padding: 15px;
}

.new-chat-search input {
  width: 100%;
  padding: 10px 15px;
  border-radius: 30px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 14px;
}

.new-chat-results {
  max-height: 350px;
  overflow-y: auto;
  padding: 0 15px 15px;
}

.new-chat-user {
  display: flex;
  align-items: center;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.new-chat-user:hover {
  background: #f0f2f5;
}

.new-chat-user-avatar {
  width: 40px;
  height: 40px;
  min-width: 40px;
  min-height: 40px;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  margin-right: 10px;
}

.new-chat-user-info {
  flex: 1;
}

.new-chat-user-name {
  font-weight: 500;
}

.new-chat-user-bio {
  font-size: 12px;
  color: #6c757d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

/* Responsive Design für Chat */
@media (max-width: 768px) {
  .chat-modal {
    width: 95%;
    height: 90vh;
  }
  
  .chat-users-list.expanded {
    width: 220px;
  }
  
  .message {
    max-width: 85%;
  }
}

@media (max-width: 480px) {
  .chat-modal {
    width: 100%;
    height: 100%;
    border-radius: 0;
    max-height: none;
  }
  
  .chat-modal-header {
    border-radius: 0;
  }
  
  .chat-users-list.expanded {
    width: 100%;
  }
  
  .chat-messages-container {
    display: none;
  }
  
  .chat-users-list.expanded + .chat-messages-container {
    display: flex;
  }
}

/* === DARK MODE === */
body.dark-mode .chat-overlay,
[data-theme="dark"] .chat-overlay {
  background-color: #121212;
}

body.dark-mode .chat-modal,
[data-theme="dark"] .chat-modal {
  background: #1a1a1a;
  box-shadow: none;
}

body.dark-mode .chat-modal-header {
  background: transparent !important;
  border-bottom: 2px solid #1E90FF;
}

body.dark-mode .chat-users-list {
  background: #121212;
  border-right: 1px solid #2a2a2a;
}

body.dark-mode .chat-list-header {
  background: #1a1a1a;
  border-bottom: 1px solid #2a2a2a;
}

body.dark-mode .chat-list-header h3 {
  color: #e2e8f0;
}

body.dark-mode .chat-list-header .btn {
  background: #0ea5e9;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.2);
}

body.dark-mode .chat-list-header .btn:hover {
  background: #38bdf8;
}

body.dark-mode .chat-search input {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #e2e8f0;
}

body.dark-mode .chat-search input:focus {
  background: #3a3a3a;
  border-color: #1E88E5;
  box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.3);
}

body.dark-mode .chat-search input::placeholder {
  color: #94a3b8;
}

body.dark-mode .chat-contact-item {
  color: #e2e8f0;
}

body.dark-mode .chat-contact-item:hover {
  background: #1a1a1a;
}

body.dark-mode .chat-contact-item.active {
  background: rgba(30, 136, 229, 0.2);
}

body.dark-mode .contact-name {
  color: #e2e8f0;
}

body.dark-mode .contact-last-message {
  color: #94a3b8;
}

body.dark-mode .contact-time {
  color: #64748b;
}

body.dark-mode .contact-badge {
  background: linear-gradient(135deg, #1E88E5, #00BCD4);
}

body.dark-mode .chat-messages-container {
  background: #1a1a1a;
}

body.dark-mode .chat-messages {
  background: #121212;
}

body.dark-mode .chat-welcome {
  color: #94a3b8;
}

body.dark-mode .chat-welcome-icon {
  background: linear-gradient(135deg, #1E88E5, #00BCD4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-mode .message-received .message-content {
  background: #2a2a2a;
  color: #e2e8f0;
}

body.dark-mode .message-sent .message-content {
  background: rgba(30, 136, 229, 0.15);
  color: #e2e8f0;
}

body.dark-mode .message-timestamp {
  color: #64748b;
}

body.dark-mode .chat-input-area,
[data-theme="dark"] .chat-input-area {
  background: transparent;
  border-top: none;
}

body.dark-mode .chat-input-wrapper,
[data-theme="dark"] .chat-input-wrapper {
  background: #2a2a2a;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark-mode .chat-input-wrapper:focus-within,
[data-theme="dark"] .chat-input-wrapper:focus-within {
  background: #3a3a3a;
  box-shadow: 0 2px 12px rgba(30, 144, 255, 0.2), 0 0 0 2px rgba(30, 144, 255, 0.15);
}

body.dark-mode #chat-message-input,
body.dark-mode #message-input,
[data-theme="dark"] #chat-message-input,
[data-theme="dark"] #message-input {
  color: #e2e8f0;
  background: transparent;
}

body.dark-mode #chat-message-input::placeholder,
body.dark-mode #message-input::placeholder,
[data-theme="dark"] #chat-message-input::placeholder,
[data-theme="dark"] #message-input::placeholder {
  color: #94a3b8;
}

body.dark-mode .chat-plus-btn,
[data-theme="dark"] .chat-plus-btn {
  color: #1E90FF;
}

body.dark-mode .chat-plus-btn:hover,
[data-theme="dark"] .chat-plus-btn:hover {
  color: #60a5fa;
}

body.dark-mode .chat-send-btn,
[data-theme="dark"] .chat-send-btn {
  color: #1E90FF;
}

body.dark-mode .chat-send-btn:hover,
[data-theme="dark"] .chat-send-btn:hover {
  color: #60a5fa;
}

body.dark-mode .chat-send-btn:disabled,
[data-theme="dark"] .chat-send-btn:disabled {
  color: #3a3a3a;
}

body.dark-mode .chat-options-menu {
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

body.dark-mode .chat-option {
  color: #e2e8f0;
}

body.dark-mode .chat-option:hover {
  background-color: #2a2a2a;
}

body.dark-mode .new-chat-modal {
  background-color: rgba(0, 0, 0, 0.8);
}

body.dark-mode .new-chat-content {
  background: #1a1a1a;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
}

body.dark-mode .new-chat-header {
  background: linear-gradient(135deg, #1E88E5, #00BCD4);
}

body.dark-mode .new-chat-search input {
  background: #2a2a2a;
  border-color: #3a3a3a;
  color: #e2e8f0;
}

body.dark-mode .new-chat-search input::placeholder {
  color: #94a3b8;
}

body.dark-mode .new-chat-user {
  color: #e2e8f0;
}

body.dark-mode .new-chat-user:hover {
  background: #2a2a2a;
}

body.dark-mode .new-chat-user-name {
  color: #e2e8f0;
}

body.dark-mode .new-chat-user-bio {
  color: #94a3b8;
}

/* ================================
   CHAT PING-PONG MINI-PLAYER
   State-of-the-Art Player im Chat
   ================================ */

.chat-pingpong-mini-player {
  width: 100%;
  max-width: 320px;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Header */
.cpp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: linear-gradient(135deg, #0074D9 0%, #1E90FF 100%);
  color: white;
}

.cpp-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
}

.cpp-badge i {
  font-size: 14px;
}

.cpp-pong-count {
  background: rgba(255, 255, 255, 0.2);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Video Container */
.cpp-video-container {
  position: relative;
  width: 100%;
  aspect-ratio: 9/16;
  max-height: 300px;
  background: #000;
  overflow: hidden;
}

.cpp-video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* Loading Spinner */
.cpp-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 10;
}

.cpp-loading.visible {
  display: block;
}

.cpp-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: #0074D9;
  border-radius: 50%;
  animation: cpp-spin 0.8s linear infinite;
}

@keyframes cpp-spin {
  to { transform: rotate(360deg); }
}

/* Play Overlay */
.cpp-play-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: all 0.2s ease;
  z-index: 20;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cpp-play-overlay.visible {
  opacity: 1;
}

.cpp-play-overlay i {
  color: #0074D9;
  font-size: 22px;
  margin-left: 4px;
}

/* Replay Overlay */
.cpp-replay-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  width: 60px;
  height: 60px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 50%;
  cursor: pointer;
  z-index: 25;
  transition: all 0.2s ease;
}

.cpp-replay-overlay.visible {
  display: flex;
}

.cpp-replay-overlay:hover {
  transform: translate(-50%, -50%) scale(1.2);
}

.cpp-replay-overlay i {
  color: #fff;
  font-size: 36px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* User Overlay */
.cpp-user-overlay {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 12px 6px 6px;
  border-radius: 25px;
  backdrop-filter: blur(8px);
  z-index: 15;
}

.cpp-user-avatar {
  width: 28px;
  height: 28px;
  min-width: 28px;
  min-height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
  aspect-ratio: 1/1;
}

.cpp-username {
  color: white;
  font-size: 12px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

/* Counter */
.cpp-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.6);
  padding: 5px 12px;
  border-radius: 15px;
  backdrop-filter: blur(8px);
  z-index: 15;
  font-size: 12px;
  color: white;
  font-weight: 600;
}

/* Mute Button */
.cpp-mute-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  background: rgba(0, 0, 0, 0.6);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 14px;
  cursor: pointer;
  backdrop-filter: blur(8px);
  z-index: 15;
  transition: all 0.2s ease;
}

.cpp-mute-btn:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: scale(1.1);
}

.cpp-mute-btn.unmuted {
  background: rgba(0, 116, 217, 0.8);
}

/* Avatar Timeline */
.cpp-timeline {
  padding: 10px 12px;
  background: linear-gradient(to bottom, rgba(0,0,0,0.95), rgba(0,0,0,0.85));
}

.cpp-avatar-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 16px;
  justify-content: flex-start;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  /* Scrollbar komplett verstecken */
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cpp-avatar-track::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.cpp-avatar-item {
  flex-shrink: 0;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.5;
}

.cpp-avatar-item:hover {
  opacity: 0.8;
  transform: translateY(-2px);
}

.cpp-avatar-item.active {
  opacity: 1;
  transform: scale(1.1);
}

.cpp-avatar-wrap {
  position: relative;
  width: 36px;
  height: 36px;
}

.cpp-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.cpp-avatar-item.active .cpp-avatar-img {
  border-color: #0074D9;
}

/* Progress Ring */
.cpp-ring-svg {
  position: absolute;
  top: -3px;
  left: -3px;
  width: 42px;
  height: 42px;
  transform: rotate(-90deg);
}

.cpp-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2;
}

.cpp-ring-progress {
  fill: none;
  stroke: #0074D9;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 113.1;
  stroke-dashoffset: 113.1;
  transition: stroke-dashoffset 0.1s linear;
}

/* Description */
.cpp-description {
  padding: 10px 14px;
  font-size: 13px;
  color: #333;
  background: #fff;
  border-top: 1px solid #f0f0f0;
  line-height: 1.4;
}

/* Stats Footer */
.cpp-stats {
  display: flex;
  gap: 16px;
  padding: 10px 14px;
  background: #f8f9fa;
  border-top: 1px solid #f0f0f0;
}

.cpp-stat {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: #666;
}

.cpp-stat i {
  font-size: 13px;
  color: #888;
}

/* View Full Link */
.cpp-view-full {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #0074D9 0%, #1E90FF 100%);
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.cpp-view-full:hover {
  background: linear-gradient(135deg, #0056a3, #0074D9);
  color: white;
}

/* Linked Events Section */
.cpp-events {
  padding: 10px 14px;
  background: #f0f7ff;
  border-top: 1px solid #e0efff;
}

.cpp-events-title {
  font-size: 11px;
  font-weight: 600;
  color: #0074D9;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cpp-event-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  background: white;
  border-radius: 10px;
  margin-bottom: 6px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cpp-event-item:hover {
  background: #e8f4ff;
}

.cpp-event-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0074D9;
  font-size: 18px;
  overflow: hidden;
  flex-shrink: 0;
}

.cpp-event-icon img {
  width: 100%;
  height: 100%;
  min-width: 44px;
  min-height: 44px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 8px;
}

/* Wenn Bild vorhanden, Hintergrund und Icon verstecken */
.cpp-event-icon:has(img) {
  background: transparent;
}

.cpp-event-icon:has(img) i {
  display: none;
}

.cpp-event-info {
  flex: 1;
  min-width: 0;
}

.cpp-event-name {
  font-size: 12px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cpp-event-date {
  font-size: 10px;
  color: #666;
}

/* Tagged Users Section */
.cpp-tagged {
  padding: 10px 14px;
  background: #fff;
  border-top: 1px solid #f0f0f0;
}

.cpp-tagged-title {
  font-size: 11px;
  font-weight: 600;
  color: #0074D9;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.cpp-tagged-users {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cpp-tagged-user {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px 4px 4px;
  background: #f0f7ff;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s ease;
}

.cpp-tagged-user:hover {
  background: #e0efff;
}

.cpp-tagged-user img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

.cpp-tagged-user span {
  font-size: 11px;
  font-weight: 500;
  color: #333;
}

/* Dark Mode */
body.dark-mode .chat-pingpong-mini-player,
[data-theme="dark"] .chat-pingpong-mini-player {
  background: #1a1a1a;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

body.dark-mode .cpp-description,
[data-theme="dark"] .cpp-description {
  color: #e2e8f0;
  background: #1a1a1a;
  border-top-color: #2a2a2a;
}

body.dark-mode .cpp-stats,
[data-theme="dark"] .cpp-stats {
  background: #121212;
  border-top-color: #2a2a2a;
}

body.dark-mode .cpp-stat,
[data-theme="dark"] .cpp-stat {
  color: #94a3b8;
}

body.dark-mode .cpp-stat i,
[data-theme="dark"] .cpp-stat i {
  color: #64748b;
}

/* Dark Mode Events Section */
body.dark-mode .cpp-events,
[data-theme="dark"] .cpp-events {
  background: #162033;
  border-top-color: #2a2a2a;
}

body.dark-mode .cpp-events-title,
[data-theme="dark"] .cpp-events-title {
  color: #1E90FF;
}

body.dark-mode .cpp-event-item,
[data-theme="dark"] .cpp-event-item {
  background: #1a1a1a;
}

body.dark-mode .cpp-event-item:hover,
[data-theme="dark"] .cpp-event-item:hover {
  background: #263650;
}

body.dark-mode .cpp-event-name,
[data-theme="dark"] .cpp-event-name {
  color: #e2e8f0;
}

body.dark-mode .cpp-event-date,
[data-theme="dark"] .cpp-event-date {
  color: #94a3b8;
}

/* Dark Mode Tagged Users */
body.dark-mode .cpp-tagged,
[data-theme="dark"] .cpp-tagged {
  background: #1a1a1a;
  border-top-color: #2a2a2a;
}

body.dark-mode .cpp-tagged-title,
[data-theme="dark"] .cpp-tagged-title {
  color: #1E90FF;
}

body.dark-mode .cpp-tagged-user,
[data-theme="dark"] .cpp-tagged-user {
  background: #162033;
}

body.dark-mode .cpp-tagged-user:hover,
[data-theme="dark"] .cpp-tagged-user:hover {
  background: #263650;
}

body.dark-mode .cpp-tagged-user span,
[data-theme="dark"] .cpp-tagged-user span {
  color: #e2e8f0;
}

/* ============================================
   GROUP CHAT INLINE OVERLAY STYLES
   Identisches Design wie 1:1 Chat + Group Features
   ============================================ */

/* Group Message Sender Info */
.group-msg-sender {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.group-msg-avatar {
  width: 20px;
  height: 20px;
  min-width: 20px;
  min-height: 20px;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.group-msg-username {
  font-size: 11px;
  font-weight: 700;
  color: #0074D9;
}

/* Reply Preview */
.msg-reply-preview {
  background: rgba(0, 116, 217, 0.08);
  border-left: 3px solid #0074D9;
  border-radius: 4px;
  padding: 4px 8px;
  margin-bottom: 4px;
  font-size: 12px;
}

.msg-reply-preview .reply-sender {
  font-weight: 700;
  color: #0074D9;
  margin-right: 4px;
}

.msg-reply-preview .reply-text {
  color: #666;
}

/* Reactions */
.msg-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.msg-reaction {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 12px;
  padding: 2px 6px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.msg-reaction:hover {
  background: rgba(0, 116, 217, 0.15);
}

/* Edited Badge */
.msg-edited {
  font-size: 10px;
  color: #999;
  font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   DATE SEPARATOR — Heute / Gestern / Datum
   ═══════════════════════════════════════════════════════════ */
.chat-date-separator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  align-self: stretch;
}

.chat-date-separator .date-line {
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
}

.chat-date-separator .date-label {
  font-size: 11px;
  font-weight: 400;
  color: #8e8e93;
  letter-spacing: 0.3px;
  white-space: nowrap;
  padding: 0 4px;
}

/* ═══════════════════════════════════════════════════════════
   SYSTEM MESSAGE — dezent, zentriert
   ═══════════════════════════════════════════════════════════ */
.message-system {
  align-self: center !important;
  max-width: 85%;
  margin: 8px 0;
}

.message-system .message-content {
  background: transparent !important;
  color: #8e8e93;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  padding: 6px 14px;
  border-radius: 0;
}

.message-system .message-timestamp {
  text-align: center;
  font-size: 9px;
  color: #adb5bd;
}

/* Info-Icon für Matchanfrage-System-Nachricht */
.system-info-icon {
  font-size: 11px;
  color: #0ea5e9;
  margin-right: 4px;
  vertical-align: middle;
}

.message-system .message-content.system-info {
  color: #6b7280;
  font-style: italic;
  font-size: 11.5px;
}

/* Dark Mode — Date Separator + System */
body.dark-mode .chat-date-separator .date-line,
[data-theme="dark"] .chat-date-separator .date-line {
  background: rgba(255, 255, 255, 0.1);
}

body.dark-mode .chat-date-separator .date-label,
[data-theme="dark"] .chat-date-separator .date-label {
  color: #64748b;
}

body.dark-mode .message-system .message-content,
[data-theme="dark"] .message-system .message-content {
  background: transparent !important;
  color: #64748b;
}

/* Deleted Message */
.message-deleted {
  font-style: italic;
  color: #999 !important;
  background: rgba(0, 0, 0, 0.03) !important;
}

/* ═══════════════════════════════════════════════════════════
   PLANNING SYSTEM MESSAGE — dezent, zentriert, mit Icon
   ═══════════════════════════════════════════════════════════ */
.message-planning {
  align-self: center !important;
  max-width: 85%;
  margin: 8px 0;
}

.message-planning .message-content {
  background: transparent !important;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.4;
  text-align: center;
  padding: 6px 14px;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.message-planning .message-timestamp {
  text-align: center;
  font-size: 9px;
  color: #adb5bd;
}

.planning-icon {
  font-size: 13px;
  vertical-align: middle;
  flex-shrink: 0;
  color: #1a1a1a;
}

body.dark-mode .message-planning .message-content,
[data-theme="dark"] .message-planning .message-content {
  background: transparent !important;
  color: #94a3b8;
}

body.dark-mode .planning-icon,
[data-theme="dark"] .planning-icon {
  color: #ffffff;
}

/* Group Chat Toolbar — entfernt */
.group-chat-toolbar {
  display: none;
}

/* ============================================
   GROUP CHAT OVERLAY TABS — HIDDEN (legacy)
   ============================================ */
.gc-overlay-tabs {
  display: none !important;
}

/* ============================================
   GROUP CHAT BOTTOM-SHEET MODAL
   State-of-the-art slide-up bottom sheet
   ============================================ */

/* Trigger Button neben Send */
.gc-bs-trigger-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #0074D9, #1E90FF);
  color: #fff;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(0, 116, 217, 0.25);
}

.gc-bs-trigger-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 4px 14px rgba(0, 116, 217, 0.35);
}

/* Backdrop */
.gc-bs-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0);
  z-index: 99998;
  pointer-events: none;
  transition: background 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.gc-bs-backdrop.active {
  background: rgba(0, 0, 0, 0.4);
  pointer-events: auto;
}

/* Sheet Container */
.gc-bs-sheet {
  position: fixed;
  left: 0; right: 0;
  bottom: 0;
  z-index: 99999;
  background: #fff;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.12);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.32, 0.72, 0, 1);
  max-height: 75vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.gc-bs-sheet.active {
  transform: translateY(0);
}

/* Handle */
.gc-bs-handle-area {
  padding: 10px 0 4px;
  cursor: grab;
  display: flex;
  justify-content: center;
  flex-shrink: 0;
}

.gc-bs-handle {
  width: 40px;
  height: 4px;
  border-radius: 3px;
  background: #d1d5db;
  transition: background 0.2s;
}

.gc-bs-handle-area:hover .gc-bs-handle {
  background: #9ca3af;
}

/* Header */
.gc-bs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 20px 12px;
  flex-shrink: 0;
}

.gc-bs-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1f2937;
}

.gc-bs-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  line-height: 1;
}

.gc-bs-close:hover {
  background: #e5e7eb;
  color: #374151;
}

/* Navigation Buttons */
.gc-bs-nav {
  display: flex;
  gap: 12px;
  padding: 0 20px 20px;
  flex-shrink: 0;
}

.gc-bs-nav-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 12px;
  border: none;
  border-radius: 16px;
  background: #f8f9fb;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
}

.gc-bs-nav-btn:hover {
  background: #eef2ff;
  color: #0074D9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 116, 217, 0.1);
}

.gc-bs-nav-btn:active {
  transform: translateY(0);
}

.gc-bs-nav-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0074D9, #1E90FF);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 12px rgba(0, 116, 217, 0.2);
}

/* Content Area */
.gc-bs-content {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 0 20px 20px;
}

.gc-bs-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: none;
  border-radius: 10px;
  background: #f3f4f6;
  color: #4b5563;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-bottom: 14px;
  transition: all 0.15s;
}

.gc-bs-back:hover {
  background: #e5e7eb;
  color: #1f2937;
}

.gc-bs-panel {
  animation: gcBsFadeIn 0.25s ease;
}

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

/* Activities Panel */
.gc-activities-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.gco-activity-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
  margin-bottom: 6px;
}

.gco-activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
  color: #fff;
}

.gco-activity-info {
  flex: 1;
  min-width: 0;
}

.gco-activity-desc {
  font-weight: 500;
  font-size: 13.5px;
  color: #333;
  line-height: 1.4;
}

.gco-activity-meta {
  font-size: 12px;
  color: #9ca3af;
  margin-top: 2px;
}

/* ── Overlay Panels ── */
.gc-overlay-panel {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: #f0f2f5;
}

.gc-planning-content,
.gc-members-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ── Event Card ── */
.gco-event-card {
  background: linear-gradient(135deg, #0074D9 0%, #1E90FF 100%);
  border-radius: 16px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 116, 217, 0.25);
}

.gco-event-img {
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.gco-event-info {
  padding: 14px 16px;
}

.gco-event-info h4 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
}

.gco-event-info p {
  margin: 0 0 4px;
  font-size: 13px;
  opacity: 0.9;
}

.gco-event-info i {
  width: 18px;
  text-align: center;
  margin-right: 4px;
}

/* ── Sections ── */
.gco-section {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.gco-section h4 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #333;
  display: flex;
  align-items: center;
  gap: 8px;
}

.gco-section h4 i {
  color: #0074D9;
  font-size: 16px;
}

/* ── Ressourcen ── */
.gco-resource {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f0f0f0;
}

.gco-resource:last-of-type { border-bottom: none; }

.gco-resource-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(0, 116, 217, 0.1);
  color: #0074D9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.gco-resource-info { flex: 1; min-width: 0; }
.gco-resource-name { font-weight: 600; font-size: 14px; color: #333; }
.gco-resource-meta { font-size: 12px; color: #888; }
.gco-resource-cost { font-weight: 700; color: #4caf50; font-size: 14px; }

/* ── Add Row ── */
.gco-add-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.gco-add-input {
  flex: 1;
  padding: 10px 14px;
  border: 2px solid #e8ecf0;
  border-radius: 12px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.gco-add-input:focus { border-color: #0074D9; }

.gco-add-btn {
  padding: 10px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #0074D9, #1E90FF);
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}

.gco-add-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,116,217,0.3); }

/* ── Checkliste ── */
.gco-checklist-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.gco-check-btn {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 2px solid #ddd;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: transparent;
  transition: all 0.2s;
  flex-shrink: 0;
}

.gco-check-btn.checked {
  background: #4caf50;
  border-color: #4caf50;
  color: #fff;
}

.gco-checklist-text {
  font-size: 14px;
  color: #333;
}

.gco-checklist-text.completed {
  text-decoration: line-through;
  color: #999;
}

/* ── Polls ── */
.gco-poll {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #f0f0f0;
}

.gco-poll:last-of-type { border-bottom: none; }

.gco-poll-question {
  font-weight: 700;
  font-size: 14px;
  margin-bottom: 10px;
  color: #333;
}

.gco-poll-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 6px;
  background: #f8f9fa;
}

.gco-poll-option:hover { background: #e8f0fe; }

.gco-poll-option.voted {
  background: rgba(0, 116, 217, 0.08);
  border: 1px solid rgba(0, 116, 217, 0.2);
}

.gco-poll-bar {
  flex: 1;
  height: 6px;
  background: #e8ecf0;
  border-radius: 3px;
  overflow: hidden;
}

.gco-poll-fill {
  height: 100%;
  background: linear-gradient(90deg, #0074D9, #1E90FF);
  border-radius: 3px;
  transition: width 0.3s ease;
}

.gco-poll-votes {
  font-size: 12px;
  color: #888;
  font-weight: 600;
  min-width: 20px;
  text-align: right;
}

/* ── Members ── */
.gco-member {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.gco-member-avatar {
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  object-fit: cover;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
}

.gco-member-info { flex: 1; min-width: 0; }
.gco-member-name { font-weight: 600; font-size: 14px; color: #333; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.gco-member-role {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 6px;
  font-weight: 600;
}

.gco-member-role.admin {
  background: rgba(0, 116, 217, 0.1);
  color: #0074D9;
}

.gco-member-role.member {
  background: rgba(0, 0, 0, 0.05);
  color: #888;
}

.gco-member-joined {
  font-size: 12px;
  color: #888;
  margin-top: 2px;
}

/* ── Empty State ── */
.gco-empty {
  text-align: center;
  padding: 32px 16px;
  color: #888;
}

.gco-empty h4 {
  margin: 0 0 8px;
  color: #555;
}

.gco-empty p {
  margin: 0;
  font-size: 13px;
}

/* ── Poll Modal ── */
.gco-modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gco-modal {
  background: #fff;
  border-radius: 20px;
  width: 90%;
  max-width: 400px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  overflow: hidden;
}

.gco-modal-header {
  background: linear-gradient(135deg, #0074D9, #1E90FF);
  color: #fff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.gco-modal-header h4 { margin: 0; font-size: 16px; }

.gco-modal-close {
  background: none;
  border: none;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  line-height: 1;
}

.gco-modal-body { padding: 20px; }
.gco-modal-footer { padding: 12px 20px 20px; }

/* ── Dark Mode ── */
body.dark-mode .gc-bs-sheet { background: #1e1e1e; box-shadow: 0 -8px 40px rgba(0,0,0,0.4); }
body.dark-mode .gc-bs-handle { background: #555; }
body.dark-mode .gc-bs-header h3 { color: #f3f4f6; }
body.dark-mode .gc-bs-close { background: #333; color: #aaa; }
body.dark-mode .gc-bs-close:hover { background: #444; color: #fff; }
body.dark-mode .gc-bs-nav-btn { background: #2a2a2a; color: #ccc; }
body.dark-mode .gc-bs-nav-btn:hover { background: #333; color: #4da6ff; }
body.dark-mode .gc-bs-back { background: #333; color: #ccc; }
body.dark-mode .gc-bs-back:hover { background: #444; color: #fff; }
body.dark-mode .gco-activity-item { background: #1e1e1e; }
body.dark-mode .gco-activity-desc { color: #eee; }
body.dark-mode .gco-activity-meta { color: #777; }

body.dark-mode .gc-overlay-panel { background: #121212; }
body.dark-mode .gco-section { background: #1e1e1e; }
body.dark-mode .gco-section h4 { color: #fff; }
body.dark-mode .gco-resource-name { color: #fff; }
body.dark-mode .gco-checklist-text { color: #eee; }
body.dark-mode .gco-poll-question { color: #fff; }
body.dark-mode .gco-poll-option { background: #2a2a2a; }
body.dark-mode .gco-poll-option:hover { background: #333; }
body.dark-mode .gco-poll-bar { background: #333; }
body.dark-mode .gco-member { background: #1e1e1e; }
body.dark-mode .gco-member-name { color: #fff; }
body.dark-mode .gco-add-input { background: #2a2a2a; border-color: #444; color: #fff; }
body.dark-mode .gco-add-input:focus { border-color: #4da6ff; }
body.dark-mode .gco-modal { background: #1e1e1e; }
body.dark-mode .gco-modal-body input { background: #2a2a2a; border-color: #444; color: #fff; }

.gc-tool-btn {
  display: none; /* Alter Expand-Button nicht mehr benötigt */
}

/* Typing Indicator */
.group-typing-indicator {
  padding: 4px 12px;
  font-size: 12px;
  color: #999;
  font-style: italic;
}

.typing-dot-anim {
  display: inline-flex;
  gap: 2px;
  vertical-align: middle;
}

.typing-dot-anim span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #999;
  animation: typingBounce 1.2s infinite;
}

.typing-dot-anim span:nth-child(2) { animation-delay: 0.2s; }
.typing-dot-anim span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-4px); }
}

/* Dark Mode — Group Chat */
body.dark-mode .group-msg-username,
[data-theme="dark"] .group-msg-username {
  color: #4da6ff;
}

body.dark-mode .msg-reply-preview,
[data-theme="dark"] .msg-reply-preview {
  background: rgba(0, 116, 217, 0.12);
}

body.dark-mode .msg-reply-preview .reply-text,
[data-theme="dark"] .msg-reply-preview .reply-text {
  color: #bbb;
}

body.dark-mode .msg-reaction,
[data-theme="dark"] .msg-reaction {
  background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .message-deleted,
[data-theme="dark"] .message-deleted {
  background: rgba(255, 255, 255, 0.03) !important;
  color: #666 !important;
}

/* ═══════════════════════════════════════════════════════════
   CONTEXT MENU (Message Actions Popup)
   ═══════════════════════════════════════════════════════════ */

.co-msg-actions {
  position: fixed;
  z-index: 10001;
  background: #ffffff;
  border-radius: 14px;
  padding: 8px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18), 0 2px 8px rgba(0, 0, 0, 0.08);
  animation: coMenuIn 0.15s ease-out;
  min-width: 220px;
  max-width: 320px;
}

@keyframes coMenuIn {
  from { opacity: 0; transform: scale(0.92) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.co-actions-emoji-row {
  display: flex;
  gap: 2px;
  padding: 4px 0 8px;
  border-bottom: 1px solid #f0f0f0;
  justify-content: center;
}

.co-action-emoji {
  font-size: 22px;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.12s, transform 0.12s;
  user-select: none;
}

.co-action-emoji:hover {
  background: #f2f4f7;
  transform: scale(1.15);
}

.co-action-emoji:active {
  transform: scale(0.95);
}

.co-actions-btn-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 6px;
}

.co-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: none;
  background: none;
  border-radius: 10px;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  transition: background 0.12s;
  text-align: left;
  width: 100%;
}

.co-action-btn i {
  width: 18px;
  text-align: center;
  font-size: 14px;
  color: #666;
}

.co-action-btn:hover {
  background: #f2f4f7;
}

.co-action-btn.co-action-danger {
  color: #e53935;
}

.co-action-btn.co-action-danger i {
  color: #e53935;
}

.co-action-btn.co-action-danger:hover {
  background: rgba(229, 57, 53, 0.08);
}

/* ═══════════════════════════════════════════════════════════
   REPLY PREVIEW BAR (above input)
   ═══════════════════════════════════════════════════════════ */

.co-reply-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin: 0 0 0 0;
  background: #f5f7fa;
  border-left: 3px solid #0074D9;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  color: #666;
  animation: coSlideDown 0.15s ease-out;
}

.co-reply-bar.visible {
  display: flex;
}

@keyframes coSlideDown {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.co-reply-bar-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.co-reply-icon {
  color: #0074D9;
  font-size: 13px;
  flex-shrink: 0;
}

.co-reply-bar-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.co-reply-bar-sender {
  font-weight: 700;
  color: #0074D9;
  font-size: 12px;
}

.co-reply-bar-content {
  font-size: 12px;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.co-reply-bar-close {
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.12s;
}

.co-reply-bar-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #333;
}

/* ═══════════════════════════════════════════════════════════
   EDIT INDICATOR BAR (above input)
   ═══════════════════════════════════════════════════════════ */

.co-edit-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  margin: 0;
  background: #fff8e1;
  border-left: 3px solid #ffa726;
  border-radius: 8px 8px 0 0;
  font-size: 13px;
  color: #666;
  animation: coSlideDown 0.15s ease-out;
}

.co-edit-bar.visible {
  display: flex;
}

.co-edit-bar-info {
  display: flex;
  align-items: center;
  gap: 8px;
}

.co-edit-icon {
  color: #ffa726;
  font-size: 13px;
}

.co-edit-bar-text {
  font-size: 12px;
  font-weight: 600;
  color: #e65100;
}

.co-edit-bar-close {
  background: none;
  border: none;
  color: #999;
  font-size: 18px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 50%;
  line-height: 1;
  transition: background 0.12s;
}

.co-edit-bar-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: #333;
}

/* ═══════════════════════════════════════════════════════════
   PINNED MESSAGE BADGE
   ═══════════════════════════════════════════════════════════ */

.co-msg-pin-badge {
  font-size: 11px;
  color: #0074D9;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  padding: 2px 0;
}

.co-msg-pin-badge i {
  font-size: 10px;
}

/* ═══════════════════════════════════════════════════════════
   REACTIONS ENHANCEMENTS
   ═══════════════════════════════════════════════════════════ */

.msg-reaction.my-reaction {
  background: rgba(0, 116, 217, 0.12);
  border: 1px solid rgba(0, 116, 217, 0.3);
}

.msg-reaction .count {
  font-size: 11px;
  color: #666;
  margin-left: 2px;
}

/* ═══════════════════════════════════════════════════════════
   EDITING HIGHLIGHT
   ═══════════════════════════════════════════════════════════ */

.message.co-editing {
  box-shadow: 0 0 0 2px rgba(255, 167, 38, 0.5);
  border-radius: 12px;
}

/* ═══════════════════════════════════════════════════════════
   HIGHLIGHT ANIMATION (for scrolling to pinned)
   ═══════════════════════════════════════════════════════════ */

.message.co-highlight {
  animation: coHighlight 2s ease-out;
}

@keyframes coHighlight {
  0% { box-shadow: 0 0 0 3px rgba(0, 116, 217, 0.5); }
  100% { box-shadow: none; }
}

/* ═══════════════════════════════════════════════════════════
   DARK MODE — New Features
   ═══════════════════════════════════════════════════════════ */

body.dark-mode .co-msg-actions,
[data-theme="dark"] .co-msg-actions {
  background: #2a2a2e;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

body.dark-mode .co-actions-emoji-row,
[data-theme="dark"] .co-actions-emoji-row {
  border-bottom-color: #3a3a3e;
}

body.dark-mode .co-action-emoji:hover,
[data-theme="dark"] .co-action-emoji:hover {
  background: #3a3a3e;
}

body.dark-mode .co-action-btn,
[data-theme="dark"] .co-action-btn {
  color: #ddd;
}

body.dark-mode .co-action-btn i,
[data-theme="dark"] .co-action-btn i {
  color: #aaa;
}

body.dark-mode .co-action-btn:hover,
[data-theme="dark"] .co-action-btn:hover {
  background: #3a3a3e;
}

body.dark-mode .co-reply-bar,
[data-theme="dark"] .co-reply-bar {
  background: #2a2a2e;
  border-left-color: #4da6ff;
}

body.dark-mode .co-reply-bar-content,
[data-theme="dark"] .co-reply-bar-content {
  color: #999;
}

body.dark-mode .co-edit-bar,
[data-theme="dark"] .co-edit-bar {
  background: #3a3020;
  border-left-color: #ffa726;
}

body.dark-mode .co-edit-bar-text,
[data-theme="dark"] .co-edit-bar-text {
  color: #ffa726;
}

body.dark-mode .co-msg-pin-badge,
[data-theme="dark"] .co-msg-pin-badge {
  color: #4da6ff;
}

body.dark-mode .msg-reaction.my-reaction,
[data-theme="dark"] .msg-reaction.my-reaction {
  background: rgba(77, 166, 255, 0.15);
  border-color: rgba(77, 166, 255, 0.3);
}

body.dark-mode .msg-reaction .count,
[data-theme="dark"] .msg-reaction .count {
  color: #999;
}

/* ════════════════════════════════════════════
   Chat Overlay — 3-Dot Menu (Mute/Block/Search/Report/Clear)
   ════════════════════════════════════════════ */
.co-chat-dropdown-menu {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  min-width: 220px;
  background: var(--bg-primary, #fff);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
  z-index: 9999;
  overflow: hidden;
  animation: coMenuSlideIn .2s ease;
}
.co-chat-dropdown-menu.open { display: block; }
@keyframes coMenuSlideIn { from { opacity:0; transform: translateY(-8px); } to { opacity:1; transform: translateY(0); } }
.co-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-primary, #333);
  transition: background .15s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}
.co-menu-item:hover { background: rgba(255,87,34,0.08); }
.co-menu-item i { width: 16px; text-align: center; font-size: 13px; color: #888; }
.co-menu-item.co-destructive { color: #e53935; }
.co-menu-item.co-destructive i { color: #e53935; }
.co-menu-divider { height: 1px; background: rgba(0,0,0,0.08); margin: 4px 0; }

body.dark-mode .co-chat-dropdown-menu,
[data-theme="dark"] .co-chat-dropdown-menu {
  background: #1e1e2e;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
body.dark-mode .co-menu-item,
[data-theme="dark"] .co-menu-item { color: #ccc; }
body.dark-mode .co-menu-item:hover,
[data-theme="dark"] .co-menu-item:hover { background: rgba(255,87,34,0.12); }
body.dark-mode .co-menu-divider,
[data-theme="dark"] .co-menu-divider { background: rgba(255,255,255,0.08); }

/* Search Bar in Overlay Header */
.co-search-bar {
  display: none;
  align-items: center;
  gap: 6px;
}
.co-search-bar.active { display: flex; }
.co-search-bar input {
  border: none;
  outline: none;
  padding: 6px 10px;
  border-radius: 16px;
  background: rgba(0,0,0,0.06);
  font-size: 13px;
  color: var(--text-primary, #333);
  width: 160px;
}
.co-search-close-btn {
  border: none;
  background: none;
  cursor: pointer;
  color: #888;
  font-size: 14px;
}
body.dark-mode .co-search-bar input,
[data-theme="dark"] .co-search-bar input {
  background: rgba(255,255,255,0.1);
  color: #eee;
}

/* Search Results in Messages */
.co-msg-search-highlight {
  background: rgba(255,149,0,0.25) !important;
  border-radius: 8px;
  transition: background 1.5s;
}

/* Blocked Notice Banner */
.co-blocked-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fef2f2;
  border-bottom: 1px solid rgba(220,38,38,0.15);
  color: #dc2626;
  font-size: 13px;
}
.co-blocked-banner i { font-size: 16px; flex-shrink: 0; }
.co-blocked-banner-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.co-blocked-banner-text span:first-child { font-weight: 600; }
.co-blocked-date { font-size: 11px; opacity: 0.8; }
.co-blocked-unblock-btn {
  padding: 5px 12px;
  border: 1.5px solid #dc2626;
  border-radius: 6px;
  background: transparent;
  color: #dc2626;
  font-weight: 600;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.co-blocked-unblock-btn:hover {
  background: #dc2626;
  color: #fff;
}
/* Blocked chat item in list */
.chat-contact-item.co-blocked {
  opacity: 0.55;
}
.chat-contact-item.co-blocked .chat-last-message {
  color: #dc2626 !important;
}
/* Blocked input disabled */
.co-blocked-input-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #f3f4f6;
  color: #9ca3af;
  font-size: 13px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.co-blocked-input-bar i { font-size: 14px; }

/* Dark mode blocked */
body.dark-mode .co-blocked-banner,
[data-theme="dark"] .co-blocked-banner {
  background: #2d1a1a;
}
body.dark-mode .co-blocked-input-bar,
[data-theme="dark"] .co-blocked-input-bar {
  background: #1c1c1e;
  border-top-color: rgba(255,255,255,0.06);
}
