/* "Inside your report" on /pro-face-report: five images of the sample report
   (made from the sample PDFs in dataassets/proreportimages), a Women/Men
   switch, a sideways rail on phones and tablets, three over two from 992 px,
   and an enlarged view in a modal. static/js/proReportPreview.js runs it. */

.pfr-preview,
.pfr-zoom {
  --pv-muted: #5b6670;
  --pv-line: #dce5f1;
}
.pfr-preview__head {
  text-align: center;
}
.pfr-preview__foot {
  margin-top: 1.25rem;
  text-align: center;
}
.pfr-preview__foot p {
  margin: 0.75rem 0 0;
  font-size: 0.85rem;
}
.pfr-preview__foot p a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  color: var(--accent-dark);
  font-weight: 600;
  text-decoration: none;
}
/* The pages need more room than the page's 38rem column: from 576 px the
   rail runs wider, centred on the column (base.html clips any overflow). */
@media (min-width: 576px) {
  .pfr-preview__wide {
    width: min(62rem, calc(100vw - 3rem));
    margin-left: calc((100% - min(62rem, calc(100vw - 3rem))) / 2);
  }
  .pfr-rail {
    margin: 0;
    padding-right: 0.25rem;
    padding-left: 0.25rem;
  }
}

.pfr-toggle {
  display: inline-flex;
  padding: 0.2rem;
  background: #eef3fb;
  border: 1px solid var(--pv-line);
  border-radius: 999px;
}
.pfr-toggle__btn {
  padding: 0.4rem 1.2rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pv-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.pfr-toggle__btn.is-active {
  background: #fff;
  color: var(--brand-primary-dark);
  box-shadow: var(--shadow-card);
}
.pfr-rail-wrap {
  position: relative;
}
.pfr-rail {
  display: flex;
  gap: 1rem;
  margin: 0 -1rem;
  padding: 0.25rem 1rem 1rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.pfr-rail::-webkit-scrollbar {
  display: none;
}
.pfr-rail:focus-visible {
  outline: 3px solid rgba(13, 110, 253, 0.35);
  outline-offset: 2px;
  border-radius: 1rem;
}
.pfr-page {
  flex: 0 0 min(78vw, 17.5rem);
  margin: 0;
  scroll-snap-align: center;
}
.pfr-rail-nav {
  position: absolute;
  top: 38%;
  z-index: 3;
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  background: #fff;
  border: 1px solid var(--pv-line);
  border-radius: 50%;
  box-shadow: var(--shadow-soft);
  color: var(--brand-primary-dark);
}
.pfr-rail-nav:disabled {
  opacity: 0.35;
}
.pfr-rail-nav--prev {
  left: -6px;
}
.pfr-rail-nav--next {
  right: -6px;
}
.pfr-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 0.1rem;
}
.pfr-dots i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #c9d6e8;
  transition: background 0.2s ease, transform 0.2s ease;
}
.pfr-dots i.is-on {
  background: var(--brand-primary);
  transform: scale(1.25);
}
@media (min-width: 576px) and (max-width: 991.98px) {
  .pfr-rail-nav {
    display: flex;
  }
}
/* Five do not fill a grid of three: three on top, two centred under them. */
@media (min-width: 992px) {
  .pfr-rail {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.75rem 1.5rem;
    margin: 0;
    padding: 0.25rem 0 0;
    overflow: visible;
  }
  .pfr-page {
    flex: 0 0 calc((100% - 3rem) / 3);
  }
  .pfr-dots {
    display: none;
  }
}

/* A sample page: the image is the page, and the whole card enlarges it. */
.pfr-sheet {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
  background: #efe7da;
  border-radius: 1rem;
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.pfr-sheet img {
  display: block;
  width: 100%;
  height: auto;
}
@media (hover: hover) {
  .pfr-sheet:hover {
    transform: translateY(-3px);
    box-shadow: 0 0.75rem 1.5rem rgba(13, 42, 80, 0.14);
  }
}
.pfr-sheet__zoom {
  position: absolute;
  right: 0.55rem;
  bottom: 0.55rem;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  font-size: 0.8rem;
  color: var(--brand-primary-dark);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--pv-line);
  border-radius: 50%;
}
/* Enlarged, the image keeps its shape and fits the screen's height. */
#pfrZoomBody .pfr-sheet {
  overflow: visible;
  cursor: default;
  background: none;
  border-radius: 0;
  box-shadow: none;
}
#pfrZoomBody .pfr-sheet:hover {
  transform: none;
}
#pfrZoomBody .pfr-sheet img {
  width: auto;
  max-width: 100%;
  max-height: calc(100vh - 11rem);
  margin: 0 auto;
  border-radius: 0.75rem;
}
#pfrZoomBody .pfr-sheet__zoom {
  display: none;
}
.pfr-zoom-dialog {
  max-width: 34rem;
}


/* Thumb-sized targets where a finger lands */
@media (max-width: 767.98px) {
  .pfr-toggle__btn {
    min-height: 2.75rem;
    padding: 0.5rem 1.4rem;
  }
  .pfr-sheet__zoom {
    right: 0.4rem;
    bottom: 0.4rem;
    width: 2.75rem;
    height: 2.75rem;
    font-size: 1rem;
  }
}
