.sw-chat-bubble {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #2FD3BF;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(47, 211, 191, 0.35);
  z-index: 9999;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.sw-chat-bubble:hover { transform: scale(1.08); }
.sw-chat-bubble:active { transform: scale(0.96); }
.sw-chat-bubble:focus-visible { outline: 2px solid #0A2540; outline-offset: 3px; }
.sw-chat-bubble svg { width: 26px; height: 26px; fill: #0A2540; }

.sw-chat-window {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 380px;
  max-height: 520px;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(10, 37, 64, 0.18);
  z-index: 9998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.sw-chat-window.sw-chat-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.sw-chat-header {
  background: #0A2540;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.sw-chat-header-info { display: flex; align-items: center; gap: 12px; }
.sw-chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(47, 211, 191, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.sw-chat-avatar svg { width: 18px; height: 18px; fill: #2FD3BF; }
.sw-chat-header-text h3 {
  margin: 0;
  font-family: 'Raleway', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}
.sw-chat-header-text p {
  margin: 2px 0 0;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
}
.sw-chat-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sw-chat-close:hover { color: #2FD3BF; }
.sw-chat-close:focus-visible { outline: 2px solid #2FD3BF; outline-offset: 2px; }
.sw-chat-close svg { width: 18px; height: 18px; fill: currentColor; }

.sw-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 8px;
  background: #F6F9FC;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  max-height: 340px;
}
.sw-chat-messages::-webkit-scrollbar { width: 4px; }
.sw-chat-messages::-webkit-scrollbar-track { background: transparent; }
.sw-chat-messages::-webkit-scrollbar-thumb { background: rgba(10, 37, 64, 0.15); border-radius: 2px; }

.sw-chat-msg {
  max-width: 82%;
  padding: 10px 14px;
  font-family: 'Open Sans', sans-serif;
  font-size: 13.5px;
  line-height: 1.6;
  word-wrap: break-word;
}
.sw-chat-msg-bot {
  align-self: flex-start;
  background: #FFFFFF;
  color: #0A2540;
  border: 1px solid #E2EAF1;
  border-radius: 12px 12px 12px 4px;
}
.sw-chat-msg-user {
  align-self: flex-end;
  background: #0A2540;
  color: #fff;
  border-radius: 12px 12px 4px 12px;
}
.sw-chat-msg-bot a {
  color: #13A892;
  font-weight: 600;
  text-decoration: none;
}
.sw-chat-msg-bot a:hover { text-decoration: underline; }

.sw-chat-typing {
  align-self: flex-start;
  display: flex;
  gap: 5px;
  padding: 12px 18px;
  background: #FFFFFF;
  border: 1px solid #E2EAF1;
  border-radius: 12px 12px 12px 4px;
}
.sw-chat-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #2FD3BF;
  opacity: 0.4;
  animation: sw-chat-bounce 1.4s ease-in-out infinite;
}
.sw-chat-dot:nth-child(2) { animation-delay: 0.2s; }
.sw-chat-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes sw-chat-bounce {
  0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-4px); }
}

.sw-chat-input {
  display: flex;
  align-items: center;
  border-top: 1px solid #E2EAF1;
  background: #fff;
  flex-shrink: 0;
}
.sw-chat-input input {
  flex: 1;
  border: none;
  outline: none;
  padding: 14px 16px;
  font-family: 'Open Sans', sans-serif;
  font-size: 14px;
  color: #0A2540;
  background: transparent;
}
.sw-chat-input input::placeholder { color: #5A6B7B; }
.sw-chat-send {
  background: #E2342B;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 14px;
  margin: 8px 10px 8px 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  flex-shrink: 0;
}
.sw-chat-send:hover { background: #C42D24; }
.sw-chat-send:active { transform: scale(0.96); }
.sw-chat-send:focus-visible { outline: 2px solid #0A2540; outline-offset: 2px; }
.sw-chat-send:disabled { opacity: 0.5; cursor: not-allowed; }
.sw-chat-send svg { width: 18px; height: 18px; fill: #fff; }

@media (max-width: 480px) {
  .sw-chat-window {
    width: calc(100vw - 16px);
    right: 8px;
    bottom: 88px;
    max-height: calc(100vh - 110px);
  }
  .sw-chat-messages { max-height: none; min-height: 200px; }
  .sw-chat-bubble { bottom: 16px; right: 16px; }
}
