
/* ---- Side preview for product image ---- */
.dropzone.__dz-with-side-preview__,
[data-role='dropzone'].__dz-with-side-preview__,
.image-dropzone.__dz-with-side-preview__{
  display: flex;
  gap: 12px;
  align-items: flex-start;
  min-height: 180px;
}

.__dz-side{
  flex: 0 0 220px;
  width: 220px;
  max-width: 35%;
  position: sticky;
  top: 12px;
}

.__dz-side img.__auto-preview__{
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.06), 0 6px 24px rgba(0,0,0,.35);
}

.__dz-side .__img-caption{ 
  font-size: 12px; opacity: .7; margin-top: 6px; text-align: center;
}

[role="dialog"], .modal, .modal-content{
  max-height: 95vh;
  overflow: auto;
}

@media (max-width: 900px){
  .dropzone.__dz-with-side-preview__,
  [data-role='dropzone'].__dz-with-side-preview__,
  .image-dropzone.__dz-with-side-preview__{
    flex-direction: column;
  }
  .__dz-side{
    position: static;
    width: 100%;
    max-width: 100%;
  }
}


/* ==== Compact dropzone for categories: hide empty box, controls at bottom ==== */
.__dz-with-side-preview__.__hide-box{
  border: none !important;
  background: transparent !important;
  padding: 0 !important;
  min-height: 0 !important;
}
.__dz-with-side-preview__.__hide-box > *:not(.__dz-side):not(.__dz-controls){
  display: none !important; /* прячем всё, кроме превью и панели кнопок */
}

/* Панель кнопок снизу */
.__dz-controls{
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  align-items: center;
  margin-top: 10px;
}
.__dz-controls .btn, .__dz-controls button, .__dz-controls .button{
  /* пусть наследует стили ваших кнопок; добавим мелкие улучшения */
  border-radius: 10px;
}

/* Чуть поджать превью */
.__dz-side{
  flex: 0 0 220px;
  width: 220px;
}


/* ===== Centered layout for Categories modal ===== */
.__dz-with-side-preview__.__dz-center{
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.__dz-with-side-preview__.__dz-center .__dz-side{
  flex: 0 0 auto;
  width: auto;
  max-width: 320px;     /* предел ширины превью */
}
.__dz-with-side-preview__.__dz-center .__dz-controls{
  width: 100%;
  justify-content: center;   /* кнопки под превью по центру */
  margin-top: 12px;
}
