/* BrokerConnector · Calculator
   Builds on style.css and about.css (the inner pages' hero, FAQs, where next, the WhatsApp button). Only the calculator
   lives here, after a short hero: your numbers on the left, the cost on the right in a night card with a soft glow, the
   working below. */

/* the short hero: about two thirds of a screen, so the calculator is close */
.ab-hero--short { min-height: clamp(460px, 64vh, 640px); }
.ab-hero--short .ab-hero__title { font-size: clamp(40px, 4.6vw, 80px); }
@media (max-width: 720px) { .ab-hero--short { min-height: 74svh; } .ab-hero--short .ab-hero__title { font-size: clamp(30px, 8.6vw, 56px); } }

.cost { position: relative; isolation: isolate; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(16px, 2vw, 32px); row-gap: clamp(32px, 5vh, 56px); padding: clamp(80px, 12vh, 130px) var(--gutter) clamp(40px, 6vh, 64px); color: var(--ink); scroll-margin-top: 40px; }
.cost__head { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 16px 40px; }
.cost__title { margin: 0; font-size: clamp(40px, 4.4vw, 72px); font-weight: 400; letter-spacing: -.04em; line-height: 1; text-wrap: balance; }
.cost__lede { margin: 0; font-size: clamp(17px, 1.3vw, 20px); line-height: 1.5; color: rgba(9, 15, 27, .62); }
.cost__grid { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(14px, 1.4vw, 22px); align-items: stretch; }

