/* Chatbot.css — Styling for the simple chatbot widget */

/* Container and floating button */
.ys-chatbot-container {
  font-family: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif);
}

.ys-chatbot-fab {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand, #1FC8D2);
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(31, 200, 210, 0.28);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.ys-chatbot-fab:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 20px rgba(31, 200, 210, 0.36);
}

.ys-chatbot-fab:active {
  transform: scale(0.96);
}

/* Chat window */
.ys-chatbot-window {
  position: fixed;
  bottom: 86px;
  right: 20px;
  width: 360px;
  height: 520px;
  background: var(--bg-2, #0F1419);
  border: 1px solid var(--border-2, rgba(31, 200, 210, 0.16));
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 25px rgba(0, 0, 0, 0.3);
  z-index: 999;
  animation: slideUp 0.2s ease;
}

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

/* Header */
.ys-chatbot-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--border-2, rgba(31, 200, 210, 0.16));
  background: linear-gradient(135deg, rgba(31, 200, 210, 0.08) 0%, rgba(31, 200, 210, 0.04) 100%);
  font-weight: 600;
  color: var(--fg-1, #E8EAED);
  font-size: 14px;
}

.ys-chatbot-close {
  background: none;
  border: none;
  color: var(--fg-3, rgba(232, 234, 237, 0.6));
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.ys-chatbot-close:hover {
  color: var(--fg-1, #E8EAED);
}

/* Messages container */
.ys-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-1, #0B0F17);
}

.ys-chatbot-messages::-webkit-scrollbar {
  width: 6px;
}

.ys-chatbot-messages::-webkit-scrollbar-track {
  background: transparent;
}

.ys-chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(31, 200, 210, 0.2);
  border-radius: 3px;
}

.ys-chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(31, 200, 210, 0.32);
}

/* Message bubbles */
.ys-chatbot-message {
  display: flex;
  gap: 8px;
  animation: fadeIn 0.2s ease;
}

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

.ys-chatbot-user {
  justify-content: flex-end;
}

.ys-chatbot-bot {
  justify-content: flex-start;
}

.ys-chatbot-text {
  max-width: 280px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.ys-chatbot-user .ys-chatbot-text {
  background: var(--brand, #1FC8D2);
  color: white;
  border-radius: 10px 4px 10px 10px;
}

.ys-chatbot-bot .ys-chatbot-text {
  background: var(--bg-3, #1A1F2E);
  color: var(--fg-1, #E8EAED);
  border: 1px solid var(--border-2, rgba(31, 200, 210, 0.16));
  border-radius: 4px 10px 10px 10px;
}

/* Input area */
.ys-chatbot-input-area {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--border-2, rgba(31, 200, 210, 0.16));
  background: var(--bg-2, #0F1419);
}

.ys-chatbot-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border-2, rgba(31, 200, 210, 0.16));
  border-radius: 6px;
  background: var(--bg-1, #0B0F17);
  color: var(--fg-1, #E8EAED);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s;
}

.ys-chatbot-input:focus {
  border-color: var(--brand, #1FC8D2);
}

.ys-chatbot-input::placeholder {
  color: var(--fg-3, rgba(232, 234, 237, 0.5));
}

.ys-chatbot-send {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 6px;
  background: var(--brand, #1FC8D2);
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  font-weight: 600;
}

.ys-chatbot-send:hover:not(:disabled) {
  background: rgba(31, 200, 210, 1);
  transform: translateY(-1px);
}

.ys-chatbot-send:active:not(:disabled) {
  transform: translateY(0) scale(0.96);
}

.ys-chatbot-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Mobile responsiveness */
@media (max-width: 500px) {
  .ys-chatbot-window {
    width: calc(100vw - 40px);
    height: 60vh;
    max-height: 520px;
  }

  .ys-chatbot-text {
    max-width: 240px;
  }
}
