/* Floating Button Styles */
#chat-button {
  position: fixed;
  bottom: 36px;
  right: 36px;
  width: 80px;
  height: 80px;
  background: #FFC845;
  color: #072B31;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: bold;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(.4, 2, .3, 1);
  z-index: 9999;
  /* Ensures the button is always on top */
  box-shadow: 0 4px 16px rgba(0, 123, 255, 0.25), 0 1.5px 6px rgba(0, 0, 0, 0.12);
  border: none;
  outline: none;
  opacity: 0;
  transform: translateY(40px) scale(0.8);
}

#chat-button.chat-appear {
  animation: chatButtonAppear 0.7s cubic-bezier(.4, 2, .3, 1) 0.3s forwards;
}

@keyframes chatButtonAppear {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.8);
  }

  60% {
    opacity: 1;
    transform: translateY(-8px) scale(1.08);
  }

  80% {
    transform: translateY(2px) scale(0.97);
  }

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

/* Mobile Responsive Styles */
@media (max-width: 600px) {
  #chat-button {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
    font-size: 14px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.18), 0 1px 3px rgba(0, 0, 0, 0.10);
    /* Increase tap area for accessibility */
    min-width: 48px;
    min-height: 48px;
    opacity: 0.5;
    /* Reduce visual clutter */
    transition: opacity 0.3s ease, transform 0.2s ease, background 0.2s;
  }

  #chat-button:hover,
  #chat-button:active {
    background: #e6b53b;
    transform: scale(1.04);
    opacity: 1;
    /* Full opacity on interaction */
  }
}

#chat-button:hover {
  background: #e6b53b;
  box-shadow: 0 8px 24px rgba(0, 123, 255, 0.35), 0 3px 12px rgba(0, 0, 0, 0.18);
  transform: scale(1.08);
}

#chat-button.grow-large {
  transition: transform 0.4s cubic-bezier(.4, 2, .3, 1), box-shadow 0.4s cubic-bezier(.4, 2, .3, 1);
  transform: scale(2);
  z-index: 10000;
  box-shadow: 0 12px 36px rgba(0, 123, 255, 0.35), 0 6px 24px rgba(0, 0, 0, 0.18);
}