.website-assistant {
  position: fixed;
  top: auto !important;
  left: auto;
  right: 1rem;
  bottom: 1rem;
  transform: none !important;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  pointer-events: none;
}

.website-assistant__toggle {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(249, 115, 22, 0.4);
  background: linear-gradient(135deg, var(--accent-600, #c2410c), var(--accent-500, #f97316));
  color: #f8fafc;
  cursor: pointer;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(249, 115, 22, 0.2) inset;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.website-assistant__toggle:hover {
  transform: translateY(-2px);
  border-color: rgba(249, 115, 22, 0.6);
  box-shadow: 0 22px 40px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(249, 115, 22, 0.4) inset;
}

.website-assistant__toggle-icon {
  width: 2.3rem;
  height: 2.3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  flex: 0 0 auto;
}

.website-assistant__toggle-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  text-align: start;
}

.website-assistant__toggle-label {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.1;
}

.website-assistant__toggle-subtitle {
  font-size: 0.72rem;
  color: #cbd5e1;
  line-height: 1.1;
}

.website-assistant__panel {
  pointer-events: auto;
  width: min(92vw, 390px);
  max-height: min(76vh, 640px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(5, 13, 21, 0.98);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(20px);
  transform: translateY(12px) scale(0.98);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  margin-bottom: 0.75rem;
}

.website-assistant__panel[hidden] {
  display: none !important;
}

.website-assistant.is-open .website-assistant__panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.website-assistant__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0.85rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.website-assistant__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(249, 115, 22, 0.16);
  color: var(--accent-400);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.55rem;
}

.website-assistant__title {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.25rem;
}

.website-assistant__subtitle {
  font-size: 0.82rem;
  color: #cbd5e1;
  max-width: 24rem;
}

.website-assistant__close {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #f8fafc;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.website-assistant__close:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(251, 146, 60, 0.28);
}

.website-assistant__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 16rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(249, 115, 22, 0.35) rgba(255, 255, 255, 0.04);
}

.website-assistant__messages::-webkit-scrollbar {
  width: 6px;
}

.website-assistant__messages::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
}

.website-assistant__messages::-webkit-scrollbar-thumb {
  background: rgba(249, 115, 22, 0.35);
  border-radius: 999px;
}

.website-assistant__messages::-webkit-scrollbar-thumb:hover {
  background: rgba(249, 115, 22, 0.55);
}

.website-assistant__message {
  max-width: 90%;
  padding: 0.8rem 0.9rem;
  border-radius: 1rem;
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.website-assistant__message--assistant {
  align-self: flex-start;
  background: rgba(15, 39, 68, 0.82);
  border: 1px solid rgba(148, 163, 184, 0.12);
  color: #e2e8f0;
}

.website-assistant__message--user {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent-500, #f97316), var(--accent-600, #c2410c));
  color: #fff;
  box-shadow: 0 12px 24px rgba(249, 115, 22, 0.2);
}

.website-assistant__message--status {
  align-self: center;
  padding-inline: 0;
  background: transparent;
  color: #94a3b8;
  font-size: 0.8rem;
}

.website-assistant__typing {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.website-assistant__typing span {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.75);
  animation: websiteAssistantPulse 1.2s infinite ease-in-out;
}

.website-assistant__typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.website-assistant__typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.website-assistant__form {
  display: flex;
  gap: 0.65rem;
  padding: 0.9rem 1rem 1rem;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.website-assistant__input {
  flex: 1;
  min-width: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(148, 163, 184, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.website-assistant__input:focus {
  border-color: rgba(249, 115, 22, 0.6);
  box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.12);
}

.website-assistant__input::placeholder {
  color: #64748b;
}

.website-assistant__send {
  flex: 0 0 auto;
  min-width: 5.5rem;
}

.website-assistant__note {
  padding: 0 1rem 1rem;
  margin-top: -0.15rem;
  font-size: 0.74rem;
  color: #94a3b8;
}

@keyframes websiteAssistantPulse {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.7; }
  40% { transform: translateY(-2px); opacity: 1; }
}

@media (max-width: 640px) {
  .website-assistant {
    top: auto !important;
    left: 0.75rem;
    right: 0.75rem;
    bottom: max(0.4rem, env(safe-area-inset-bottom));
    transform: none !important;
  }

  .website-assistant__toggle {
    width: 100%;
    justify-content: flex-start;
  }

  .website-assistant__panel {
    width: 100%;
    max-height: min(72vh, 620px);
  }

  .website-assistant__header {
    padding: 0.9rem 0.9rem 0.75rem;
  }

  .website-assistant__messages {
    min-height: 14rem;
    padding: 0.9rem;
  }

  .website-assistant__form {
    padding: 0.85rem 0.9rem 0.9rem;
  }

  .website-assistant__note {
    padding: 0 0.9rem 0.9rem;
  }
}