/* Container for all catalog tiles */
.catalog-tile-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  grid-auto-rows: masonry;   /* experimental masonry rows */
  gap: 1rem;                 /* spacing between tiles */
  justify-content: center;   /* center grid in wide containers */
  padding: 10px;
}

/* Each individual tile */
.catalog-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  cursor: pointer;
  break-inside: avoid; /* prevent tiles from splitting in masonry */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.catalog-tile:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* Tile thumbnail image */
.catalog-tile img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

/* Tile info (id, name, grade) */
.catalog-info {
  padding: 10px;
  text-align: center;
  font-size: 1.1rem;
  font-weight: 500;
  color: #222;
}

/* Popup overlay for fullscreen images */
.catalog-popup {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  place-items: center;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.catalog-popup-content img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.catalog-popup .caption {
  margin-top: 12px;
  color: #fff;
  text-align: center;
  font-size: 1.3rem;
}

/* Flex wrapper so controls sit above/below and iframe fills the rest */
.pdb-host {
  display: flex;
  flex-direction: column;
  gap: 8px;
  height: 100%;
  width: 100%;
}

.pdb-stage {
  display: flex;
  gap: 8px;
  min-width: 0;
  width: 100%;
}

.pdb-stage.is-top,
.pdb-stage.is-bottom {
  flex-direction: column;
}

.pdb-stage.is-left,
.pdb-stage.is-right {
  align-items: flex-start;
}

.pdb-stage.is-left {
  flex-direction: row;
}

.pdb-stage.is-right {
  flex-direction: row;
}

.pdb-stage-viewer {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: visible;
}

.pdb-stage--sectional {
  display: block;
}

.pdb-sectional-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 32%);
  gap: 8px;
  width: 100%;
  min-width: 0;
  overflow: visible;
  --pdb-sectional-header-font-size: 18px;
  --pdb-sectional-body-font-size: clamp(1.25rem, 2vw, 1.6rem);
  --pdb-sectional-material-value-max-font-size: var(--pdb-sectional-body-font-size);
  --pdb-sectional-material-value-min-font-size: 10px;
}

.pdb-sectional-workspace.is-preview-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.pdb-sectional-planner-shell,
.pdb-sectional-preview-shell {
  min-width: 0;
  min-height: 600px;
  align-items: stretch;
}

.pdb-sectional-planner-shell {
  position: relative;
  z-index: 2;
  overflow: visible;
}

.pdb-sectional-floating-layer {
  position: absolute;
  inset: 0;
  overflow: visible;
  pointer-events: none;
  z-index: 20;
}

.pdb-sectional-planner {
  min-height: 100%;
  justify-content: center;
  overflow: visible;
}

.pdb-sectional-planner-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin: 0 0 10px;
}

.pdb-sectional-layout {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 280px);
  gap: 16px;
  overflow: visible;
}

.pdb-sectional-layout.is-empty {
  grid-template-columns: minmax(0, 1fr);
}

.pdb-sectional-layout.is-inspector-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.pdb-sectional-planner-surface {
  flex: 1 1 auto;
  min-height: 480px;
  display: flex;
  min-width: 0;
  overflow: visible;
}

.pdb-sectional-title {
  margin: 0;
  font-size: var(--pdb-sectional-header-font-size);
  line-height: 1.2;
  color: #222;
}

.pdb-sectional-toolbar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.pdb-sectional-toolbar[hidden] {
  display: none;
}

.pdb-sectional-copy,
.pdb-sectional-preview-copy {
  margin: 0;
  font-size: var(--pdb-sectional-body-font-size);
  line-height: 1.5;
  color: #555;
}

.pdb-sectional-specification-block {
  align-self: flex-start;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border: 1px solid #d6dde7;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  max-width: 100%;
  overflow-x: auto;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.pdb-sectional-specification-block.is-hover-linked {
  border-color: #5e8eba;
  background: rgba(240, 248, 255, 0.96);
  box-shadow: 0 10px 22px rgba(34, 93, 137, 0.10);
}

.pdb-sectional-specification-block.is-selection-linked {
  border-color: #245580;
  background: rgba(232, 243, 252, 0.98);
  box-shadow: 0 0 0 2px rgba(36, 85, 128, 0.10), 0 10px 22px rgba(34, 93, 137, 0.10);
}

.pdb-sectional-specification-block.is-hover-linked.is-selection-linked {
  box-shadow: 0 0 0 2px rgba(36, 85, 128, 0.14), 0 12px 26px rgba(34, 93, 137, 0.16);
}

.pdb-sectional-specification-header {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 0 0 80px;
  width: 80px;
}

.pdb-sectional-specification-title {
  display: block;
  width: 100%;
  min-width: 0;
}

.pdb-sectional-specification-name {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  font-size: var(--pdb-sectional-body-font-size);
  font-weight: 700;
  line-height: 1.1;
  color: #334155;
}

.pdb-sectional-specification-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pdb-sectional-specification-icon-artboard {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.pdb-sectional-specification-icon-piece {
  position: absolute;
  border: 1px solid rgba(72, 97, 120, 0.45);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(216, 228, 239, 0.92), rgba(189, 208, 223, 0.92));
  box-sizing: border-box;
}

.pdb-sectional-specification-icon-piece.is-active {
  border-color: #9b5f13;
  background: linear-gradient(180deg, rgba(255, 224, 166, 0.96), rgba(233, 176, 81, 0.96));
  box-shadow: 0 0 0 1px rgba(155, 95, 19, 0.14);
}

.pdb-sectional-specification-icon-piece.is-hover-linked,
.pdb-sectional-specification-icon-piece.is-selection-linked {
  border-color: #245580;
  background: linear-gradient(180deg, rgba(190, 222, 247, 0.96), rgba(129, 189, 228, 0.96));
  box-shadow: 0 0 0 1px rgba(36, 85, 128, 0.18);
}

.pdb-sectional-specification-block .product-specifications-table {
  flex: 0 0 938px;
  width: 938px;
  min-width: 938px;
  max-width: 938px;
}

.pdb-sectional-empty-state,
.pdb-sectional-canvas {
  flex: 1 1 auto;
  min-height: 100%;
  border: 1px solid #d8dee8;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 251, 0.98));
}

.pdb-sectional-empty-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 24px;
}

