/* Salesforge rebuild: pricing page, block 3 (billing switch, Pro and Growth plans, add-on calculator,
   Agent Frank card). New code; design values (sizes, colours, breakpoints, timings) follow salesforge.ai/pricing.
   Needs site.css first. Every class starts with "plans". */

.plans { padding-top: 16px; }
.plans [hidden] { display: none !important; }
.plans__frame { display: flex; flex-direction: column; align-items: center; }

/* ---------------------------------------------------------------- billing switch */
/* Frank's switch sticks under the menu while the plans scroll by. Version 11, Devansh's call (2026-11-17): it stays in its
   place above the plans and scrolls with the page like the rest; same spot, same look, it just no longer follows. */
.plans__bar {
  position: relative; z-index: 4; width: 100%;
  display: flex; justify-content: center; align-items: center; padding: 16px 0 24px;
}
.plans__switch {
  position: relative; display: grid; grid-template-columns: 1fr max-content; gap: 16px 8px;
  margin-bottom: 8px; padding: 8px; border-radius: 8px;
  background: var(--gray-50); box-shadow: 0 0 14px 20px var(--white);
}
.plans__tab {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 6px; color: var(--body); font-weight: 500; line-height: 1.4; text-align: center;
  transition: color .4s, background-color .4s, box-shadow .4s;
}
.plans__tab:hover { color: var(--ink); }
.plans__tab.is-active {
  background: var(--white); color: var(--ink);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 1px 3px rgba(0, 0, 0, .1);
}
.plans__badge {
  padding: 2px 10px 4px; border-radius: 9999px; background: var(--violet-50); color: var(--violet);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
  font-size: 14px; line-height: 1.5; font-weight: 500; text-align: center; white-space: nowrap;
}
.plans__badge--free { background: var(--violet-100); }

/* ---------------------------------------------------------------- two paths side by side */
.plans__row { width: 100%; margin-top: 28px; display: flex; align-items: flex-start; gap: 16px; }
.plans__human {
  width: 70%; display: flex; flex-direction: column; gap: 16px;
  padding: 16px; border-radius: 16px; background: var(--gray-50);
}
.plans__lead { font-weight: 500; text-align: center; color: var(--ink); }

/* ---------------------------------------------------------------- Pro and Growth cards */
.plans__grid { display: flex; gap: 12px; }
.plans__card {
  position: relative; flex: 1 1 0%; display: flex; flex-direction: column; gap: 28px;
  padding: 20px 20px 40px; border-radius: 12px; background: var(--white);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
}
.plans__squares {
  position: absolute; right: 0; bottom: -2.6px; width: 70%; max-width: none; height: auto;
  opacity: .1; pointer-events: none;
}
.plans__card .plans__badge { position: absolute; top: 12px; right: 12px; }
.plans__top { display: flex; flex-direction: column; }
.plans__head { display: flex; flex-direction: column; align-items: flex-start; gap: 32px; }
.plans__icon { width: 32px; height: 32px; flex: none; }
.plans__name { font-size: 20px; line-height: 30px; font-weight: 600; color: var(--ink); }
.plans__sub { font-size: 13px; line-height: 1.4; }
.plans__price-row { display: flex; align-items: flex-end; gap: 4px; margin-top: 12px; }
.plans__price { font-size: 36px; line-height: 1.2; font-weight: 500; letter-spacing: -.75px; color: var(--ink); }
.plans__per { position: relative; top: -6px; font-size: 14px; line-height: 1.4; }
.plans__desc { margin-top: 32px; color: var(--ink); }
.plans__desc--narrow { margin-right: 20px; }

/* the zigzag line under the top part */
.plans__divider { position: relative; flex: none; height: 6px; }
.plans__divider img { position: absolute; left: 0; bottom: 1px; width: 100%; height: auto; }

/* feature lists */
.plans__list { display: flex; flex-direction: column; gap: 16px; }
.plans__list-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 6px;
  font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--ink);
}
.plans__list-head--more { margin-top: 8px; }
.plans__list-head svg { width: 20px; height: 20px; flex: none; }
.plans__list-head .plans__brand { color: var(--violet-hover); }
.plans__items { display: flex; flex-direction: column; gap: 16px; margin: 0; padding: 0; list-style: none; }
.plans__item { display: flex; gap: 6px; margin: 0 -6.4px; }
.plans__check {
  flex: none; width: 28px; height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 16 16'%3E%3Cpath stroke='%236E40D7' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M13.335 4 6 11.333 2.668 8'/%3E%3C/svg%3E") no-repeat 50% 50% / 16px 16px;
}
.plans__item-text {
  flex: 1 1 0%; display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
  font-size: 15px; line-height: 1.4; color: var(--ink);
}
.plans__more { margin-top: 2px; font-size: 12px; line-height: 1.4; color: var(--body); }
.plans__logo { display: block; width: 108px; height: 18px; }

