
.bbx-sm-dog{display:flex;gap:12px;padding:12px;border:1px solid rgba(0,0,0,.1);border-radius:12px;margin:10px 0;background:#fff}
.bbx-sm-dog-left{display:flex;gap:12px;flex:1}
.bbx-sm-dog-handle{cursor:move;font-weight:900;opacity:.6;padding:6px 8px;border-radius:8px;background:rgba(0,0,0,.05);height:fit-content}
.bbx-sm-dog-fields{display:flex;flex-wrap:wrap;gap:12px;flex:1}
.bbx-sm-field{flex:1 1 240px}
.bbx-sm-full{flex:1 1 100%}
.bbx-sm-field label{display:block;font-weight:700;margin:0 0 6px}
.bbx-sm-imgrow{display:flex;align-items:center;gap:10px}
.bbx-sm-thumb{width:64px;height:64px;object-fit:cover;border-radius:14px}
.bbx-sm-thumbph{width:52px;height:52px;border-radius:14px;background:rgba(0,0,0,.06)}
.bbx-sm-btn{border:1px solid rgba(0,0,0,.2);padding:6px 10px;border-radius:10px;background:#fff;cursor:pointer}
.bbx-sm-danger{border-color:#c00;color:#c00}
.bbx-sm-check{display:flex;align-items:center;gap:8px;font-weight:600}


/* Collapsible Stud Dogs rows */
.bbx-sm-dog { border:1px solid #dcdcde; border-radius:10px; background:#fff; margin:12px 0; overflow:hidden; }
.bbx-sm-dog-header{ display:flex; align-items:center; gap:10px; padding:10px 12px; cursor:pointer; user-select:none; }
.bbx-sm-dog-title{ font-weight:700; flex:1; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.bbx-sm-toggle-dog{ margin-left:auto; }
.bbx-sm-dog-handle{ cursor:grab; font-weight:700; padding:2px 8px; border-radius:8px; background:#f1f1f1; }
.bbx-sm-dog-body{ padding:12px; border-top:1px solid #eee; display:block; }
.bbx-sm-dog.bbx-sm-collapsed .bbx-sm-dog-body{ display:none; }
.bbx-sm-dog.bbx-sm-collapsed .bbx-sm-dog-actions{ display:none; }


/* Stud Dogs repeater: alternating background like Litters plugin */
#bbx_sm_dogs [data-dog]:nth-child(odd){ background:#c8e6f0; }
#bbx_sm_dogs [data-dog]:nth-child(even){ background:#b7d9e6; }

/* Remove the border around the two-column dog editor body */
#bbx_sm_dogs [data-dog] .bbx-sm-dog-body{ border: none !important; }


/* Remove borders around each Stud Dog editor block */
#bbx_sm_dogs [data-dog]{ border:none !important; box-shadow:none !important; }
#bbx_sm_dogs [data-dog] .bbx-sm-dog-body{ border:none !important; box-shadow:none !important; background:transparent !important; }
#bbx_sm_dogs [data-dog] .bbx-sm-dog-header{ border:none !important; background:transparent !important; }


/* Description preview + WP Editor modal */
.bbx-sm-desc-preview{
  padding: 10px 12px;
  border: 1px solid #ddd;
  background: #fff;
  min-height: 60px;
}
.bbx-sm-desc-actions{ margin: 6px 0 10px; }

.bbx-sm-modal{ position: fixed; inset: 0; z-index: 99999; }
.bbx-sm-modal-backdrop{ position:absolute; inset:0; background: rgba(0,0,0,.45); }
.bbx-sm-modal-dialog{ position: relative; max-width: 980px; width: calc(100% - 30px); margin: 40px auto; background:#fff; border-radius: 10px; overflow:hidden; }
.bbx-sm-modal-head{ display:flex; align-items:center; justify-content:space-between; padding: 12px 14px; border-bottom: 1px solid #eee; }
.bbx-sm-modal-body{ padding: 10px 14px; }
.bbx-sm-modal-foot{ padding: 12px 14px; border-top:1px solid #eee; display:flex; gap:10px; justify-content:flex-end; }
.bbx-sm-modal-close{ font-size: 20px; line-height: 1; padding: 0 10px; }


/* Keep modal in DOM so WP TinyMCE can initialize; hide via visibility */
.bbx-sm-modal{
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .15s ease, visibility .15s ease;
}
.bbx-sm-modal.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}


/* --- Tighter Stud Dog repeater list spacing (requested) --- */
#bbx_sm_dogs{
  margin-top: 10px;
}
.bbx-sm-dog-row{
  margin: 8px 0 !important;
}
.bbx-sm-dog-row .bbx-sm-dog-title{
  padding: 8px 10px !important;
}
.bbx-sm-dog-row.is-open .bbx-sm-dog-body{
  padding: 10px 10px 12px !important;
}
.bbx-sm-dog-row .bbx-sm-field{
  margin-bottom: 10px !important;
}
.bbx-sm-dog-row .bbx-sm-field label{
  margin-bottom: 4px !important;
}
.bbx-sm-dog-row .bbx-sm-desc-preview{
  min-height: 44px !important;
  padding: 8px 10px !important;
}
.bbx-sm-dog-row .bbx-sm-desc-actions{
  margin: 4px 0 8px !important;
}


/* --- Ultra-tight repeater spacing (as requested) --- */
.bbx-sm-rows{
  gap: 0 !important;
}

#bbx_sm_dogs{
  margin-top: 0 !important;
}

.bbx-sm-dog-row{
  margin: 0 !important;
}

.bbx-sm-dog{
  margin: 0 !important;
  padding: 0 !important;
}

.bbx-sm-dog-row .bbx-sm-dog-title{
  padding: 6px 8px !important;
}

.bbx-sm-dog-row.is-open .bbx-sm-dog-body{
  padding: 8px !important;
}

.bbx-sm-dog-row + .bbx-sm-dog-row{
  border-top: 1px solid rgba(0,0,0,0.06);
}

/* Gallery thumbs in Stud Dogs repeater */
.bbx-sm-gallery-controls{ display:flex; gap:10px; flex-wrap:wrap; margin:8px 0; }
.bbx-sm-gallery-thumbs{ display:flex; gap:8px; flex-wrap:wrap; }
.bbx-sm-gthumb{ position:relative; width:56px; height:56px; border-radius:8px; overflow:hidden; border:1px solid rgba(0,0,0,.12); background:#fff; display:inline-flex; align-items:center; justify-content:center; }
.bbx-sm-gthumb img{ width:100%; height:100%; object-fit:cover; display:block; }
.bbx-sm-gthumb .dashicons-no-alt{ position:absolute; top:2px; right:2px; background:rgba(255,255,255,.85); border-radius:50%; font-size:16px; width:18px; height:18px; line-height:18px; text-align:center; cursor:pointer; }
.bbx-sm-gthumb-ph{ font-size:11px; color:#666; padding:4px; text-align:center; }
