/* Genealogy Assistant — welcome-page pin & open walkthrough overlay.
   All selectors are scoped to #ga-wt so nothing leaks into the page.
   Intentionally does NOT set font-family — it inherits the page's font. */

#ga-wt,
#ga-wt * {
  box-sizing: border-box;
}

#ga-wt {
  position: fixed;
  inset: 0;
  z-index: 2147483600;
  opacity: 1;
  transition: opacity 0.28s ease;
}

#ga-wt.ga-wt-hiding {
  opacity: 0;
  pointer-events: none;
}

/* Dimmed backdrop */
#ga-wt .ga-wt-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(1.5px);
  -webkit-backdrop-filter: blur(1.5px);
}

/* Branded card (matches the site's white, 20px-radius card style) */
#ga-wt .ga-wt-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.45);
  padding: 30px 30px 22px;
  text-align: left;
}

/* Persistent header: info icon + title, with Skip in the corner */
#ga-wt .ga-wt-header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  text-align: left;
  margin-bottom: 18px;
  padding-right: 44px; /* clear the Skip button */
}

#ga-wt .ga-wt-info-icon {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  margin-top: 1px;
}

#ga-wt .ga-wt-header-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.25;
  /* color inherited from the page */
}

/* Screenshot for the current step */
#ga-wt .ga-wt-illus {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 4px 0 18px;
}

#ga-wt .ga-wt-shot {
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1; /* screenshots are 600×300 */
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
}

/* Fallback shown when a screenshot file is missing */
#ga-wt .ga-wt-shot-ph {
  width: 100%;
  aspect-ratio: 2 / 1; /* match the screenshots so layout doesn't jump */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 2px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
}

#ga-wt .ga-wt-shot-ph span {
  font-weight: 400;
  font-size: 12px;
  color: #b6c0cc;
}

#ga-wt .ga-wt-step-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #606060;
  margin-bottom: 6px;
}

#ga-wt .ga-wt-title {
  margin: 0 0 8px;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
  /* color inherited from the page */
}

#ga-wt .ga-wt-body {
  margin: 0 0 18px;
  font-size: 15px;
  line-height: 1.55;
  /* color inherited from the page */
}

#ga-wt .ga-wt-body kbd {
  font: inherit;
  font-weight: 600;
  color: #0f172a;
  background: #f1f5f9;
  border-radius: 5px;
  padding: 1px 6px;
}

#ga-wt .ga-wt-hint {
  display: block;
  margin-top: 10px;
}

/* Progress dots — same size; current slide shown by colour only */
#ga-wt .ga-wt-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 18px;
}

#ga-wt .ga-wt-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
  transition: background 0.2s ease;
}

#ga-wt .ga-wt-dot.is-active {
  background: #109322;
}

/* Controls */
#ga-wt .ga-wt-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

#ga-wt button {
  font: inherit;
  cursor: pointer;
  border: none;
}

/* Primary button — matches the site's .research-tools-button */
#ga-wt .ga-wt-next {
  flex: 1;
  background-color: #109322;
  color: #fff;
  font-weight: 700;
  border-radius: 8px;
  height: 36px;
  padding: 0 20px;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

#ga-wt .ga-wt-next:hover {
  background-color: #0d7a1c;
}

#ga-wt .ga-wt-back {
  background-color: #f1f5f9;
  color: #334155;
  font-weight: 700;
  border-radius: 8px;
  height: 36px;
  padding: 0 20px;
  font-size: 16px;
  transition: background-color 0.3s ease;
}

#ga-wt .ga-wt-back:hover {
  background-color: #e2e8f0;
}

#ga-wt .ga-wt-back[hidden] {
  display: none;
}

#ga-wt .ga-wt-skip {
  position: absolute;
  top: 34px;
  right: 32px;
  background: transparent;
  color: #606060;
  font-size: 14px;
  font-weight: 500;
  padding: 4px 6px;
}

#ga-wt .ga-wt-skip:hover {
  color: #404040;
}

@media (max-width: 480px) {
  #ga-wt .ga-wt-card {
    padding: 24px 18px 16px;
  }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  #ga-wt,
  #ga-wt .ga-wt-dot,
  #ga-wt button {
    transition: none !important;
  }
}