/* ---------------------------------------------------------------- info icons and their tooltips */
.plans__tip {
  position: relative; flex: none; width: 28px;
  display: flex; justify-content: center; align-items: flex-start; cursor: pointer;
}
.plans__tip-btn {
  display: block; width: 16px; height: 16px; border-radius: 50%;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath opacity='0.7' d='M7.9987 14.6667C11.6806 14.6667 14.6654 11.6819 14.6654 8.00004C14.6654 4.31814 11.6806 1.33337 7.9987 1.33337C4.3168 1.33337 1.33203 4.31814 1.33203 8.00004C1.33203 11.6819 4.3168 14.6667 7.9987 14.6667Z' fill='%2398A2B3'/%3E%3Cpath d='M8 10.6667V8.00004M8 5.33337H8.00667' stroke='white' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat 50% 50% / 100% 100%;
}
.plans__tip-btn:focus { outline: none; }
.plans__tip-btn:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.plans__tip-box {
  position: absolute; top: 28px; right: -6px; z-index: 1; width: 18rem; padding: 12px;
  border-radius: 8px; background: var(--ink); color: var(--white); box-shadow: 0 4px 5px rgba(0, 0, 0, .1);
  font-size: 14px; line-height: 1.4; font-weight: 400; text-align: left; cursor: pointer;
  visibility: hidden; opacity: 0; transform: translate3d(0, .5rem, 0);
  /* closing: 200 ms fade and sink (ease "outSine"), then gone */
  transition: opacity .2s cubic-bezier(.61, 1, .88, 1), transform .2s cubic-bezier(.61, 1, .88, 1), visibility 0s .2s;
}
.plans__tip.is-open .plans__tip-box {
  visibility: visible; opacity: 1; transform: translate3d(0, 0, 0);
  /* opening: 300 ms rise and fade in (ease "outSine") */
  transition: opacity .3s cubic-bezier(.61, 1, .88, 1), transform .3s cubic-bezier(.61, 1, .88, 1), visibility 0s;
}
.plans__tip-box::before {
  content: ""; position: absolute; top: -6px; right: 12px; width: 16px; height: 6px;
  background: url("data:image/svg+xml,%3Csvg width='16' height='6' viewBox='0 0 16 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 6H14L8.70711 0.707107C8.31658 0.316583 7.68342 0.316583 7.29289 0.707107L2 6Z' fill='%23101828'/%3E%3C/svg%3E") no-repeat 0 0 / 16px 6px;
}
.plans__tip-box p { margin: 0; }
.plans__tip-box ul { margin: 0 0 10px; padding-left: 20px; }
.plans__tip-ref { font-weight: 500; text-decoration: underline; }

/* ---------------------------------------------------------------- add-on calculator */
.plans__calc {
  display: grid; grid-template-columns: 1fr .5fr; gap: 48px; padding: 12px;
  border-radius: 12px; background: var(--white);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .1);
}
/* the bottom padding keeps the 50 px empty box that ends this column on Frank's page */
.plans__sliders { display: flex; flex-direction: column; gap: 32px; padding: 20px 0 114px 16px; }
.plans__slider { display: flex; flex-direction: column; gap: 20px; }
.plans__slider-head { display: flex; justify-content: space-between; align-items: center; }
.plans__slider-name { display: flex; align-items: center; font-weight: 500; color: var(--ink); }
.plans__tip--calc { align-self: center; }
.plans__tier { font-size: 14px; line-height: 1.4; color: var(--ink); }
.plans__values { width: 256px; margin: 4px 0 0; display: flex; flex-direction: column; gap: 2px; font-weight: 500; }
.plans__values > div { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; line-height: 1.4; }
.plans__values dt { font-weight: 400; color: var(--gray-500); }
.plans__values dd { width: 64px; margin: 0; color: var(--ink); }

