/* popup.css - onboarding popup styles (dark theme, matches project) */

/* utility: hide */
.hidden { display: none !important; }

/* Overlay (backdrop) */
.onboarding-overlay {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.56);         /* same intensity as other backdrops */
  backdrop-filter: blur(4px);           /* gentle blur like site */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Popup container */
.onboarding-popup {
  width: 92%;
  max-width: 520px;
  background: linear-gradient(180deg, rgba(11,13,18,0.98), rgba(5,5,7,0.98)); /* rich dark card */
  color: #e6eef8;                         /* matches saved-show title color */
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 10px 30px rgba(2,6,12,0.7);
  position: relative;
  transition: transform 260ms cubic-bezier(.2,.9,.2,1), opacity 180ms ease;
  transform-origin: center;
}

/* entrance */
.onboarding-popup.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Close (X) */
.onboarding-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(255,255,255,0.03);
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.45);
  transition: background 150ms ease, transform 100ms ease;
  z-index: 10000;
}
.onboarding-close:hover { background: rgba(255,255,255,0.06); transform: translateY(-1px); }
.onboarding-close:active { transform: translateY(0); }

/* Slides container (stacked blocks) */
.onboarding-slide-container {
  width: 100%;
  height: 70vh;           /* 👈 adjust this if needed */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  margin: 6px 0 4px;
}

/* Individual slide */
.onboarding-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 6px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;   /* center horizontally */
  justify-content: flex-start;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease;
}

/* Visible slide */
.onboarding-slide.active {
  opacity: 1;
  pointer-events: auto;
  display: block;
}

/* Headings & paragraph */
.onboarding-slide h2 {
  margin: 6px 0 12px;
  font-size: 1.25rem;
  font-weight: 650;
  color: #f3f7fb;
  line-height: 1.1;
  text-align: center;
}

.onboarding-slide p {
  margin: 8px 0 0;
  font-size: 0.95rem;
  color: #d6e1ef;
  line-height: 1.4;
  text-align: left;
  margin-left: 6px;
  margin-right: 6px;
}

/* GIF / image */
.onboarding-slide img {
    display: block;
    height: 60%;                 /* 👈 Set the uniform height you prefer */
    width: auto;                   /* Keeps aspect ratio */
    max-width: 100%;               /* Prevents overflow horizontally */
    margin: 10px auto 6px;
    border-radius: 12px;
    object-fit: contain;           /* Shows entire GIF without cropping */
    box-shadow: 0 6px 18px rgba(0,0,0,0.6);
    border: 1px solid rgba(255,255,255,0.02);
}

/* Navigation area (buttons) */
.onboarding-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
}

/* Keep the class name you already use for buttons */
.nav-btn {
  -webkit-appearance: none;
  appearance: none;
  background: rgba(255,255,255,0.03);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 160ms ease, background 120ms ease;
  box-shadow: 0 4px 14px rgba(2,6,12,0.55);
}

/* Disabled / hidden prev */
.nav-btn[disabled], .nav-btn.btn-disabled {
  opacity: 0.55;
  pointer-events: none;
  filter: grayscale(80%);
}

/* hover states consistent with site */
.nav-btn:hover {
  transform: translateY(-2px);
  background: rgba(255,255,255,0.045);
  box-shadow: 0 8px 24px rgba(2,6,12,0.6);
}

/* ------------------------
   Mobile-safe popup (final)
   ------------------------ */
@media (max-width: 768px) {

  /* popup: use flex column so header/close/nav are accounted for */
  .onboarding-popup {
    width: 94%;
    max-width: 600px;
    max-height: 80vh;         /* never taller than viewport */
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 10px;
    box-sizing: border-box;
  }

  /* slide container fills remaining popup space and is the positioning context */
  .onboarding-slide-container {
    position: relative;       /* needed for absolute slides */
    flex: 1 1 auto;
    min-height: 0;            /* allow proper flex overflow behavior */
    overflow: auto;         /* slide handles its own scroll if necessary */
  }

  /* keep slides absolute so only the active one occupies visible space */
  .onboarding-slide {
    position: absolute;
    inset: 0;                 /* top:0; right:0; bottom:0; left:0 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 8px;
    box-sizing: border-box;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
  }

  .onboarding-slide.active {
    opacity: 1;
    pointer-events: auto;
  }

  /* allow slide content to scroll internally if needed */
  .onboarding-slide > .slide-inner {
    /* optional wrapper if you want inner scroll — if you don't have it, the rules below still work */
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: 100%;
  }

  /* heading and text sizing */
  .onboarding-slide h2 {
    font-size: 1.05rem;
    margin: 6px 0 8px;
    text-align: center;
  }
  .onboarding-slide p {
    font-size: 0.95rem;
    line-height: 1.35;
    margin: 6px 0;
    text-align: left;
    width: 100%;
  }

  /* image: sized relative to the available slide area */
  .onboarding-slide img {
    width: 100%;
    object-fit: contain;
    margin: 8px 0;
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.45);
  }

  /* navigation area stays visible and fixed at bottom of popup */
  .onboarding-nav {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    align-items: center;
  }
  .nav-btn {
    padding: 10px 12px;
    font-size: 0.95rem;
    border-radius: 8px;
  }

  /* close button sits above content (no change) */
  .onboarding-close {
    top: 10px;
    right: 10px;
    width: 36px;
    height: 36px;
  }
}

