.assistant-widget {
  position: fixed;
  right: 28px;
  bottom: 24px;
  z-index: 1200;
  color: #e7edf7;
  font-family: inherit;
}

.assistant-fab {
  width: 72px;
  height: 72px;
  border: 0;
  border-radius: 50%;
  background: #10ceb3;
  color: #061018;
  font-size: 32px;
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 0 0 28px rgba(16, 206, 179, .16), 0 24px 70px rgba(0, 0, 0, .5);
  animation: assistantBlinkPulse 1.8s ease-in-out infinite;
}

.assistant-animated-icon {
  width: 82%;
  height: 82%;
  display: block;
  object-fit: contain;
  border-radius: 50%;
  background: transparent;
}

.assistant-fab .assistant-animated-icon {
  width: 58px;
  height: 58px;
  background: transparent;
}

.assistant-widget.open .assistant-fab {
  display: none;
}

.assistant-panel {
  position: fixed;
  right: 16px;
  bottom: 10px;
  width: min(476px, calc(100vw - 24px));
  height: min(724px, calc(100vh - 20px));
  border: 1px solid rgba(0, 207, 190, .22);
  border-radius: 18px;
  background: #0b1424;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.assistant-panel[hidden] {
  display: none !important;
}

.assistant-widget.minimized .assistant-panel {
  height: 104px;
}

.assistant-head {
  min-height: 104px;
  padding: 18px 28px 18px 24px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 112px;
  align-items: center;
  column-gap: 16px;
  background: #111d30;
  border-bottom: 1px solid rgba(0, 207, 190, .18);
  flex: 0 0 auto;
}

.assistant-bot-icon {
  width: 56px;
  height: 56px;
  border: 1px solid rgba(0, 219, 198, .55);
  border-radius: 20px;
  background: #08685e;
  color: #10ceb3;
  display: grid;
  place-items: center;
  font-size: 24px;
  position: relative;
  overflow: hidden;
  animation: assistantIconBlink 1.8s ease-in-out infinite;
}

.assistant-bot-icon::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: 5px;
  width: 12px;
  height: 12px;
  border: 3px solid #111d30;
  border-radius: 50%;
  background: #10ceb3;
  animation: assistantDotBlink 1.2s ease-in-out infinite;
}

@keyframes assistantBlinkPulse {
  0%, 100% {
    box-shadow: 0 0 0 24px rgba(16, 206, 179, .12), 0 24px 70px rgba(0, 0, 0, .5);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 0 34px rgba(16, 206, 179, .24), 0 24px 80px rgba(0, 219, 198, .22);
    filter: brightness(1.12);
  }
}

@keyframes assistantIconBlink {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(16, 206, 179, .18);
    filter: brightness(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(16, 206, 179, .12);
    filter: brightness(1.18);
  }
}

