/* Legacy calculator layout/visibility v21-v25.
 * Compatibility only. Do not add new rules here.
 */

/* Hide included-services badge v21 */
.calculator-services-panel--included .calculator-services-panel-badge,
.calculator-services-panel-badge--included {
  display: none !important;
}

/* Hide included-service right checkmark v22 */
.calculator-reference-services .calculator-service-item--included::after {
  content: none !important;
  display: none !important;
}
.calculator-reference-services .calculator-service-item--included > .calculator-base-service-price {
  margin-right: 0 !important;
}


/* Calculator viewport-fit compact layout v23 */
@media (min-width: 1081px) and (min-height: 700px) {
  body.fillru-homepage .calculator-section {
    --calc-viewport-header: var(--site-header-live-height, 64px);
    --calc-viewport-content: calc(100dvh - var(--calc-viewport-header));
    min-height: var(--calc-viewport-content) !important;
    padding: 10px 10px 12px !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__heading {
    margin: 0 auto 8px !important;
    padding: 0 12px !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__eyebrow {
    margin: 0 0 3px !important;
    font-size: 10px !important;
    line-height: 1.1 !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__title {
    font-size: clamp(30px, 3.1vw, 44px) !important;
    line-height: .96 !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__title br {
    display: none !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__subtitle {
    max-width: 980px !important;
    margin: 5px auto 0 !important;
    font-size: 12.5px !important;
    line-height: 1.28 !important;
  }

  body.fillru-homepage .calculator-inner {
    width: min(100%, 1580px) !important;
    padding: 0 !important;
    margin: 0 auto !important;
  }

  body.fillru-homepage .calculator-reference-card {
    border-radius: 14px 14px 0 0 !important;
  }

  body.fillru-homepage .calculator-mode-switch {
    min-height: 38px !important;
    margin: 0 !important;
    padding: 3px 7px 3px 11px !important;
    border-radius: 13px 13px 0 0 !important;
  }

  body.fillru-homepage .calculator-mode-switch-buttons {
    padding: 2px !important;
  }

  body.fillru-homepage .calculator-mode-button {
    min-height: 30px !important;
    padding: 0 9px !important;
  }

  body.fillru-homepage .calculator-mode-description {
    font-size: 10.5px !important;
    line-height: 1.2 !important;
  }

  body.fillru-homepage .calculator-columns,
  body.fillru-homepage .calculator-columns3 {
    height: clamp(470px, calc(100dvh - var(--calc-viewport-header) - 215px), 585px) !important;
    min-height: 0 !important;
    align-items: stretch !important;
  }

  body.fillru-homepage .calculator-reference-column {
    min-height: 0 !important;
    height: 100% !important;
    padding: 10px 14px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body.fillru-homepage .calculator-reference-head,
  body.fillru-homepage .calculator-services-intro {
    margin: 0 0 7px !important;
  }

  body.fillru-homepage .calculator-reference-head h3 {
    margin: 0 !important;
    font-size: 19px !important;
    line-height: 1.08 !important;
  }

  body.fillru-homepage .calculator-reference-head p {
    margin: 3px 0 0 !important;
    font-size: 10.5px !important;
    line-height: 1.22 !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-quantity-field {
    min-height: 48px !important;
    padding: 0 13px !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-quantity-field input {
    font-size: 20px !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-presets {
    gap: 6px !important;
    margin-top: 7px !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-preset {
    height: 34px !important;
    min-height: 34px !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-boxes-stage,
  body.fillru-homepage .calculator-reference-quantity .calculator-boxes-stage.calculator-boxes-local {
    height: calc(100% - 132px) !important;
    min-height: 120px !important;
    margin-top: 6px !important;
    padding: 0 !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-boxes-stage.calculator-boxes-local .calculator-boxes-image {
    max-width: min(88%, 285px) !important;
    max-height: 100% !important;
  }

  body.fillru-homepage .calculator-reference-sizes .calculator-size-list {
    height: calc(100% - 45px) !important;
    min-height: 0 !important;
    gap: 4px !important;
  }

  body.fillru-homepage .calculator-reference-sizes .calculator-size-card {
    min-height: 0 !important;
    height: calc((100% - 21px) / 4) !important;
    max-height: 104px !important;
    padding: 5px 9px !important;
    gap: 9px !important;
  }

  body.fillru-homepage .calculator-reference-sizes .calculator-size-text strong {
    font-size: 14px !important;
  }

  body.fillru-homepage .calculator-reference-sizes .calculator-size-text > span {
    margin-top: 2px !important;
    font-size: 10.5px !important;
  }

  body.fillru-homepage .calculator-reference-services {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }

  body.fillru-homepage .calculator-reference-services .calculator-services-intro {
    flex: 0 0 auto !important;
  }

  body.fillru-homepage .calculator-services-panel {
    padding: 7px !important;
    border-radius: 11px !important;
  }

  body.fillru-homepage .calculator-services-panel + .calculator-services-panel {
    margin-top: 6px !important;
  }

  body.fillru-homepage .calculator-services-panel-head {
    margin-bottom: 5px !important;
  }

  body.fillru-homepage .calculator-services-panel-head h4 {
    font-size: 12px !important;
  }

  body.fillru-homepage .calculator-services-panel-head p {
    margin-top: 1px !important;
    font-size: 9px !important;
    line-height: 1.15 !important;
  }

  body.fillru-homepage .calculator-services-panel--included {
    flex: 0 0 auto !important;
  }

  body.fillru-homepage .calculator-services-panel--addons {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-gutter: stable;
  }

  body.fillru-homepage .calculator-base-services .calculator-info-list,
  body.fillru-homepage .calculator-additional-services .calculator-options-list,
  body.fillru-homepage .calculator-service-subgroup {
    gap: 3px !important;
  }

  body.fillru-homepage .calculator-reference-services .calculator-service-item {
    min-height: 34px !important;
    padding: 4px 6px !important;
    border-radius: 8px !important;
  }

  body.fillru-homepage .calculator-reference-services .calculator-base-service {
    min-height: 34px !important;
  }

  body.fillru-homepage .calculator-reference-services .calculator-service-item .calculator-option-main > span,
  body.fillru-homepage .calculator-reference-services .calculator-service-item [data-base-service-label] {
    font-size: 10.5px !important;
    line-height: 1.18 !important;
  }

  body.fillru-homepage .calculator-reference-services .calculator-service-item .calculator-option-price,
  body.fillru-homepage .calculator-reference-services .calculator-service-item .calculator-base-service-price {
    font-size: 10px !important;
  }

  body.fillru-homepage .calculator-reference-summary:not(.is-floating),
  body.fillru-homepage .calculator-reference-summary {
    min-height: 70px !important;
    padding: 7px 12px !important;
    column-gap: 12px !important;
    border-radius: 0 0 14px 14px !important;
  }

  body.fillru-homepage .calculator-summary-context {
    margin-bottom: 3px !important;
  }

  body.fillru-homepage .calculator-summary-chip {
    min-height: 18px !important;
    padding: 0 6px !important;
    font-size: 8px !important;
  }

  body.fillru-homepage .calculator-summary-metric {
    gap: 1px !important;
    padding: 0 10px !important;
  }

  body.fillru-homepage .calculator-summary-metric > span {
    font-size: 8px !important;
  }

  body.fillru-homepage .calculator-summary-metric > strong,
  body.fillru-homepage .calculator-summary-metric--total > strong {
    font-size: 21px !important;
  }

  body.fillru-homepage .calculator-summary-metric > small,
  body.fillru-homepage .calculator-summary-formula {
    font-size: 8px !important;
    line-height: 1.15 !important;
  }

  body.fillru-homepage .calculator-reference-summary .calculator-cart-action {
    max-width: 300px !important;
  }

  body.fillru-homepage .calculator-reset-button,
  body.fillru-homepage .calculator-reference-summary .calculator-add-cart {
    min-height: 42px !important;
  }
}

/* Keep compact spacing on tablet/mobile, but do not force a desktop-height viewport. */
@media (max-width: 1080px) {
  body.fillru-homepage .calculator-section {
    padding-top: 18px !important;
    padding-bottom: 28px !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__heading {
    margin-bottom: 14px !important;
  }

  body.fillru-homepage .calculator-reference-column {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
}


/* Calculator viewport-fit without visual compression v24 */
@media (min-width: 1081px) and (min-height: 720px) {
  body.fillru-homepage .calculator-section {
    --calc-viewport-header: var(--site-header-live-height, 64px);
    --calc-viewport-content: calc(100dvh - var(--calc-viewport-header));
    min-height: var(--calc-viewport-content) !important;
    padding: 16px 16px 18px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__heading {
    margin: 0 auto 12px !important;
    padding: 0 18px !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__eyebrow {
    margin: 0 0 6px !important;
    font-size: 11px !important;
    line-height: 1.2 !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__title {
    font-size: clamp(38px, 3.6vw, 52px) !important;
    line-height: .99 !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__title br {
    display: none !important;
  }

  body.fillru-homepage .calculator-module__HVrzLW__subtitle {
    max-width: 920px !important;
    margin: 9px auto 0 !important;
    font-size: 14px !important;
    line-height: 1.42 !important;
  }

  body.fillru-homepage .calculator-inner {
    width: min(100%, 1580px) !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }

  body.fillru-homepage .calculator-reference-card {
    border-radius: 16px 16px 0 0 !important;
  }

  body.fillru-homepage .calculator-mode-switch {
    min-height: 46px !important;
    margin: 0 !important;
    padding: 5px 9px 5px 14px !important;
    border-radius: 14px 14px 0 0 !important;
  }

  body.fillru-homepage .calculator-mode-switch-buttons {
    padding: 3px !important;
  }

  body.fillru-homepage .calculator-mode-button {
    min-height: 36px !important;
    padding: 0 11px !important;
    font-size: 12px !important;
  }

  body.fillru-homepage .calculator-mode-description {
    font-size: 12px !important;
    line-height: 1.3 !important;
  }

  body.fillru-homepage .calculator-columns,
  body.fillru-homepage .calculator-columns3 {
    height: clamp(510px, calc(100dvh - var(--calc-viewport-header) - 245px), 640px) !important;
    min-height: 0 !important;
    align-items: stretch !important;
  }

  body.fillru-homepage .calculator-reference-column {
    min-height: 0 !important;
    height: 100% !important;
    padding: 16px 18px !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  body.fillru-homepage .calculator-reference-head,
  body.fillru-homepage .calculator-services-intro {
    margin: 0 0 12px !important;
  }

  body.fillru-homepage .calculator-reference-head h3 {
    margin: 0 !important;
    font-size: 22px !important;
    line-height: 1.1 !important;
  }

  body.fillru-homepage .calculator-reference-head p {
    margin: 5px 0 0 !important;
    font-size: 12.5px !important;
    line-height: 1.35 !important;
  }

  body.fillru-homepage .calculator-reference-quantity {
    display: flex !important;
    flex-direction: column !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-quantity-field {
    min-height: 56px !important;
    padding: 0 16px !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-quantity-field input {
    font-size: 23px !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-presets {
    gap: 8px !important;
    margin-top: 10px !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-preset {
    height: 40px !important;
    min-height: 40px !important;
    font-size: 14px !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-boxes-stage,
  body.fillru-homepage .calculator-reference-quantity .calculator-boxes-stage.calculator-boxes-local {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 150px !important;
    margin-top: 10px !important;
    padding: 4px 8px 0 !important;
  }

  body.fillru-homepage .calculator-reference-quantity .calculator-boxes-stage.calculator-boxes-local .calculator-boxes-image {
    max-width: min(100%, 340px) !important;
    max-height: 100% !important;
  }

  body.fillru-homepage .calculator-reference-sizes {
    display: flex !important;
    flex-direction: column !important;
  }

  body.fillru-homepage .calculator-reference-sizes .calculator-size-list {
    display: grid !important;
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    grid-template-rows: repeat(4, minmax(0, 1fr)) !important;
    gap: 7px !important;
  }

  body.fillru-homepage .calculator-reference-sizes .calculator-size-card {
    min-height: 84px !important;
    height: auto !important;
    max-height: none !important;
    padding: 8px 11px !important;
    gap: 12px !important;
  }

  body.fillru-homepage .calculator-reference-sizes .calculator-size-text strong {
    font-size: 16px !important;
  }

  body.fillru-homepage .calculator-reference-sizes .calculator-size-text > span {
    margin-top: 4px !important;
    font-size: 12px !important;
  }

  body.fillru-homepage .calculator-reference-services {
    display: flex !important;
    flex-direction: column !important;
    min-height: 0 !important;
  }

  body.fillru-homepage .calculator-reference-services .calculator-services-intro {
    flex: 0 0 auto !important;
  }

  body.fillru-homepage .calculator-services-panel {
    padding: 10px !important;
    border-radius: 13px !important;
  }

  body.fillru-homepage .calculator-services-panel + .calculator-services-panel {
    margin-top: 8px !important;
  }

  body.fillru-homepage .calculator-services-panel-head {
    margin-bottom: 8px !important;
  }

  body.fillru-homepage .calculator-services-panel-head h4 {
    font-size: 13.5px !important;
  }

  body.fillru-homepage .calculator-services-panel-head p {
    margin-top: 2px !important;
    font-size: 10.5px !important;
    line-height: 1.3 !important;
  }

  body.fillru-homepage .calculator-services-panel--included {
    flex: 0 0 auto !important;
  }

  body.fillru-homepage .calculator-services-panel--addons {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-gutter: stable;
  }

  body.fillru-homepage .calculator-base-services .calculator-info-list,
  body.fillru-homepage .calculator-additional-services .calculator-options-list,
  body.fillru-homepage .calculator-service-subgroup {
    gap: 5px !important;
  }

  body.fillru-homepage .calculator-reference-services .calculator-service-item {
    min-height: 44px !important;
    padding: 7px 9px !important;
    border-radius: 10px !important;
  }

  body.fillru-homepage .calculator-reference-services .calculator-base-service {
    min-height: 44px !important;
  }

  body.fillru-homepage .calculator-reference-services .calculator-service-item .calculator-option-main > span,
  body.fillru-homepage .calculator-reference-services .calculator-service-item [data-base-service-label] {
    font-size: 12px !important;
    line-height: 1.28 !important;
  }

  body.fillru-homepage .calculator-reference-services .calculator-service-item .calculator-option-price,
  body.fillru-homepage .calculator-reference-services .calculator-service-item .calculator-base-service-price {
    font-size: 11px !important;
  }

  body.fillru-homepage .calculator-reference-summary:not(.is-floating),
  body.fillru-homepage .calculator-reference-summary {
    min-height: 84px !important;
    padding: 10px 14px !important;
    column-gap: 16px !important;
    border-radius: 0 0 16px 16px !important;
  }

  body.fillru-homepage .calculator-summary-context {
    margin-bottom: 5px !important;
  }

  body.fillru-homepage .calculator-summary-chip {
    min-height: 21px !important;
    padding: 0 7px !important;
    font-size: 9px !important;
  }

  body.fillru-homepage .calculator-summary-metric {
    gap: 3px !important;
    padding: 2px 13px !important;
  }

  body.fillru-homepage .calculator-summary-metric > span {
    font-size: 9px !important;
  }

  body.fillru-homepage .calculator-summary-metric > strong,
  body.fillru-homepage .calculator-summary-metric--total > strong {
    font-size: 25px !important;
  }

  body.fillru-homepage .calculator-summary-metric > small,
  body.fillru-homepage .calculator-summary-formula {
    font-size: 9px !important;
    line-height: 1.25 !important;
  }

  body.fillru-homepage .calculator-reference-summary .calculator-cart-action {
    max-width: 330px !important;
  }

  body.fillru-homepage .calculator-reset-button,
  body.fillru-homepage .calculator-reference-summary .calculator-add-cart {
    min-height: 48px !important;
  }
}


/* Restore additional services visibility v25 */
@media (min-width: 1081px) and (min-height: 720px) {
  body.fillru-homepage .calculator-reference-services {
    display: block !important;
    height: 100% !important;
    min-height: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    scrollbar-gutter: stable;
  }

  body.fillru-homepage .calculator-reference-services .calculator-services-intro,
  body.fillru-homepage .calculator-services-panel--included,
  body.fillru-homepage .calculator-services-panel--addons {
    display: block !important;
    flex: none !important;
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  body.fillru-homepage .calculator-services-panel--addons {
    margin-top: 8px !important;
  }

  body.fillru-homepage .calculator-additional-services .calculator-options-list {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    grid-auto-flow: row !important;
    width: 100% !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
}
