.minichat-icon {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: #6a0dad;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  font-size: 28px;
  line-height: 50px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 0 10px rgba(106, 13, 173, 0.7);
  z-index: 9999;
}

.minichat-window {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 320px;
  height: 500px;
  max-width: 90vw;
  background: #121212;
  border-radius: 10px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.7);
  display: none;
  flex-direction: column;
  font-family: Arial, sans-serif;
  color: #eee;
  z-index: 9999;
}

.minichat-header {
  display: flex;
  align-items: center;
  background: #1f1f1f;
  padding: 10px 15px;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

.minichat-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  border: 2px solid #4caf50;
}

.minichat-header .user-info {
  flex-grow: 1;
}

.minichat-header .user-info .name {
  font-weight: bold;
  font-size: 16px;
  line-height: 1.1;
}

.minichat-header .user-info .status {
  font-size: 12px;
  color: #4caf50;
  margin-top: 2px;
}

.minichat-content {
  display: flex;
  flex-grow: 1;
  background: #181818;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  overflow: hidden;
}

.specialists-list {
  background: rgba(30, 30, 30, 0.7);
  border-right: 1px solid #444;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 0;
  box-sizing: border-box;
  user-select: none;
}

.specialist {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  margin: 6px 0;
  cursor: pointer;
  border: 2px solid transparent;
  transition: border-color 0.3s, transform 0.2s;
  position: relative;
}

.specialist:hover {
  border-color: #6a0dad;
  transform: scale(1.1);
}

.specialist.active {
  border-color: #4caf50;
}

.specialist img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.specialist[data-name]:hover::after {
  content: attr(data-name);
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: #4caf50;
  color: #121212;
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  user-select: none;
  box-shadow: 0 0 5px #4caf50aa;
}

.minichat-messages {
  flex-grow: 1;
  padding: 10px 15px;
  overflow-y: auto;
  font-size: 14px;
  flex-shrink: 1;
}

.message {
  margin-bottom: 10px;
  max-width: 69%;
  padding: 8px 12px;
  border-radius: 15px;
  line-height: 1.3;
  word-wrap: break-word;
  word-break: break-word;
}

.message.user {
  background: #6a0dad;
  color: white;
  margin-left: auto;
  border-bottom-right-radius: 0;
}

.message.support {
  background: #333;
  color: #ddd;
  margin-right: auto;
  border-bottom-left-radius: 0;
}

.minichat-input {
  display: flex;
  border-top: 1px solid #333;
  background: #1f1f1f;
  padding: 10px 15px;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  gap: 10px;
}

.minichat-input input {
  flex-grow: 1;
  border: none;
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 14px;
  background: #2a2a2a;
  color: #eee;
  outline: none;
  min-width: 0;
}

.minichat-input button {
  background: #6a0dad;
  border: none;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
  flex-shrink: 0;
}

.minichat-input button:hover {
  background: #7e3ed9;
}

.minichat-messages::-webkit-scrollbar {
  width: 6px;
}

.minichat-messages::-webkit-scrollbar-thumb {
  background-color: #6a0dad;
  border-radius: 3px;
}

@media (max-width: 920px) {
  .minichat-window {
    width: 95vw;
    height: 90vh;
    bottom: 60px;
    right: 2.5vw;
  }

  .message {
    max-width: 50%;
  }

  .minichat-header {
    padding: 6px 15px;
  }

  .minichat-messages {
    padding: 8px 15px;
  }

  .minichat-icon {
    bottom: 5px;
  }

  .minichat-content {
    flex-direction: column;
  }

  .specialists-list {
    width: 100%;
    height: 60px;
    flex-direction: row;
    border-right: none;
    border-bottom: 1px solid #444;
    padding: 8px 5px;
    justify-content: center;
    gap: 10px;
  }

  .specialist {
    width: 44px;
    height: 44px;
    margin: 0;
  }
  
  .specialist[data-name]:hover::after {
    left: 50%;
    top: 70px;
    transform: translateX(-50%);
  }
}