/* Vitric brand overrides */

/* Reserve the scrollbar gutter so the layout does not jump when a page is short enough
   to lose its scrollbar.

   NOT `both-edges`: that reserves the gutter on the left as well, and because the page
   scrollbar is a real one (the ::-webkit-scrollbar{display:none} in the theme is scoped
   to .nav-container, not the document) only the right gutter ever gets filled. The left
   one stayed empty and painted as a 15px white strip down every page. */
html {
  scrollbar-gutter: stable;
}

/* Center the logo horizontally on that (now symmetric) content center, AND vertically within
   the header bar — top:50% + translateY(-50%) centers our taller mark regardless of the per-template
   fixed `top` values (the ebook lander pins top:17px, which left our 34px mark sitting low). */
.header-logo {
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.header-logo a { display: inline-flex !important; align-items: center; }
.vitric-logo { margin: 0 !important; display: block; }


/* Proof wall cap.
   The theme only caps this wall on its own pre-call/demo templates, and only while
   King Kong's "Load More" button is in the DOM. Our wall now runs on more pages, so
   cap it here on the same condition. The theme's own handler deletes the button on
   click, which makes :has() stop matching and the wall opens to full height - the
   original behaviour, no extra JS. */
.pre-call-proof:has(.js-load-more) .pre-call-proof__wall {
  max-height: 3200px;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 360px), rgba(0,0,0,.15) calc(100% - 144px), transparent);
          mask-image: linear-gradient(#000 calc(100% - 360px), rgba(0,0,0,.15) calc(100% - 144px), transparent);
}

/* Video proof wall. Reuses the theme's masonry grid and its own lime play button
   (.pre-call-video__thumb:before) so the tiles match the rest of the site. Posters
   are lazy-loaded; the mp4 is only fetched when someone presses play. */
.vm-vwall .pre-call-proof__grid .vm-vtile {
  position: relative;
  display: block;
  width: 100%;
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-column-break-inside: avoid;
          break-inside: avoid;
}
.vm-vwall .pre-call-proof__grid .vm-vtile img { margin-bottom: 0; }
.vm-vwall .pre-call-proof__grid video {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 20px;
  border-radius: 8px;
  background: #000;
  -webkit-column-break-inside: avoid;
          break-inside: avoid;
}

/* The theme binds its own click handler to .pre-call-video__thumb (it opens a
   Wistia modal and detaches the node), which fought our play-on-click. So our
   tiles use .vm-vtile only and borrow the same play-button marks verbatim. */
.vm-vwall .vm-vtile:before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 92px; height: 58px; margin: -29px 0 0 -46px;
  background: rgba(207, 241, 40, .85);
  -webkit-transition: background-color .2s ease; transition: background-color .2s ease;
}
.vm-vwall .vm-vtile:after {
  content: ""; position: absolute; top: 50%; left: 50%;
  margin: -9px 0 0 -6px;
  border-color: transparent transparent transparent #000;
  border-style: solid; border-width: 9px 0 9px 15px;
}
.vm-vwall .vm-vtile:hover:before { background: rgba(207, 241, 40, 1); }

/* iClosed booking widget sizing.
   The widget resizes its own container from a postMessage, but it reports the
   BODY height (497px) while its iframe is 800px, so the calendar was cut off
   with an inner scrollbar. Let the box grow and never let it collapse under
   the real content height. */
.book-ss__calendar .iclosed-widget {
  height: auto !important;
  min-height: 880px;
}
.book-ss__calendar .iclosed-widget iframe {
  display: block;
  width: 100% !important;
  height: 880px !important;
  border: 0;
}
@media (max-width: 767px) {
  .book-ss__calendar .iclosed-widget { min-height: 980px; }
  .book-ss__calendar .iclosed-widget iframe { height: 980px !important; }
}

/* Submit loader mark.
   King Kong's loader was their "K" filling with lime from the bottom. Same
   mechanic, our logo: two layers masked by the real VM mark, with the fill
   clipped by the same --p variable the loader JS already sets on .form-loader. */
.form-loader__k.form-loader__vm { width: 132px; height: 79px; }
.form-loader__vm .form-loader__vm-base,
.form-loader__vm .form-loader__vm-fill {
  position: absolute; left: 0; top: 0; width: 100%; height: 100%;
  -webkit-mask: url(/_local/brand/vitric-green.png) no-repeat center / contain;
          mask: url(/_local/brand/vitric-green.png) no-repeat center / contain;
}
.form-loader__vm .form-loader__vm-base { background: #e9e9e9; }
.form-loader__vm .form-loader__vm-fill {
  background: linear-gradient(180deg, #cff128 0%, #a2de00 100%);
  -webkit-clip-path: inset(calc(100% - 100% * var(--p, 0)) 0 0 0);
          clip-path: inset(calc(100% - 100% * var(--p, 0)) 0 0 0);
  -webkit-transition: -webkit-clip-path .25s linear;
          transition: clip-path .25s linear;
}

/* Quiz option pills, long answers only.
   The theme pins the radio mark into a left gutter for its own short options
   ($5K - $10K). On a long answer the mark computed to position:static, so it
   indented the first line only and wrapped lines spilled out of the pill.
   Scoped to that one question by input name - the short ladders are already
   correct and must not be touched. */
.infusion-option input[name="inf_custom_BiggestObstacle"] + label {
  position: relative;
  display: block;
  padding-left: 60px !important;
  padding-right: 20px !important;
  text-indent: 0;
  white-space: normal;
}
.infusion-option input[name="inf_custom_BiggestObstacle"] + label:before {
  position: absolute;
  left: 16px;
  top: 50%;
  margin: 0;
  -webkit-transform: translateY(-50%);
          transform: translateY(-50%);
}

/* Offer-card logomark.
   The theme pinned King Kong's "K" svg at a fixed 66x74 inside the 147px black
   disc. Our mark is landscape (1111x661), so it gets its own box: centred in the
   disc at a width that keeps the same optical weight as their K did. */
.offer__logo .offer__mark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 92px;
  height: auto;
  margin: 0;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
}
