.portal-assistant {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  width: 23.75rem;
  height: 32.5rem;
  max-height: calc(100vh - 7rem);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 35;
  animation: fadeInUp var(--motion-enter) both;
}

.portal-assistant__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  color: var(--color-text-on-accent);
  background: linear-gradient(
    135deg,
    var(--color-blue) 0%,
    var(--color-purple) 100%
  );
}

.portal-assistant__header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.portal-assistant__title {
  font-size: 0.875rem;
  font-weight: 600;
}

.portal-assistant__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, 0.85);
  transition:
    background var(--motion-fast),
    color var(--motion-fast);
}
.portal-assistant__close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--color-text-on-accent);
}

.portal-assistant__messages {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0.875rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--color-bg-subtle);
}

.portal-assistant__suggestions {
  margin-bottom: 0.25rem;
}

.portal-assistant__suggestions-eyebrow {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-section-label);
  margin-bottom: 0.5rem;
}

.portal-assistant__suggestions-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.portal-assistant__suggestion {
  padding: 0.4375rem 0.625rem;
  font-size: 0.8125rem;
  text-align: left;
  color: var(--color-text-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition:
    border-color var(--motion-fast),
    background var(--motion-fast);
}
.portal-assistant__suggestion:hover {
  background: var(--color-bg-hover);
  border-color: var(--color-blue-border);
}

.portal-assistant__bubble {
  max-width: 80%;
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  border-radius: var(--radius-md);
  animation: fadeInUp var(--motion-enter) both;
  word-wrap: break-word;
}

.portal-assistant__bubble--user {
  align-self: flex-end;
  background: var(--color-blue);
  color: var(--color-text-on-accent);
  border-bottom-right-radius: 0.25rem;
}

.portal-assistant__bubble--assistant {
  align-self: flex-start;
  background: var(--color-surface);
  color: var(--color-text-2);
  border: 1px solid var(--color-border);
  border-bottom-left-radius: 0.25rem;
}

.portal-assistant__typing {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}
.portal-assistant__typing span {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background: var(--color-text-5);
  animation: pulse 1.2s ease-in-out infinite;
}
.portal-assistant__typing span:nth-child(2) {
  animation-delay: 0.15s;
}
.portal-assistant__typing span:nth-child(3) {
  animation-delay: 0.3s;
}

.portal-assistant__input-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 0.75rem;
  border-top: 1px solid var(--color-border);
  background: var(--color-surface);
}

.portal-assistant__input {
  flex: 1 1 auto;
  font: inherit;
  font-size: 0.8125rem;
  background: transparent;
  border: 1px solid var(--color-border-input);
  border-radius: var(--radius-md);
  padding: 0.4375rem 0.625rem;
  color: var(--color-text-1);
  outline: none;
  transition: border-color var(--motion-fast);
}
.portal-assistant__input:focus {
  border-color: var(--color-blue);
}

.portal-assistant__send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  background: var(--grad-blue-btn);
  color: var(--color-text-on-accent);
  transition: opacity var(--motion-fast);
}
.portal-assistant__send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
