/* =============================
   Performance calculator
   =============================
   Scoped styles so other pages don't change.
*/

.ht-calc {
  max-width: 1060px;
  margin: 0 auto;
  padding: 22px 14px 30px;
}

.ht-performance-calculator .ht-mobile__content .px-4 {
  padding-top: 10px !important;
}

.ht-calc__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: 42px 0 48px;
  padding: 0;
}

.ht-calc__title {
  margin: 0;
  font-family: "Acumin Pro ExtraCondensed", "Acumin Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  font-style: italic;
  letter-spacing: 0.2px;
  font-size: clamp(34px, 5vw, 52px);
  line-height: 0.88;
}

.ht-calc__brand-link{
  display: inline-flex;
  align-items: flex-start;
  text-decoration: none;
}

.ht-calc__brand {
  width: auto;
  height: 38px;
  object-fit: contain;
  margin-top: 6px;
}

.ht-calc__clear {
  font-family: "Acumin Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  text-decoration: underline;
  color: #14539B;
  background: none;
  border: 0;
  padding: 0;
}

.ht-calc__form {
  margin-top: 0;
}

.ht-calc__top {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 12px;
  margin-bottom: 28px;
}

.ht-calc__eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #14539B;
}

.ht-calc__subtitle {
  margin-top: 4px;
  color: #475467;
  font-size: 14px;
}

.ht-calc-field {
  margin-bottom: 16px;
}

.ht-calc-field.is-invalid .ht-calc-field__control,
.ht-calc-field.is-invalid .ht-calc-field__select {
  border-color: #D50C1A;
  box-shadow: 0 0 0 3px rgba(213, 12, 26, 0.12);
}

.ht-performance-calculator .ht-calc-field[hidden] {
  display: none !important;
}

.ht-calc-field__label {
  display: block;
  margin-bottom: 6px;
  font-family: "Acumin Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  color: #111;
}

.ht-calc-field__help {
  margin-top: 6px;
  font-size: 12px;
  color: #444;
}

.ht-calc-field__hint,
.ht-calc-field__error {
  margin-top: 6px;
  font-size: 12px;
}

.ht-calc-field__hint {
  color: #475467;
}

.ht-calc-field__error {
  color: #D50C1A;
  font-weight: 700;
}

.ht-calc-field__control,
.ht-calc-field__select {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border: 2px solid #14539B;
  border-radius: 6px;
  background-color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,0.10);
  font-family: "Acumin Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 500;
}

.ht-calc-field__control:focus,
.ht-calc-field__select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(20,83,155,0.18), 0 4px 10px rgba(0,0,0,0.10);
}

