/* EDISCO Smart Assistant Widget Styles */

.edisco-assistant {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Floating Button */
.edisco-assistant__button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue, #1b5f82), var(--blue-dark, #246185));
  color: #f4f8fb;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(27, 95, 130, 0.4), 0 0 20px rgba(27, 95, 130, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
}

.edisco-assistant__button:hover {
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 32px rgba(27, 95, 130, 0.5), 0 0 30px rgba(27, 95, 130, 0.4);
}

.edisco-assistant__button:active {
  transform: translateY(0) scale(0.98);
}

.edisco-assistant__button::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue, #1b5f82), var(--blue-dark, #246185));
  opacity: 0.3;
  z-index: -1;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.1); opacity: 0.5; }
}

/* Chat Panel */
.edisco-assistant__panel {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  max-width: calc(100vw - 48px);
  height: 600px;
  max-height: calc(100vh - 120px);
  background: var(--card, rgba(0, 14, 22, 0.95));
  border: 1px solid var(--border, rgba(196, 211, 220, 0.35));
  border-radius: 20px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(27, 95, 130, 0.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  backdrop-filter: blur(10px);
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.edisco-assistant__panel.open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* Panel Header */
.edisco-assistant__header {
  padding: 20px 24px;
  background: linear-gradient(135deg, rgba(27, 95, 130, 0.2), rgba(12, 30, 42, 0.9));
  border-bottom: 1px solid var(--border, rgba(196, 211, 220, 0.35));
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.edisco-assistant__header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text, #e6eef3);
}

.edisco-assistant__header p {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--muted, #9fb3c0);
}

.edisco-assistant__close {
  background: none;
  border: none;
  color: var(--muted, #9fb3c0);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.2s ease, color 0.2s ease;
}

.edisco-assistant__close:hover {
  background: rgba(196, 211, 220, 0.12);
  color: var(--text, #e6eef3);
}

/* Messages Area */
.edisco-assistant__messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  scroll-behavior: smooth;
}

.edisco-assistant__messages::-webkit-scrollbar {
  width: 6px;
}

.edisco-assistant__messages::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

.edisco-assistant__messages::-webkit-scrollbar-thumb {
  background: var(--blue, #1b5f82);
  border-radius: 3px;
}

.edisco-assistant__messages::-webkit-scrollbar-thumb:hover {
  background: var(--blue-dark, #246185);
}

/* Message Bubbles */
.edisco-assistant__message {
  display: flex;
  gap: 12px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.edisco-assistant__message.user {
  flex-direction: row-reverse;
}

.edisco-assistant__message-bubble {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.edisco-assistant__message.user .edisco-assistant__message-bubble {
  background: linear-gradient(135deg, var(--blue, #1b5f82), var(--blue-dark, #246185));
  color: #f4f8fb;
  border-bottom-right-radius: 4px;
}

.edisco-assistant__message.assistant .edisco-assistant__message-bubble {
  background: rgba(196, 211, 220, 0.15);
  color: var(--text, #e6eef3);
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border, rgba(196, 211, 220, 0.2));
}

/* Typing Indicator */
.edisco-assistant__typing {
  display: flex;
  gap: 6px;
  padding: 12px 16px;
  background: rgba(196, 211, 220, 0.15);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  max-width: 60px;
}

.edisco-assistant__typing span {
  width: 8px;
  height: 8px;
  background: var(--muted, #9fb3c0);
  border-radius: 50%;
  animation: typing 1.4s ease-in-out infinite;
}

.edisco-assistant__typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.edisco-assistant__typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* Quick Buttons */
.edisco-assistant__quick-buttons {
  padding: 16px 20px;
  border-top: 1px solid var(--border, rgba(196, 211, 220, 0.35));
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: rgba(0, 0, 0, 0.2);
}

.edisco-assistant__quick-btn {
  padding: 8px 14px;
  background: rgba(196, 211, 220, 0.1);
  border: 1px solid var(--border, rgba(196, 211, 220, 0.35));
  border-radius: 20px;
  color: var(--text, #e6eef3);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.edisco-assistant__quick-btn:hover {
  background: rgba(27, 95, 130, 0.3);
  border-color: var(--blue, #1b5f82);
  transform: translateY(-1px);
}

/* Input Area */
.edisco-assistant__input-area {
  padding: 16px 20px;
  border-top: 1px solid var(--border, rgba(196, 211, 220, 0.35));
  background: rgba(0, 0, 0, 0.2);
  display: flex;
  gap: 12px;
  align-items: center;
}

.edisco-assistant__input {
  flex: 1;
  padding: 12px 16px;
  background: rgba(0, 14, 22, 0.6);
  border: 1px solid var(--border, rgba(196, 211, 220, 0.35));
  border-radius: 12px;
  color: var(--text, #e6eef3);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.edisco-assistant__input:focus {
  border-color: var(--blue, #1b5f82);
  background: rgba(0, 14, 22, 0.8);
}

.edisco-assistant__input::placeholder {
  color: var(--muted, #9fb3c0);
}

.edisco-assistant__send {
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--blue, #1b5f82), var(--blue-dark, #246185));
  color: #f4f8fb;
  border: none;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-size: 14px;
}

.edisco-assistant__send:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(27, 95, 130, 0.4);
}

.edisco-assistant__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* CTA Buttons */
.edisco-assistant__cta {
  padding: 16px 20px;
  border-top: 1px solid var(--border, rgba(196, 211, 220, 0.35));
  background: linear-gradient(135deg, rgba(27, 95, 130, 0.15), rgba(12, 30, 42, 0.8));
  display: flex;
  gap: 12px;
}

.edisco-assistant__cta-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 13px;
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.edisco-assistant__cta-btn.whatsapp {
  background: #25D366;
  color: #fff;
}

.edisco-assistant__cta-btn.whatsapp:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.edisco-assistant__cta-btn.email {
  background: rgba(196, 211, 220, 0.15);
  color: var(--text, #e6eef3);
  border: 1px solid var(--border, rgba(196, 211, 220, 0.35));
}

.edisco-assistant__cta-btn.email:hover {
  background: rgba(196, 211, 220, 0.25);
  transform: translateY(-1px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .edisco-assistant {
    bottom: 16px;
    right: 16px;
  }

  .edisco-assistant__button {
    width: 56px;
    height: 56px;
    font-size: 20px;
  }

  .edisco-assistant__panel {
    width: calc(100vw - 32px);
    height: calc(100vh - 100px);
    max-height: 85vh;
    bottom: 72px;
    right: 0;
    border-radius: 20px 20px 0 0;
  }

  .edisco-assistant__cta {
    flex-direction: column;
  }

  .edisco-assistant__quick-buttons {
    padding: 12px 16px;
  }

  .edisco-assistant__quick-btn {
    font-size: 11px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .edisco-assistant__panel {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    bottom: 0;
    right: 0;
    border-radius: 0;
  }
}











