/* Search + filters row */
.bwpp-table-root .gridjs-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.bwpp-table-root .gridjs-search {
  flex: 0 0 320px !important; /* adjust */
  max-width: 100%;
}
.toolbar {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.toolbar label {
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: center;
  gap: 6px;
}
.toolbar select { padding: 6px 8px; }

.thumb { max-height:50px; cursor:pointer; border-radius:4px; }
.g-btn { padding:4px 10px; cursor:pointer; }

.bwpp-table-root .gridjs-table {
  table-layout: auto !important;
  width: 100%;
}

.bwpp-table-root thead th:nth-child(1),
.bwpp-table-root tbody td:nth-child(1) {
  width: 90px;
  max-width: 90px;
  text-align: center;
  white-space: nowrap;
}

.bwpp-table-root thead th:nth-child(2),
.bwpp-table-root tbody td:nth-child(2) {
  width: 110px;
  max-width: 110px;
  text-align: center;
  white-space: nowrap;
}

.bwpp-table-root thead th:nth-child(3),
.bwpp-table-root tbody td:nth-child(3) {
  white-space: normal;
}

.bwpp-status-select {
  width: 100%;
  padding: 4px 6px;
  font-size: 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.bwpp-status-select:disabled { opacity: 0.6; cursor: wait; }

.bwpp-table-root thead th:nth-child(4),
.bwpp-table-root tbody td:nth-child(4) {
  width: 110px;
  max-width: 110px;
  text-align: center;
  white-space: nowrap;
}

.bwpp-table-root thead th:nth-child(5),
.bwpp-table-root tbody td:nth-child(5) {
  width: 110px;
  max-width: 110px;
  text-align: center;
  white-space: nowrap;
}

.bwpp-table-root thead th:nth-child(6),
.bwpp-table-root tbody td:nth-child(6),
.bwpp-table-root thead th:nth-child(7),
.bwpp-table-root tbody td:nth-child(7) {
  white-space: nowrap;
  text-align: right;
}

.bwpp-table-root thead th:nth-child(6),
.bwpp-table-root tbody td:nth-child(6) {
  width: 150px;
  max-width: 150px;
}

.bwpp-table-root thead th:nth-child(7),
.bwpp-table-root tbody td:nth-child(7) {
  width: 170px;
  max-width: 170px;
}

.bwpp-table-root thead th:nth-child(8),
.bwpp-table-root tbody td:nth-child(8) {
  width: 140px;
  max-width: 140px;
  white-space: nowrap;
}

.bwpp-table-root thead th:nth-child(9),
.bwpp-table-root tbody td:nth-child(9) {
  width: 100px;
  max-width: 100px;
  text-align: center;
  white-space: nowrap;
}

.bwpp-table-root thead th:nth-child(10),
.bwpp-table-root tbody td:nth-child(10) {
  width: 200px;
  max-width: 200px;
  text-align: center;
  white-space: nowrap;
}

/* Modal & gallery */
.bwpp-modal { display:none; position:fixed; z-index:1000; inset:0; background:rgba(0,0,0,.7); }
.bwpp-modal-content { background:#fff; margin:4% auto; padding:20px; border-radius:8px; width:95%; max-width:1100px; max-height:90vh; overflow:auto; }
.bwpp-modal-close { float:right; font-size:28px; cursor:pointer; }
.bwpp-gallery-main { display:flex; align-items:center; justify-content:center; gap:8px; margin-bottom:12px; }
.bwpp-gallery-main img { max-height:420px; max-width:100%; border-radius:6px; }
.bwpp-gallery-nav { cursor:pointer; user-select:none; font-size:22px; padding:6px 12px; border:1px solid #ddd; border-radius:6px; }
.bwpp-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}

.bwpp-thumbs img.bwpp-thumb {
  height: 80px !important;
  width: auto !important;
  max-width: none !important;
  object-fit: cover;
  border-radius: 4px;
  flex: 0 0 auto;
  opacity: .9;
  cursor: pointer;
}

.bwpp-thumbs img.bwpp-thumb.active {
  outline: 2px solid #333;
  opacity: 1;
}

.bwpp-field-table { width:100%; border-collapse:collapse; }
.bwpp-field-table td { border:1px solid #eee; padding:8px; vertical-align:top; }
.bwpp-field-table .field-label { width:30%; font-weight:600; background:#fafafa; }
