/* Main layout */
#root {
  display: flex;
  min-height: 100vh;
  padding: 20px;
  gap: 24px;
  background: #f5f7fa;
}

/* Right side content */
.right-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
  max-width: 1280px;
  position: relative;
  height: calc(100vh - 40px);
}

/* Icon buttons */
.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 8px;
  background: #f0f2f5;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}

.icon-button:hover {
  background: #e6e8eb;
  color: #1a1a1a;
}

.icon-button.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-button .material-icons {
  font-size: 20px;
}

.icon-button .spinning {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.icon-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-button {
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.icon-button:hover:not(:disabled) {
  background: #f0f0f0;
}

.icon-button:active:not(:disabled) {
  background: #e0e0e0;
}

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Responsive design */
@media (max-width: 1024px) {
  #root {
    flex-direction: column;
    padding: 16px;
  }

  .left-side {
    flex: none;
    width: 100%;
  }

  .chat-window {
    height: 300px;
  }
}

/* Animation for messages */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.chat-message {
  animation: slideIn 0.2s ease-out;
}

/* Network quality stats positioning */
.network-quality-container {
  margin-top: 16px;
  transition: all 0.3s ease;
}

.avatar-select {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 14px;
  min-width: 200px;
}

.avatar-select option {
  padding: 8px;
}

.avatar-select option.available {
  color: #2ecc71;
}

.avatar-select option.unavailable {
  color: #e74c3c;
}

.avatar-select optgroup {
  font-weight: bold;
  color: #34495e;
}

/* Style for disabled state */
.avatar-select:disabled {
  background-color: #f5f5f5;
  cursor: not-allowed;
}
