/* ==========================================================================
   Meg Assistant — LP Chama a Meg
   Assistente visual elegante, discreta, premium.
   Não invasiva. Mobile-first. Performance otimizada.
   ========================================================================== */

/* ----- Container flutuante fixo ----- */
#meg-assistant {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 90px;
  cursor: pointer;
  z-index: 999;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.35s ease;
  opacity: 0;
  animation: meg-appear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s forwards;
}

@keyframes meg-appear {
  from {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

#meg-assistant img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 20px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1),
              0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              box-shadow 0.3s ease;
}

#meg-assistant:hover {
  transform: translateY(-8px) scale(1.02);
}

#meg-assistant:hover img {
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12),
              0 0 0 1px rgba(255, 255, 255, 0.5);
}

#meg-assistant:focus {
  outline: none;
}

#meg-assistant:focus-visible img {
  outline: 2px solid var(--lp-accent, #7ed321);
  outline-offset: 3px;
}

/* ----- Tooltip ----- */
.meg-tooltip {
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: #ffffff;
  padding: 14px 18px;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1),
              0 0 0 1px rgba(0, 0, 0, 0.04);
  font-size: 14px;
  line-height: 1.5;
  color: #2c2c2c;
  max-width: 220px;
  opacity: 0;
  transform: translateY(12px) scale(0.95);
  transition: opacity 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
              transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}

#meg-assistant:hover .meg-tooltip,
#meg-assistant:focus-within .meg-tooltip,
#meg-assistant.meg-tooltip-visible .meg-tooltip {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ----- Scroll-follow (versão que acompanha scroll) ----- */
#meg-assistant.meg-scroll-follow {
  position: absolute;
  bottom: auto;
  right: 24px;
  top: auto;
}

/* ----- Mobile ----- */
@media (max-width: 767px) {
  #meg-assistant {
    width: 70px;
    bottom: 16px;
    right: 16px;
  }

  .meg-tooltip {
    max-width: 200px;
    padding: 12px 14px;
    font-size: 13px;
    bottom: calc(100% + 10px);
  }
}

/* ----- Seção "Conheça a Meg" ----- */
.meg-conheca {
  background: linear-gradient(180deg, rgba(126, 211, 33, 0.04) 0%, transparent 100%);
  border: 1px solid rgba(126, 211, 33, 0.12);
  border-radius: 16px;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1.5rem;
  text-align: center;
}

.meg-conheca__title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--lp-text, #1a1a2e);
  margin: 0 0 0.75rem;
}

.meg-conheca__text {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--lp-text-muted, #6b7280);
  margin: 0 0 1rem;
}

.meg-conheca__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--lp-brand, #003366);
  background: transparent;
  border: 1px solid rgba(0, 51, 102, 0.2);
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.meg-conheca__cta:hover {
  background: rgba(0, 51, 102, 0.06);
  border-color: rgba(0, 51, 102, 0.3);
  color: var(--lp-brand, #003366);
}

/* ----- Badge "Atendimento organizado pela Meg" ----- */
.meg-cta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  margin-top: 0.5rem;
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--lp-text-muted, #6b7280);
  background: transparent;
  border: none;
  cursor: help;
  position: relative;
  transition: color 0.2s ease;
}

.meg-cta-badge:hover {
  color: var(--lp-brand, #003366);
}

.meg-cta-badge__tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  background: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--lp-text, #1a1a2e);
  max-width: 240px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: normal;
  text-align: center;
}

.meg-cta-badge:hover .meg-cta-badge__tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.meg-cta-badge-wrap {
  margin-top: 0.75rem;
  display: flex;
  justify-content: center;
}

.meg-cta-final {
  flex-direction: column;
  align-items: center;
}

.meg-cta-badge--final {
  margin-top: 0.75rem;
}

.meg-conheca__tagline {
  font-style: italic;
  margin-bottom: 0.5rem;
}
