/* Floating Button */
#assistant-toggle {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #4a7c59;
  color: white;
  font-size: 1.4rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  z-index: 1000;
}

#assistant-toggle:hover {
  background: #8bb89a;
}

/* Modal Overlay */
#assistant-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: none;
  align-items: flex-end;
  justify-content: flex-end;
  z-index: 1000;
}

/* Panel */
.assistant-panel {
  width: 360px;
  max-height: 70vh;
  background: white;
  border-radius: 15px 15px 0 0;
  margin: 1rem;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Header */
.assistant-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #ddd;
}

.assistant-header h4 {
  margin: 0;
}

.assistant-header button {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Messages */
.assistant-messages {
  padding: 1rem;
  overflow-y: auto;
  flex-grow: 1;
}

.message {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.message.assistant {
  color: #4a7c59;
}

.message.user {
  text-align: right;
  color: #333;
}

/* Input */
.assistant-input {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid #ddd;
}

.assistant-input input {
  flex: 1;
  padding: 0.6rem;
  border-radius: 8px;
  border: 1px solid #ddd;
}

/* =================================
Floating button animation effects
================================= */

/* Breathing with color transition: Clearly → Knowing → Clearly */
@keyframes breatheColor {
  0% {
    transform: scale(1);
    background-color: #4a7c59; /* Clearly (green) */
    box-shadow: 0 6px 18px rgba(74,124,89,0.30);
  }

  50% {
    transform: scale(1.18);
    background-color: #6b2f2f; /* Knowing (reddish) */
    box-shadow: 0 14px 36px rgba(107,47,47,0.45);
  }

  100% {
    transform: scale(1);
    background-color: #4a7c59; /* back to Clearly */
    box-shadow: 0 6px 18px rgba(74,124,89,0.30);
  }
}

/* Applied dynamically */
#assistant-toggle.breathe {
  animation: breatheColor 7s ease-in-out;
}

/* Accessibility: respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  #assistant-toggle.breathe {
    animation: none;
  }
}