.pdb-sectional-starter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.pdb-sectional-starter-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-height: 154px;
  padding: 14px 16px;
  border: 1px solid #cfd7e3;
  border-radius: 12px;
  background: #fff;
  color: #1f2937;
  cursor: pointer;
  text-align: left;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.pdb-sectional-starter-preview {
  position: relative;
  display: block;
  width: 100%;
  height: 70px;
  overflow: visible;
  border-radius: 0;
  background: transparent;
}

.pdb-sectional-starter-imagery,
.pdb-sectional-starter-imagery-layer {
  position: absolute;
  display: block;
  pointer-events: none;
}

.pdb-sectional-starter-imagery {
  transform-origin: center;
}

.pdb-sectional-starter-imagery-layer {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: fill;
}

.pdb-sectional-starter-card:hover {
  transform: translateY(-1px);
  border-color: #8fa8c3;
  box-shadow: 0 10px 24px rgba(26, 43, 64, 0.08);
}

.pdb-sectional-starter-label {
  font-size: var(--pdb-sectional-body-font-size);
  font-weight: 700;
  line-height: 1.35;
}

.pdb-sectional-canvas {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: auto;
  position: relative;
}

.pdb-sectional-select-all-button,
.pdb-sectional-dimensions-toggle,
.pdb-sectional-layout-rotate-button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #bfd2e6;
  border-radius: 8px;
  background: rgba(248, 252, 255, 0.96);
  color: #245580;
  font-size: var(--pdb-sectional-body-font-size);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(18, 42, 64, 0.10);
}

.pdb-sectional-layout-rotate-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  padding: 0 10px;
}

.pdb-sectional-rotate-glyph {
  display: inline-block;
  font-size: 17px;
  line-height: 1;
}

.pdb-sectional-rotate-glyph.is-counterclockwise {
  transform: scaleX(-1);
}

.pdb-sectional-select-all-button:hover,
.pdb-sectional-select-all-button:focus-visible,
.pdb-sectional-dimensions-toggle:hover,
.pdb-sectional-dimensions-toggle:focus-visible,
.pdb-sectional-layout-rotate-button:hover,
.pdb-sectional-layout-rotate-button:focus-visible {
  border-color: #5e8eba;
  background: #ffffff;
  outline: 0;
}

.pdb-sectional-dimension-ruler {
  position: absolute;
  z-index: 2;
  pointer-events: none;
  color: #2f6f9f;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.pdb-sectional-dimension-label {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 4px 10px rgba(24, 72, 110, 0.08);
}

.pdb-sectional-dimension-ruler--x {
  height: 20px;
  border-top: 2px solid #2f6f9f;
}

.pdb-sectional-dimension-ruler--x::before,
.pdb-sectional-dimension-ruler--x::after {
  content: "";
  position: absolute;
  top: -6px;
  width: 2px;
  height: 12px;
  background: #2f6f9f;
}

.pdb-sectional-dimension-ruler--x::before {
  left: 0;
}

.pdb-sectional-dimension-ruler--x::after {
  right: 0;
}

.pdb-sectional-dimension-ruler--x .pdb-sectional-dimension-label {
  transform: translateY(-10px);
}

.pdb-sectional-dimension-ruler--y {
  width: 38px;
  border-left: 2px solid #2f6f9f;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pdb-sectional-dimension-ruler--y::before,
.pdb-sectional-dimension-ruler--y::after {
  content: "";
  position: absolute;
  left: -6px;
  width: 12px;
  height: 2px;
  background: #2f6f9f;
}

.pdb-sectional-dimension-ruler--y::before {
  top: 0;
}

.pdb-sectional-dimension-ruler--y::after {
  bottom: 0;
}

.pdb-sectional-dimension-ruler--y .pdb-sectional-dimension-label {
  transform: rotate(-90deg);
}

.pdb-sectional-artboard-stage {
  position: relative;
  flex: 0 0 auto;
  overflow: visible;
}

.pdb-sectional-artboard {
  position: relative;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pdb-sectional-piece {
  position: absolute;
  display: flex;
  align-items: flex-end;
  padding: 8px;
  border: 2px solid #486178;
  border-radius: 12px;
  background: linear-gradient(180deg, #d8e4ef, #bdd0df);
  box-sizing: border-box;
  box-shadow: 0 8px 18px rgba(38, 58, 78, 0.14);
}

.pdb-sectional-piece.has-package-imagery {
  padding: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
}

.pdb-sectional-piece-imagery {
  position: absolute;
  display: block;
  pointer-events: none;
  transform-origin: center;
  z-index: 0;
}

.pdb-sectional-piece-imagery-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: fill;
}

.pdb-sectional-piece.is-selected {
  border-color: #1f4f79;
  box-shadow: 0 0 0 3px rgba(31, 79, 121, 0.12), 0 12px 24px rgba(38, 58, 78, 0.18);
}

.pdb-sectional-piece.is-connection-active {
  border-color: #a56415;
  box-shadow: 0 0 0 3px rgba(165, 100, 21, 0.14), 0 12px 24px rgba(38, 58, 78, 0.18);
}

.pdb-sectional-piece.is-selected.is-connection-active {
  border-color: #7d4a10;
  box-shadow:
    0 0 0 3px rgba(165, 100, 21, 0.16),
    0 0 0 6px rgba(31, 79, 121, 0.10),
    0 12px 24px rgba(38, 58, 78, 0.18);
}

.pdb-sectional-piece.is-hover-linked:not(.is-selected):not(.is-connection-active) {
  border-color: #5e8eba;
  box-shadow: 0 0 0 3px rgba(94, 142, 186, 0.14), 0 12px 24px rgba(38, 58, 78, 0.12);
}

.pdb-sectional-piece.has-package-imagery.is-selected,
.pdb-sectional-piece.has-package-imagery.is-connection-active,
.pdb-sectional-piece.has-package-imagery.is-selected.is-connection-active {
  border: 0;
  box-shadow: none;
}

.pdb-sectional-piece.has-package-imagery.is-hover-linked:not(.is-selected):not(.is-connection-active) {
  filter: drop-shadow(0 0 5px rgba(47, 111, 159, 0.24));
}

.pdb-sectional-piece.has-package-imagery.is-hover-linked:not(.is-selected):not(.is-connection-active) .pdb-sectional-piece-imagery {
  filter: brightness(1.04) saturate(1.08);
}

.pdb-sectional-piece.has-package-imagery.is-selected::after,
.pdb-sectional-piece.has-package-imagery.is-connection-active::after {
  content: "";
  position: absolute;
  top: -12px;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1f4f79;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.94), 0 2px 6px rgba(31, 79, 121, 0.22);
  transform: translateX(-50%);
  pointer-events: none;
}

.pdb-sectional-piece.has-package-imagery.is-connection-active::after {
  background: #a56415;
}

.pdb-sectional-piece.has-package-imagery.is-selected:not(.is-connection-active)::after {
  content: none;
}

.pdb-sectional-piece-label {
  display: inline-flex;
  max-width: 100%;
  position: relative;
  z-index: 1;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #1f2937;
  font-size: var(--pdb-sectional-body-font-size);
  font-weight: 700;
  line-height: 1.2;
}

.pdb-sectional-piece.has-package-imagery .pdb-sectional-piece-label {
  opacity: 0;
}

.pdb-sectional-selection-alpha-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.pdb-sectional-selection-alpha-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: visible;
  filter: url("#pdb-sectional-selection-alpha-border");
}

