/* Native calculator layouts. The approved desktop is unchanged at 1440px+. */
@media (width < 1350px) {
  #calculator {
    --calculator-gap: 20px;
    --calculator-card-padding: 24px;
    --calculator-control-radius: 14px;
    width: 100%;
    height: auto;
    padding: clamp(40px, 5vw, 64px) var(--responsive-gutter, clamp(16px, 3vw, 32px));
  }

  #calculator .v6-613-2813,
  #calculator .v6-612-843 {
    width: 100%;
    max-width: 1440px;
    height: auto;
    min-width: 0;
  }

  #calculator .v6-613-2813 { gap: 28px; }
  #calculator .v6-612-843 { gap: 12px; white-space: normal; }
  #calculator .v6-612-844 {
    font-size: clamp(28px, 3.5vw, 44px);
    line-height: 1.12;
    text-wrap: balance;
  }
  #calculator .v6-612-845 { font-size: 16px; line-height: 1.5; }

  #calculator .v6-613-2566 {
    display: grid;
    grid-template-columns: minmax(0, 1.85fr) minmax(320px, 1fr);
    align-items: stretch;
    width: 100%;
    min-width: 0;
    gap: var(--calculator-gap);
  }

  #calculator .v6-613-2568 {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: var(--calculator-card-padding);
    gap: 20px;
    border-radius: var(--responsive-radius, 24px);
  }

  #calculator .v6-613-2569 {
    width: 100%;
    min-width: 0;
    padding: 6px;
    border-radius: 18px;
  }

  #calculator .v6-613-2570 {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    min-width: 0;
    gap: 4px;
  }

  #calculator .v6-calc-tab {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    padding: 10px 6px;
    border-radius: var(--calculator-control-radius);
  }
  #calculator .v6-calc-tab > p {
    min-width: 0;
    flex-shrink: 1;
    font-size: 14px;
    line-height: 20px;
    white-space: normal;
    word-break: normal;
  }

  #calculator .v6-613-2581 { gap: 18px; min-width: 0; }
  #calculator .v6-613-2582 { gap: 6px; }
  #calculator .v6-category {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 94px;
    min-width: 0;
    padding: 10px 4px;
    border-radius: 18px;
  }
  #calculator .v6-category > p {
    flex-shrink: 1;
    font-size: 13px;
    line-height: 18px;
    white-space: normal;
    word-break: normal;
  }
  #calculator[data-calculator-variant="2"] .v7-calculator-category-icon,
  #calculator[data-calculator-variant="2"] .v6-category .v7-calculator-category-image {
    width: 46px;
    height: 46px;
  }
  #calculator .v6-category-count {
    top: 4px;
    right: 4px;
    width: auto;
    min-width: 24px;
    height: 24px;
    padding-inline: 4px;
    font-size: 12px;
    line-height: 16px;
  }

  #calculator .v6-613-2663,
  #calculator .v6-room-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 10px;
    min-width: 0;
  }
  #calculator :is(.v6-613-2663, .v6-room-option-grid) > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    min-width: 0;
    min-height: 64px;
    height: auto;
    padding: 8px 8px 8px 14px;
    border-radius: var(--calculator-control-radius);
  }
  #calculator :is(.v6-613-2663, .v6-room-option-grid) > div > p {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
    font-size: 14px;
    line-height: 20px;
    white-space: normal;
    word-break: normal;
    overflow-wrap: break-word;
  }
  #calculator :is(.v6-613-2663, .v6-room-option-grid) > div > div {
    flex: 0 0 auto;
    width: auto;
    gap: 4px;
  }
  #calculator :is(.v6-613-2663, .v6-room-option-grid) > div > div > p {
    min-width: 22px;
    text-align: center;
    font-size: 16px;
    line-height: 24px;
  }
  #calculator .v6-quantity {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    flex: none;
    touch-action: manipulation;
  }
  #calculator .v6-quantity > img {
    position: static;
    width: 30px;
    height: 30px;
    object-fit: contain;
  }

  #calculator .v6-direct-panel {
    min-width: 0;
    min-height: 0;
    gap: 16px;
    font-size: 16px;
    line-height: 24px;
  }
  #calculator .v6-calc-mode-intro { font-size: 16px; line-height: 24px; }
  #calculator .v6-calc-range-value { align-items: center; gap: 16px; min-height: 44px; }
  #calculator .v6-calc-range-value > span { font-size: 16px; line-height: 22px; }
  #calculator .v6-calc-range-value > strong { flex: none; font-size: 32px; line-height: 40px; }
  #calculator .v6-calc-range {
    width: 100%;
    height: 44px;
    min-height: 44px;
    margin: 0;
    border-radius: 0;
    background: linear-gradient(90deg, #009ee0 0 var(--range-progress), #dedede var(--range-progress) 100%) center / 100% 8px no-repeat;
  }
  #calculator .v6-calc-range::-webkit-slider-thumb { width: 36px; height: 36px; }
  #calculator .v6-calc-range::-moz-range-thumb { width: 36px; height: 36px; }
  #calculator .v6-calc-range-ends { margin-top: -10px; font-size: 14px; line-height: 20px; }
  #calculator .v6-calc-presets { gap: 10px; }
  #calculator .v6-calc-preset {
    min-width: 0;
    min-height: 70px;
    height: auto;
    padding: 12px;
    border-radius: var(--calculator-control-radius);
    touch-action: manipulation;
  }
  #calculator .v6-calc-preset strong { font-size: 19px; line-height: 24px; }
  #calculator .v6-calc-preset span { font-size: 13px; line-height: 18px; white-space: normal; }
  #calculator .v6-calc-hint { font-size: 14px; line-height: 21px; }
  #calculator .v6-613-2728 { margin-top: auto; max-width: 100%; min-height: 44px; }

  #calculator .v6-613-2750.v7-calc-result {
    width: 100%;
    min-width: 0;
    height: auto;
    padding: var(--calculator-card-padding);
    gap: 16px;
    border-radius: var(--responsive-radius, 24px);
  }
  #calculator .v7-calc-picture { min-width: 0; border-radius: 16px; }
  #calculator .v7-calc-photo-metrics { bottom: 12px; left: 12px; max-width: calc(100% - 24px); }
  #calculator .v7-calc-photo-badge { padding: 8px 12px; }
  #calculator .v7-calc-photo-area [data-node-id="613:2755"] { font-size: 44px; line-height: 48px; letter-spacing: -1px; }
  #calculator .v7-calc-result .v7-calc-price-row { flex-wrap: wrap; gap: 4px 12px; }
  #calculator .v7-calc-result .v7-calc-price-row > span { font-size: 15px; line-height: 22px; }
  #calculator .v7-calc-result .v7-calc-price-row [data-node-id="613:2764"],
  #calculator .v7-calc-result .v7-calc-price-row [data-node-id="613:2764"] p {
    font-size: clamp(24px, 2.1vw, 28px);
    line-height: 34px;
  }
  #calculator .v7-calc-result .v7-calc-selection { flex: none; font-size: 15px; line-height: 23px; }
  #calculator .v7-calc-result .v7-calc-price-note { padding: 12px; }
  #calculator .v7-calc-result .v7-calc-price-note .v7-calc-note,
  #calculator .v7-calc-result .v7-calc-price-note .v7-calc-note p { font-size: 14px; line-height: 21px; }
  #calculator .v7-calc-result .v6-613-2829 { gap: 10px; }
  #calculator .v7-calc-result :is(.v6-613-2830, .v6-613-2838) {
    width: 100%;
    height: auto;
    min-height: 54px;
    padding: 14px 12px;
    gap: 8px;
  }
  #calculator .v7-calc-result :is(.v6-613-2830, .v6-613-2838) > p {
    flex-shrink: 1;
    min-width: 0;
    font-size: 15px;
    line-height: 22px;
    white-space: normal;
    word-break: normal;
    text-align: center;
  }
  #calculator :is(button, [role="button"], input):focus-visible {
    outline: 3px solid #14607f;
    outline-offset: 3px;
  }
  #calculator .v7-calc-result :is(button, [role="button"]):focus-visible { outline-color: white; }
}

