/* digibiz landing, home page part B: the few rules home.css has no class for.
   Loan calculator amount suffix + hint, plan tab panels, video cursor,
   single testimonial column. */

/* ---- loan calculator: amount field with the currency on its inline end ---- */
.hpb-amount {
  position: relative;
}
.hpb-amount .form-control {
  padding-inline-end: 72px;
}
.hpb-amount-cur {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 16px;
  display: inline-flex;
  align-items: center;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  pointer-events: none;
}
.hpb-amount .form-control:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.hpb-amount .form-control.is-invalid,
.hpb-amount .form-control.is-invalid:focus {
  border-color: #f2545b;
  box-shadow: 0 0 0 3px rgba(242, 84, 91, 0.2);
}
.hpb-calc-hint {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
}
.hpb-calc-hint.is-error {
  color: #ff8a8f;
}
.hpb-calc-hint:empty {
  display: none;
}
.hp-calc-form .hp-field:last-of-type {
  margin-bottom: 0;
}

/* ---- pricing: only the chosen family's panel shows ----
   .hp-plans sets display:grid, which beats the UA [hidden] rule */
.hp-plans[hidden] {
  display: none;
}
.hpb-plans-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 40px 20px;
  border: 1px dashed var(--dbk-border);
  border-radius: 20px;
  text-align: center;
  color: var(--dbk-muted);
}

/* ---- video: the whole poster opens the dialog ---- */
.hp-video[data-src] {
  cursor: pointer;
}

/* ---- testimonials: one column when there is only one quote ---- */
.hp-voices-cols.is-single {
  grid-template-columns: minmax(0, 1fr);
}

/* ---- pricing: fewer than four plans fill the row instead of leaving empty
   columns; one or two stay card-sized and centred ---- */
@media (min-width: 992px) {
  .hp-plans.hpb-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 576px) {
  .hp-plans.hpb-cols-1,
  .hp-plans.hpb-cols-2 {
    grid-template-columns: repeat(var(--hpb-n), minmax(0, 340px));
    justify-content: center;
  }
  .hp-plans.hpb-cols-1 { --hpb-n: 1; }
  .hp-plans.hpb-cols-2 { --hpb-n: 2; }
}

/* ---- loan calculator: stacked - the two fields across the top, the figures under
   them (total on the left, the six readings beside it), the apply button outside
   the panel at its own width ---- */
.hp-calcband .hp-calc {
  grid-template-columns: minmax(0, 1fr);
  max-width: 1000px;
  margin-inline: auto;
}

.hp-calcband .hp-calc-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 24px;
  align-items: start;
  border-inline-end: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.hp-calcband .hp-calc-form .hp-field {
  margin-bottom: 0;
}

.hp-calcband .hp-out {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.6fr);
  gap: 0 clamp(24px, 3vw, 48px);
  align-items: center;
}

.hp-calcband .hp-out-head {
  grid-row: 1 / span 2;
  padding-bottom: 0;
}

.hp-calcband .hp-out-list,
.hp-calcband .hp-out .hp-out-grid {
  grid-column: 2;
}

.hp-calcband .hp-out-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(20px, 2.5vw, 44px);
}

.hp-calcband .hp-out-list > div:first-child {
  padding-top: 0;
}

.hp-calcband .hp-out-list > div:nth-child(2) {
  padding-top: 0;
}

/* the apply button sits under the panel, centred, at its natural width */
.hpb-apply-wrap {
  display: flex;
  justify-content: center;
  margin-top: 32px;
}

.hpb-apply-wrap .hpb-apply {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  min-height: 58px;
  padding: 16px 52px;
  border-radius: 14px;
  font-size: 17px;
}

.hpb-apply-wrap .hpb-apply i {
  font-size: 20px;
}

@media (max-width: 767px) {
  .hp-calcband .hp-calc-form {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .hp-calcband .hp-out {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-calcband .hp-out-head {
    grid-row: auto;
    padding-bottom: 20px;
  }

  .hp-calcband .hp-out-list,
  .hp-calcband .hp-out .hp-out-grid {
    grid-column: 1;
  }
}

@media (max-width: 575px) {
  .hp-calcband .hp-out-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-calcband .hp-out-list > div:nth-child(2) {
    padding-top: 15px;
  }
}
