/* FD Media Global — Asistente virtual */
.fd-bot-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
}

.fd-bot-fab-wrap {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  animation: fd-bot-nudge 2.8s ease-in-out 1s 4;
  transition: transform 0.2s ease;
}

.fd-bot-fab-wrap:hover {
  transform: scale(1.04);
}

.fd-bot-fab-wrap:hover .fd-bot-bubble {
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.18);
}

.fd-bot-launcher.open .fd-bot-fab-wrap {
  animation: none;
}

.fd-bot-launcher.open .fd-bot-bubble {
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px) scale(0.95);
}

.fd-bot-bubble {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-bottom: -10px;
  padding: 10px 14px;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  z-index: 2;
  animation: fd-bot-teaser-bob 3s ease-in-out 0.5s infinite;
}

.fd-bot-bubble::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  width: 12px;
  height: 12px;
  background: #fff;
  border-right: 1px solid rgba(148, 163, 184, 0.45);
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  transform: translateX(-50%) rotate(45deg);
}

.fd-bot-bubble-line1 {
  font-size: 14px;
  line-height: 1.3;
  color: #334155;
}

.fd-bot-bubble-line1 strong {
  color: #1e3a8a;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.fd-bot-bubble-line2 {
  font-size: 13px;
  line-height: 1.3;
  color: #475569;
}

.fd-bot-fab {
  position: relative;
  width: 72px;
  height: 72px;
  padding: 0;
  border-radius: 50%;
  border: 3px solid rgba(125, 211, 252, 0.85);
  background: #fff;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.fd-bot-fab img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 12%;
  display: block;
  background: #fff;
  transform: scale(1.08);
}

.fd-bot-fab .fd-bot-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(14, 165, 233, 0.5);
  animation: fd-bot-pulse 2s ease-out infinite;
  pointer-events: none;
}

@keyframes fd-bot-pulse {
  0% { transform: scale(1); opacity: 0.7; }
  100% { transform: scale(1.25); opacity: 0; }
}

@keyframes fd-bot-nudge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

@keyframes fd-bot-teaser-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.fd-bot-panel {
  position: fixed;
  right: 20px;
  bottom: 108px;
  z-index: 9998;
  width: min(400px, calc(100vw - 32px));
  max-height: min(560px, calc(100dvh - 120px));
  display: flex;
  flex-direction: column;
  background: rgba(11, 17, 32, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s;
  overflow: hidden;
}

.fd-bot-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.fd-bot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 16px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
  flex-shrink: 0;
}

.fd-bot-header img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2px solid rgba(201, 168, 76, 0.4);
  object-fit: cover;
  object-position: center 12%;
  background: #fff;
  transform: scale(1.05);
}

.fd-bot-header-text {
  flex: 1;
  min-width: 0;
}

.fd-bot-header-text h3 {
  font-size: 14px;
  font-weight: 700;
  color: #e8edf5;
  margin: 0 0 2px;
}

.fd-bot-header-text p {
  font-size: 11px;
  color: #64748b;
  margin: 0;
}

.fd-bot-close {
  appearance: none;
  border: none;
  background: rgba(148, 163, 184, 0.12);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.fd-bot-lang {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.fd-bot-lang button {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.fd-bot-lang button:hover {
  color: #e8edf5;
  border-color: rgba(201, 168, 76, 0.45);
}

.fd-bot-lang button.active {
  background: rgba(201, 168, 76, 0.18);
  border-color: rgba(201, 168, 76, 0.55);
  color: #f5e6b8;
}

.fd-bot-close:hover { background: rgba(148, 163, 184, 0.22); color: #e8edf5; }

.fd-bot-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
  flex-shrink: 0;
}

.fd-bot-mode-group {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
}

.fd-bot-mode-group button {
  appearance: none;
  border: 1px solid rgba(148, 163, 184, 0.2);
  background: transparent;
  color: #94a3b8;
  font-family: inherit;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.fd-bot-mode-group button.active {
  background: rgba(79, 70, 229, 0.2);
  border-color: rgba(79, 70, 229, 0.5);
  color: #c7d2fe;
}

.fd-bot-messages {
  flex: 1;
  min-height: 180px;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.fd-bot-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.45;
}

.fd-bot-msg.bot {
  align-self: flex-start;
  background: rgba(79, 70, 229, 0.12);
  border: 1px solid rgba(79, 70, 229, 0.25);
  color: #e8edf5;
}

.fd-bot-msg.user {
  align-self: flex-end;
  background: rgba(14, 165, 233, 0.15);
  border: 1px solid rgba(14, 165, 233, 0.3);
  color: #e8edf5;
}

.fd-bot-msg.typing {
  color: #94a3b8;
  font-style: italic;
}

.fd-bot-input-area {
  padding: 12px 16px 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  flex-shrink: 0;
}

.fd-bot-input-row {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}

.fd-bot-input-row textarea {
  flex: 1;
  min-height: 42px;
  max-height: 100px;
  resize: none;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.6);
  color: #e8edf5;
  font-family: inherit;
  font-size: 13px;
  padding: 10px 12px;
  line-height: 1.4;
}

.fd-bot-input-row textarea:focus {
  outline: none;
  border-color: rgba(79, 70, 229, 0.5);
}

.fd-bot-input-row textarea::placeholder { color: #64748b; }

.fd-bot-icon-btn {
  appearance: none;
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 12px;
  background: rgba(2, 6, 23, 0.6);
  color: #94a3b8;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.fd-bot-icon-btn:hover {
  background: rgba(79, 70, 229, 0.15);
  border-color: rgba(79, 70, 229, 0.4);
  color: #e8edf5;
}

.fd-bot-icon-btn.listening {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.5);
  color: #fca5a5;
  animation: fd-bot-mic-pulse 1s ease infinite;
}

@keyframes fd-bot-mic-pulse {
  50% { box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2); }
}

.fd-bot-icon-btn svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.fd-bot-voice-hint {
  font-size: 11px;
  color: #64748b;
  margin-top: 8px;
  min-height: 16px;
}

.fd-bot-voice-hint.active { color: #0ea5e9; }

@media (max-width: 480px) {
  .fd-bot-launcher { right: 16px; bottom: 16px; }
  .fd-bot-fab { width: 64px; height: 64px; }
  .fd-bot-bubble-line1 { font-size: 13px; }
  .fd-bot-bubble-line2 { font-size: 12px; }
  .fd-bot-panel { right: 16px; bottom: 100px; }
}
