/* First-time visitor walkthrough (public pages only) */

#tgFirstTimeGuideOverlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647; /* above everything */
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 1rem;
  opacity: 0;
}

#tgFirstTimeGuideOverlay.tg-ftg-show {
  opacity: 1;
  transition: opacity 240ms ease;
}

#tgFirstTimeGuideModal {
  width: 100%;
  max-width: 690px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  transform: translateY(40px);
  opacity: 0;
}

#tgFirstTimeGuideOverlay.tg-ftg-show #tgFirstTimeGuideModal {
  transform: translateY(0);
  opacity: 1;
  transition: transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1), opacity 220ms ease;
}

.tg-ftg-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.78rem 0.95rem;
  background: linear-gradient(135deg, #1a3c34 0%, #2d5a4a 50%, #1e4a3e 100%);
  color: #ffffff;
}

.tg-ftg-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tg-ftg-brand-badge {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.tg-ftg-title {
  margin: 0;
  font-family: "Newsreader", Georgia, serif;
  font-weight: 700;
  font-size: 1.02rem;
  color: #ffffff;
}

.tg-ftg-step {
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 1;
  color: #ffffff;
}

.tg-ftg-logoRow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.45rem 1rem 0.15rem;
}

.tg-ftg-logoImg {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  background: transparent;
  border: 0;
  object-fit: contain;
}

.tg-ftg-body {
  padding: 0.85rem 0.95rem 0.9rem;
}

.tg-ftg-slide {
  display: none;
}

.tg-ftg-slide.tg-ftg-slide-active {
  display: block;
}

.tg-ftg-slide h3 {
  margin: 0 0 0.5rem;
  font-family: "Newsreader", Georgia, serif;
  color: #0f172a;
  font-size: clamp(1rem, 2.0vw, 1.25rem);
  font-weight: 700;
}

.tg-ftg-slide p {
  margin: 0;
  color: #334155;
  line-height: 1.6;
  font-size: 0.95rem;
  white-space: pre-line;
}

.tg-ftg-footer {
  padding: 0.8rem 0.95rem;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.tg-ftg-actions {
  display: flex;
  gap: 0.5rem;
}

.tg-ftg-btn {
  border-radius: 10px;
  border: 1px solid rgba(17, 24, 39, 0.12);
  background: #ffffff;
  color: #0f172a;
  padding: 0.5rem 0.8rem;
  font-weight: 650;
  cursor: pointer;
}

.tg-ftg-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.tg-ftg-btn-primary {
  background: linear-gradient(135deg, #1a3c34 0%, #2d5a4a 50%, #1e4a3e 100%);
  color: rgba(255, 255, 255, 0.98);
  border-color: rgba(255, 255, 255, 0.18);
}

.tg-ftg-progress {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  flex: 1 1 auto;
  justify-content: center;
  min-width: 220px;
}

.tg-ftg-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.18);
}

.tg-ftg-dot.tg-ftg-dot-active {
  background: #198754;
}

/* Accessibility */
#tgFirstTimeGuideOverlay:focus {
  outline: none;
}

@media (max-width: 640px) {
  #tgFirstTimeGuideModal {
    max-width: 92vw;
  }
  .tg-ftg-header {
    padding: 0.75rem 0.9rem;
  }

  .tg-ftg-body {
    padding: 0.8rem 0.9rem 0.85rem;
  }

  .tg-ftg-footer {
    padding: 0.75rem 0.9rem;
  }

  .tg-ftg-actions {
    width: 100%;
  }

  .tg-ftg-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .tg-ftg-progress {
    justify-content: flex-start;
    min-width: 0;
  }
}

