/* Domino's Pizza AI Support - Premium CSS */

:root {
  --dominos-blue: #006491;
  --dominos-red: #E31837;
  --dominos-white: #FFFFFF;
  --bg-gradient: linear-gradient(135deg, #006491 0%, #004d70 100%);
  --glass: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
  height: 100vh;
  width: 100vw;
  background: var(--bg-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.chat-container {
  width: 100%;
  max-width: 900px;
  height: 90vh;
  background: var(--glass);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--glass-border);
}

.chat-header {
  background: var(--dominos-white);
  padding: 20px 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 2px solid #eee;
  z-index: 10;
}

.chat-header h2 {
  color: var(--dominos-blue);
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header img {
  height: 40px;
}

.chat-box {
  flex: 1;
  padding: 30px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
  background: rgba(245, 247, 250, 0.5);
  scroll-behavior: smooth;
}

.chat-box::-webkit-scrollbar {
  width: 6px;
}

.chat-box::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.1);
  border-radius: 10px;
}

.message {
  max-width: 75%;
  padding: 16px 20px;
  border-radius: 20px;
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.message.user {
  align-self: flex-end;
  background: var(--dominos-blue);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.bot {
  align-self: flex-start;
  background: white;
  color: #333;
  border-bottom-left-radius: 4px;
  border-left: 4px solid var(--dominos-red);
}

.message.bot img.bot-logo {
  width: 24px;
  height: 24px;
  margin-right: 10px;
  vertical-align: middle;
}

/* AI Thinking Animation */
.thinking-container {
  display: flex;
  gap: 4px;
  padding: 10px 0;
}

.thinking-dot {
  width: 8px;
  height: 8px;
  background: var(--dominos-red);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.thinking-dot:nth-child(1) { animation-delay: -0.32s; }
.thinking-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

.chat-input {
  background: white;
  padding: 24px 30px;
  display: flex;
  gap: 15px;
  align-items: flex-end;
  border-top: 1px solid #eee;
}

.chat-input textarea {
  flex: 1;
  background: #f8f9fa;
  border: 2px solid #eee;
  border-radius: 16px;
  padding: 14px 20px;
  font-size: 1rem;
  resize: none;
  max-height: 120px;
  outline: none;
  transition: border-color 0.3s ease;
}

.chat-input textarea:focus {
  border-color: var(--dominos-blue);
}

.chat-input button {
  background: var(--dominos-blue);
  color: white;
  border: none;
  border-radius: 50%;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 100, 145, 0.2);
  flex-shrink: 0;
}

.chat-input button:hover {
  background: #004d70;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 18px rgba(0, 100, 145, 0.3);
}

.chat-input button:active {
  transform: translateY(0) scale(0.95);
}

/* Markdown Styling */
.message h1, .message h2, .message h3 {
  margin: 10px 0;
  color: var(--dominos-blue);
}

.message ul, .message ol {
  margin-left: 20px;
}

.message li {
  margin-bottom: 8px;
}

.message p {
  margin-bottom: 12px;
}

/* Animations */
.slide-in-bottom {
  animation: slideIn 0.4s ease-out forwards;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