/* range sliders: grey 4 px track, 16 px ring thumb (as Frank's styles render in Chrome) */
.plans__range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 4px; margin: 0; padding: 0;
  border: 0; border-radius: 100px; background: transparent; outline: none; cursor: default;
}
.plans__range::-webkit-slider-runnable-track { height: 4px; border-radius: 100px; background: var(--gray-200); }
.plans__range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 16px; height: 16px; border-radius: 50%;
  background: var(--white); border: 3px solid var(--violet); cursor: pointer; transform: translateY(-6px);
}
.plans__range::-moz-range-track { height: 8px; border-radius: 100px; background: var(--gray-200); }
.plans__range::-moz-range-progress { height: 8px; border-radius: 100px; background: var(--violet); }
.plans__range::-moz-range-thumb {
  width: 16px; height: 16px; border-radius: 50%; background: var(--white);
  border: 3px solid var(--violet); cursor: pointer; transform: translateY(-4px);
}
.plans__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px var(--violet-100); }
.plans__range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px var(--violet-100); }

/* total panel */
.plans__total {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 20px 24px 16px 20px; border-radius: 8px; background: var(--gray-50);
}
.plans__total-label { margin-bottom: 4px; font-weight: 500; color: var(--ink); }
.plans__total-price,
.plans__ai-total-price { font-size: 30px; line-height: 1.3; font-weight: 500; letter-spacing: -.02em; color: var(--ink); }
.plans__total-per { font-size: 14px; line-height: 1.4; color: var(--gray-500); }
.plans__total-rule { height: 1px; margin: 20px 0; background: var(--gray-200); }
.plans__lines { margin: 0; }
.plans__lines > div {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; margin-bottom: 8px;
  font-size: 14px; line-height: 1.4;
}
.plans__lines dt { color: var(--gray-500); }
.plans__lines dd { margin: 0; font-weight: 500; color: var(--ink); }

/* ---------------------------------------------------------------- Agent Frank card */
.plans__ai {
  position: sticky; top: 100px; z-index: 3; width: 30%; min-width: 22rem;
  display: flex; flex-direction: column; gap: 16px; padding: 16px 12px;
  border-radius: 16px; background: var(--violet);
}
.plans__ai-label { font-weight: 500; text-align: center; color: var(--white); }
.plans__ai-box {
  position: relative; overflow: hidden; overflow: clip; padding: 28px 20px;
  border-radius: 12px; background: var(--white);
}
.plans__ai-squares { position: absolute; top: 0; left: 0; width: 430px; max-width: none; height: 336px; pointer-events: none; }
.plans__ai-title { position: relative; z-index: 1; display: flex; flex-direction: column; }
.plans__ai-line {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px; margin-bottom: 4px;
  font-size: 24px; line-height: 1.3; font-weight: 600; color: var(--ink);
}
.plans__ai-line--brand { color: var(--violet); }
.plans__avatar {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 9999px;
  background: url("../img/66e42f604fc13d94cd1d2a73_frank-avatar2x.jpg.avif") 0 0 / cover no-repeat;
  box-shadow: 0 3px 3px rgba(0, 0, 0, .3);
}
.plans__avatar img { position: absolute; top: -4px; left: -4px; width: 52px; height: 52px; max-width: none; }
.plans__x10 { padding: 0 8px; border-radius: 9999px; background: #e9d7fe; color: var(--violet); letter-spacing: -.02em; }
.plans__ai-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 28px; }
.plans__ai-text { margin-top: 12px; text-align: center; color: var(--ink); }
.plans__ai-track { display: flex; margin: 0 -20px; }
.plans__ai-panel { position: relative; width: 100%; min-width: 100%; padding: 0 20px; }
.plans__ai-panel--slider { display: flex; flex-direction: column; }
/* desktop: the panels slide with the page scroll (pricing-plans.js); Frank's page keeps them on their own layer */
@media (min-width: 992px) { .plans__ai-panel { will-change: transform; transform-style: preserve-3d; } }
.plans__ai-price-row { position: relative; z-index: 1; display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin-bottom: 36px; }
.plans__ai-price { font-size: 36px; line-height: 1.2; font-weight: 500; letter-spacing: -.75px; color: var(--ink); }
.plans__ai-bottom { display: flex; flex-direction: column; }
.plans__ai-buttons { display: flex; justify-content: center; align-items: center; gap: 12px; }
.plans__ai-features { margin: 20px 0 0; padding: 0; list-style: none; }
.plans__ai-features li {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 6px;
  font-size: 14px; line-height: 1.4; font-weight: 600; color: var(--violet);
}
.plans__ai-features li:last-child { margin-bottom: 0; }
.plans__ai-features li::after {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 4px;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M13.3327 4L5.99935 11.3333L2.66602 8' stroke='%236E40D7' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat 0 0 / 16px 16px;
}
.plans__ai-slider { flex: 1 1 0%; display: flex; flex-direction: column; gap: 20px; }
.plans__ai-total {
  flex: 1 1 0%; display: flex; flex-direction: column; justify-content: center; align-items: center;
  border-radius: 8px; background: var(--gray-100); text-align: center;
}
.plans__ai-total-per { margin-bottom: 16px; font-size: 14px; line-height: 1.4; }
.plans__ai-units { font-size: 14px; line-height: 1.4; }
.plans__ai-units strong { font-weight: 600; color: var(--ink); }