.pdb-sectional-selection-alpha-piece {
  position: absolute;
  display: block;
  pointer-events: none;
}

.pdb-sectional-selection-alpha-imagery {
  position: absolute;
  display: block;
  pointer-events: none;
  transform-origin: center;
}

.pdb-sectional-selection-alpha-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: fill;
}

.pdb-sectional-connection {
  position: absolute;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  box-sizing: border-box;
  cursor: pointer;
  box-shadow: none;
  transition: none;
  z-index: 1;
}

.pdb-sectional-connection::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--sectional-connection-visible-width, 36px);
  height: var(--sectional-connection-visible-height, 12px);
  border: 1px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(219, 235, 250, 0.96), rgba(186, 217, 241, 0.96));
  box-sizing: border-box;
  box-shadow: 0 6px 14px rgba(34, 93, 137, 0.16);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.9);
  transition: opacity 0.14s ease, transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.pdb-sectional-connection:hover::before,
.pdb-sectional-connection:focus-visible::before,
.pdb-sectional-connection.is-active::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.pdb-sectional-connection:hover::before,
.pdb-sectional-connection:focus-visible::before {
  border-color: #2f6f9f;
  background: linear-gradient(180deg, rgba(211, 237, 250, 0.98), rgba(127, 194, 224, 0.98));
  box-shadow: 0 8px 18px rgba(34, 93, 137, 0.22);
}

.pdb-sectional-connection.is-active::before {
  border-color: #245580;
  background: linear-gradient(180deg, rgba(80, 157, 197, 0.98), rgba(34, 113, 157, 0.98));
  box-shadow: 0 0 0 3px rgba(38, 88, 168, 0.18), 0 10px 20px rgba(34, 93, 137, 0.22);
}

