/* v1.5.2 - Enhanced Features + Preferences + Dynamic updates */
#cc-features-button {
  display:inline-flex; align-items:center; gap:.4rem;
  padding:6px 10px; border-radius:8px; border:1px solid #4b5563;
  background:#1f2937; color:#fff; font:inherit; cursor:pointer;
}
#cc-features-button .ico { font-size:1.05em; }
#cc-features-button:focus { outline:2px solid #60a5fa; outline-offset:2px; }
#cc-features-button:hover { background:#374151; }

/* Modal */
.cc-vnext-modal{position:fixed;left:24px;top:24px;width:340px;background:#1f2937;color:#fff;border-radius:14px;box-shadow:0 10px 30px rgba(0,0,0,.35);z-index:10000;user-select:none}
.cc-vnext-modal-header{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;background:#111827;border-top-left-radius:14px;border-top-right-radius:14px;cursor:grab}
.cc-vnext-modal-body{padding:12px;display:grid;grid-template-columns:1fr;gap:10px}
.cc-feature-btn{padding:12px;border-radius:10px;background:#374151;color:#fff;cursor:pointer;border:1px solid #4b5563;text-align:left}
.cc-feature-btn:hover{background:#4b5563}
.cc-vnext-modal-footer{padding:8px 12px;font-size:12px;color:#d1d5db}

/* Poll pulse highlight */
.cc-pulse {
  animation: cc-pulse 1.2s ease-in-out 2;
}
@keyframes cc-pulse {
  0% { box-shadow:0 0 0 0 rgba(96,165,250,.7); }
  100% { box-shadow:0 0 0 12px rgba(96,165,250,0); }
}

/* Embedded media styling */
.cc-media {
  margin: 8px 0;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(156, 163, 175, 0.2);
}
.cc-media img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}
.cc-media video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  outline: none;
}

/* Thumbnail sizing for images and videos */
.cc-thumbnail {
  max-width: 200px !important;
  max-height: 200px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cc-thumbnail:hover {
  transform: scale(1.05);
}

/* Click to expand functionality */
.cc-media.expanded .cc-thumbnail {
  max-width: 100% !important;
  max-height: none !important;
}

/* System messages */
.system-msg {
  opacity: 0.8;
  margin: 4px 0;
}
.system-msg .col-msg {
  color: #9aa4bb !important;
  font-style: italic;
  text-align: center;
  font-size: 0.9em;
}

/* Enhanced preferences support */
:root {
  --chat-text-color: #e7ecf3;
  --chat-font-family: system-ui, Segoe UI, Roboto, Arial;
}

/* Muted users styling */
.user[data-muted="true"] {
  opacity: 0.5;
  filter: grayscale(0.3);
}

/* Enhanced button states */
#featuresBtn:focus {
  outline: 2px solid #6aa7ff;
  outline-offset: 2px;
}

#featuresBtn:hover {
  background: #374151;
  border-color: #6aa7ff;
}

/* Poll management modal specific styles */
.cc-poll-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #4b5563;
}

.cc-tab-btn {
  padding: 8px 16px;
  background: transparent;
  color: #9ca3af;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.cc-tab-btn.active {
  color: #fff;
  border-bottom-color: #6aa7ff;
}

.cc-tab-btn:hover {
  color: #fff;
  background: rgba(107, 167, 255, 0.1);
}

.cc-tab-content {
  display: none;
}

.cc-tab-content.active {
  display: block;
}

.cc-poll-item {
  transition: all 0.2s ease;
}

.cc-poll-item:hover {
  background: #374151 !important;
  border-color: #6aa7ff !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .cc-vnext-modal {
    width: calc(100vw - 48px);
    left: 24px;
    right: 24px;
  }
  
  .cc-media img,
  .cc-media video {
    max-width: 100%;
    height: auto;
  }
  
  .cc-thumbnail {
    max-width: 150px !important;
    max-height: 150px !important;
  }
}