/* ── Chat widget ── */
.chat-widget { position: fixed; bottom: var(--space-xl); right: var(--space-xl); z-index: 1000; }

.chat-widget__toggle {
  width: var(--chat-btn-size);
  height: var(--chat-btn-size);
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: var(--color-white);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  font-size: 24px;
  box-shadow: 0 4px 20px rgba(99,102,241,0.4);
  transition: box-shadow var(--transition), transform var(--transition);
}
.chat-widget__toggle:hover { box-shadow: 0 4px 30px rgba(99,102,241,0.6); transform: scale(1.05); }

.chat-widget__indicator {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 11px;
  height: 11px;
  background: var(--color-success);
  border-radius: 50%;
  border: 2px solid #1a1a2e;
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.chat-widget__panel {
  position: absolute;
  bottom: calc(var(--chat-btn-size) + var(--space-md));
  right: 0;
  width: 320px;
  background: #0f0f1a;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  overflow: hidden;
  border: 1px solid rgba(99,102,241,0.2);
}
.chat-widget__header {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: var(--color-white);
  padding: var(--space-md);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}
.chat-widget__header .chat-widget__indicator { position: static; border-color: #6366f1; }
.chat-widget__title { font-size: var(--font-size-sm); font-weight: 700; line-height: 1.2; }
.chat-widget__sub   { font-size: 0.65rem; opacity: 0.75; }
.chat-widget__close {
  margin-left: auto;
  background: none;
  border: none;
  color: var(--color-white);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 var(--space-xs);
  opacity: 0.8;
}
.chat-widget__close:hover { opacity: 1; }
.chat-widget__messages {
  height: 220px;
  overflow-y: auto;
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  background: #0f0f1a;
}
.chat-widget__form { display: flex; border-top: 1px solid rgba(99,102,241,0.2); background: #0f0f1a; }
.chat-widget__form input {
  flex: 1;
  padding: var(--space-sm) var(--space-md);
  border: none;
  background: transparent;
  color: #ffffff;
  font-size: var(--font-size-sm);
  font-family: var(--font-main);
  outline: none;
}
.chat-widget__form input::placeholder { color: rgba(255,255,255,0.35); }
.chat-widget__form button {
  padding: var(--space-sm) var(--space-md);
  background: #6366f1;
  color: var(--color-white);
  border: none;
  font-weight: 600;
  font-size: var(--font-size-sm);
  cursor: pointer;
  transition: background var(--transition);
  font-family: var(--font-main);
}
.chat-widget__form button:hover { background: #8b5cf6; }

.chat-msg {
  padding: var(--space-xs) var(--space-md);
  border-radius: var(--radius);
  font-size: var(--font-size-sm);
  max-width: 85%;
  word-break: break-word;
  line-height: 1.5;
}
.chat-msg--user { background: rgba(255,255,255,0.08); color: #ffffff; align-self: flex-end; border-bottom-right-radius: 2px; }
.chat-msg--bot  { background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3); color: #ffffff; align-self: flex-start; border-bottom-left-radius: 2px; }

