/*
 * The static shell also contains legacy waypoints, which remain in their
 * existing completed state. The homepage's seven G1/G2 icons override that
 * baseline only until they enter the viewport. The source stylesheet supplies
 * fadeTop when mirror.js adds .et-animated; screenshot tooling pins its own
 * capture-only end state, so visitor rendering remains deterministic at rest.
 */
.et-waypoint:not(.et_pb_counters) {
  opacity: 1;
}

.tpm-howitwork-col .et-waypoint.et_pb_animation_top:not(.et-animated),
.tpm-whatwedo-col .et-waypoint.et_pb_animation_top:not(.et-animated) {
  opacity: 0;
}

/* fitvids injects these rules at runtime on pages with video embeds; the
   static mirror wraps the same embeds at import time, so the CSS ships here. */
.fluid-width-video-wrapper {
  width: 100%;
  position: relative;
  padding: 0;
}

.fluid-width-video-wrapper iframe,
.fluid-width-video-wrapper object,
.fluid-width-video-wrapper embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Local Kadence gallery lightbox (G6). */
body.tpm-lightbox-open {
  overflow: hidden;
}

.tpm-local-lightbox[hidden] {
  display: none;
}

.tpm-local-lightbox {
  align-items: center;
  background: rgba(24, 26, 58, 0.88);
  display: flex;
  inset: 0;
  justify-content: center;
  padding: 1rem;
  position: fixed;
  z-index: 100000;
}

.tpm-local-lightbox__panel {
  background: #ffffff;
  border-radius: 8px;
  box-sizing: border-box;
  max-height: calc(100vh - 2rem);
  max-width: min(96vw, 960px);
  overflow: auto;
  padding: 3.5rem 1rem 1rem;
  position: relative;
  width: max-content;
}

.tpm-local-lightbox__title {
  height: 1px;
  margin: -1px;
  overflow: hidden;
  position: absolute;
  width: 1px;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.tpm-local-lightbox__close,
.tpm-local-lightbox__previous,
.tpm-local-lightbox__next {
  --tpm-control-bg: #3a3d72;
  --tpm-control-fg: #ffffff;
  --tpm-control-hover-bg: #90c423;
  --tpm-control-hover-fg: #3a3d72;
  --tpm-control-focus: #3a3d72;
  align-items: center;
  appearance: none;
  background: var(--tpm-control-bg);
  border: 2px solid var(--tpm-control-bg);
  border-radius: 999px;
  box-sizing: border-box;
  color: var(--tpm-control-fg);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 600;
  justify-content: center;
  line-height: 1.2;
  min-height: 2.75rem;
  min-width: 6rem;
  padding: 0.65rem 1rem;
  transition: none;
}

.tpm-local-lightbox__close:hover,
.tpm-local-lightbox__close:focus,
.tpm-local-lightbox__previous:hover,
.tpm-local-lightbox__previous:focus,
.tpm-local-lightbox__next:hover,
.tpm-local-lightbox__next:focus {
  background: var(--tpm-control-hover-bg);
  border-color: var(--tpm-control-hover-bg);
  color: var(--tpm-control-hover-fg);
}

.tpm-local-lightbox__close:focus,
.tpm-local-lightbox__previous:focus,
.tpm-local-lightbox__next:focus {
  outline: 3px solid var(--tpm-control-focus);
  outline-offset: 2px;
}

.tpm-local-lightbox__close {
  position: absolute;
  right: 1rem;
  top: 1rem;
  z-index: 1;
}

.tpm-local-lightbox__media {
  align-items: center;
  background: #f5f6f8;
  display: flex;
  justify-content: center;
  min-height: 5rem;
  min-width: min(20rem, 80vw);
}

.tpm-local-lightbox__message {
  color: #3a3d72;
  margin: 2rem;
  text-align: center;
}

.tpm-local-lightbox__image {
  display: block;
  height: auto;
  max-height: calc(100vh - 10rem);
  max-width: min(90vw, 900px);
  object-fit: contain;
  width: auto;
}

.tpm-local-lightbox__caption {
  color: #3a3d72;
  font-size: 0.95rem;
  margin: 0.75rem 0;
  text-align: center;
}

.tpm-local-lightbox__controls {
  display: flex;
  flex-shrink: 0;
  gap: 0.75rem;
  justify-content: center;
}

.tpm-local-lightbox__panel--review {
  max-width: calc(100vw - 1rem);
  overflow: hidden;
  padding: 3.5rem 1rem 1rem;
  width: min(544px, calc(100vw - 1rem));
}

.tpm-local-lightbox__panel--review .tpm-local-lightbox__media {
  height: min(512px, calc(100vw - 2rem), calc(100vh - 18rem));
  min-height: 0;
  min-width: 0;
  width: min(512px, calc(100vw - 2rem), calc(100vh - 18rem));
}

.tpm-local-lightbox__panel--review .tpm-local-lightbox__image {
  height: auto;
  max-height: 100%;
  max-width: 100%;
  width: auto;
}

.tpm-local-lightbox__review-highlight {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  height: 9.5rem;
  padding: 0.65rem 0.25rem 0.2rem;
  width: 100%;
}

.tpm-local-lightbox__stars {
  color: #3a3d72;
  flex-shrink: 0;
  font-size: 1.1rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-align: left;
}

.tpm-local-lightbox__review-author,
.tpm-local-lightbox__review-text,
.tpm-local-lightbox__review-counts {
  color: #3a3d72;
  margin: 0;
}

.tpm-local-lightbox__review-author {
  flex-shrink: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
}

.tpm-local-lightbox__review-text {
  display: -webkit-box;
  flex: 1 1 auto;
  font-size: 0.85rem;
  line-height: 1.35;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tpm-local-lightbox__review-counts {
  flex-shrink: 0;
  font-size: 0.75rem;
  line-height: 1.25;
}

.tpm-local-lightbox__review-link {
  align-self: flex-start;
  color: #3a3d72;
  flex-shrink: 0;
  font-size: 0.75rem;
  line-height: 1.25;
  text-decoration: underline;
}

.tpm-local-lightbox__review-link:focus {
  outline: 3px solid #3a3d72;
  outline-offset: 2px;
}

.tpm-local-lightbox__caption--status,
.tpm-local-lightbox__visually-hidden {
  border: 0;
  clip: rect(0 0 0 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

@media only screen and (max-width: 767px) {
  .tpm-local-lightbox {
    padding: 0.5rem;
  }

  .tpm-local-lightbox__panel {
    max-height: calc(100vh - 1rem);
    max-width: 100vw;
    padding: 3.5rem 0.5rem 0.75rem;
    width: 100%;
  }

  .tpm-local-lightbox__panel--review {
    padding: 3.5rem 0.5rem 0.75rem;
  }

  .tpm-local-lightbox__panel--review .tpm-local-lightbox__media {
    height: min(512px, calc(100vw - 2rem), calc(100vh - 18rem));
    width: min(512px, calc(100vw - 2rem), calc(100vh - 18rem));
  }

  .tpm-local-lightbox__review-highlight {
    height: 9.5rem;
  }

  .tpm-local-lightbox__media {
    min-width: 0;
  }

  .tpm-local-lightbox__image {
    max-height: calc(100vh - 11rem);
    max-width: calc(100vw - 2rem);
  }
}
