/* Chatbot Asesor */
.chat-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

.chat-button {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #ffd500 0%, #ffb700 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(255, 213, 0, 0.4);
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
  position: relative;
}

.chat-button:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(255, 213, 0, 0.6);
}

.chat-icon {
  width: 28px;
  height: 28px;
  color: #0c0c0c;
}

.chat-notification {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ff3b30;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  animation: bounce 1s infinite;
}

.chat-window {
  position: fixed;
  bottom: 120px;
  right: 20px;
  width: 420px;
  max-height: calc(100vh - 120px);
  background: white;
  border-radius: 16px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.2);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 10000;
}

.chat-window.active {
  display: flex;
  animation: slideUp 0.3s ease;
}

.chat-header {
  background: linear-gradient(135deg, #ffd500 0%, #ffb700 100%);
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #0c0c0c;
}

.chat-header-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  background: white;
  padding: 4px;
}

.chat-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.chat-status {
  margin: 2px 0 0 0;
  font-size: 13px;
  opacity: 0.9;
}

.chat-close {
  background: none;
  border: none;
  color: #0c0c0c;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.chat-close:hover {
  background: rgba(12, 12, 12, 0.1);
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f5f5f5;
  min-height: 100px;
  max-height: 200px;
}

.message {
  margin-bottom: 16px;
  display: flex;
  animation: fadeIn 0.3s ease;
}

.message p {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 16px;
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
}

.message.bot p {
  background: white;
  color: #333;
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

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

.message.user p {
  background: #ffd500;
  color: #0c0c0c;
  border-bottom-right-radius: 4px;
}

.chat-options {
  padding: 10px;
  background: white;
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid #e0e0e0;
  max-height: none;
  overflow-y: visible;
}

.chat-option {
  background: white;
  border: 2px solid #ffd500;
  color: #0c0c0c;
  padding: 8px 11px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
  line-height: 1.15;
}

.chat-option:hover {
  background: #ffd500;
  transform: translateX(4px);
}

.chat-input-area {
  padding: 14px 16px;
  background: white;
  display: flex;
  gap: 10px;
  border-top: 1px solid #e0e0e0;
}

.chat-input {
  flex: 1;
  padding: 13px 16px;
  border: 2px solid #ffd500;
  border-radius: 24px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  background: #fffef8;
  font-weight: 500;
  color: #0c0c0c;
}

.chat-input::placeholder {
  color: #999;
  font-weight: 400;
}

.chat-input:focus {
  border-color: #ffb700;
  background: white;
}

.chat-send {
  width: 44px;
  height: 44px;
  background: #ffd500;
  border: none;
  border-radius: 50%;
  color: #0c0c0c;
  font-size: 18px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chat-send:hover {
  background: #ffb700;
  transform: scale(1.05);
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: white;
  border-radius: 16px;
  width: fit-content;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #999;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

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

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

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(255, 213, 0, 0.4);
  }
  50% {
    box-shadow: 0 4px 30px rgba(255, 213, 0, 0.7), 
                0 0 0 10px rgba(255, 213, 0, 0.1),
                0 0 0 20px rgba(255, 213, 0, 0.05);
  }
}

@keyframes bounce {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

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

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

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

/* Responsive */
@media (max-width: 768px) {
  .chat-window {
    position: fixed;
    width: calc(100vw - 40px);
    right: 20px;
    bottom: 110px;
    max-height: calc(100vh - 130px);
  }

  .chat-options {
    padding: 8px;
    gap: 5px;
  }

  .chat-option {
    padding: 7px 9px;
    font-size: 11px;
  }

  .chat-button {
    width: 55px;
    height: 55px;
  }

  .chat-icon {
    width: 24px;
    height: 24px;
  }
}