/* custom-ish select chevron */
.ht-calc-field__select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #bdbdbd 50%),
    linear-gradient(135deg, #bdbdbd 50%, transparent 50%);
  background-position:
    calc(100% - 20px) 19px,
    calc(100% - 14px) 19px;
  background-size:
    6px 6px,
    6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.ht-calc-field__control--result {
  box-shadow: none;
  background: #19733B;
  border-color: #19733B;
  color: #fff;
  font-weight: 700;
}

.ht-calc-field--result .ht-calc-field__control,
.ht-calc-field--result .ht-calc-field__control--result {
  height: 44px;
  cursor: default;
}

.ht-calc-field--result .ht-calc-field__control[readonly],
.ht-calc-field--result .ht-calc-field__control--result[readonly]{
  pointer-events: none;
}

.ht-calc-field--result .ht-calc-field__control:focus,
.ht-calc-field--result .ht-calc-field__control--result:focus{
  box-shadow: none;
}

.ht-calc-field--result .ht-calc-field__control::placeholder,
.ht-calc-field--result .ht-calc-field__control--result::placeholder{
  color: rgba(255,255,255,0.88);
}

.ht-calc-field--result .ht-calc-field__control[readonly],
.ht-calc-field--result .ht-calc-field__control[readonly]:disabled,
.ht-calc-field--result .ht-calc-field__control--result[readonly],
.ht-calc-field--result .ht-calc-field__control--result[readonly]:disabled{
  -webkit-text-fill-color: #fff;
  opacity: 1;
}

.ht-calc__submit {
  display: block;
  width: 100%;
  height: 44px;
  border: 0;
  border-radius: 3px;
  background: #14539B;
  color: #fff;
  font-family: "Acumin Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  letter-spacing: 0.2px;
  margin-top: 18px;
}

.ht-calc__issues {
  border: 2px solid #D50C1A;
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 18px;
  background: #fff7f8;
}

.ht-calc-settings {
  border: 2px solid #14539B;
  border-radius: 16px;
  padding: 16px;
  margin-top: 12px;
  background: #f8fbff;
}

.ht-calc-settings--missing {
  border-color: #D50C1A;
  background: #fff7f8;
}

.ht-calc-settings__title {
  font-weight: 800;
  margin-bottom: 6px;
}

.ht-calc-settings__text {
  margin-bottom: 12px;
}

.ht-calc-settings__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ht-calc__metrics {
  margin-top: 42px;
}

.ht-calc__diagram-wrap{
  position: relative;
  width: min(100%, 560px);
  margin: 0 auto;
}

.ht-calc__diagram-image{
  display: block;
  width: 100%;
  height: auto;
}

.ht-calc__diagram-marker{
  position: absolute;
  color: var(--hyt-red);
  font-family: "Acumin Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: clamp(15px, 2vw, 18px);
  font-weight: 700;
  line-height: 1;
}

.ht-calc__diagram-marker--d{
  left: 2.6%;
  top: 63.2%;
}

.ht-calc__diagram-marker--e{
  left: 63.2%;
  top: 10.8%;
}

.ht-calc__diagram-marker--f{
  right: 2.8%;
  top: 34.6%;
}

.ht-calc__disclaimer{
  width: 100%;
  margin: 22px 0;
  color: rgba(0, 0, 0, 0.78);
  font-family: "Acumin Pro", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

.ht-calc__disclaimer p{
  margin: 0;
}

.ht-calc__disclaimer p + p{
  margin-top: 2px;
}

.ht-pc-debug{
  margin-top: 18px;
  border: 2px solid #14539B;
  border-radius: 16px;
  background: #f8fbff;
  overflow: hidden;
}

.ht-pc-debug__summary{
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 800;
  list-style: none;
}

.ht-pc-debug__summary::-webkit-details-marker{
  display: none;
}

.ht-pc-debug__issues,
.ht-pc-code{
  margin: 0;
  padding: 0 18px 18px;
}

.ht-pc-code{
  white-space: pre-wrap;
  overflow-x: auto;
}

.ht-pc-metrics{
  margin-top: 18px;
}

.ht-pc-metrics__canvas{
  position: relative;
  width: 100%;
  max-width: 651px;
}

.ht-pc-metrics__image{
  display: block;
  width: 100%;
  height: auto;
}

.ht-pc-metrics__value{
  position: absolute;
  min-width: 48px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255,255,255,0.92);
  border: 2px solid #14539B;
  color: #000;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.ht-pc-metrics__value--pump-lift{
  left: 3.8%;
  top: 74%;
}

.ht-pc-metrics__value--feed-hose{
  left: 25%;
  top: 10%;
}

.ht-pc-metrics__value--max-user{
  left: 66%;
  top: 10%;
}

.ht-pc-metrics__value--pump-height{
  left: 91%;
  top: 42%;
  transform: translate(-100%, -50%);
}

@media (max-width: 991.98px) {
  .ht-calc {
    padding-left: 12px;
    padding-right: 12px;
  }
}

@media (max-width: 575.98px) {
  .ht-calc {
    padding-top: 14px;
  }

  .ht-calc__header {
    margin: 24px 0 36px;
  }
  .ht-calc__top {
    flex-direction: column;
    align-items: stretch;
  }
  .ht-calc-field {
    margin-bottom: 14px;
  }
  .ht-calc-field__control,
  .ht-calc-field__select,
  .ht-calc__submit {
    height: 42px;
  }

  .ht-calc__diagram-wrap,
  .ht-calc__disclaimer{
    width: min(100%, 420px);
  }
}