@keyframes assistantDotBlink {
  0%, 100% {
    opacity: .55;
    transform: scale(.82);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.assistant-head b {
  display: block;
  color: #f1f5fb;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: 0;
}

.assistant-head span {
  display: block;
  margin-top: 4px;
  color: #10f0cd;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}

.assistant-head span i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10ceb3;
  margin-right: 8px;
  vertical-align: 2px;
}

.assistant-tools {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
}

.assistant-tools button {
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7f98b6;
  font-size: 24px;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
}

.assistant-tools button i {
  color: #7ea7d6;
  text-shadow: 0 0 14px rgba(16, 206, 179, .35);
}

.assistant-tools button[title="Refresh"] i {
  color: #34d399;
}

.assistant-tools button[title="Minimize"] i {
  color: #93c5fd;
}

.assistant-tools button[title="Close"] i {
  color: #5eead4;
}

.assistant-tools button:hover {
  color: #d7e5f8;
}

.assistant-topics {
  min-height: 64px;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  background: #0f192a;
  border-bottom: 1px solid rgba(0, 207, 190, .18);
  scrollbar-width: none;
  flex: 0 0 auto;
}

.assistant-topics::-webkit-scrollbar,
.assistant-body::-webkit-scrollbar {
  display: none;
}

.assistant-topics button {
  height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(0, 207, 190, .18);
  border-radius: 18px;
  background: #0e1e32;
  color: #7f98b6;
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.assistant-topics button i,
.assistant-quick button i,
.assistant-followups button i {
  margin-right: 6px;
  color: #8ab4f8;
}

.assistant-topics button:nth-child(1) i {
  color: #38bdf8;
}

.assistant-topics button:nth-child(2) i {
  color: #fbbf24;
}

.assistant-topics button:nth-child(3) i {
  color: #a78bfa;
}

.assistant-topics button:nth-child(4) i {
  color: #34d399;
}

.assistant-topics button:hover {
  color: #d7e5f8;
  border-color: rgba(0, 207, 190, .42);
}

.assistant-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 20px 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(180deg, #0b1424 0%, #0a1220 100%);
  scrollbar-width: none;
}

.assistant-panel > .assistant-quick {
  display: none;
}

.assistant-msg {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
}

.assistant-msg .avatar {
  width: 38px;
  height: 38px;
  border: 1px solid rgba(0, 219, 198, .45);
  border-radius: 15px;
  background: #08685e;
  color: #10ceb3;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex: 0 0 auto;
  overflow: hidden;
}

.assistant-bot-icon .assistant-animated-icon,
.assistant-msg .avatar .assistant-animated-icon {
  width: 42px;
  height: 42px;
}

.assistant-msg .avatar .assistant-animated-icon {
  width: 32px;
  height: 32px;
  background: transparent;
}

.assistant-msg p {
  margin: 0;
  border-radius: 18px;
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: 0;
}

.assistant-msg.ai p {
  max-width: 356px;
  padding: 16px 18px;
  background: #121f34;
  border: 1px solid rgba(0, 207, 190, .18);
  color: #e2e8f2;
  font-weight: 650;
}

.assistant-msg.ai p strong {
  color: #f3f7ff;
  font-weight: 850;
}

.assistant-msg.user {
  justify-content: flex-end;
  align-items: center;
  padding-right: 28px;
}

.assistant-msg.user p {
  max-width: 270px;
  padding: 13px 20px;
  background: #10ceb3;
  color: #031411;
  font-weight: 500;
  text-align: left;
}

.assistant-time {
  color: rgba(126, 150, 181, .5);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0;
}

.assistant-msg.ai + .assistant-time {
  margin-left: 50px;
}

.assistant-msg.user + .assistant-time {
  align-self: flex-end;
  margin-right: 32px;
}

.assistant-time button {
  margin-left: 8px;
  border: 0;
  background: transparent;
  color: rgba(126, 150, 181, .62);
  cursor: pointer;
  padding: 0;
}

.assistant-time button[title="Copy"] i {
  color: #93c5fd;
}

.assistant-time button[title="Helpful"] i {
  color: #22c55e;
}

.assistant-time button[title="Not helpful"] i {
  color: #fb7185;
}

.assistant-user-dot {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  margin-left: 8px;
  border-radius: 50%;
  background: #13253a;
  color: #e7edf7;
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
}

.assistant-body > .assistant-quick,
.assistant-followups {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin: 6px 30px 12px 48px;
}

.assistant-quick button,
.assistant-followups button {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid rgba(0, 207, 190, .18);
  border-radius: 19px;
  background: #0e1e32;
  color: #7891b0;
  font-size: 16px;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

.assistant-body > .assistant-quick:not(.assistant-followups) button:first-child {
  border-color: rgba(195, 255, 247, .95);
  box-shadow: inset 0 0 0 1px rgba(16, 206, 179, .85);
  color: #7f98b6;
}

.assistant-quick button:hover,
.assistant-followups button:hover {
  color: #dbe7f5;
  border-color: rgba(0, 207, 190, .42);
}

.assistant-compose {
  height: 64px;
  margin: 10px 20px 10px;
  padding: 0 12px 0 18px;
  border: 1px solid rgba(0, 207, 190, .18);
  border-radius: 20px;
  background: #101d30;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) 30px 42px;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.assistant-compose button {
  border: 0;
  background: transparent;
  color: #7f98b6;
  font-size: 22px;
  cursor: pointer;
  padding: 0;
}

.assistant-compose button[title="Attach"] i {
  color: #93c5fd;
}

.assistant-compose button[title="Voice"] i {
  color: #c4b5fd;
}

.assistant-compose input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: #dce6f4;
  font-size: 18px;
  letter-spacing: 0;
}

.assistant-compose input::placeholder {
  color: #6f87a6;
}

.assistant-compose .assistant-send {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: rgba(16, 206, 179, .45);
  color: #061018;
  display: grid;
  place-items: center;
}

.assistant-compose .assistant-send i {
  color: #031411;
}

.assistant-panel footer i {
  color: #8b5cf6;
}

.assistant-panel footer {
  padding: 0 34px 20px;
  color: rgba(126, 150, 181, .38);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0;
  flex: 0 0 auto;
}

.login-required-overlay {
  position: fixed;
  inset: 0;
  z-index: 1600;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(3, 8, 18, .74);
  backdrop-filter: blur(10px);
}

.login-required-overlay > div {
  width: min(430px, 100%);
  padding: 34px;
  border: 1px solid rgba(0, 207, 190, .28);
  border-radius: 22px;
  background: #10192b;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55);
  text-align: center;
}

.login-required-overlay span {
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 24px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(0, 207, 190, .36);
  background: rgba(0, 207, 190, .1);
  color: #10ceb3;
  font-size: 30px;
}

.login-required-overlay h2 {
  margin: 0 0 10px;
  color: #f3f7ff;
  font-size: 30px;
  letter-spacing: 0;
}

.login-required-overlay p {
  margin: 0 0 24px;
  color: #8aa4c2;
  line-height: 1.6;
}

.login-required-overlay button {
  margin: 5px;
}

@media (max-width: 560px) {
  .assistant-widget {
    right: 12px;
    bottom: 14px;
  }

  .assistant-panel {
    right: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    height: min(720px, calc(100vh - 16px));
  }

  .assistant-head {
    grid-template-columns: 46px minmax(0, 1fr) 86px;
    padding-right: 16px;
  }

  .assistant-head b {
    font-size: 18px;
  }

  .assistant-head span,
  .assistant-topics button,
  .assistant-quick button,
  .assistant-followups button {
    font-size: 15px;
  }

  .assistant-msg.ai p {
    max-width: calc(100vw - 132px);
    font-size: 16px;
  }

  .assistant-msg.user p {
    max-width: calc(100vw - 150px);
    font-size: 16px;
  }
}
