div.pl-order-blocks-right {
  /* This style applies to the DIV that holds each dropzone column */
  /* This particular style renders the dropzones in a single row horizontally */
  width: calc(50% - 16px);
  margin: 8px;
  padding: 0px;
}

div.pl-order-blocks-bottom {
  /* This style applies to the DIV that holds each dropzone column */
  /* This particular style renders the dropzones in a single column vertically */
  width: calc(100% - 16px);
  margin: 8px;
  min-height: 8rem;
  padding: 0px;
}

li.pl-order-blocks-code {
  list-style-type: none;
  padding: 0px !important;
  /* The following color is hardcoded to match the default background of pl-code blocks.
     If pl-code changes its default background color, this will need to be updated to stay
     in sync. */
  background-color: #f0f0f0;
}

.pl-order-blocks-code .pl-code > div {
  margin-bottom: 0px !important;
  border: none !important;
}

li.pl-order-blocks-code .pl-order-block-handle {
  flex: 0 0 16px;
  width: 16px;
  margin-left: 2px;
  padding-left: 4px;
}

.pl-order-blocks-code .pl-code,
.pl-order-blocks-code .pl-code div {
  /* override margins on code block to ensure code is centered properly */
  margin-bottom: 0px !important;
}

.pl-order-blocks-code .pl-code td.code pre {
  /* spacing for the code content within the code block */
  padding-left: 0.25rem;
}

ul.pl-order-blocks-connected-sortable .pl-order-block:hover:not(.nodrag) {
  cursor: grab; /* For UX: The answer tiles shows a 'grab' cursor on mouse over */
  outline: 2px solid blue;
  outline-offset: -2px;
}

/* Scrollable content is excluded from the sortable's drag region (see the
   `cancel` selector in pl-order-blocks.js), so don't show a 'grab' cursor over it. */
ul.pl-order-blocks-connected-sortable
  .pl-order-block:not(.nodrag)
  .pl-order-block-content.is-scrollable {
  cursor: default;
}

ul.pl-order-blocks-connected-sortable li.nodrag {
  opacity: 0.6;
}

ul.pl-order-blocks-connected-sortable li.nodrag:hover {
  cursor: not-allowed;
}

li.ui-state-highlight {
  /* This styling applies to the placeholder answer tile created by jquery-ui when the user is dragging */
  border: none !important;
  list-style-type: none;
  background-color: #90a4ae !important;
  min-width: 3em !important;
  margin-bottom: 5px;
}

.pl-order-blocks-container > ul {
  padding: 14px;
  height: 100%;
  margin-bottom: 0px;
}

.pl-order-blocks-container .pl-order-block,
.pl-order-blocks-pairing-indicator .pl-order-block {
  margin-bottom: 5px;
  border: 1px solid grey !important;
  border-radius: 5px !important;
  line-height: 1.2em;
  color: black;
}

.pl-order-blocks-answer-container .pl-order-block {
  border: 1px solid grey !important;
  border-radius: 5px !important;
  line-height: 1.2em;
}

.pl-order-blocks-answer-container > .list-group > .pl-order-block {
  margin-bottom: 5px;
}

.pl-order-blocks-horizontal > ul {
  letter-spacing: -1em !important; /* a hacky way to remove the space between inline-block elements */
}

.pl-order-blocks-horizontal > .list-group,
.pl-order-blocks-horizontal > ul > li {
  letter-spacing: normal;
  display: inline-block;
  vertical-align: middle;
}

.pl-order-blocks-scroll > .list-group {
  overflow-x: scroll;
  white-space: nowrap;
}

.pl-order-blocks-scroll > ul > li {
  white-space: nowrap;
}

.pl-order-blocks-horizontal .pl-order-block-content {
  white-space: nowrap;
  width: auto;
}

.pl-order-blocks-answer-container > ul {
  padding: 14px;
}

div.pl-order-blocks-answer-container {
  display: flex;
  flex-direction: column;
  border: 1px solid #9e9e9e;
  border-radius: 4px;
  margin-bottom: 5px;
}

div.pl-order-blocks-container {
  box-shadow: 2px #888888;
  border-radius: 4px;
  background-color: #eeeeee;
  border: 1px solid #9e9e9e;
  display: flex;
  flex-direction: column;
}

div.pl-order-blocks-header {
  display: flex;
  align-items: center;
}

.pl-order-blocks-container.is-invalid {
  padding-right: 0;
}

.pl-order-blocks-feedback-icon {
  margin-right: 10px;
}

.pl-order-blocks-correctness-badge-container {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.pl-order-blocks-correctness-badge {
  margin: 4px;
  width: 19px;
  height: 19px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pl-order-blocks-pairing-indicator {
  border-radius: 10px;
  border: 0px !important;
  list-style: none;
  margin-left: -6px;
  margin-right: -6px;
  padding: 6px;
  margin-top: 5px;
  margin-bottom: 5px;
  overflow: visible;
}

.pl-order-blocks-pairing-indicator li:last-child {
  margin-bottom: 0px !important;
}

[aria-selected='true']:not(.ui-sortable-placeholder) {
  outline: 2px solid orangered;
  outline-offset: -2px;
}

.pl-order-block-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
}

.pl-order-block-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 0;
  color: var(--bs-secondary);
  touch-action: none;
}

li.pl-order-block:not(.pl-order-blocks-code) .pl-order-block-handle {
  margin-left: -10px;
}

.pl-order-block-content {
  overflow-x: auto;
  overflow-y: hidden;
  white-space: normal;
  min-width: 0;
  width: 100%;
  touch-action: pan-x;
  /* Text selection is impossible in fully-draggable blocks,
  so we disable selection in scrollable blocks for consistency. */
  user-select: none;
  -webkit-user-select: none;
}
