/* Legacy calculator summary/layout v33-v37.
 * Compatibility only. Do not add new rules here.
 */

/* Compact summary with quantity v33 */
body.fillru-homepage .calculator-reference-summary {
  display: grid !important;
  grid-template-columns: minmax(155px, .72fr) minmax(0, 2.35fr) minmax(230px, .95fr) !important;
  align-items: stretch !important;
  gap: 0 !important;
  width: 100% !important;
  min-height: 72px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid rgba(19, 33, 54, .10) !important;
  border-top: 0 !important;
  border-radius: 0 0 14px 14px !important;
  background: #fff !important;
  box-shadow: none !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body.fillru-homepage .calculator-summary-quantity-card,
body.fillru-homepage .calculator-reference-summary .calculator-reference-total,
body.fillru-homepage .calculator-reference-summary .calculator-cart-action {
  min-width: 0 !important;
  min-height: 72px !important;
  margin: 0 !important;
  padding: 8px 12px !important;
  box-sizing: border-box !important;
}

body.fillru-homepage .calculator-summary-quantity-card {
  display: grid !important;
  grid-template-columns: 28px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 8px !important;
  border-right: 1px solid rgba(19, 33, 54, .08) !important;
}

body.fillru-homepage .calculator-summary-item-icon {
  display: grid !important;
  width: 28px !important;
  height: 28px !important;
  place-items: center !important;
  color: #163b63 !important;
  font-size: 16px !important;
}

body.fillru-homepage .calculator-summary-quantity-field {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 3px !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.fillru-homepage .calculator-summary-item-label,
body.fillru-homepage .calculator-reference-summary .calculator-summary-metric > span {
  color: #53708e !important;
  font-size: 9px !important;
  font-weight: 750 !important;
  line-height: 1.1 !important;
}

body.fillru-homepage .calculator-summary-quantity-input-wrap {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 5px !important;
  min-width: 0 !important;
  height: 28px !important;
  padding: 0 7px !important;
  border: 1px solid #dce5ed !important;
  border-radius: 5px !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

body.fillru-homepage .calculator-summary-quantity-input-wrap input {
  width: 100% !important;
  min-width: 0 !important;
  height: 24px !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #173352 !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

body.fillru-homepage .calculator-summary-quantity-input-wrap > span {
  color: #7b8999 !important;
  font-size: 9px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-reference-total {
  display: flex !important;
  align-items: stretch !important;
  padding: 0 !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-summary-context,
body.fillru-homepage .calculator-reference-summary .calculator-summary-formula,
body.fillru-homepage .calculator-reference-summary .calculator-summary-chip,
body.fillru-homepage .calculator-reference-summary .calculator-summary-metric > small {
  display: none !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-summary-metrics {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-summary-metric {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 4px !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 8px 14px !important;
  border-left: 0 !important;
  border-right: 1px solid rgba(19, 33, 54, .08) !important;
  background: #fff !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-summary-metric > strong,
body.fillru-homepage .calculator-reference-summary .calculator-summary-metric--total > strong {
  margin: 0 !important;
  color: #14365a !important;
  font-size: 22px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-summary-metric--total {
  background: rgba(255, 106, 19, .055) !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-summary-metric--total > strong {
  color: #ff6a13 !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-cart-action {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  gap: 3px !important;
  max-width: none !important;
  padding: 8px 10px !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-summary-actions {
  display: grid !important;
  grid-template-columns: 72px minmax(0, 1fr) !important;
  gap: 6px !important;
  width: 100% !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-reset-button,
body.fillru-homepage .calculator-reference-summary .calculator-add-cart {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 36px !important;
  height: 36px !important;
  margin: 0 !important;
  padding: 0 9px !important;
  border-radius: 7px !important;
  font-size: 10px !important;
  line-height: 1 !important;
  box-sizing: border-box !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-reset-symbol {
  font-size: 15px !important;
}

body.fillru-homepage .calculator-reference-summary .calculator-cart-feedback {
  min-height: 0 !important;
  margin: 0 !important;
  font-size: 8px !important;
  line-height: 1.1 !important;
}

@media (max-width: 900px) {
  body.fillru-homepage .calculator-reference-summary {
    grid-template-columns: 1fr !important;
    overflow: visible !important;
  }

  body.fillru-homepage .calculator-summary-quantity-card,
  body.fillru-homepage .calculator-reference-summary .calculator-reference-total,
  body.fillru-homepage .calculator-reference-summary .calculator-cart-action {
    min-height: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(19, 33, 54, .08) !important;
  }

  body.fillru-homepage .calculator-reference-summary .calculator-summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}


/* Product column after quantity move v34 */
body.fillru-homepage .calculator-reference-product {
  display: flex !important;
  flex-direction: column !important;
  min-height: 0 !important;
}

body.fillru-homepage .calculator-product-name-field {
  display: grid !important;
  gap: 6px !important;
  margin: 0 0 12px !important;
}

body.fillru-homepage .calculator-product-name-field > span {
  color: #47647f !important;
  font-size: 10px !important;
  font-weight: 800 !important;
}

body.fillru-homepage .calculator-product-name-field > input {
  width: 100% !important;
  min-width: 0 !important;
  height: 38px !important;
  padding: 0 11px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 7px !important;
  background: #fff !important;
  color: #173352 !important;
  font: inherit !important;
  font-size: 11px !important;
  outline: 0 !important;
  box-sizing: border-box !important;
}

body.fillru-homepage .calculator-product-name-field > input:focus {
  border-color: rgba(255,106,19,.55) !important;
  box-shadow: 0 0 0 2px rgba(255,106,19,.08) !important;
}

body.fillru-homepage .calculator-product-upload {
  display: flex !important;
  flex: 1 1 auto !important;
  min-height: 180px !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  margin: 0 !important;
  padding: 14px !important;
  border: 1px dashed #cbd8e5 !important;
  border-radius: 9px !important;
  background: #fbfdff !important;
  color: #59728c !important;
  text-align: center !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

body.fillru-homepage .calculator-product-upload > input[type="file"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.fillru-homepage .calculator-product-upload-preview {
  display: grid !important;
  width: 60px !important;
  height: 60px !important;
  place-items: center !important;
  margin-bottom: 4px !important;
  color: #1d4a73 !important;
  font-size: 29px !important;
}

body.fillru-homepage .calculator-product-upload-preview img {
  width: 60px !important;
  height: 60px !important;
  object-fit: cover !important;
  border-radius: 8px !important;
}

body.fillru-homepage .calculator-product-upload-preview:has(img:not([hidden])) > i {
  display: none !important;
}

body.fillru-homepage .calculator-product-upload strong {
  color: #264a6d !important;
  font-size: 11px !important;
  font-weight: 800 !important;
}

body.fillru-homepage .calculator-product-upload small,
body.fillru-homepage .calculator-product-upload-note {
  color: #8291a2 !important;
  font-size: 9px !important;
  line-height: 1.25 !important;
}

body.fillru-homepage .calculator-product-upload-note {
  display: block !important;
  margin: 6px 0 0 !important;
  text-align: center !important;
}


/* Summary strip exactly like reference v35 */
body.fillru-homepage .calculator-reference-summary {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 26px minmax(0, .92fr) 26px minmax(0, 1fr) 26px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 0 !important;
  width: 100% !important;
  min-height: 98px !important;
  margin: 0 !important;
  padding: 10px 14px !important;
  border: 1px solid #dfe6ee !important;
  border-top: 0 !important;
  border-radius: 0 0 12px 12px !important;
  background: #f9fbfd !important;
  box-shadow: none !important;
  overflow: visible !important;
  box-sizing: border-box !important;
}

body.fillru-homepage .calculator-summary-ref-card {
  display: grid !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
  min-width: 0 !important;
  height: 74px !important;
  margin: 0 !important;
  padding: 9px 12px !important;
  border: 1px solid #e2e8ef !important;
  border-radius: 8px !important;
  background: #fff !important;
  box-shadow: 0 1px 2px rgba(20, 43, 70, .02) !important;
  box-sizing: border-box !important;
}

body.fillru-homepage .calculator-summary-ref-card--quantity {
  grid-template-columns: 34px minmax(0, 1fr) 20px !important;
}

body.fillru-homepage .calculator-summary-ref-icon {
  display: grid !important;
  width: 34px !important;
  height: 34px !important;
  place-items: center !important;
  color: #17456f !important;
  font-size: 20px !important;
  line-height: 1 !important;
}

body.fillru-homepage .calculator-summary-ref-content {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-width: 0 !important;
  margin: 0 !important;
}

body.fillru-homepage .calculator-summary-ref-label {
  display: block !important;
  margin: 0 0 3px !important;
  color: #50708f !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body.fillru-homepage .calculator-summary-ref-content > strong {
  display: block !important;
  margin: 0 !important;
  color: #102f50 !important;
  font-size: 25px !important;
  font-weight: 900 !important;
  line-height: .98 !important;
  letter-spacing: -.025em !important;
  white-space: nowrap !important;
}

body.fillru-homepage .calculator-summary-ref-content > small {
  display: block !important;
  margin: 4px 0 0 !important;
  color: #9aa6b3 !important;
  font-size: 8px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.fillru-homepage .calculator-summary-ref-input {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  align-items: center !important;
  gap: 5px !important;
  width: 100% !important;
  height: 30px !important;
  margin: 1px 0 0 !important;
  padding: 0 8px !important;
  border: 1px solid #dbe4ed !important;
  border-radius: 5px !important;
  background: #fff !important;
  box-sizing: border-box !important;
}

body.fillru-homepage .calculator-summary-ref-input input {
  width: 100% !important;
  min-width: 0 !important;
  height: 26px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  color: #163654 !important;
  font: inherit !important;
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

body.fillru-homepage .calculator-summary-ref-input > span {
  color: #8290a0 !important;
  font-size: 9px !important;
  font-weight: 650 !important;
  white-space: nowrap !important;
}

body.fillru-homepage .calculator-summary-ref-reset {
  display: grid !important;
  width: 20px !important;
  min-width: 20px !important;
  height: 32px !important;
  place-items: center !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #173b5f !important;
  font-size: 22px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

body.fillru-homepage .calculator-summary-ref-operator {
  display: grid !important;
  width: 26px !important;
  height: 74px !important;
  place-items: center !important;
  color: #183b5e !important;
  font-size: 18px !important;
  font-weight: 850 !important;
  line-height: 1 !important;
}

body.fillru-homepage .calculator-summary-ref-card--total {
  border-color: #f4ded0 !important;
  background: linear-gradient(135deg, #fff8f3 0%, #fff1e7 100%) !important;
}

body.fillru-homepage .calculator-summary-ref-card--total .calculator-summary-ref-icon,
body.fillru-homepage .calculator-summary-ref-card--total .calculator-summary-ref-content > strong {
  color: #ff6410 !important;
}

body.fillru-homepage .calculator-reference-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 10px !important;
  min-height: 0 !important;
  margin: 8px 0 0 !important;
  padding: 0 2px !important;
}

body.fillru-homepage .calculator-reference-actions .calculator-add-cart {
  display: inline-flex !important;
  width: auto !important;
  min-width: 180px !important;
  min-height: 38px !important;
  height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px !important;
  margin: 0 !important;
  padding: 0 14px !important;
  border-radius: 8px !important;
  font-size: 10px !important;
}

body.fillru-homepage .calculator-reference-actions .calculator-cart-feedback {
  margin: 0 !important;
  color: #738398 !important;
  font-size: 8px !important;
}

/* Cancel old summary internals from previous revisions. */
body.fillru-homepage .calculator-reference-summary .calculator-reference-total,
body.fillru-homepage .calculator-reference-summary .calculator-summary-metrics,
body.fillru-homepage .calculator-reference-summary .calculator-cart-action,
body.fillru-homepage .calculator-reference-summary .calculator-summary-context,
body.fillru-homepage .calculator-reference-summary .calculator-summary-formula,
body.fillru-homepage .calculator-reference-summary .calculator-summary-actions,
body.fillru-homepage .calculator-reference-summary .calculator-summary-quantity-card {
  display: none !important;
}

@media (max-width: 900px) {
  body.fillru-homepage .calculator-reference-summary {
    grid-template-columns: 1fr 18px 1fr !important;
    gap: 6px 0 !important;
    padding: 8px !important;
  }

  body.fillru-homepage .calculator-summary-ref-operator {
    width: 18px !important;
    height: 68px !important;
    font-size: 14px !important;
  }

  body.fillru-homepage .calculator-summary-ref-card {
    height: 68px !important;
  }

  body.fillru-homepage .calculator-summary-ref-operator--equals {
    display: none !important;
  }

  body.fillru-homepage .calculator-summary-ref-card--total {
    grid-column: 1 / -1 !important;
  }
}


/* Services column natural height v36 */
body.fillru-homepage .calculator-reference-column.calculator-reference-services { height:auto !important; min-height:0 !important; max-height:none !important; overflow:visible !important; align-self:stretch !important; }
body.fillru-homepage .calculator-columns.calculator-columns3 { height:auto !important; max-height:none !important; overflow:visible !important; align-items:stretch !important; }
body.fillru-homepage .calculator-reference-card, body.fillru-homepage .calculator-inner { height:auto !important; max-height:none !important; overflow:visible !important; }


/* Reset action + clean table radii v37 */
body.fillru-homepage .calculator-summary-ref-card--quantity {
  grid-template-columns: 34px minmax(0, 1fr) !important;
}

body.fillru-homepage .calculator-summary-ref-reset {
  display: none !important;
}

body.fillru-homepage .calculator-reference-actions {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
}

body.fillru-homepage .calculator-reference-actions .calculator-reset-button--reference {
  display: inline-flex !important;
  width: auto !important;
  min-width: 108px !important;
  min-height: 38px !important;
  height: 38px !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 1px solid #d9e2eb !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #274866 !important;
  box-shadow: none !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  line-height: 1 !important;
  cursor: pointer !important;
}

body.fillru-homepage .calculator-reference-actions .calculator-reset-button--reference:hover {
  border-color: #c8d4df !important;
  background: #f7fafc !important;
}

body.fillru-homepage .calculator-reference-actions .calculator-reset-symbol {
  font-size: 15px !important;
  line-height: 1 !important;
}

/* Rounded table shell: keep dropdowns unclipped, round actual corner cells instead. */
body.fillru-homepage .calculator-services-table-card {
  border-radius: 10px !important;
  overflow: visible !important;
  background: #fff !important;
}

body.fillru-homepage .calculator-services-table {
  border-collapse: separate !important;
  border-spacing: 0 !important;
  border-radius: 10px !important;
  background: #fff !important;
}

body.fillru-homepage .calculator-services-table thead th:first-child {
  border-top-left-radius: 9px !important;
}

body.fillru-homepage .calculator-services-table thead th:last-child {
  border-top-right-radius: 9px !important;
}

body.fillru-homepage .calculator-services-table tfoot td:first-child {
  border-bottom-left-radius: 9px !important;
}

body.fillru-homepage .calculator-services-table tfoot td:last-child {
  border-bottom-right-radius: 9px !important;
}

/* Prevent square cell backgrounds from visually leaking past the rounded shell. */
body.fillru-homepage .calculator-services-table thead tr:first-child > *:first-child,
body.fillru-homepage .calculator-services-table thead tr:first-child > *:last-child,
body.fillru-homepage .calculator-services-table tfoot tr:last-child > *:first-child,
body.fillru-homepage .calculator-services-table tfoot tr:last-child > *:last-child {
  background-clip: padding-box !important;
}

body.fillru-homepage .calculator-services-table-card::before {
  content: none !important;
}
