/* Salesforge rebuild: Agent Frank page, the two calculators.
   Block 10 "Flexible Pricing per Active Contact" (.afpc-*) and block 12 "Calculate Your Savings With Agent Frank" (.afsc-*).
   New code written for this rebuild. Design values (colours, sizes, spacing, breakpoints) follow salesforge.ai/agent/frank.
   Needs site.css (tokens, .wrap, .container, .sr-only), home.css (.h3) and solutions.css (.tag) before it. */

.afpc, .afsc {
  --afc-sys: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans",
    "Droid Sans", "Helvetica Neue", sans-serif;
  --afc-lilac: #e9d7fe;
}

/* ================================================================ block 10: pricing per Active Contact */
/* Frank's section ends with an empty 50 px strip between two gaps, so 56 + 50 + 56 + 32 = 194 px stay under the card. */
.afpc { display: flex; flex-direction: column; gap: 56px; padding: 32px 0 194px; }

.afpc-head {
  position: relative; z-index: 1; max-width: 960px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.afpc-head__title { margin-top: 12px; }
.afpc-head__lead { margin-top: 20px; font-size: 20px; line-height: 1.4; }

/* the purple card: text on the left, the white calculator on the right */
.afpc-card {
  position: relative; display: grid; grid-template-columns: 1fr 1.75fr; column-gap: 5%;
  margin-top: 8px; padding: 8px; border-radius: 12px; background: var(--violet); overflow: hidden;
}
.afpc-card__squares { position: absolute; top: 0; left: 0; width: auto; max-width: none; height: 100%; pointer-events: none; }

.afpc-info {
  position: relative; z-index: 1; width: 24rem; padding: 20px 0 28px 28px;
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 56px;
}
.afpc-hl { font-size: 30px; line-height: 1.3; font-weight: 600; letter-spacing: -.02em; color: var(--white); }
.afpc-hl__rows, .afpc-hl__row { display: flex; }
.afpc-hl__rows { flex-direction: column; }
.afpc-hl__row { flex-wrap: wrap; align-items: center; gap: 8px; }
.afpc-hl__row:not(:last-child) { margin-bottom: 4px; }
.afpc-hl__photo {
  position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%;
  background: url("../img/66e42f604fc13d94cd1d2a73_frank-avatar2x.jpg.avif") 0 0 / cover no-repeat;
  box-shadow: 0 3px 3px rgba(0, 0, 0, .3);
}
.afpc-hl__sparkles { position: absolute; top: -4px; left: -4px; width: 52px; height: 52px; max-width: none; }
.afpc-hl__pill { padding: 0 12px; border-radius: 9999px; background: var(--afc-lilac); color: var(--violet); }
.afpc-info__text { margin-top: 20px; color: var(--white); }

.afpc-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; line-height: 1.4; font-weight: 600; color: var(--white); }
.afpc-list li + li { margin-top: 8px; }
.afpc-list svg { flex: none; width: 16px; height: 16px; margin-top: 4px; }

/* the white calculator */
.afpc-calc {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; gap: 32px;
  padding: 36px 2% 48px; border-radius: 8px; background: var(--white);
}
/* faint grids at the top and bottom; the pictures sit on a text line as on Frank's page, so the lower one ends 5.4 px above the edge */
.afpc-calc__sq { position: absolute; left: 10%; right: 10%; pointer-events: none; }
.afpc-calc__sq--top { top: 0; }
.afpc-calc__sq--bottom { bottom: 0; }
.afpc-calc__sq img { display: inline; width: 100%; height: auto; vertical-align: baseline; }

.afpc-tabs {
  position: relative; z-index: 1; align-self: center; display: grid; grid-template-columns: 1fr max-content; gap: 16px 8px;
  margin-bottom: 8px; padding: 8px; border-radius: 8px; background: var(--gray-50);
}
.afpc-tab {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 6px; color: var(--body); transition: all .4s;
}
.afpc-tab:hover { color: var(--ink); }
.afpc-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); }
.afpc-tab__label { font-weight: 500; text-align: center; }

