/*
inspired by to https://thisbailiwick.com/add-a-resize-handle-for-wordpress-post-and-page-edit-sidebar/
thanks!
*/

.edit-post-layout .interface-interface-skeleton__sidebar {
  border-right: 1px solid #e0e0e0;
  display: flex !important;
  resize: horizontal;
  will-change: transform;
}

.edit-post-layout .interface-complementary-area.edit-post-sidebar {
  border-right: 1px solid #e0e0e0;
  overflow: auto; 
  width: 100%;
  will-change: transform;
}

.edit-post-layout .interface-complementary-area.edit-post-sidebar:before {
  content: 'Resize Sidebar';
  background: rgb(224 0 0);
  color: rgb(255 255 255);
  height: 20px;
  width: 100px;
  padding-left: 20px;
  position: absolute;
  z-index: 2;
  bottom: 0;
  right: 0;
}

@media (min-width: 782px) {
  .edit-post-layout .interface-interface-skeleton__sidebar {
    border-right: 1px solid #e0e0e0;
    max-width: 60%;
    min-width: 20%;
    width: 40%;
    transform: rotate(180deg);
  }

  .edit-post-layout .interface-complementary-area.edit-post-sidebar {
    border-left: 1px solid #e0e0e0;
    transform: rotate(180deg);
    padding-top: 20px;
  }

  .edit-post-layout .interface-complementary-area.edit-post-sidebar:before {
    bottom: unset;
    left: 0;
    right: unset;
    top: 0;
  }
}

.edit-post-layout:not(.is-sidebar-opened) .interface-interface-skeleton__sidebar {
  width: unset !important;
}