/* app/assets/stylesheets/chatbox.css */

/* Animations */
@keyframes fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 0.4;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.animate-fade-in {
  animation: fade-in 0.4s ease-out;
}

.animate-shake {
  animation: shake 0.5s ease-in-out;
}

/* Chatbox Styles */
.chatbox-container {
  background: white;
  border-radius: 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  border: 2px solid #f59e0b;
}

.chatbox-header {
  background: linear-gradient(135deg, #9333ea, #ec4899);
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.chatbox-avatar {
  position: relative;
}

.chatbox-avatar-inner {
  width: 3rem;
  height: 3rem;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 1rem;
  height: 1rem;
  background: #10b981;
  border-radius: 50%;
  border: 2px solid white;
  animation: pulse-dot 2s infinite;
}

.chat-messages {
  height: 24rem;
  overflow-y: auto;
  padding: 1.5rem;
  background: linear-gradient(to bottom, white, rgba(243, 232, 255, 0.3));
}

.chat-messages::-webkit-scrollbar {
  width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #d4af37;
  border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #b8941f;
}

/* Message Bubbles */
.message-bubble {
  max-width: 80%;
  padding: 1rem 1.25rem;
  border-radius: 1.25rem;
  line-height: 1.6;
  word-wrap: break-word;
}

.message-user {
  background: #b45309;
  color: white;
  border-bottom-right-radius: 0.25rem;
  margin-left: auto;
}

.message-assistant {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 146, 60, 0.1));
  color: #1f2937;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-bottom-left-radius: 0.25rem;
}

/* Typing Indicator */
.typing-indicator {
  display: flex;
  align-items: center;
  padding: 1rem 1.5rem;
  background: white;
  border-top: 1px solid #f3f4f6;
}

.typing-dots {
  display: flex;
  gap: 0.25rem;
}

.typing-dot {
  width: 0.5rem;
  height: 0.5rem;
  background: #f59e0b;
  border-radius: 50%;
  animation: pulse-dot 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

/* Input Area */
.chat-input-area {
  background: white;
  padding: 1rem 1.5rem;
  border-top: 2px solid #f3f4f6;
}

.chat-textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 1rem;
  resize: none;
  font-family: inherit;
  transition: all 0.3s ease;
  max-height: 120px;
  overflow-y: auto;
}

.chat-textarea:focus {
  outline: none;
  border-color: #9333ea;
  box-shadow: 0 0 0 3px rgba(147, 51, 234, 0.1);
}

.chat-send-button {
  padding: 0.75rem 1.5rem;
  background: #b45309;
  color: white;
  border: none;
  border-radius: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.chat-send-button:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(147, 51, 234, 0.3);
}

.chat-send-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Quick Questions */
.quick-questions-area {
  background: rgba(243, 232, 255, 0.5);
  padding: 1rem 1.5rem;
  border-top: 1px solid rgba(147, 51, 234, 0.1);
}

.quick-question-btn {
  padding: 0.5rem 1rem;
  background: white;
  border: 2px solid #fcd34d;
  border-radius: 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #78350f;
  transition: all 0.2s ease;
  cursor: pointer;
}

.quick-question-btn:hover {
  background: #b45309;
  color: white;
  border-color: #b45309;
}

/* Rate Limit Banner */
.rate-limit-banner {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  border-radius: 1rem;
  padding: 1rem;
  margin-bottom: 1rem;
  animation: fade-in 0.5s ease-out;
}

.rate-limit-text {
  color: #92400e;
  font-weight: 600;
  text-align: center;
}

/* Donation Modal */
.donation-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(4px);
  animation: fade-in 0.3s ease-out;
}

.donation-modal {
  background: white;
  border-radius: 1.5rem;
  padding: 2rem;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: fade-in 0.4s ease-out;
}

.donation-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.donation-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.donation-subtitle {
  color: #6b7280;
  font-size: 1rem;
}

.qr-code-container {
  text-align: center;
  padding: 1.5rem;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border-radius: 1rem;
  margin-bottom: 1.5rem;
}

.qr-code-image {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 0.5rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.donation-amounts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.amount-btn {
  padding: 0.75rem;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.amount-btn:hover {
  border-color: #9333ea;
  background: rgba(147, 51, 234, 0.05);
  transform: translateY(-2px);
}

.amount-btn.selected {
  background: #b45309;
  color: white;
  border-color: transparent;
}

.close-modal-btn {
  width: 100%;
  padding: 1rem;
  background: #f3f4f6;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.close-modal-btn:hover {
  background: #e5e7eb;
}

/* Message Counter */
.message-counter {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 1rem;
  font-size: 0.875rem;
  color: white;
}

.counter-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  background: #f59e0b;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
  .chat-messages {
    height: 20rem;
  }
  
  .message-bubble {
    max-width: 90%;
  }
  
  .donation-modal {
    width: 95%;
    padding: 1.5rem;
  }
  
  .donation-amounts {
    grid-template-columns: repeat(2, 1fr);
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */
