/* JewDIY UI hotfix 2026-11-16 (r6)
   Scope: button hierarchy + left-panel density + share grid.
   Triple #builder outranks editor-workbench.css / editor-shell.css rules. */

/* ---------- 1) Right panel empty-state hint ---------- */
html body #builder#builder#builder #addCart.needs-beads {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  height: auto !important;
  padding: 8px 2px 8px 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #8a8f8a !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.4 !important;
  text-align: left !important;
  justify-content: flex-start !important;
  white-space: normal !important;
  cursor: default !important;
  outline: 0 !important;
}

/* ---------- 2) Secondary action stays compact ---------- */
html body #builder#builder#builder #exportBrief {
  width: auto !important;
  min-width: 0 !important;
  max-width: max-content !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 14px !important;
  margin: 2px 0 0 !important;
  align-self: flex-start !important;
  justify-self: start !important;
  flex: 0 0 auto !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

/* ---------- 3) Share buttons stay compact ---------- */
html body #builder#builder#builder .share-buttons button,
html body #builder#builder#builder .share-buttons > button {
  width: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  min-height: 30px !important;
  height: 30px !important;
  padding: 0 8px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* ---------- 4) Desktop: compress left-panel filters so beads show sooner ---------- */
@media (min-width: 1181px) {
  html body #builder#builder#builder .left-panel .panel-header {
    padding: 10px 12px 8px !important;
  }
  html body #builder#builder#builder .left-panel .panel-header h2 {
    font-size: 16px !important;
    line-height: 1.25 !important;
  }
  html body #builder#builder#builder .left-panel .tabs {
    padding: 6px 10px !important;
    gap: 5px !important;
  }
  html body #builder#builder#builder .left-panel .tab {
    min-height: 32px !important;
    padding: 6px 14px !important;
    font-size: 11px !important;
  }
  html body #builder#builder#builder .left-panel .material-taxonomy {
    padding: 6px 10px !important;
    gap: 5px !important;
  }
  html body #builder#builder#builder .left-panel .taxonomy-pills .filter {
    min-height: 30px !important;
    padding: 5px 10px !important;
    font-size: 11px !important;
  }
  html body #builder#builder#builder .left-panel .size-selector {
    padding: 5px 10px !important;
    gap: 4px !important;
  }
  html body #builder#builder#builder .left-panel .size-options {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow: auto hidden !important;
    gap: 4px !important;
  }
  html body #builder#builder#builder .left-panel .size-options button {
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: 54px !important;
    height: 30px !important;
    font-size: 10.5px !important;
  }
  html body #builder#builder#builder .left-panel .color-selector {
    padding: 5px 10px !important;
  }
  html body #builder#builder#builder .left-panel .color-selector select {
    height: 32px !important;
    font-size: 11px !important;
  }
  html body #builder#builder#builder .left-panel .search-bar {
    padding: 5px 10px !important;
  }
  html body #builder#builder#builder .left-panel .search-bar input {
    height: 32px !important;
    font-size: 11.5px !important;
  }
  html body #builder#builder#builder .left-panel .catalog {
    padding: 5px !important;
    gap: 5px !important;
    grid-auto-rows: 122px !important;
  }
  html body #builder#builder#builder .left-panel .catalog > .product-card {
    height: 122px !important;
  }

  /* ---------- 5) Desktop: share grid 3 columns, calmer price ---------- */
  html body #builder#builder#builder .share-buttons {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }
  html body #builder#builder#builder .right-panel .total strong {
    font-size: 26px !important;
    line-height: 1.2 !important;
  }
}

@media (max-width: 560px) {
  html body #builder#builder#builder .share-buttons button,
  html body #builder#builder#builder .share-buttons > button {
    min-height: 32px !important;
    height: 32px !important;
  }
}