@media (min-width: 1100px) and (max-width: 1279px) {
  #calculator .v6-613-2582 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  #calculator .v6-category { min-height: 84px; flex-direction: row; gap: 6px; }
  #calculator[data-calculator-variant="2"] .v7-calculator-category-icon,
  #calculator[data-calculator-variant="2"] .v6-category .v7-calculator-category-image { width: 40px; height: 40px; }
}

@media (max-width: 1099px) {
  #calculator .v6-613-2566 { grid-template-columns: minmax(0, 1fr); }
  #calculator .v6-613-2750.v7-calc-result {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: start;
    gap: 16px 24px;
  }
  #calculator .v7-calc-picture { grid-column: 1; grid-row: 1 / 4; }
  #calculator .v7-calc-result .v7-calc-price-row,
  #calculator .v7-calc-result .v7-calc-selection,
  #calculator .v7-calc-result .v7-calc-price-note { grid-column: 2; }
  #calculator .v7-calc-result .v6-613-2829 {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 0;
  }
}

@media (max-width: 767px) {
  #calculator { --calculator-card-padding: 16px; --calculator-gap: 16px; }
  #calculator .v6-613-2813 { gap: 24px; }
  #calculator .v6-613-2568 { gap: 16px; }
  #calculator .v6-613-2570 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
  #calculator .v6-613-2569 { padding: 5px; }
  #calculator .v6-calc-tab { min-height: 46px; padding: 10px 8px; }
  #calculator .v6-calc-tab > p { font-size: 14px; line-height: 20px; }
  #calculator .v6-613-2581 { gap: 16px; }
  #calculator .v6-613-2582 {
    display: grid;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 84px;
    align-items: stretch;
    gap: 8px;
    width: 100%;
    padding-block: 4px 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 4px;
    scrollbar-width: thin;
    scrollbar-color: #009ee0 #edf3f6;
  }
  #calculator .v6-613-2582[hidden] { display: none; }
  #calculator .v6-category { min-height: 90px; padding: 8px 4px; scroll-snap-align: start; }
  #calculator .v6-category > p { font-size: 13px; line-height: 18px; }
  #calculator[data-calculator-variant="2"] .v7-calculator-category-icon,
  #calculator[data-calculator-variant="2"] .v6-category .v7-calculator-category-image { width: 44px; height: 44px; }
  #calculator .v6-613-2663,
  #calculator .v6-room-option-grid { grid-template-columns: 1fr; gap: 8px; }
  #calculator :is(.v6-613-2663, .v6-room-option-grid) > div { min-height: 62px; padding: 8px 6px 8px 12px; }
  #calculator :is(.v6-613-2663, .v6-room-option-grid) > div > p { font-size: 15px; line-height: 21px; }
  #calculator .v6-direct-panel { gap: 14px; }
  #calculator .v6-calc-mode-intro { font-size: 15px; line-height: 23px; }
  #calculator .v6-calc-range-value > span { font-size: 15px; }
  #calculator .v6-calc-range-value > strong { font-size: 28px; line-height: 36px; }
  #calculator .v6-calc-presets { gap: 8px; }
  #calculator .v6-calc-preset { min-height: 78px; padding: 10px; }
  #calculator .v6-calc-preset span { font-size: 13px; line-height: 18px; }
  #calculator .v6-613-2728 { margin-top: 4px; min-width: 180px; }
  #calculator .v6-613-2750.v7-calc-result { display: flex; gap: 16px; }
  #calculator .v7-calc-picture { aspect-ratio: 16 / 9; }
  #calculator .v7-calc-photo-metrics { bottom: 10px; left: 10px; max-width: calc(100% - 20px); }
  #calculator .v7-calc-photo-area [data-node-id="613:2755"] { font-size: 42px; line-height: 46px; }
  #calculator .v7-calc-result .v7-calc-price-row { justify-content: space-between; }
  #calculator .v7-calc-result .v7-calc-price-row [data-node-id="613:2764"],
  #calculator .v7-calc-result .v7-calc-price-row [data-node-id="613:2764"] p { font-size: 26px; line-height: 34px; }
  #calculator .v7-calc-result .v6-613-2829 { display: flex; margin-top: 0; }
}

@media (max-width: 359px) {
  #calculator .v6-613-2568 { padding: 14px; }
  #calculator .v6-calc-preset strong { font-size: 18px; }
  #calculator .v7-calc-result .v7-calc-price-row { gap: 4px 8px; }
  #calculator .v7-calc-result .v7-calc-price-row > span { font-size: 14px; }
  #calculator .v7-calc-result .v7-calc-price-row [data-node-id="613:2764"],
  #calculator .v7-calc-result .v7-calc-price-row [data-node-id="613:2764"] p { font-size: 24px; line-height: 32px; }
}

@media (prefers-reduced-motion: reduce) and (width < 1350px) {
  #calculator :is(button, .v6-quantity) { transition: none; }
  #calculator .v6-613-2582 { scroll-behavior: auto; }
}
