/* Chat modal */
.chat-modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 450px;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 5;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: -2px 0 10px rgba(0,0,0,0.5);
}

.chat-modal.open {
  transform: translateX(0);
}

/* Chat header */
.chat-header {
  padding: 10px 15px;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
}

.chat-title {
  font-weight: bold;
  color: #2196F3;
}

.chat-close {
  cursor: pointer;
  color: #aaa;
  font-size: 18px;
  transition: color 0.3s ease;
}

.chat-close:hover {
  color: #2196F3;
}

/* Chat tabs */
.chat-tabs-container {
  position: relative;
  height: 40px;
  background: rgba(0, 0, 0, 0.8);
  border-bottom: 1px solid #333;
  overflow: hidden;
}

.chat-tabs {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 5px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.chat-tabs:hover {
  opacity: 1;
}

.chat-tabs.has-active {
  opacity: 1;
}

.chat-tab {
  display: flex;
  padding: 5px 10px;
  background: rgba(0, 0, 0, 0.5);
  color: #aaa;
  border-radius: 4px 4px 0 0;
  margin-right: 5px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
  align-items: center;
  justify-content: space-between;
}

.chat-tab .tab-title {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-tab .tab-close {
  margin-left: 8px;
  color: #777;
  font-size: 12px;
  opacity: 0.7;
  transition: all 0.2s ease;
}

.chat-tab .tab-close:hover {
  color: #f44336;
  opacity: 1;
}

.chat-tab:hover {
  background: rgba(33, 150, 243, 0.2);
}

.chat-tab.active {
  background: rgba(33, 150, 243, 0.8);
  color: white;
}

.chat-tab.active .tab-close {
  color: rgba(255, 255, 255, 0.7);
}

.chat-tab.active .tab-close:hover {
  color: white;
}

/* Chat content */
.chat-content {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.chat-iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}

.chat-iframe.active {
  display: block;
}

/* Chat resize handle */
.chat-resize-handle {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 5px;
  cursor: ew-resize;
  z-index: 901;
}

.resizing-chat {
  user-select: none;
  pointer-events: none;
}

/* Chat states */
.chat-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f5f5f5;
  color: #666;
  font-size: 14px;
  text-align: center;
}

.chat-disabled-message {
  padding: 20px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 5px;
}

.chat-iframe.error-message {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #2c2c2c;
  color: #ff5252;
  font-size: 14px;
  padding: 20px;
  text-align: center;
}

.chat-error {
  color: #ff5252;
  padding: 15px;
  text-align: center;
  background-color: rgba(255, 0, 0, 0.1);
  border-radius: 4px;
  margin: 10px;
}

.chat-tab.error {
  background-color: rgba(255, 0, 0, 0.3);
} 