/* ==================================================================
   ЧАТ-ПОМОЩНИК
   ================================================================== */
.chat-assistant {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  font-family: "Montserrat", "Roboto", sans-serif;
}

.chat-toggle-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d6efd 0%, #1d8ce0 100%);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(13, 110, 253, 0.3);
  transition: all 0.3s ease;
  position: relative;
  z-index: 1001;
}

.chat-toggle-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 25px rgba(13, 110, 253, 0.4);
}

.chat-toggle-btn i {
  font-size: 1.5rem;
}

.chat-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #dc3545;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  border: 2px solid white;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.chat-window {
  position: absolute;
  bottom: 70px;
  right: 0;
  width: 350px;
  height: 500px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e9ecef;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s ease;
}

.chat-window.active {
  display: flex;
  transform: translateY(0);
  opacity: 1;
}

.chat-header {
  background: linear-gradient(135deg, #0d6efd 0%, #1d8ce0 100%);
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1rem;
}

.chat-title i {
  font-size: 1.2rem;
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.chat-body {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
  background: #f8f9fa;
}

.chat-message {
  display: flex;
  max-width: 80%;
  animation: messageAppear 0.3s ease forwards;
}

.chat-message.bot {
  align-self: flex-start;
}

.chat-message.user {
  align-self: flex-end;
}

.message-content {
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
}

.chat-message.bot .message-content {
  background: white;
  border: 1px solid #e9ecef;
  border-top-left-radius: 4px;
}

.chat-message.user .message-content {
  background: linear-gradient(135deg, #0d6efd 0%, #1d8ce0 100%);
  color: white;
  border-top-right-radius: 4px;
}

.message-text {
  font-size: 0.9rem;
  line-height: 1.4;
  margin-bottom: 5px;
}

.message-time {
  font-size: 0.7rem;
  opacity: 0.7;
  text-align: right;
}

@keyframes messageAppear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Быстрые вопросы */
.quick-questions {
  margin-top: 10px;
}

.quick-questions-title {
  font-size: 0.85rem;
  color: #6c757d;
  margin-bottom: 10px;
  font-weight: 600;
}

.quick-questions-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-question-btn {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 10px;
  padding: 10px 15px;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s;
  font-size: 0.85rem;
  color: #495057;
  display: flex;
  align-items: center;
  gap: 10px;
}

.quick-question-btn:hover {
  background: #f8f9fa;
  border-color: #0d6efd;
  transform: translateX(5px);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.quick-question-btn i {
  color: #0d6efd;
  font-size: 1rem;
  flex-shrink: 0;
}

/* Индикатор печатания */
.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 10px;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #6c757d;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(1) { animation-delay: 0s; }
.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  50% {
    transform: translateY(-5px);
    opacity: 1;
  }
}

/* Ссылки в сообщениях */
.message-link {
  color: #0d6efd;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dashed #0d6efd;
  transition: all 0.3s;
}

.message-link:hover {
  border-bottom-style: solid;
}

/* Поле ввода */
.chat-input-container {
  padding: 15px;
  border-top: 1px solid #e9ecef;
  background: white;
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.chat-input {
  flex-grow: 1;
  padding: 10px 15px;
  border: 1px solid #dee2e6;
  border-radius: 25px;
  font-size: 0.9rem;
  transition: all 0.3s;
}

.chat-input:focus {
  outline: none;
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.1);
}

.chat-send-btn {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d6efd 0%, #1d8ce0 100%);
  color: white;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s;
}

.chat-send-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}