:root {
  --assistant-primary: #f9a825;
  --assistant-primary-hover: #fb8c00;
  --assistant-accent: #00695c;
  --assistant-accent-hover: #004d40;
  --assistant-secondary: #f3f4f6;
  --assistant-text: #1f2937;
  --assistant-text-light: #6b7280;
  --assistant-border: #ffe0b2;
  --assistant-user-bg: linear-gradient(135deg, #f9a825 0%, #fb8c00 100%);
  --assistant-user-text: #ffffff;
  --assistant-bot-bg: #fff3e0;
  --assistant-bot-text: #1f2937;
}

#assistant-chat-container {
  max-width: 66%;
  margin: 20px auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
}

.assistant-chat-window {
  width: 100%;
  height: 700px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(249, 168, 37, 0.25),
    0 0 0 1px rgba(249, 168, 37, 0.1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.assistant-chat-header {
  background: linear-gradient(135deg, #f9a825 0%, #fb8c00 100%);
  color: white;
  padding: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 20px rgba(249, 168, 37, 0.3);
}

.assistant-header-content h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.assistant-tagline {
  margin: 4px 0 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
  letter-spacing: 0.3px;
}

.assistant-chat-actions {
  display: flex;
  gap: 8px;
}

.assistant-btn-clear,
.assistant-btn-close {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.assistant-btn-clear:hover,
.assistant-btn-close:hover {
  background: rgba(255, 255, 255, 0.4);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.assistant-chat-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  background: linear-gradient(
    to bottom,
    rgba(255, 243, 224, 0.15) 0%,
    white 50%,
    white 100%
  );
}

.assistant-message {
  display: flex;
  margin-bottom: 8px;
  animation: messageAppear 0.3s ease-out;
}

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

.assistant-message.user {
  justify-content: flex-end;
}

.assistant-message.assistant {
  justify-content: flex-start;
}

.assistant-message-bubble {
  max-width: 75%;
  padding: 14px 18px;
  border-radius: 20px;
  word-wrap: break-word;
  line-height: 1.6;
  font-size: 15px;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  transition: all 0.3s ease;
}

.assistant-message.user .assistant-message-bubble {
  background: var(--assistant-user-bg);
  color: var(--assistant-user-text);
  border-bottom-right-radius: 6px;
  font-weight: 500;
}

.assistant-message.assistant .assistant-message-bubble {
  background: var(--assistant-bot-bg);
  color: var(--assistant-bot-text);
  border-bottom-left-radius: 6px;
  border: 1px solid rgba(249, 168, 37, 0.2);
}

.assistant-message-bubble strong,
.assistant-message-bubble b,
.assistant-message-bubble em,
.assistant-message-bubble i {
  color: #00695c;
  font-weight: 700;
}

.assistant-message-bubble h1,
.assistant-message-bubble h2,
.assistant-message-bubble h3,
.assistant-message-bubble h4,
.assistant-message-bubble h5,
.assistant-message-bubble h6 {
  color: #00695c;
  margin: 8px 0 4px 0;
  font-weight: 700;
}

.assistant-message-bubble a {
  color: #00695c;
  text-decoration: underline;
  font-weight: 600;
}

.assistant-message-bubble a:hover {
  color: #004d40;
}

.assistant-message-bubble ul,
.assistant-message-bubble ol {
  margin: 8px 0;
  padding-left: 24px;
}

.assistant-message-bubble li {
  margin: 4px 0;
  line-height: 1.6;
}

.assistant-message-bubble pre {
  background: rgba(0, 105, 92, 0.05);
  border: 1px solid rgba(0, 105, 92, 0.1);
  border-radius: 8px;
  padding: 12px;
  margin: 8px 0;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.assistant-message-bubble code {
  background: rgba(0, 105, 92, 0.08);
  color: #00695c;
  padding: 2px 6px;
  border-radius: 4px;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.9em;
}

.assistant-message-bubble pre code {
  background: none;
  padding: 0;
  color: inherit;
  display: block;
}

.assistant-message-bubble p {
  margin: 8px 0;
}

.assistant-message-bubble p:first-child {
  margin-top: 0;
}

.assistant-message-bubble p:last-child {
  margin-bottom: 0;
}

.assistant-typing-indicator {
  display: flex;
  gap: 4px;
  padding: 14px 18px;
  background: var(--assistant-bot-bg);
  border-radius: 20px;
  border-bottom-left-radius: 6px;
  width: fit-content;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12);
  border: 1px solid rgba(249, 168, 37, 0.2);
}

.assistant-typing-indicator span {
  width: 8px;
  height: 8px;
  background: linear-gradient(135deg, #f9a825 0%, #fb8c00 100%);
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

.assistant-chat-input-wrapper {
  padding: 20px 24px;
  border-top: 2px solid rgba(249, 168, 37, 0.1);
  display: flex;
  gap: 12px;
  background: linear-gradient(
    to bottom,
    rgba(255, 243, 224, 0.3) 0%,
    white 100%
  );
}

.assistant-chat-input {
  flex: 1;
  border: 2px solid var(--assistant-border);
  border-radius: 20px;
  padding: 14px 18px;
  font-size: 15px;
  resize: none;
  font-family: inherit;
  max-height: 120px;
  transition: all 0.3s ease;
}

.assistant-chat-input:focus {
  outline: none;
  border-color: var(--assistant-primary);
  box-shadow: 0 0 0 4px rgba(249, 168, 37, 0.15);
}

.assistant-send-btn {
  background: linear-gradient(135deg, #f9a825 0%, #fb8c00 100%);
  border: none;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(249, 168, 37, 0.4);
}

.assistant-send-btn:hover {
  background: linear-gradient(135deg, #fb8c00 0%, #f57c00 100%);
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(249, 168, 37, 0.5);
}

.assistant-send-btn:active {
  transform: scale(0.98);
}

.assistant-send-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.assistant-error-message {
  background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
  color: #e65100;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 14px;
  margin-bottom: 12px;
  box-shadow: 0 3px 12px rgba(249, 168, 37, 0.25);
  border: 1px solid rgba(249, 168, 37, 0.3);
  font-weight: 500;
}

@media (max-width: 768px) {
  .assistant-chat-window {
    width: calc(100vw - 40px);
    height: calc(100vh - 100px);
    max-height: 600px;
  }
}
