/* Phase 14 — shared "Want to know more" explainer dialog. Mounted
   once in base.html; every popup elsewhere triggers it via
   `<button class="learn-more-trigger" data-explainer="<key>">`. */

/* The trigger button — a soft brand-tinted pill (2026-06-07: was a
   transparent slate text button; per user it was too easy to miss).
   Visible without competing with primary CTAs. */
.learn-more-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(23, 56, 45, 0.08);
  border: 1px solid rgba(23, 56, 45, 0.24);
  padding: 5px 12px;
  margin: 4px 0 0;
  font: inherit;
  font-size: 11.5px;
  font-weight: 750;
  color: var(--brand-deep, #17382d);
  cursor: pointer;
  border-radius: 999px;
  letter-spacing: 0.02em;
}
.learn-more-trigger::before {
  content: "ⓘ";
  font-size: 13px;
  line-height: 1;
  opacity: 0.9;
}
.learn-more-trigger:hover {
  background: var(--brand-deep, #17382d);
  border-color: var(--brand-deep, #17382d);
  color: var(--surface-white, #fff);
}
.learn-more-trigger:focus-visible {
  outline: 2px solid var(--info-blue-border-dark, var(--info-blue-border-dark));
  outline-offset: 2px;
}

/* Standard page placement: the trigger is the FIRST thing below the big
   page title, in its own row. */
.learn-more-row {
  margin: 6px 0 0;
}

/* The dialog host — native <dialog>, centered. ::backdrop dims the
   page; the card itself is white-on-cream and capped for legibility. */
.learn-more-dialog {
  padding: 0;
  border: 0;
  background: transparent;
  max-width: min(560px, calc(100vw - 32px));
  max-height: calc(100dvh - 32px);
  width: 100%;
  border-radius: 16px;
  overflow: visible;
}
.learn-more-dialog::backdrop {
  background: rgba(17, 27, 39, 0.55);
}
.learn-more-dialog-card {
  position: relative;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
  padding: 24px 24px 22px;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-white) 0%, var(--surface-white) 100%);
  border: 1px solid var(--border-pale, var(--border-pale));
  box-shadow: 0 24px 48px rgba(20, 30, 45, 0.28);
}
.learn-more-dialog-close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: transparent;
  border: 0;
  font-size: 22px;
  line-height: 1;
  color: var(--ink-muted, var(--ink-muted));
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
}
.learn-more-dialog-close:hover {
  background: rgba(28, 51, 67, 0.06);
  color: var(--ink-navy, var(--ink-navy));
}
.learn-more-dialog-title {
  margin: 0 0 12px;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink-navy, var(--ink-navy));
  padding-right: 24px;
}
.learn-more-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.learn-more-body-prose {
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-navy, var(--ink-navy));
}
.learn-more-body-prose p { margin: 0 0 10px; }
.learn-more-body-prose p:last-child { margin-bottom: 0; }
.learn-more-body-prose strong { font-weight: 800; }
.learn-more-body-prose ul,
.learn-more-body-prose ol {
  margin: 8px 0 12px;
  padding-left: 22px;
}
.learn-more-body-prose li { margin: 0 0 4px; }
.learn-more-body-prose em { font-style: italic; color: var(--ink-slate, var(--ink-slate)); }

/* Screenshot strip — sits below the prose body. Real images stretch
   to the card width; placeholders are dashed-border slots that show
   the user what each screenshot will eventually display so the panel
   reads as a finished layout before the images arrive. */
.learn-more-screenshots {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 14px;
}
.learn-more-shot {
  margin: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border-pale, var(--border-pale));
}
.learn-more-shot img {
  display: block;
  width: 100%;
  height: auto;
}
.learn-more-shot figcaption {
  padding: 6px 10px;
  font-size: 11.5px;
  color: var(--ink-muted, var(--ink-muted));
  background: var(--surface-pale-cool, var(--surface-pale-cool));
}
.learn-more-shot-placeholder {
  border: 1px dashed var(--border-mid, var(--border-mid));
  background: var(--surface-pale-cool, var(--surface-pale-cool));
  border-radius: 10px;
  padding: 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.learn-more-shot-placeholder-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted, var(--ink-muted));
}
.learn-more-shot-placeholder-text {
  margin: 0;
  font-size: 12px;
  font-style: italic;
  color: var(--ink-slate, var(--ink-slate));
  line-height: 1.45;
}

/* Carousel (2026-06-07) — used whenever an explainer has MORE than one
   screenshot, so the dialog stays short on small screens. One slide at a
   time; scroll-snap gives native swipe on touch; arrows + dots for mouse. */
.learn-more-carousel {
  position: relative;
  margin-top: 14px;
  min-width: 0;
}
.learn-more-carousel-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.learn-more-carousel-track::-webkit-scrollbar { display: none; }
.learn-more-carousel-slide {
  flex: 0 0 100%;
  min-width: 0;
  scroll-snap-align: start;
}
.learn-more-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-pale, #e3e9ee);
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink-navy, #1c3343);
  font-size: 17px;
  line-height: 1;
  padding: 0 0 2px;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(23, 38, 48, 0.14);
}
.learn-more-carousel-arrow.is-prev { left: 6px; }
.learn-more-carousel-arrow.is-next { right: 6px; }
.learn-more-carousel-arrow:hover:not(:disabled) {
  border-color: var(--brand-deep, #17382d);
  color: var(--brand-deep, #17382d);
}
.learn-more-carousel-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}
.learn-more-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.learn-more-carousel-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 0;
  padding: 0;
  background: var(--border-mid, #c8d2da);
  cursor: pointer;
}
.learn-more-carousel-dot.is-active {
  background: var(--brand-deep, #17382d);
}

@media (max-width: 700px) {
  .learn-more-dialog {
    max-width: calc(100vw - 16px);
  }
  .learn-more-dialog-card {
    padding: 18px 18px 16px;
  }
  .learn-more-dialog-title { font-size: 16px; }
  .learn-more-body-prose { font-size: 12.5px; }
}