.pdb-sectional-ghost-tab {
  position: absolute;
  display: block;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: transparent;
  font-size: 0;
  line-height: 0;
  box-sizing: border-box;
  cursor: pointer;
  opacity: 0;
  overflow: visible;
  transition: opacity 0.14s ease, filter 0.14s ease;
  --sectional-ghost-solid: 14px;
  --sectional-ghost-fade: 24px;
  --sectional-ghost-depth: calc(var(--sectional-ghost-solid) + var(--sectional-ghost-fade));
  --sectional-ghost-mask: linear-gradient(90deg, #000 0 var(--sectional-ghost-solid), transparent var(--sectional-ghost-depth));
  --sectional-ghost-filter-neutral: grayscale(0.06) brightness(1.02) contrast(0.96);
  --sectional-ghost-filter-hover: grayscale(1) sepia(1) saturate(8.5) hue-rotate(141deg) brightness(1.32) contrast(0.98);
  --sectional-ghost-filter-selected: grayscale(1) sepia(1) saturate(8) hue-rotate(166deg) brightness(0.62) contrast(1.2);
}

.pdb-sectional-canvas:hover .pdb-sectional-ghost-tab,
.pdb-sectional-canvas:focus-within .pdb-sectional-ghost-tab,
.pdb-sectional-canvas.has-persistent-ghost-tabs .pdb-sectional-ghost-tab,
.pdb-sectional-ghost-tab.is-active {
  opacity: 0.92;
}

.pdb-sectional-ghost-tab:hover,
.pdb-sectional-ghost-tab:focus-visible,
.pdb-sectional-ghost-tab.is-active {
  opacity: 1;
}

.pdb-sectional-ghost-tab.is-move-target {
  opacity: 1;
}

@media (hover: none), (pointer: coarse) {
  .pdb-sectional-canvas .pdb-sectional-ghost-tab {
    opacity: 0.92;
  }
}

.pdb-sectional-ghost-tab:focus-visible {
  outline: 0;
}

.pdb-sectional-ghost-tab--w {
  --sectional-ghost-mask: linear-gradient(270deg, #000 0 var(--sectional-ghost-solid), transparent var(--sectional-ghost-depth));
}

.pdb-sectional-ghost-tab--s {
  --sectional-ghost-mask: linear-gradient(180deg, #000 0 var(--sectional-ghost-solid), transparent var(--sectional-ghost-depth));
}

.pdb-sectional-ghost-tab--n {
  --sectional-ghost-mask: linear-gradient(0deg, #000 0 var(--sectional-ghost-solid), transparent var(--sectional-ghost-depth));
}

.pdb-sectional-ghost-tab-clip {
  position: absolute;
  inset: 0;
  display: block;
  overflow: hidden;
  background: rgba(251, 252, 251, 0.96);
  pointer-events: none;
  -webkit-mask-image: var(--sectional-ghost-mask);
  mask-image: var(--sectional-ghost-mask);
}

.pdb-sectional-ghost-imagery,
.pdb-sectional-ghost-imagery-layer {
  position: absolute;
  display: block;
  pointer-events: none;
}

.pdb-sectional-ghost-imagery {
  top: 0;
  left: 0;
  transform-origin: center center;
  filter: var(--sectional-ghost-filter-neutral);
}

.pdb-sectional-ghost-imagery-layer {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: fill;
}

.pdb-sectional-ghost-tab:hover .pdb-sectional-ghost-imagery,
.pdb-sectional-ghost-tab:focus-visible .pdb-sectional-ghost-imagery {
  filter: var(--sectional-ghost-filter-hover);
}

.pdb-sectional-ghost-tab.is-active .pdb-sectional-ghost-imagery {
  filter: var(--sectional-ghost-filter-selected);
}

.pdb-sectional-ghost-tab.is-move-target .pdb-sectional-ghost-imagery {
  filter: var(--sectional-ghost-filter-hover);
}

.pdb-sectional-picker {
  position: absolute;
  width: 260px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  border: 1px solid #c8d5e2;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 32px rgba(23, 39, 58, 0.16);
  z-index: 2;
  pointer-events: auto;
}

.pdb-sectional-picker-title {
  font-size: var(--pdb-sectional-header-font-size);
  font-weight: 700;
  color: #1f2937;
}

.pdb-sectional-picker-copy {
  margin: 0;
  font-size: var(--pdb-sectional-body-font-size);
  line-height: 1.45;
  color: #5f6b7a;
}

.pdb-sectional-picker-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdb-sectional-picker-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 74px;
  padding: 8px 10px;
  border: 1px solid #d6dde7;
  border-radius: 10px;
  background: #f8fbff;
  color: #425466;
  text-align: left;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease;
}

.pdb-sectional-picker-option:hover {
  transform: translateY(-1px);
  border-color: #8fa8c3;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(26, 43, 64, 0.08);
}

.pdb-sectional-picker-option-preview {
  position: relative;
  flex: 0 0 104px;
  width: 104px;
  height: 62px;
  display: block;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}

.pdb-sectional-picker-option-imagery,
.pdb-sectional-picker-option-imagery-layer,
.pdb-sectional-picker-option-context,
.pdb-sectional-picker-option-context-imagery,
.pdb-sectional-picker-option-context-imagery-layer {
  position: absolute;
  display: block;
  pointer-events: none;
}

.pdb-sectional-picker-option-imagery,
.pdb-sectional-picker-option-context-imagery {
  transform-origin: center;
}

.pdb-sectional-picker-option-imagery-layer,
.pdb-sectional-picker-option-context-imagery-layer {
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: fill;
}

.pdb-sectional-picker-option-context {
  z-index: 0;
  overflow: hidden;
  background: rgba(251, 252, 251, 0.92);
}

.pdb-sectional-picker-option-context-imagery {
  filter: var(--sectional-ghost-filter-selected, grayscale(1) sepia(1) saturate(8) hue-rotate(166deg) brightness(0.62) contrast(1.2));
  opacity: 0.9;
}

.pdb-sectional-picker-option-context--w {
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 100%);
}

.pdb-sectional-picker-option-context--e {
  -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 100%);
  mask-image: linear-gradient(270deg, transparent 0, #000 100%);
}

.pdb-sectional-picker-option-context--n {
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0, #000 100%);
}

.pdb-sectional-picker-option-context--s {
  -webkit-mask-image: linear-gradient(0deg, transparent 0, #000 100%);
  mask-image: linear-gradient(0deg, transparent 0, #000 100%);
}

.pdb-sectional-picker-option-imagery {
  z-index: 1;
}

.pdb-sectional-picker-option-content {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
}

.pdb-sectional-picker-option-label {
  font-size: var(--pdb-sectional-body-font-size);
  font-weight: 700;
  line-height: 1.3;
}

.pdb-sectional-picker-option-meta {
  font-size: var(--pdb-sectional-body-font-size);
  line-height: 1.35;
}

.pdb-sectional-connection-picker {
  z-index: 4;
}

.pdb-sectional-connection-chip {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 10px;
  border: 1px solid rgba(60, 122, 176, 0.42);
  border-radius: 12px;
  background: rgba(247, 251, 255, 0.98);
  box-shadow: 0 18px 32px rgba(18, 42, 64, 0.16);
  z-index: 3;
  pointer-events: auto;
}

.pdb-sectional-connection-chip-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdb-sectional-connection-chip-button {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #bfd2e6;
  border-radius: 10px;
  background: #eef6fd;
  color: #335c7d;
  font-size: var(--pdb-sectional-body-font-size);
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, color 0.14s ease;
}

.pdb-sectional-connection-chip-button:not(:disabled):hover {
  transform: translateY(-1px);
  border-color: #5e8eba;
  background: #f8fcff;
  color: #245580;
  box-shadow: 0 10px 20px rgba(34, 93, 137, 0.10);
}

.pdb-sectional-connection-chip-button:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.pdb-sectional-inspector {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #d8dee8;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 247, 251, 0.98));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.pdb-sectional-inspector[hidden] {
  display: none;
}

.pdb-sectional-inspector-empty {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdb-sectional-inspector-empty-title,
.pdb-sectional-inspector-eyebrow,
.pdb-sectional-inspector-section-title {
  font-size: var(--pdb-sectional-header-font-size);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5f6b7a;
}

.pdb-sectional-inspector-empty-copy,
.pdb-sectional-inspector-copy {
  margin: 0;
  font-size: var(--pdb-sectional-body-font-size);
  line-height: 1.5;
  color: #5f6b7a;
}

.pdb-sectional-inspector-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pdb-sectional-inspector-swatch-button {
  display: grid;
  grid-template-columns: minmax(58px, max-content) 42px minmax(0, 1fr);
  align-items: center;
  gap: 0;
  width: 100%;
  min-height: 42px;
  padding: 0;
  border: 1px solid #d6dde7;
  border-radius: 8px;
  background: #ffffff;
  color: #1f2937;
  text-align: left;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.14s ease, transform 0.14s ease, box-shadow 0.14s ease;
}

.pdb-sectional-inspector-swatch-button:hover {
  transform: translateY(-1px);
  border-color: #8fa8c3;
  box-shadow: 0 10px 22px rgba(26, 43, 64, 0.08);
}

.pdb-sectional-inspector-swatch-label {
  font-size: var(--pdb-sectional-body-font-size);
  font-weight: 700;
  color: #425466;
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0 8px;
}

.pdb-sectional-inspector-swatch-preview {
  width: 42px;
  height: 42px;
  border: 0;
  border-left: 1px solid #d6dde7;
  border-right: 1px solid #d6dde7;
  border-radius: 0;
  background-color: #eef2f7;
  background-size: cover;
  background-position: center;
}

.pdb-sectional-inspector-swatch-preview.is-empty {
  background-image:
    linear-gradient(135deg, rgba(143, 168, 195, 0.25), rgba(143, 168, 195, 0.05)),
    linear-gradient(45deg, rgba(143, 168, 195, 0.18), rgba(143, 168, 195, 0));
}

.pdb-sectional-inspector-swatch-value {
  font-size: var(--pdb-sectional-material-value-max-font-size);
  color: #425466;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: 100%;
  padding: 0 8px;
}

.pdb-sectional-inspector-rotation-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pdb-sectional-inspector-rotation-options.is-stepwise {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdb-sectional-inspector-rotation-btn,
.pdb-sectional-inspector-delete-button {
  border: 1px solid #cfd7e3;
  border-radius: 10px;
  background: #ffffff;
  color: #425466;
  min-height: 40px;
  font-size: var(--pdb-sectional-body-font-size);
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.14s ease, background 0.14s ease, box-shadow 0.14s ease, transform 0.14s ease;
}

.pdb-sectional-inspector-rotation-btn:hover:not(:disabled),
.pdb-sectional-inspector-delete-button:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: #8fa8c3;
  box-shadow: 0 10px 22px rgba(26, 43, 64, 0.08);
}

.pdb-sectional-inspector-rotation-btn.is-active {
  border-color: #1f4f79;
  background: rgba(31, 79, 121, 0.12);
  color: #12395d;
  box-shadow: 0 0 0 3px rgba(31, 79, 121, 0.12);
}

.pdb-sectional-inspector-rotation-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.pdb-sectional-inspector-delete-button {
  color: #8a2230;
  border-color: #e8c4cb;
  background: #fff8f8;
}

.pdb-sectional-inspector-delete-button:disabled {
  color: #9aa3af;
  border-color: #d8dee8;
  background: #f4f6f8;
  cursor: not-allowed;
  opacity: 0.72;
  box-shadow: none;
  transform: none;
}

.pdb-sectional-preview {
  min-height: 100%;
  justify-content: center;
}

.pdb-sectional-workspace.is-visualizer {
  grid-template-columns: minmax(0, 1fr);
}

.pdb-sectional-workspace.is-visualizer .pdb-sectional-planner-shell {
  display: none;
}

@media (max-width: 960px) {
  .pdb-sectional-workspace:not(.is-preview-hidden) {
    grid-template-columns: minmax(0, 1fr);
  }

  .pdb-sectional-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Minimal outside-the-iframe controls */
.pdb-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #eee;
  background: #f0f0f0;
  flex: 0 0 auto;
}

.pdb-panel-shell {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  border: 1px solid #d7dce5;
  border-radius: 8px;
  background: #f0f0f0;
}

.pdb-panel-shell[hidden] {
  display: none;
}

.pdb-standard-controls-shell,
.pdb-specifications-shell,
.pdb-pricing-shell {
  align-items: stretch;
}

.pdb-panel-label {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #eadca7;
  border-radius: 6px;
  background: #fff4cc;
  color: #5a4a00;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

.pdb-panel-shell .pdb-controls,
.pdb-panel-body {
  border: 0;
  background: transparent;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.pdb-panel-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pdb-stage.is-left .pdb-standard-controls-shell,
.pdb-stage.is-right .pdb-standard-controls-shell {
  flex: 0 0 min(420px, 35vw);
  max-width: min(420px, 35vw);
}

.pdb-stage.is-top .pdb-standard-controls-shell,
.pdb-stage.is-left .pdb-standard-controls-shell {
  order: 0;
}

.pdb-stage.is-top .pdb-stage-viewer,
.pdb-stage.is-left .pdb-stage-viewer {
  order: 1;
}

.pdb-stage.is-bottom .pdb-stage-viewer,
.pdb-stage.is-right .pdb-stage-viewer {
  order: 0;
}

.pdb-stage.is-bottom .pdb-standard-controls-shell,
.pdb-stage.is-right .pdb-standard-controls-shell {
  order: 1;
}

.pdb-controls .pdb-buttonbar,
.pdb-swatch-group {
  display: inline-flex;
  align-items: center;
  border: 0;
  background: #ffffff;
  border-radius: 6px;
  padding: 0px;
  overflow: hidden;
}

.pdb-controls .pdb-buttonbar.pdb-swatch-bar {
  appearance: none;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-align: left;
}

.pdb-controls .pdb-buttonbar.pdb-swatch-bar:focus-visible {
  outline: 2px solid #7a8796;
  outline-offset: 2px;
}

.pdb-toolbar-placement-bar .pdb-btn {
  min-width: 34px;
  padding: 0;
}

.pdb-controls .pdb-toolbar-placement-bar {
  display: none;
}

.pdb-host--developer .pdb-controls .pdb-toolbar-placement-bar {
  display: inline-flex;
}

.pdb-dock-glyph {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 1px solid #7a8796;
  border-radius: 3px;
  box-sizing: border-box;
  background: #ffffff;
}

.pdb-dock-glyph::before {
  content: "";
  position: absolute;
  background: #8a97a6;
}

.pdb-dock-top::before {
  top: 1px;
  left: 1px;
  right: 1px;
  height: 4px;
}

.pdb-dock-bottom::before {
  left: 1px;
  right: 1px;
  bottom: 1px;
  height: 4px;
}

.pdb-dock-left::before {
  top: 1px;
  bottom: 1px;
  left: 1px;
  width: 4px;
}

.pdb-dock-right::before {
  top: 1px;
  bottom: 1px;
  right: 1px;
  width: 4px;
}

.pdb-toolbar-placement-bar .pdb-btn.active .pdb-dock-glyph {
  border-color: #3b82f6;
  background: #f8fbff;
}

.pdb-toolbar-placement-bar .pdb-btn.active .pdb-dock-glyph::before {
  background: #3b82f6;
}

.pdb-controls .pdb-debug-model-bar {
  border: 1px solid #eee;
  align-items: stretch;
}

.pdb-controls .pdb-debug-model-bar .pdb-label,
.pdb-controls .pdb-debug-model-bar .pdb-value {
  min-height: 34px;
  height: auto;
}

.pdb-viewer-messages-shell {
  width: 100%;
  align-items: stretch;
}

.pdb-debug-tools {
  flex-direction: column;
  align-items: stretch;
}

.pdb-debug-tools-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
}

.pdb-viewer-messages {
  gap: 8px;
}

.pdb-controls .pdb-viewer-messages-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #d6dbe4;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  user-select: none;
}

.pdb-controls .pdb-viewer-messages-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pdb-viewer-messages-toggle-track {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: #d1d5db;
  transition: background 0.15s ease;
  flex: 0 0 auto;
}

.pdb-viewer-messages-toggle-track::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  transition: transform 0.15s ease;
}

.pdb-viewer-messages-toggle-input:checked + .pdb-viewer-messages-toggle-track {
  background: #3b82f6;
}

.pdb-viewer-messages-toggle-input:checked + .pdb-viewer-messages-toggle-track::after {
  transform: translateX(14px);
}

.pdb-viewer-messages-toggle-text {
  font-size: 12px;
  font-weight: 600;
  color: #555;
}

.pdb-viewer-messages-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.pdb-viewer-messages-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pdb-viewer-messages-count,
.pdb-viewer-messages-empty {
  font-size: 12px;
  color: #555;
}

.pdb-viewer-messages-count {
  font-weight: 700;
}

.pdb-viewer-messages-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow: auto;
}

.pdb-viewer-message-row {
  display: grid;
  grid-template-columns: 96px 72px 160px 220px minmax(0, 1fr) auto;
  position: relative;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #e3e6eb;
  border-radius: 6px;
  background: #fff;
  white-space: nowrap;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.pdb-viewer-message-row.is-new {
  background: #fff7d6;
  border-color: #f0c54f;
  box-shadow: 0 0 0 1px rgba(240, 197, 79, 0.18);
}

.pdb-viewer-message-time,
.pdb-viewer-message-type,
.pdb-viewer-message-summary,
.pdb-viewer-message-preview {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdb-viewer-message-time,
.pdb-viewer-message-type {
  font-size: 11px;
  color: #4b5563;
}

.pdb-viewer-message-type {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.pdb-viewer-message-summary,
.pdb-viewer-message-preview {
  font-size: 12px;
  color: #555;
}

.pdb-viewer-message-preview {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  overflow: visible;
}

.pdb-viewer-message-stream {
  min-width: 0;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  text-align: center;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pdb-viewer-message-stream--out {
  background: #dbeafe;
  color: #1d4ed8;
}

.pdb-viewer-message-stream--in {
  background: #dcfce7;
  color: #166534;
}

.pdb-viewer-message-stream--proposed {
  background: #fef3c7;
  color: #92400e;
}

.pdb-viewer-message-separator {
  color: #9aa2ad;
  flex: 0 0 auto;
}

.pdb-viewer-message-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid #d6dbe4;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 600;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.pdb-viewer-message-tag-label {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdb-viewer-message-tag:focus-visible,
.pdb-viewer-message-tag.is-expanded {
  outline: none;
  border-color: #93c5fd;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(147, 197, 253, 0.24);
}

.pdb-viewer-message-tag:active,
.pdb-viewer-message-tag.is-copying {
  transform: translateY(1px);
  border-color: #86efac;
  background: #ecfdf5;
  box-shadow: 0 0 0 2px rgba(134, 239, 172, 0.24);
}

.pdb-viewer-message-popover {
  position: fixed;
  z-index: 1200;
  min-width: 240px;
  max-width: min(420px, 72vw);
  padding: 8px 10px;
  border: 1px solid #d6dbe4;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  white-space: normal;
}

.pdb-viewer-message-popover-label {
  margin-bottom: 6px;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pdb-viewer-message-popover-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 240px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
}

.pdb-viewer-message-json-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.pdb-viewer-message-json-segment {
  color: #334155;
}

.pdb-viewer-message-json-key {
  color: #0f766e;
}

.pdb-viewer-message-json-string {
  color: #b45309;
}

.pdb-viewer-message-json-number {
  color: #7c3aed;
}

.pdb-viewer-message-json-boolean {
  color: #1d4ed8;
}

.pdb-viewer-message-json-null {
  color: #dc2626;
}

.pdb-viewer-message-json-punctuation {
  color: #94a3b8;
}

.pdb-viewer-message-copy,
.pdb-viewer-messages-clear,
.pdb-viewer-messages-close {
  white-space: nowrap;
}

.catalog-popup .pdb-swatch-group {
  border: 1px solid var(--pdb-border, #d0d0d0);
}

.pdb-controls .pdb-label,
.pdb-swatch-group .pdb-label {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  margin-right: 0;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
}

.pdb-controls .pdb-swatch,
.pdb-swatch-group .pdb-swatch-image {
  height: 34px;
  min-width: 34px;
  padding: 0px;
  cursor: pointer;
  border: 0px;
}

.pdb-controls .pdb-swatch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0;
}

.pdb-controls .pdb-swatch.is-empty {
  border: 1px dashed #bcc8d4;
  background:
    linear-gradient(135deg, rgba(143, 168, 195, 0.18), rgba(143, 168, 195, 0.05)),
    linear-gradient(45deg, rgba(143, 168, 195, 0.12), rgba(143, 168, 195, 0));
}

.pdb-controls .pdb-swatch.is-empty::before {
  content: '';
  width: 16px;
  height: 16px;
  border-radius: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(217, 226, 236, 0.9)),
    linear-gradient(45deg, rgba(143, 168, 195, 0.2), rgba(143, 168, 195, 0));
  box-shadow: inset 0 0 0 1px rgba(143, 168, 195, 0.35);
}

.pdb-controls .pdb-swatch img {
  height: 100%;
  width: auto;
}

.pdb-controls .pdb-value,
.pdb-swatch-group .pdb-info {
  font-size: 12px;
  font-weight: 400;
  color: #555;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 10px;
  text-wrap: nowrap;
}

.pdb-controls .pdb-btn {
  border: 1px solid #ccc;
  background: #fff;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pdb-controls .pdb-btn.active {
  outline: none;
  background: #e8f0fe;
  border-color: #3b82f6;
}

.pdb-controls .pdb-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pdb-controls .pdb-camera-type-bar .pdb-btn.active:disabled {
  opacity: 1;
  cursor: default;
  background: #e8f0fe;
  border-color: #3b82f6;
}

.pdb-controls .pdb-buttonbar .pdb-btn {
  height: 34px;
  padding: 2px 8px;
  border-radius: 0;
}

.pdb-controls .pdb-buttonbar .pdb-btn:first-of-type {
  border-top-left-radius: 6px;
  border-bottom-left-radius: 6px;
}

.pdb-controls .pdb-buttonbar .pdb-btn:last-of-type {
  border-top-right-radius: 6px;
  border-bottom-right-radius: 6px;
}

.pdb-controls .pdb-buttonbar .pdb-btn .pdb-icon {
  height: 100%;
  width: auto;
}

.pdb-iframe {
    flex: 1 1 auto;
    min-height: 600px;
    width: calc(100% - 40px);
    margin: 0 20px;
    box-sizing: border-box;
    border: 0;
}

.pdb-viewer-loading {
    position: absolute;
    inset: 0 20px;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
    padding: 24px;
    box-sizing: border-box;
    background: rgba(248, 250, 252, 0.92);
    color: #17202a;
    text-align: center;
}

.pdb-viewer-loading.is-hidden,
.pdb-viewer-loading[hidden] {
    display: none;
}

.pdb-viewer-loading-panel {
    display: grid;
    justify-items: center;
    gap: 10px;
    max-width: 360px;
}

.pdb-viewer-loading-spinner {
    width: 34px;
    height: 34px;
    border: 3px solid #c9d1dc;
    border-top-color: #315f7d;
    border-radius: 50%;
    animation: pdb-viewer-loading-spin 0.9s linear infinite;
}

.pdb-viewer-loading-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
}

.pdb-viewer-loading-detail,
.pdb-viewer-loading-diagnostic {
    font-size: 0.875rem;
    line-height: 1.45;
    color: #4f5f6f;
}

.pdb-viewer-loading-diagnostic {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}

.pdb-viewer-loading.is-failed {
    background: rgba(255, 255, 255, 0.96);
}

.pdb-viewer-loading.is-failed .pdb-viewer-loading-spinner {
    display: none;
}

.pdb-viewer-loading.is-failed .pdb-viewer-loading-title {
    color: #7a1f1f;
}

@keyframes pdb-viewer-loading-spin {
    to {
        transform: rotate(360deg);
    }
}

.pdb-image-viewer {
    flex: 1 1 auto;
    min-height: 0;
    width: 100%;
}

.catalog-options-content {
  max-width: 900px;
  margin: 0 auto;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.catalog-options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #eee;
}
.catalog-options-title {
  font-weight: 600;
  font-size: 1.6em;
  margin-left: auto;
  margin-right: auto;
}
.catalog-options-close {
  border: 0;
  background: transparent;
  font-size: 1.75em;
  line-height: 1;
  cursor: pointer;
}

.catalog-options-prompt {
  padding: 0.5rem 1rem;
  opacity: .85;
}

.catalog-options-body {
  padding: 0.75rem 1rem;
  overflow: auto;
  flex: 1 1 auto;
  min-height: 0;
}

.catalog-popup { padding: clamp(12px, 5vw, 50px); }
.catalog-options-content {
  width: 100%;
  max-height: 100%;
  border-radius: 8px;
}

.catalog-options-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #eee;
}

.catalog-options-tab {
  border: 1px solid #ddd;
  background: #fafafa;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95rem;
}

.catalog-options-tab.active {
  background: #fff;
  border-color: #bbb;
  font-weight: 600;
}

.catalog-tile.selected {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}
.catalog-options-toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #eee;
}
.catalog-options-search { flex: 1 1 auto; }

.catalog-options-toolbar {
  display: flex;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #eee;
  align-items: center;
  --ctl-h: 36px;
  --ctl-br: 10px;
}

.catalog-options-search,
.catalog-options-grade {
  height: var(--ctl-h);
  border: 1px solid #d6d6d6;
  border-radius: var(--ctl-br);
  background: #fff;
  padding: 0 .6rem;
  font: inherit;
  color: inherit;
  outline: none;
  box-shadow: none;
}

.catalog-options-search {
  -webkit-appearance: none;
  appearance: none;
}
.catalog-options-search::placeholder { color: #8a8a8a; }

.catalog-options-grade { padding-right: 1.8rem; }
.catalog-options-grade::-ms-expand { display: none; }

.catalog-options-search:focus,
.catalog-options-grade:focus {
  border-color: #bdbdbd;
  box-shadow: 0 0 0 2px rgba(0,0,0,.06);
}

.is-disabled {
  opacity: 0.5;
  cursor: not-allowed;
  position: relative;
  }
.is-disabled .tile-unavailable {
  position: absolute;
  left: 0;
  right: 0;
  top: 50px;
  color: black;
  font-size: 1.8rem;
  font-weight: 500;
  text-align: center;
  pointer-events: none;
}

@supports not (grid-template-rows: masonry) {
  .catalog-tile-container {
    grid-auto-rows: auto;
  }
}

.catalog-popup {
  --pdb-accent:    #0a84ff;
  --pdb-accent-bg: #e6f0ff;
  --pdb-border:    #d0d0d0;
  --pdb-btn-bg:    #f9f9f9;
  --pdb-btn-fg:    #222;
}

.catalog-popup .catalog-question {
  margin-bottom: .25rem;
  font-weight: 600;
}

.catalog-popup .catalog-checkbox-option {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin: 0 .75rem .9rem;
  color: #333;
}

.catalog-popup .catalog-checkbox-option input[type="checkbox"] {
  inline-size: 16px;
  block-size: 16px;
  margin: 0;
}

.catalog-popup .pdb-buttonbar.pdb-segment {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--pdb-border);
  border-radius: 10px;
  overflow: hidden;
  margin: .75rem;
}

.catalog-popup .pdb-buttonbar.pdb-segment .pdb-btn.toggle {
  appearance: none;
  background: var(--pdb-btn-bg);
  color: var(--pdb-btn-fg);
  border: 0;
  padding: .75rem 1rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 64px;
  transition: background .15s ease, box-shadow .15s ease, color .15s ease;
}

.catalog-popup .pdb-buttonbar.pdb-segment .pdb-btn.toggle + .pdb-btn.toggle {
  border-left: 1px solid var(--pdb-border);
}

.catalog-popup .pdb-buttonbar.pdb-segment .pdb-btn.toggle:hover:not(.active) {
  background: #f3f4f6;
}
.catalog-popup .pdb-buttonbar.pdb-segment .pdb-btn.toggle:focus-visible {
  outline: 2px solid var(--pdb-accent);
  outline-offset: 2px;
}

.catalog-popup .pdb-buttonbar.pdb-segment .pdb-btn.toggle.active {
  background: var(--pdb-accent-bg);
  box-shadow:
    inset 0 0 0 1.5px var(--pdb-accent),
    0 0 0 2px rgba(10,132,255,.35);
}

@supports (color: color-mix(in srgb, white, black)) {
  .catalog-popup .pdb-buttonbar.pdb-segment .pdb-btn.toggle.active {
    box-shadow:
      inset 0 0 0 1.5px var(--pdb-accent),
      0 0 0 2px color-mix(in srgb, var(--pdb-accent) 35%, transparent);
  }
}

.catalog-popup .pdb-buttonbar.pdb-segment .label {
  font-weight: 600;
  line-height: 1.1;
  text-align: center;
  color: #555;
  font-size: 18px;
  margin-left: auto;
  margin-right: auto;
}

.catalog-popup .pdb-buttonbar.pdb-segment .pdb-swatch-grid {
    display: inline-grid;
    gap: 3px;
    margin-left: auto;
    margin-right: auto;
}

.catalog-popup .pdb-adhoc-toggle-copy {
  margin-top: 6px;
  color: #666;
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
}

.catalog-popup .pdb-adhoc-dialog-form {
  display: grid;
  gap: 10px;
  margin: .75rem;
}

.catalog-popup .pdb-adhoc-dialog-field {
  display: grid;
  gap: 6px;
}

.catalog-popup .pdb-adhoc-dialog-field .catalog-question {
  margin-bottom: 0;
}

.catalog-popup .pdb-adhoc-dialog-copy {
  margin: 0 .75rem;
  color: #555;
  line-height: 1.45;
}

.catalog-popup .pdb-adhoc-dialog-error {
  margin: .5rem .75rem 0;
  color: #b42318;
  font-weight: 600;
}

.catalog-popup .pdb-adhoc-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: .75rem;
}

.catalog-popup .catalog-options-custom-action {
  margin: 0 .75rem .75rem;
  align-self: flex-start;
}

.pdb-image-viewer {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;

  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* no bleed */
}

.pdb-image-viewer .pdb-main-wrapper {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.pdb-image-viewer .pdb-main-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.pdb-image-viewer .pdb-image-sidebar {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pdb-image-viewer .pdb-thumb-image {
  width: 80px;
  cursor: pointer;
  border: 1px solid #ccc;
}

.pdb-image-viewer .pdb-thumb-image:hover {
  border-color: #666;
}

/* Allow the control bar to wrap whole components to new rows */
.pdb-controls {
  flex-wrap: wrap;
  row-gap: 8px;
}

/* Keep each component at its intrinsic width; don't let it shrink */
.pdb-controls .pdb-buttonbar,
.pdb-controls .pdb-swatch-group {
  flex: 0 0 auto;
}

/* If long labels/values were being forced onto one line, let them wrap within the component */
.pdb-controls .pdb-value,
.pdb-swatch-group .pdb-info {
  white-space: normal;
}

.product-specifications-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed; /* forces equal-width columns */
  background-color: white;
  border-radius: 6px;
}

.product-specifications-table th,
.product-specifications-table td {
  padding: 4px;
  text-align: left;
  width: calc(100% / 12); /* 12 columns in your markup */
  vertical-align: top;
}

.product-specifications-table th span {
  display: block;       /* each span on its own line */
  text-align: left;     /* left aligned */
  line-height: 1.2em;   /* compact vertical spacing */
}

/* Responsive font scaling */
.product-specifications-table {
  font-size: clamp(6px, 1.3vw, 12px);
  max-width: 938px;
  color: #555;
}

.product-specifications-table th {
  font-weight: 600;
}

.product-pricing-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  max-width: 100%;
}

.pdb-pricing {
  align-items: flex-start;
}

.product-pricing-title {
  font-size: 13px;
  font-weight: 600;
  color: #555;
}

.product-pricing-table {
  width: auto;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  background-color: white;
  border-radius: 6px;
  font-size: clamp(10px, 1.1vw, 12px);
  color: #555;
}

.product-pricing-table th,
.product-pricing-table td {
  padding: 4px 10px 4px 8px;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.product-pricing-table th {
  font-weight: 600;
  border-bottom: 1px solid #ddd;
}

.product-pricing-table td {
  border-top: 1px solid #eee;
}

.product-pricing-table tbody tr:first-child td {
  border-top: 0;
}

.product-pricing-table td.is-highlight {
  font-weight: 700;
  color: #222;
}

.catalog-options-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.catalog-options-actions { display: inline-flex; gap: 8px; }
.catalog-json-pre { tab-size: 2; }

/* Pressed / selected state (radio-style) */
.pdb-btn.active,
.pdb-btn[aria-pressed="true"] {
    /* “stays pressed” look */
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.25);
    transform: translateY(1px);
    cursor: default; /* looks non-clickable even though it’s enabled */
}

/* Disabled / blocked state */
.pdb-btn[disabled],
.pdb-btn[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none; /* extra safety so no handlers fire */
}
