@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&display=swap');

#ng-chatbot-root {
  --ng-chatbot-primary: #0f172a;
  --ng-chatbot-surface: rgba(255, 255, 255, 0.9);
  --ng-chatbot-surface-strong: rgba(255, 255, 255, 0.96);
  --ng-chatbot-surface-muted: rgba(248, 250, 252, 0.88);
  --ng-chatbot-text: #0f172a;
  --ng-chatbot-text-soft: #475569;
  --ng-chatbot-border: rgba(148, 163, 184, 0.24);
  --ng-chatbot-shadow: 0 26px 80px rgba(15, 23, 42, 0.18);

  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  font-family: 'Space Grotesk', 'Segoe UI', sans-serif;
}

#ng-chatbot-root[data-open='true'] .ng-chatbot-launcher {
  transform: translateY(2px);
}

.ng-chatbot-launcher {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 150px;
  height: 52px;
  padding: 0 20px;
  border: 0;
  border-radius: 18px;
  appearance: none;
  -webkit-appearance: none;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.2), transparent 38%),
    linear-gradient(135deg, #ff2f93, #f03ab2 52%, #b54fda 100%);
  box-shadow:
    0 18px 34px rgba(197, 47, 143, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  color: #ffffff;
  cursor: pointer;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    filter 180ms ease;
}

.ng-chatbot-launcher:hover {
  transform: translateY(-1px);
  box-shadow:
    0 20px 40px rgba(197, 47, 143, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  filter: saturate(1.04);
}

.ng-chatbot-launcher:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 4px rgba(255, 255, 255, 0.94),
    0 0 0 8px rgba(240, 58, 178, 0.18),
    0 20px 40px rgba(197, 47, 143, 0.28);
}

.ng-chatbot-launcher-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ng-chatbot-panel {
  position: absolute;
  right: 0;
  bottom: 80px;
  width: min(390px, calc(100vw - 28px));
  max-height: min(78vh, 620px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ng-chatbot-border);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(248, 250, 252, 0.92)),
    rgba(255, 255, 255, 0.9);
  box-shadow: var(--ng-chatbot-shadow);
  backdrop-filter: blur(24px);
  transform-origin: bottom right;
  animation: ng-chatbot-panel-enter 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.ng-chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
  color: #ffffff;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 42%),
    radial-gradient(circle at bottom right, rgba(59, 130, 246, 0.2), transparent 34%),
    linear-gradient(135deg, var(--ng-chatbot-primary), #0b1220 76%);
}

.ng-chatbot-header-main {
  display: flex;
  align-items: flex-start;
  min-width: 0;
}

.ng-chatbot-header-copy {
  min-width: 0;
}

.ng-chatbot-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.ng-chatbot-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.2;
  color: rgba(255, 255, 255, 0.8);
}

.ng-chatbot-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #86efac;
  box-shadow: 0 0 0 4px rgba(134, 239, 172, 0.14);
}

.ng-chatbot-close {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  line-height: 1;
  cursor: pointer;
  transition:
    background 160ms ease,
    transform 160ms ease;
}

.ng-chatbot-close:hover {
  background: rgba(255, 255, 255, 0.18);
  transform: translateY(-1px);
}

.ng-chatbot-messages {
  min-height: 300px;
  max-height: 420px;
  padding: 18px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  color: var(--ng-chatbot-text);
  background:
    radial-gradient(circle at top right, rgba(37, 99, 235, 0.08), transparent 38%),
    radial-gradient(circle at bottom left, rgba(15, 23, 42, 0.05), transparent 40%),
    linear-gradient(180deg, #f8fafc, #f1f5f9);
  overscroll-behavior: contain;
}

.ng-chatbot-messages::-webkit-scrollbar {
  width: 10px;
}

.ng-chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.ng-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.35);
  border: 3px solid transparent;
  border-radius: 999px;
  background-clip: padding-box;
}

.ng-chatbot-message-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.ng-chatbot-message-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.18), transparent 48%),
    linear-gradient(135deg, var(--ng-chatbot-primary), #2563eb 88%);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
  color: #ffffff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.ng-chatbot-message-bubble {
  max-width: 82%;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.ng-chatbot-user {
  justify-content: flex-end;
}

.ng-chatbot-user .ng-chatbot-message-bubble {
  color: #ffffff;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.15), transparent 42%),
    linear-gradient(135deg, var(--ng-chatbot-primary), #2563eb 96%);
  border-bottom-right-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.22);
}

.ng-chatbot-assistant {
  justify-content: flex-start;
}

.ng-chatbot-assistant .ng-chatbot-message-bubble {
  color: var(--ng-chatbot-text);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-bottom-left-radius: 8px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.ng-chatbot-form {
  padding: 14px 16px 16px;
  border-top: 1px solid var(--ng-chatbot-border);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.96)),
    #ffffff;
}

.ng-chatbot-composer {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 20px;
  background: var(--ng-chatbot-surface-muted);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 10px 24px rgba(15, 23, 42, 0.06);
}

.ng-chatbot-input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ng-chatbot-text);
  padding: 9px 8px 9px 10px;
  font-size: 14px;
  line-height: 1.35;
}

.ng-chatbot-input::placeholder {
  color: #64748b;
}

.ng-chatbot-input:focus {
  outline: none;
}

.ng-chatbot-composer:focus-within {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 0 4px rgba(37, 99, 235, 0.1),
    0 10px 24px rgba(15, 23, 42, 0.08);
}

.ng-chatbot-send {
  flex: 0 0 auto;
  min-width: 72px;
  border: 0;
  border-radius: 14px;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.14), transparent 44%),
    linear-gradient(135deg, var(--ng-chatbot-primary), #1d4ed8 92%);
  color: #ffffff;
  font-weight: 600;
  padding: 11px 14px;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease;
}

.ng-chatbot-send:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.26);
}

.ng-chatbot-form-note {
  margin: 10px 4px 0;
  font-size: 12px;
  line-height: 1.45;
  color: var(--ng-chatbot-text-soft);
}

.ng-chatbot-send[disabled],
.ng-chatbot-input[disabled] {
  opacity: 0.7;
  cursor: not-allowed;
}

@keyframes ng-chatbot-panel-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  #ng-chatbot-root {
    right: 12px;
    bottom: 12px;
  }

  .ng-chatbot-launcher {
    min-width: 136px;
    height: 48px;
    padding: 0 18px;
  }

  .ng-chatbot-panel {
    width: min(94vw, 390px);
    bottom: 72px;
    border-radius: 24px;
    max-height: min(76vh, 620px);
  }

  .ng-chatbot-header,
  .ng-chatbot-messages {
    padding-left: 16px;
    padding-right: 16px;
  }

  .ng-chatbot-message-bubble {
    max-width: 86%;
  }

  .ng-chatbot-form {
    padding: 12px 14px 14px;
  }
}
