/* Floating Bottom Bar */
.wave-floating {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  margin: 0;
  padding: 0;
  opacity: 0;
  transform: translateY(100%);
  transition: all 0.4s ease;
}

.wave-floating.visible {
  opacity: 1;
  transform: translateY(0);
}

.bottom-action-bar {
  background: rgba(254, 252, 248, 0.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(139, 69, 19, 0.2);
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.bottom-action-bar .wave-button {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 20px;
  background: rgba(139, 69, 19, 0.1);
  border: 1px solid rgba(139, 69, 19, 0.3);
  transition: all 0.3s ease;
  margin-right: auto; /* Push other elements to the right */
  /* Inherit all wave button styles and animations */
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  font-weight: 600;
  color: #8b4513;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.bottom-action-bar .wave-button:hover {
  background: rgba(139, 69, 19, 0.9);
  color: #fefcf8;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

/* Ensure emoji animations work in bottom bar */
.bottom-action-bar .wave-button .wave-emoji {
  display: inline-block;
  transition: transform 0.3s ease;
  font-size: 1.1em;
}

.bottom-action-bar .wave-button:hover .wave-emoji,
.bottom-action-bar .wave-button.waving .wave-emoji,
.wave-button:hover .wave-emoji,
.wave-button.waving .wave-emoji {
  animation: wave-hand 0.8s ease-in-out;
}

@keyframes wave-hand {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(20deg); }
  75% { transform: rotate(-10deg); }
}

/* Ensure ripple effect works in bottom bar */
.bottom-action-bar .wave-button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.bottom-action-bar .wave-button.ripple::before {
  width: 80px;
  height: 80px;
}

.bottom-action-bar .donation-button,
.bottom-action-bar .feedback-button {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 20px;
  background: transparent;
  border: 1px solid rgba(139, 69, 19, 0.3);
  color: #8b4513;
  text-decoration: none;
  transition: all 0.3s ease;
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  font-weight: 500;
}

.bottom-action-bar .donation-button:hover,
.bottom-action-bar .feedback-button:hover {
  background: rgba(139, 69, 19, 0.1);
  border-color: #8b4513;
}

.wave-floating .wave-message {
  position: absolute;
  bottom: 100%;
  left: 1.5rem;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  min-width: 150px;
  display: none; /* Hide by default - will show in bar instead */
}

/* Message display in the action bar */
.bottom-action-bar.showing-message .donation-button,
.bottom-action-bar.showing-message .feedback-button,
.bottom-action-bar.showing-message .wave-button {
  display: none;
}

.bottom-action-bar .wave-message-inline {
  display: none;
  color: #8b4513;
  font-family: 'Source Sans Pro', system-ui, sans-serif;
  font-weight: 500;
  font-size: 0.9rem;
  animation: fadeInMessage 0.4s ease;
  margin-right: auto; /* Push to the left */
}

.bottom-action-bar.showing-message .wave-message-inline {
  display: block;
}

@keyframes fadeInMessage {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Mobile responsive */
@media (max-width: 768px) {
  .bottom-action-bar {
    padding: 0.5rem 1rem;
    gap: 0.5rem;
    flex-wrap: wrap;
  }
  
  .bottom-action-bar .wave-button {
    flex: 1;
    margin-right: 0;
    margin-bottom: 0.5rem;
    text-align: center;
  }
  
  .bottom-action-bar .donation-button,
  .bottom-action-bar .feedback-button {
    flex: 1;
    text-align: center;
    padding: 0.4rem 0.75rem;
    font-size: 0.8rem;
  }
}