.dl-chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 10000;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.dl-chat-button {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(255, 140, 66, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.dl-chat-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 40px rgba(255, 140, 66, 0.4);
}

.dl-chat-button i {
  color: white;
  font-size: 22px;
  animation: pulse 2s infinite;
}

.dl-chat-notification {
  display: none;
}

.dl-chat-window {
  position: absolute;
  bottom: 75px;
  right: 0;
  width: 350px;
  height: 500px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  transform-origin: bottom right;
}

.dl-chat-hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.dl-chat-header {
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
  color: white;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dl-chat-header-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dl-chat-header-content i {
  font-size: 16px;
}

.dl-chat-header-content span {
  font-weight: 600;
  font-size: 15px;
}

.dl-chat-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: all 0.2s ease;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dl-chat-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.dl-chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--background-light);
}

.dl-chat-messages::-webkit-scrollbar {
  width: 4px;
}

.dl-chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.dl-chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 140, 66, 0.3);
  border-radius: 4px;
}

.dl-chat-message {
  display: flex;
  animation: messageSlide 0.3s ease;
}

.dl-bot-message {
  justify-content: flex-start;
}

.dl-user-message {
  justify-content: flex-end;
}

.dl-message-content {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.4;
  word-wrap: break-word;
}

.dl-bot-message .dl-message-content {
  background: var(--glass-bg);
  color: var(--text-primary);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--glass-border);
}

.dl-user-message .dl-message-content {
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
  color: white;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 8px rgba(255, 140, 66, 0.3);
}

.dl-typing-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--glass-bg);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  max-width: 70px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--glass-border);
}

.dl-typing-dots {
  display: flex;
  gap: 3px;
}

.dl-typing-dot {
  width: 6px;
  height: 6px;
  background: var(--text-secondary);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.dl-typing-dot:nth-child(1) { animation-delay: -0.32s; }
.dl-typing-dot:nth-child(2) { animation-delay: -0.16s; }

.dl-chat-input-container {
  padding: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 12px;
  align-items: center;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
}

.dl-chat-input-container input {
  flex: 1;
  padding: 12px 16px;
  border: 2px solid rgba(255, 140, 66, 0.1);
  border-radius: 20px;
  outline: none;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  font-family: inherit;
}

.dl-chat-input-container input:focus {
  border-color: var(--primary-orange);
  background: white;
  box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.dl-chat-input-container input::placeholder {
  color: var(--text-secondary);
}

.dl-chat-input-container button {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary-orange) 0%, var(--primary-orange-dark) 100%);
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 6px 20px rgba(255, 140, 66, 0.25);
}

.dl-chat-input-container button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 140, 66, 0.35);
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes typing {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

body.dark-mode .dl-chat-window {
  background: rgba(51, 65, 85, 0.9);
  border-color: rgba(255, 140, 66, 0.2);
}

body.dark-mode .dl-chat-messages {
  background: #34495e;
}

body.dark-mode .dl-bot-message .dl-message-content {
  background: rgba(30, 41, 59, 0.8);
  color: #e2e8f0;
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .dl-typing-indicator {
  background: rgba(30, 41, 59, 0.8);
  border-color: rgba(255, 255, 255, 0.1);
}

body.dark-mode .dl-typing-dot {
  background: #94a3b8;
}

body.dark-mode .dl-chat-input-container {
  background: rgba(51, 65, 85, 0.9);
  border-top-color: rgba(255, 140, 66, 0.2);
}

body.dark-mode .dl-chat-input-container input {
  background: rgba(71, 85, 105, 0.8);
  color: #e2e8f0;
  border-color: rgba(255, 140, 66, 0.2);
}

body.dark-mode .dl-chat-input-container input:focus {
  background: rgba(71, 85, 105, 0.95);
  border-color: var(--primary-orange);
}

body.dark-mode .dl-chat-input-container input::placeholder {
  color: #94a3b8;
}

@media (max-width: 480px) {
  .dl-chat-window {
    width: calc(100vw - 30px);
    height: 70vh;
    bottom: 75px;
    right: 15px;
  }
  
  .dl-chat-button {
    width: 56px;
    height: 56px;
  }
}