/*
  Tour Guiado — Chat360 Landpage
  POC v1 — apresentação do produto em 11 passos
  Cores casam com a paleta da landpage (#6B5FFF roxo Chat360)
*/

/* ===== Hero CTA group (tour + ação direta) ===== */
.hero-cta-group {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
}

.btn-hero-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 28px;
  font-size: 15px;
  border-radius: 12px;
  background: transparent;
  border: 2px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  font-family: inherit;
  line-height: 1.5;
  cursor: pointer;
}

.btn-hero-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.75);
  transform: translateY(-1px);
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 768px) {
  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .hero-cta-group .btn-hero,
  .hero-cta-group .btn-hero-secondary {
    width: 100%;
    text-align: center;
  }
}

/* ===== Scroll offset: garante que cada passo role para o TOPO da seção,
   descontando a navbar fixa (≈70-80px) + respiro de 24px ===== */
#navbar,
#about,
#features,
.productivity-section,
.integrations,
#pricing,
#enterprise-plan,
#support {
  scroll-margin-top: 96px;
}

/* ===== Modal de boas-vindas (passo 0) ===== */
.tour-welcome-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: tourFadeIn 0.25s ease;
}

.tour-welcome-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 32px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(107, 95, 255, 0.3);
  text-align: center;
  animation: tourScaleIn 0.3s ease;
}

.tour-welcome-card .tour-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.tour-welcome-card h2 {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a2e;
  margin: 0 0 8px;
  font-family: inherit;
}

.tour-welcome-card p {
  font-size: 15px;
  color: #4a4a6a;
  line-height: 1.5;
  margin: 0 0 24px;
}

.tour-welcome-card .tour-meta {
  font-size: 13px;
  color: #6B5FFF;
  margin-bottom: 24px;
  font-weight: 600;
}

.tour-welcome-card .tour-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.tour-welcome-card button,
.tour-welcome-card a {
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.tour-welcome-card .tour-btn-primary {
  background: linear-gradient(135deg, #6B5FFF, #8B7FFF);
  color: #ffffff;
}

.tour-welcome-card .tour-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(107, 95, 255, 0.4);
}

.tour-welcome-card .tour-btn-secondary {
  background: #f0f0f5;
  color: #4a4a6a;
}

.tour-welcome-card .tour-btn-secondary:hover {
  background: #e0e0eb;
}

/* ===== Customização do driver.js popover ===== */
.driver-popover.chat360-tour-popover {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(107, 95, 255, 0.25);
  padding: 20px;
  max-width: 360px;
  font-family: inherit;
  border: 1px solid rgba(107, 95, 255, 0.15);
}

.driver-popover.chat360-tour-popover .driver-popover-title {
  font-size: 17px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
  line-height: 1.3;
}

.driver-popover.chat360-tour-popover .driver-popover-description {
  font-size: 14px;
  color: #4a4a6a;
  line-height: 1.55;
  margin-bottom: 16px;
}

.driver-popover.chat360-tour-popover .driver-popover-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.driver-popover.chat360-tour-popover .driver-popover-progress-text {
  font-size: 12px;
  color: #6B5FFF;
  font-weight: 600;
}

.driver-popover.chat360-tour-popover button {
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-family: inherit;
  transition: all 0.15s ease;
}

.driver-popover.chat360-tour-popover .driver-popover-prev-btn {
  background: #f0f0f5;
  color: #4a4a6a;
}

.driver-popover.chat360-tour-popover .driver-popover-prev-btn:hover {
  background: #e0e0eb;
}

.driver-popover.chat360-tour-popover .driver-popover-next-btn {
  background: linear-gradient(135deg, #6B5FFF, #8B7FFF);
  color: #ffffff;
  text-shadow: none;
  border: none;
}

.driver-popover.chat360-tour-popover .driver-popover-next-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(107, 95, 255, 0.4);
}

.driver-popover.chat360-tour-popover .driver-popover-close-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  background: transparent;
  color: #9a9ab0;
  font-size: 20px;
  width: 28px;
  height: 28px;
  line-height: 1;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.driver-popover.chat360-tour-popover .driver-popover-close-btn:hover {
  background: #f0f0f5;
  color: #1a1a2e;
}

/* Setas do popover seguindo o tema */
.driver-popover.chat360-tour-popover .driver-popover-arrow-side-left.driver-popover-arrow,
.driver-popover.chat360-tour-popover .driver-popover-arrow-side-right.driver-popover-arrow,
.driver-popover.chat360-tour-popover .driver-popover-arrow-side-top.driver-popover-arrow,
.driver-popover.chat360-tour-popover .driver-popover-arrow-side-bottom.driver-popover-arrow {
  border-color: #ffffff transparent transparent transparent;
}

/* Overlay do driver.js — z-index acima de qualquer modal MUI futuro */
.driver-overlay,
.driver-active .driver-overlay {
  z-index: 99998 !important;
}

.driver-popover {
  z-index: 99999 !important;
}

/* ===== Modal final (passo 11 — CTA) ===== */
.tour-finale-card .tour-actions {
  flex-direction: column;
  gap: 10px;
}

.tour-finale-card .tour-actions button,
.tour-finale-card .tour-actions a {
  width: 100%;
  display: block;
  text-decoration: none;
  text-align: center;
  box-sizing: border-box;
}

.tour-finale-card .tour-btn-outline {
  background: transparent;
  border: 1.5px solid #6B5FFF;
  color: #6B5FFF;
}

.tour-finale-card .tour-btn-outline:hover {
  background: rgba(107, 95, 255, 0.08);
}

/* ===== Animações ===== */
@keyframes tourFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes tourScaleIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

/* ===== Mobile: popover full-width ===== */
@media (max-width: 768px) {
  .driver-popover.chat360-tour-popover {
    max-width: calc(100vw - 32px);
  }

  .tour-welcome-card {
    padding: 24px 20px;
  }

  .tour-welcome-card h2 {
    font-size: 20px;
  }
}