/* buttons (only "Learn more" to the Agent Frank page is kept) */
.plans__btn {
  display: flex; justify-content: center; align-items: center; gap: 8px; flex: none; max-width: 100%;
  height: 48px; padding: 0 20px; border: 1px solid var(--gray-300); border-radius: 8px;
  background: var(--white); color: var(--body); font-weight: 600; line-height: 1.4; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .05); transition: background-color .4s, color .4s, border-color .4s;
}
.plans__btn:hover { background: var(--gray-200); color: var(--gray-700); }

/* ---------------------------------------------------------------- 991 px and below: the Agent Frank card goes under the plans */
@media (max-width: 991px) {
  .plans__row { flex-wrap: wrap; justify-content: center; }
  .plans__human { width: 100%; padding-left: 8px; padding-right: 8px; }
  .plans__price, .plans__ai-price { font-size: 32px; }
  .plans__total-price, .plans__ai-total-price { font-size: 1.7rem; }
  .plans__ai { position: relative; top: auto; width: 100%; min-width: 0; }   /* min-width 0 keeps it inside 320 px phones */
  .plans__ai-line { font-size: 1.35rem; }
  /* the two panels sit side by side, as wide as on Frank's page, where two buttons (171.3 + 12 + 129.8 px) set it */
  .plans__ai-panel { flex: 0 1 353.1px; width: auto; min-width: auto; }
  .plans__ai-buttons { flex-wrap: wrap; }
  .plans__btn { height: 44px; }
}

@media (max-width: 767px) {
  .plans__badge { padding: 2px 8px; }
  .plans__price { font-size: 28px; }
  .plans__total-price, .plans__ai-total-price { font-size: 1.443rem; }
  .plans__ai-line { font-size: 1.1rem; }
  .plans__ai-buttons--top { display: none; }
  .plans__ai-panel:first-child { flex-basis: auto; }        /* no buttons in it here, so its own width, as on Frank's page */
}

/* Between 480 and 539 px the calculator's two columns no longer fit, so it stacks as it does on phones
   instead of spilling past the window. */
@media (max-width: 539px) {
  .plans__calc { display: flex; flex-direction: column; gap: 4px; }
  .plans__sliders { gap: 28px; padding-bottom: 110px; }
  .plans__total { padding: 16px 12px; }
}

/* ---------------------------------------------------------------- phones */
@media (max-width: 479px) {
  .plans { padding-bottom: 24px; }
  .plans__bar { padding: 16px 0; background: var(--white); }
  .plans__switch { display: flex; width: 100%; margin-bottom: 0; padding: 16px 8px; border-radius: 0; box-shadow: none; }
  .plans__tab { flex: 1 1 0%; flex-direction: column; }
  .plans__tab--monthly { max-width: 30%; }
  .plans__row { margin-top: 0; }
  .plans__grid { flex-direction: column; }
  .plans__card { gap: 20px; }
  .plans__head { flex-direction: row; align-items: center; gap: 12px; }
  .plans__icon { width: 24px; height: 24px; }
  .plans__name { color: var(--violet); }
  .plans__desc { margin-top: 24px; }
  .plans__item { gap: 8px; }
  .plans__check { background-size: 20px 20px; }
  .plans__tip-btn { width: 20px; height: 20px; }
  .plans__calc { display: flex; flex-direction: column; gap: 4px; }
  .plans__sliders { gap: 28px; padding-bottom: 110px; }
  .plans__total { padding: 16px 12px; }
  .plans__ai-track { flex-direction: column; }
  .plans__ai-panel { flex: none; width: auto; }
  .plans__ai-panel + .plans__ai-panel { margin-top: 36px; }
  .plans__ai-buttons { order: -1; flex-direction: column; align-items: stretch; }
  .plans__ai-total { padding: 20px 0; }
}