.afpc-body { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 20px; }
.afpc-slider { display: flex; flex-direction: column; gap: 20px; width: 100%; max-width: 416px; margin: 0 auto; }
.afpc-slider__top, .afpc-slider__ends { display: flex; justify-content: space-between; align-items: center; }
.afpc-slider__label { font-size: 14px; }
.afpc-tier {
  flex: none; padding: 6px 12px; border-radius: 9999px; background: var(--violet-100); color: var(--violet);
  font-family: var(--afc-sys); font-size: 13px; line-height: 1.5; font-weight: 700; text-align: center;
}
.afpc-slider__ends { font-size: 14px; color: var(--gray-400); }

/* the range: an 8 px grey track and a 28 px white thumb with a purple ring, no filled part (as Chrome shows Frank's) */
.afpc-range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; margin: 0; padding: 0;
  border: 0; border-radius: 100px; background: var(--gray-200); outline: none; cursor: default;
}
.afpc-range::-webkit-slider-runnable-track { height: 8px; border-radius: 100px; background: var(--gray-200); }
.afpc-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; box-sizing: border-box; width: 28px; height: 28px;
  border: 3px solid var(--violet); border-radius: 50%; background: var(--white); cursor: pointer; transform: translateY(-10px);
}
.afpc-range::-moz-range-track { height: 8px; border-radius: 100px; background: var(--gray-200); }
.afpc-range::-moz-range-thumb {
  box-sizing: border-box; width: 28px; height: 28px; border: 3px solid var(--violet); border-radius: 50%;
  background: var(--white); cursor: pointer;
}
/* keyboard focus: the lilac fill the savings handles use on Frank's page */
.afpc-range:focus-visible::-webkit-slider-thumb { background: var(--afc-lilac); }
.afpc-range:focus-visible::-moz-range-thumb { background: var(--afc-lilac); }

.afpc-total {
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  width: 100%; max-width: 448px; margin: 0 auto 32px; padding: 36px 0 48px; border-radius: 8px; background: var(--violet-50);
}
.afpc-total__main { margin-bottom: 24px; }
.afpc-total__price { margin-bottom: 8px; font-size: 48px; line-height: 1.3; font-weight: 500; letter-spacing: -.8px; text-align: center; color: var(--ink); }
.afpc-total__period { margin-bottom: 16px; font-size: 14px; }
.afpc-total__units b { font-weight: 700; color: var(--ink); }

@media (max-width: 991px) {
  .afpc-card { grid-template-columns: .75fr 1fr; }
  .afpc-info { width: auto; padding-left: 16px; }
  .afpc-hl { font-size: 1.7rem; }
  .afpc-calc { padding-left: 20px; padding-right: 20px; }
  .afpc-total__price { font-size: 2.5rem; }
}
@media (max-width: 767px) {
  .afpc-card { display: flex; flex-direction: column; }
  .afpc-card__squares { display: none; }
  .afpc-info { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-right: 16px; }
  .afpc-hl { font-size: 1.443rem; }
  .afpc-tier { padding: 2px 8px; }
  .afpc-total__price { font-size: 2rem; }
}
@media (max-width: 479px) {
  .afpc { gap: 40px; padding-bottom: 162px; }
  .afpc-info { display: flex; align-items: stretch; }
  .afpc-list li { flex-direction: row-reverse; justify-content: space-between; }
  .afpc-calc__sq { left: 0; right: 0; }
  .afpc-tabs { display: flex; width: 100%; margin-bottom: 0; padding: 16px 8px; border-radius: 0; }
  .afpc-tab { flex: 1 1 0%; flex-direction: column; flex-wrap: nowrap; }
  .afpc-tab--monthly { max-width: 30%; }
}

/* ================================================================ block 12: savings */
.afsc { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; padding: 96px 0; background: var(--white); }

.afsc-head {
  position: relative; z-index: 1; max-width: 800px; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center;
}
.afsc-head__title { margin-top: 12px; }
.afsc-head__lead { font-size: 18px; line-height: 1.4; }

