/* LogikSense Chat Widget Styles */

.logiksense-chat-widget {
  font-family: 'Outfit', sans-serif;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
}

.chat-minimized {
  width: 60px;
  height: 60px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.3);
  transition: all 0.3s ease;
}

.chat-minimized:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(0, 229, 255, 0.5);
}

.chat-bubble {
  font-size: 28px;
  line-height: 1;
}

.chat-label {
  font-size: 10px;
  color: #000;
  font-weight: bold;
  margin-top: 2px;
  text-align: center;
  white-space: nowrap;
}

.chat-window {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 420px;
  max-height: 600px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  overflow: hidden;
  z-index: 10000;
}

@media (max-width: 500px) {
  .chat-window {
    width: calc(100vw - 20px);
    max-width: 100%;
  }
}

.chat-header {
  background: linear-gradient(135deg, var(--accent), #00a5cc);
  color: #000;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 229, 255, 0.2);
}

.chat-avatar {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-agent-name {
  font-weight: 700;
  font-size: 14px;
}

.chat-agent-status {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg);
}

.chat-message {
  display: flex;
  margin-bottom: 8px;
  animation: slideIn 0.3s ease;
}

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

.chat-message-bot {
  justify-content: flex-start;
}

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

.chat-message .chat-bubble {
  max-width: 75%;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  word-wrap: break-word;
}

.chat-message-bot .chat-bubble {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
}

.chat-message-user .chat-bubble {
  background: var(--accent);
  color: #000;
  font-weight: 600;
}

.chat-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}

.chat-button {
  padding: 10px 14px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-button:hover {
  background: #00d5ef;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.3);
}

.chat-input-area {
  border-top: 1px solid var(--border);
  padding: 12px;
  display: flex;
  gap: 8px;
  background: var(--surface);
}

.chat-input {
  flex: 1;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}

.chat-input:focus {
  border-color: var(--accent);
}

.chat-send-btn {
  padding: 10px 16px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.2s ease;
}

.chat-send-btn:hover {
  background: #00d5ef;
  transform: translateY(-2px);
}

.chat-send-btn:active {
  transform: translateY(0);
}

/* Form inputs in chat */
#chat-input-area input[type="text"],
#chat-input-area input[type="email"],
#chat-input-area input[type="tel"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text);
  font-family: 'Outfit', sans-serif;
  font-size: 13px;
  transition: border-color 0.2s;
}

#chat-input-area input:focus {
  border-color: var(--accent);
  outline: none;
}

/* Scrollbar styling */
.chat-messages::-webkit-scrollbar {
  width: 6px;
}

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

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.3);
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.5);
}