/* ---------- your numbers ---------- */
.cost__in { display: grid; align-content: start; gap: clamp(22px, 3.2vh, 32px); padding: clamp(24px, 2.6vw, 40px); border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px rgba(9, 15, 27, .07), 0 40px 80px -60px rgba(20, 40, 90, .4); }
.cost__field { display: grid; gap: 14px; }
.cost__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cost__row label { font-size: clamp(15px, 1.1vw, 17px); color: rgba(9, 15, 27, .7); }
/* the value: big, and a box you can type in */
.cost__val { display: inline-flex; align-items: baseline; gap: 6px; flex: none; font-size: clamp(22px, 1.8vw, 28px); letter-spacing: -.02em; }
.cost__val span { font-size: .6em; letter-spacing: 0; color: rgba(9, 15, 27, .5); }
.cost__val input { width: calc(var(--w, 4) * 1ch + 18px); font-variant-numeric: tabular-nums; min-width: 3ch; padding: 2px 8px; border: 0; border-radius: 8px; font: inherit; color: var(--ink); text-align: right; background: transparent; transition: background-color .2s ease, box-shadow .2s ease; }
.cost__val input:hover { background: #F2F4F8; }
.cost__val input:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px #19E8C9; }
/* the slider: a fine track, filled in teal up to a round white handle */
.cost__range { -webkit-appearance: none; appearance: none; width: 100%; height: 22px; margin: 0; background: transparent; cursor: pointer; --p: 50%; }
.cost__range::-webkit-slider-runnable-track { height: 4px; border-radius: 4px; background: linear-gradient(to right, #10B39B var(--p), #E4E8EF var(--p)); }
.cost__range::-moz-range-track { height: 4px; border-radius: 4px; background: #E4E8EF; }
.cost__range::-moz-range-progress { height: 4px; border-radius: 4px; background: #10B39B; }
.cost__range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -9px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(9, 15, 27, .12), 0 4px 10px rgba(9, 15, 27, .2); transition: transform .2s ease, box-shadow .2s ease; }
.cost__range::-moz-range-thumb { width: 22px; height: 22px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgba(9, 15, 27, .12), 0 4px 10px rgba(9, 15, 27, .2); }
.cost__range:hover::-webkit-slider-thumb, .cost__range:focus-visible::-webkit-slider-thumb { transform: scale(1.12); box-shadow: 0 0 0 6px rgba(25, 232, 201, .25), 0 4px 10px rgba(9, 15, 27, .2); }
.cost__range:focus { outline: none; }

/* ---------- the cost: a night card with a soft glow ---------- */
.cost__out { position: relative; isolation: isolate; display: flex; flex-direction: column; overflow: hidden; padding: clamp(28px, 2.8vw, 44px); border-radius: 24px; color: #fff; background: #141C30; }
.cost__glow { position: absolute; z-index: -1; right: -20%; top: -25%; width: 90%; aspect-ratio: 1; border-radius: 50%; background: #3360E3; opacity: .45; filter: blur(90px); pointer-events: none; }
.cost__glow::after { content: ""; position: absolute; left: 10%; top: 45%; width: 55%; aspect-ratio: 1; border-radius: 50%; background: #19E8C9; opacity: .4; filter: blur(70px); }
.cost__label { margin: 0; font-size: 15px; color: #19E8C9; }
.cost__big { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; margin: 18px 0 0; }
.cost__cur { font-size: clamp(20px, 1.6vw, 26px); color: rgba(255, 255, 255, .6); }
.cost__big b { font-size: clamp(52px, 5.4vw, 92px); font-weight: 400; letter-spacing: -.045em; line-height: .95; font-variant-numeric: tabular-nums; }
.cost__big small { font-size: clamp(16px, 1.2vw, 19px); color: rgba(255, 255, 255, .6); }
.cost__year { margin: 14px 0 0; font-size: clamp(17px, 1.3vw, 20px); color: rgba(255, 255, 255, .72); }
.cost__year b { font-weight: 500; color: #fff; font-variant-numeric: tabular-nums; }
.cost__stats { display: grid; gap: 0; margin: clamp(26px, 4vh, 40px) 0 0; }
.cost__stats div { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 14px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
.cost__stats dt { font-size: 15px; color: rgba(255, 255, 255, .62); }
.cost__stats dd { margin: 0; font-size: clamp(18px, 1.4vw, 22px); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.cost__back { margin: auto 0 0; padding-top: clamp(24px, 4vh, 36px); font-size: clamp(16px, 1.2vw, 18px); color: rgba(255, 255, 255, .85); }
.cost__ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 16px; }

/* ---------- the working: four steps in a row, your numbers in them ---------- */
.cost__how { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(14px, 1.4vw, 22px); margin: 0; padding: 0; list-style: none; counter-reset: s; }
.cost__how li { display: grid; align-content: start; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(9, 15, 27, .14); }
.cost__how p { margin: 0; font-size: 15px; line-height: 1.45; color: rgba(9, 15, 27, .62); }
.cost__how .cost__math { font-size: clamp(15px, 1.1vw, 17px); color: var(--ink); font-variant-numeric: tabular-nums; }
.cost__math b { font-weight: 600; color: #0E9E8A; }

/* the FAQs follow close: the calculator's working leads straight into them */

/* tablets and phones: the cost under your numbers; the working in two columns, then one */
@media (max-width: 1024px) {
  .cost__grid { grid-template-columns: 1fr; }
  .cost__how { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
}
@media (max-width: 720px) {
  .cost__row label { flex: 1; font-size: 15px; line-height: 1.35; }
  .cost__val { font-size: 22px; }
  .cost__how { grid-template-columns: 1fr; }
  .cost__ctas .ui-btn, .cost__ctas .msg__wa { flex: 1 1 auto; justify-content: center; }
}

/* the box reads as the client's sentence (15 Nov): the two rows, then "That's AED … worth of broker hours being wasted
   every month", then the real value of BrokerConnector */
.cost__out .cost__stats { margin-top: 18px; }
.cost__lead { margin: clamp(24px, 3.6vh, 34px) 0 0; font-size: clamp(17px, 1.3vw, 20px); color: rgba(255, 255, 255, .72); }
.cost__out .cost__big { margin-top: 4px; }
.cost__out .cost__year { margin-top: 8px; }
.cost__stats dd { white-space: nowrap; } /* "AED 257" stays on one line on phones */
/* the real value of BrokerConnector (Hasan, 15 Nov: "more obvious", but no more text in the hero): it's the calculator's
   own title, "real" in the brand's deep teal, its colon leading straight into the numbers */
.cost__title em { font-style: normal; color: #0E9E8A; }
/* phones: the title's two desktop lines are each too long for the screen, so it flows as one balanced sentence instead of
   breaking into four ragged lines (Hasan, 15 Nov) */
@media (max-width: 720px) {
  .ab-hero--short .ab-hero__title { text-wrap: balance; }
  .ab-hero--short .ab-hero__title .line { display: inline; white-space: normal; }
}
/* small phones (320 to 360): "BrokerConnector:" is one unbreakable word, so the title steps down rather than push the
   page sideways (15 Nov) */
@media (max-width: 400px) {
  .cost__title { font-size: clamp(30px, 10.4vw, 40px); }
  /* and the inputs card fits too: "AED 1,500,000" was pushing the card 5px past the screen at 320 */
  .cost__in { padding: 22px 18px; }
  .cost__row { flex-wrap: wrap; gap: 4px 12px; }
  .cost__val { font-size: 20px; margin-left: auto; }
}
@media (max-width: 1024px) { .cost__grid { grid-template-columns: minmax(0, 1fr); } }
