/* Compact bookcase controls. Keep the original inputs, events and scrolling fallback. */
html#itodiUi[data-itodi-product-type="bookcase"] #baseIntegratedSection {
  container: itodi-bookcase-base415 / inline-size;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings {
  margin-top: 12px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings > .base-settings-title {
  margin: 0 0 8px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings .plinth-model-grid {
  gap: 6px !important;
  margin: 0 !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #itodiBaseBreakdown350 {
  margin: 8px 0 !important;
}
@container itodi-bookcase-base415 (min-width: 380px) {
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings:not([hidden]):not([style*="display: none"]):not([style*="display:none"]) {
    display: grid !important;
    grid-template-columns: minmax(210px, 1.3fr) minmax(150px, 1fr);
    column-gap: 18px;
    grid-template-rows: min-content auto;
    row-gap: 0;
    align-items: start;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings > .base-settings-title {
    grid-column: 1;
    grid-row: 1;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings > .plinth-model-grid {
    grid-column: 1;
    grid-row: 2;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings .plinth-model-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 92px !important;
    height: auto !important;
    padding: 8px 3px !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings .plinth-model-card .leg-thumb {
    height: 44px !important;
    min-height: 44px !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings .plinth-model-card svg {
    width: 44px !important;
    height: 44px !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings .leg-model-name {
    font-size: 12px !important;
    line-height: 1.3 !important;
    white-space: normal !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings > :is(#classicPlinthSettings, #designerLegHeightSettings, #podiumSettings) {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    min-width: 0;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings > #podiumSettings > .base-settings-title {
    display: none !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings .compact-control {
    display: flex !important;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    justify-content: space-between;
    margin: 0 0 6px !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings .compact-control > label {
    flex: 1 0 100%;
    font-size: 12px !important;
    line-height: 1.4;
    margin: 0 !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings .compact-number {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: space-between;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings input[type="range"] {
    width: 100% !important;
    margin: 4px 0 !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings .range-info {
    margin: 0 !important;
    font-size: 11px !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings #podiumSizeNote {
    margin-top: 6px !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #plinthSettings > :is(.toggle-row, #cutoutSettings, #legFinishSection) {
    grid-column: 1 / -1;
  }
}

/* Legacy compartment layouts. */
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #step5 #viewerFillingToolbar.ib396-toolbar {
  padding: 2px 4px 6px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #step5 #viewerFillingToolbar.ib396-toolbar #step5ProgressiveRoot .ib396-title {
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin: 0 0 8px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #step5 #viewerFillingToolbar.ib396-toolbar #step5ProgressiveRoot .type-grid {
  margin-bottom: 6px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #step5 #viewerFillingToolbar.ib396-toolbar #step5ProgressiveRoot .step5-progress-card {
  min-height: 36px !important;
  padding: 6px 10px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #step5 #viewerFillingToolbar.ib396-toolbar #step5ProgressiveRoot .ib396-row {
  min-height: 44px !important;
  column-gap: 10px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #step5 #viewerFillingToolbar.ib396-toolbar .ib396-equipment,
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #ic382Panel .ib396-equipment {
  margin: 8px 0 2px !important;
  padding-top: 8px !important;
  font-size: 13px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #step5 #viewerFillingToolbar.ib396-toolbar #step5ProgressiveRoot .step5-progress-counter {
  min-height: 36px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #step5 #viewerFillingToolbar.ib396-toolbar #step5ProgressiveRoot .step5-progress-counter > button {
  width: 32px !important;
  min-width: 32px !important;
  height: 30px !important;
  min-height: 30px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #viewerFillingToolbar .dividers407 {
  min-height: 44px;
  padding: 4px 0 !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #viewerFillingToolbar .dividers407-control {
  gap: 12px !important;
  padding: 2px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections :is(#viewerFillingToolbar, #ic382Panel) .ib398-depth {
  margin-top: 6px !important;
  padding: 8px 0 2px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections :is(#viewerFillingToolbar, #ic382Panel) .ib398-counter {
  height: 36px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections :is(#viewerFillingToolbar, #ic382Panel) .ib398-counter :is(button, input) {
  height: 34px !important;
  min-height: 34px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections :is(#viewerFillingToolbar, #ic382Panel) .ib398-help {
  margin-top: 4px !important;
  font-size: 11px !important;
  line-height: 1.4 !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #viewerFillingToolbar.ib396-toolbar #bookcaseLightingPanel label,
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #ic382Panel.ib396-cell-front .ic382-led {
  min-height: 40px !important;
  margin: 0 !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #viewerFillingToolbar.ib396-toolbar #bookcaseLightingPanel input,
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #ic382Panel.ib396-cell-front .ic382-led input {
  margin: 6px 0 !important;
}
/* The cell editor uses the same spacing without changing its split/position controls. */
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #ic382Panel.ib396-cell-front .ib396-cell-row {
  min-height: 44px !important;
  gap: 8px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #ic382Panel.ib396-cell-front .ib396-cell-row button {
  min-height: 36px !important;
  padding: 6px 10px !important;
}
html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #ic382Panel.ib396-cell-front .ib396-cell-counter {
  min-height: 42px !important;
}
@media (max-width: 760px) {
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #step5 #viewerFillingToolbar.ib396-toolbar #step5ProgressiveRoot .step5-progress-card,
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #ic382Panel.ib396-cell-front .ib396-cell-row button {
    min-height: 44px !important;
  }
  html#itodiUi[data-itodi-product-type="bookcase"] #itodiShellSections #step5 #viewerFillingToolbar.ib396-toolbar #step5ProgressiveRoot .step5-progress-counter > button {
    width: 40px !important;
    min-width: 40px !important;
    min-height: 40px !important;
    height: 40px !important;
  }
}