/* the cards row; the twinkling stars sit 8 px outside its corners */
.afsc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 64px; }
.afsc-card {
  display: flex; flex-direction: column; border: 1px solid var(--gray-200); border-radius: 16px;
  box-shadow: 0 12px 16px -4px rgba(0, 0, 0, .08), 0 4px 6px -2px rgba(16, 24, 40, .03);
}
.afsc-card__top { display: flex; justify-content: space-between; align-items: center; padding: 32px; }
.afsc-card__name { margin-right: 16px; }
.afsc-card__title { margin-bottom: 4px; font-family: var(--afc-sys); font-size: 24px; line-height: 1.4; font-weight: 600; color: var(--ink); }
.afsc-card__per { font-family: var(--afc-sys); font-size: 16px; line-height: 1.5; }
.afsc-card__price { display: flex; align-items: flex-start; gap: 2px; color: var(--ink); }
.afsc-card__cur { margin-top: 4px; font-size: 36px; line-height: 1.5; font-weight: 600; }
.afsc-card__num { font-family: var(--afc-sys); font-size: 60px; line-height: 1.2; font-weight: 600; }
.afsc-card__rule { flex: none; height: 1px; background: var(--gray-200); }
.afsc-card__body { padding: 32px; }
.afsc-card__body--frank { flex: 1 0 auto; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; }

.afsc-sliders { display: flex; flex-direction: column; gap: 24px; margin-bottom: 15px; }
.afsc-slider { --afsc-pos: 0%; padding-bottom: 16px; }
.afsc-slider__label { display: flex; align-items: center; margin-bottom: 24px; font-weight: 600; color: var(--ink); }
/* round 6 fix: where the label wraps (tablets and phones), as two flex parts the number floated to the right of the
   wrapped words ("... month: $" ... "500"); as plain text the number follows the "$" */
@media (max-width: 991px) { .afsc-slider__label { display: block; } }
.afsc-slider__track { position: relative; height: 8px; border-radius: 100px; background: var(--gray-200); touch-action: pan-y; }
.afsc-slider__fill { position: absolute; left: 0; top: 0; bottom: 0; width: var(--afsc-pos); border-radius: 100px; background: var(--violet); }
.afsc-slider__handle {
  position: absolute; top: 50%; left: var(--afsc-pos); z-index: 1; width: 24px; height: 24px; transform: translate(-50%, -50%);
  border: 2px solid var(--violet); border-radius: 50%; background: var(--white); cursor: grab;
  box-shadow: 0 2px 4px -2px rgba(16, 24, 40, .06), 0 4px 8px -2px rgba(16, 24, 40, .1);
}
.afsc-slider__handle:focus-visible { background: var(--afc-lilac); }

.afsc-avatar { position: relative; border-radius: 9999px; box-shadow: 0 3px 80px rgba(105, 65, 198, .5); }
.afsc-avatar__img {
  width: 64px; height: 64px; border: 2px solid var(--violet-50); border-radius: 50%; object-fit: cover;
  box-shadow: 0 4px 6px -2px rgba(16, 24, 40, .03), 0 12px 16px -4px rgba(16, 24, 40, .08);
}
.afsc-avatar__stars { position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; }
.afsc-claim { margin-bottom: -16px; font-size: 2.6rem; line-height: 1.2; font-weight: 600; color: var(--ink); }

.afsc-stars { position: absolute; inset: -8px; pointer-events: none; }
.afsc-star { position: absolute; opacity: 0; }
.afsc-star--tl { top: 0; left: 0; width: 16px; height: 16px; }
.afsc-star--br { right: 0; bottom: 0; width: 16px; height: 16px; }
.afsc-star--tr { top: 1px; right: 1px; width: 14px; height: 14px; }
.afsc-star--bl { bottom: 1px; left: 1px; width: 14px; height: 14px; }

@media (max-width: 991px) {
  .afsc { padding-bottom: 0; }
  .afsc-box { padding-bottom: 96px; }
  .afsc-card__top { flex-wrap: wrap; gap: 4px 16px; }
  .afsc-card__num { font-size: 3.25rem; }
  .afsc-slider__handle { width: 32px; height: 32px; }
  .afsc-claim { font-size: 2.5rem; }
}
@media (max-width: 767px) {
  .afsc-box { padding-top: 64px; padding-bottom: 64px; }
  .afsc-grid { grid-template-columns: 1fr; margin-top: 48px; }
  .afsc-card__title { font-size: 20px; }
  .afsc-card__num { font-size: 3rem; }
  .afsc-card__body--frank { gap: 32px; }
}
@media (max-width: 479px) {
  .afsc-head { gap: 20px; }
  .afsc-box { padding-top: 0; }
  .afsc-card__top, .afsc-card__body { padding: 16px; }
  .afsc-card__body--frank { gap: 16px; }
  .afsc-sliders { gap: 16px; }
  .afsc-claim { font-size: 1.6rem; }
}
