.sw-chat-shell {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 1100;
  font-family: "Poppins", sans-serif;
}

.sw-chat-toggle {
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #1d6fe1, #1558b8);
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(29, 111, 225, 0.3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.sw-chat-toggle:hover {
  transform: translateY(-1px);
}

.sw-chat-panel {
  position: absolute;
  right: 0;
  bottom: 74px;
  width: 360px;
  max-width: calc(100vw - 24px);
  height: 540px;
  max-height: min(72vh, 540px);
  background: #ffffff;
  border: 1px solid #dbe5f2;
  border-radius: 14px;
  box-shadow: 0 18px 35px rgba(15, 31, 92, 0.24);
  display: none;
  flex-direction: column;
  overflow: hidden;
}

.sw-chat-shell.is-open .sw-chat-panel {
  display: flex;
}

.sw-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 12px;
  background: #0f1f5c;
  color: #ffffff;
}

.sw-chat-title {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  margin: 0;
}

.sw-chat-subtitle {
  font-size: 12px;
  margin: 2px 0 0;
  opacity: 0.9;
}

.sw-chat-close {
  border: none;
  background: transparent;
  color: #ffffff;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.sw-chat-close:hover {
  background: rgba(255, 255, 255, 0.12);
}

.sw-chat-messages {
  flex: 1;
  overflow-y: auto;
  background: #f7fbff;
  padding: 14px;
}

.sw-chat-row {
  display: flex;
  margin-bottom: 10px;
}

.sw-chat-row-user {
  justify-content: flex-end;
}

.sw-chat-row-assistant {
  justify-content: flex-start;
}

.sw-chat-bubble {
  max-width: 88%;
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.45;
}

.sw-chat-bubble-user {
  background: #1d6fe1;
  color: #ffffff;
  border-bottom-right-radius: 5px;
}

.sw-chat-bubble-assistant {
  background: #ffffff;
  color: #0f1f5c;
  border: 1px solid #dbe5f2;
  border-bottom-left-radius: 5px;
}

.sw-chat-links {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sw-chat-link {
  display: inline-block;
  font-size: 12px;
  color: #1558b8;
  text-decoration: underline;
}

.sw-chat-quick {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px 0;
  border-top: 1px solid #edf3fa;
}

.sw-chat-quick-btn {
  border: 1px solid #dbe5f2;
  background: #ffffff;
  color: #0f1f5c;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.sw-chat-quick-btn:hover {
  border-color: #1d6fe1;
}

.sw-chat-form {
  border-top: 1px solid #edf3fa;
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
}

.sw-chat-input {
  flex: 1;
  border: 1px solid #cfdced;
  border-radius: 8px;
  padding: 10px 11px;
  font-size: 14px;
  outline: none;
}

.sw-chat-input:focus {
  border-color: #1d6fe1;
  box-shadow: 0 0 0 2px rgba(29, 111, 225, 0.2);
}

.sw-chat-send {
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  background: #1d6fe1;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
}

.sw-chat-send:hover {
  background: #1558b8;
}

@media (max-width: 640px) {
  .sw-chat-shell {
    right: 12px;
  }

  .sw-chat-panel {
    width: min(96vw, 380px);
    right: -4px;
    bottom: 70px;
    height: min(74vh, 520px);
  }

  .sw-chat-toggle {
    width: 56px;
    height: 56px;
    font-size: 24px;
  }
}
