/* styles.css */

body {
  font-family: 'Inter', sans-serif;
  background-color: #f8fafc;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.header {
  background-color: #111827;
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  font-family: 'Inter', sans-serif;
  border-bottom: 1px solid #1f2937;
}

.header-left h1 {
  font-size: 1.5rem;
  margin: 0;
}

.header-left span {
  font-size: 0.9rem;
  color: #d1d5db;
}

.header-right button {
  margin-left: 1rem;
  background-color: #111827;
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.2s ease-in-out;
}

.header-right button:hover {
  background-color: #1d0a58;
}

/* Main layout */
.container {
  display: flex;
  flex-direction: row;
  padding: 1rem;
  gap: 1.5rem;
  flex: 1;
}

/* Chat Section */
.chat-section {
  flex: 2;
  display: flex;
  flex-direction: column;
  background-color: white;
  border-radius: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  padding: 1rem;
  height: 80vh;
  overflow: hidden;
}

/* Chat messages scrollable container */
#chatContainer {
  flex-grow: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 1rem;
}

/* Smooth scrollbar */
#chatContainer::-webkit-scrollbar,
aside::-webkit-scrollbar {
  width: 6px;
}
#chatContainer::-webkit-scrollbar-thumb,
aside::-webkit-scrollbar-thumb {
  background-color: rgba(100, 116, 139, 0.4); /* slate-500 */
  border-radius: 6px;
}

/* Chat form */
.chat-form {
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

.chat-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid #cbd5e1; /* slate-300 */
  font-size: 1rem;
  outline: none;
}

.chat-form button {
  padding: 0.75rem 1.25rem;
  border: none;
  border-radius: 0.75rem;
  background-color: #2563eb; /* blue-600 */
  color: white;
  cursor: pointer;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.chat-form button:hover {
  background-color: #1d4ed8; /* blue-700 */
}

/* Chat message bubbles */
.message {
  transition: background-color 0.3s ease, transform 0.2s ease, opacity 0.3s ease;
  padding: 0.75rem 1rem;
  border-radius: 1rem;
  max-width: 75%;
  word-wrap: break-word;
  opacity: 0;
  transform: translateY(10px);
}

.message.user {
  background-color: #dbeafe; /* blue-100 */
  align-self: flex-end;
}

.message.ai {
  background-color: #f1f5f9; /* slate-100 */
  align-self: flex-start;
}

/* Fade-in message transitions */
.opacity-0 {
  opacity: 0;
}
.opacity-100 {
  opacity: 1;
}
.translate-y-2 {
  transform: translateY(10px);
}
.translate-y-0 {
  transform: translateY(0);
}
.transition-all {
  transition: all 0.3s ease;
}

/* Product Section */
.products {
  flex: 1;
  background-color: white;
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  overflow-y: auto;
  height: 80vh;
  display: flex;
  flex-direction: column;
}

.products h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Placeholder message style */
#placeholderMessage {
  color: #94a3b8; /* slate-400 */
  font-style: italic;
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.3s ease, transform 0.3s ease;
  transform: translateY(10px);
  margin-bottom: 1rem;
}
#placeholderMessage.show {
  opacity: 1;
  transform: translateY(0);
}

/* Product grid */
.product-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Product card animation */
.product-card {
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  transform: scale(0.95);
  background-color: #f8fafc;
  padding: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #e2e8f0; /* slate-200 */
  display: flex;
  flex-direction: column;
  align-items: center;
}

.product-card.opacity-100 {
  opacity: 1;
  transform: scale(1);
}

/* Hover effect */
.product-card:hover {
  transform: scale(1.02);
  transition: transform 0.2s ease-in-out;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

/* Product image */
.product-card img {
  max-height: 160px;
  object-fit: contain;
  margin-bottom: 0.75rem;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  .chat-section,
  .products {
    height: auto;
  }

  .chat-form input,
  .chat-form button {
    font-size: 0.875rem;
  }

  .message {
    max-width: 90%;
  }
}

.dot-flashing {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 48px;
  height: 12px;
  margin-left: 0.5rem;
  gap: 8px;
}

.dot-flashing div {
  width: 10px;
  height: 10px;
  background-color: #94a3b8;
  border-radius: 50%;
  animation: dotFlashing 1.2s infinite ease-in-out;
}

.dot-flashing div:nth-child(1) {
  animation-delay: 0s;
}
.dot-flashing div:nth-child(2) {
  animation-delay: 0.2s;
}
.dot-flashing div:nth-child(3) {
  animation-delay: 0.4s;
}

.nav-link {
  margin-left: 1rem;
  font-weight: 600;
  text-decoration: none;
  color: white
}

.nav-link:hover {
  text-decoration: underline;
}

.logo-link {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.logo-link:hover{
  opacity: 0.85;
}

/* 🌊 Wave Loader Animation */
.wave {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 8px 0;
}

.wave span {
  display: block;
  width: 6px;
  height: 6px;
  background: #4cafef; /* match theme color */
  border-radius: 50%;
  animation: wave 1s infinite ease-in-out;
}

.wave span:nth-child(2) { animation-delay: 0.1s; }
.wave span:nth-child(3) { animation-delay: 0.2s; }
.wave span:nth-child(4) { animation-delay: 0.3s; }
.wave span:nth-child(5) { animation-delay: 0.4s; }

@keyframes wave {
  0%, 60%, 100% { transform: initial; }
  30% { transform: translateY(-6px); }
}

.footer {
  margin-top: 25px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: black; /* dark navy */
  color: white;
  padding: 15px 50px;
  flex-wrap: wrap;
}

.footer-left a {
  color: white;
  margin-right: 15px;
  font-size: 20px;
  transition: color 0.3s ease;
}

.footer-left a:hover {
  color: #38bdf8; /* sky blue hover */
}

.footer-center {
  display: flex;
  gap: 10px;
  font-size: 14px;
}

.footer-center a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-center a:hover {
  color: #38bdf8;
}

.footer-right p {
  font-size: 14px;
  margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .footer {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}