.h5peditor-dragquestion {
  --h5p-theme-font-size-m: 1em;
}

.h5peditor-dragquestion-wrapper {
  position: relative;
}

.dragQuestion {
  position: relative;
}

.h5p-dragquestion-editor .field-name-question > .h5p-editor-flex-wrapper {
  display: none;
}

.dragQuestion .h5peditor-dragnbar {
  font-size: 1em;
  background: #f5f5f5;
  border: 1px solid #ccc;
  border-bottom: none;
}

.dragQuestion .h5p-dragnbar-ul {
  float: none;
  padding: 0;
  margin: 0;
  list-style: none;
}

.dragQuestion .h5p-dragnbar-ul:after {
  visibility: hidden;
  display: block;
  content: '';
  clear: both;
}

.dragQuestion .h5p-dragnbar-li {
  float: left;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  position: relative;
}

.dragQuestion .h5p-dragnbar-li:last-child {
  float: right;
}

/* Paste button overrides */
.dragQuestion
  .h5peditor-dragnbar
  .h5p-dragnbar-ul
  .h5p-dragnbar-li
  .h5p-dragnbar-a.h5p-dragnbar-paste-button {
  padding: 0.2em 0.95em 0.2em 0.55em;
  border-radius: 0.25em;
  border-width: 1px;
}

.dragQuestion .h5p-dragnbar-a.h5p-dragnbar-paste-button:before {
  font-size: 1.5em;
}

.dragQuestion .h5p-dragnbar-li.disabled {
  opacity: 0.3;
  cursor: auto;
}

.h5p-dragquestion-editor
  .h5peditor-dragnbar
  .h5p-dragnbar-li
  .h5p-dragnbar-tooltip {
  font-size: 0.9em;
}

.dragQuestion .h5p-dragnbar-li:hover {
  background: none;
}

.dragQuestion .h5p-dragnbar-li:before {
  top: 44px;
  font-size: 0.88em;
}

.dragQuestion .h5p-dragnbar-a {
  width: 1em;
  line-height: 1.5em;
  text-align: center;
  background: linear-gradient(to bottom, #fff 0, #f2f2f2 100%);
  border: 1px solid #ccc;
  border-radius: 0.25em;
  margin: 0.25em;
  display: block;
  padding: 0.25em 0.75em;
  color: #333;
  height: 1.5em;
}

.dragQuestion .h5p-dragnbar-a:hover {
  text-decoration: none;
  border-color: #999;
}

.dragQuestion .h5p-dragnbar-a:link,
.dragQuestion .h5p-dragnbar-a:visited {
  color: #555;
}
.dragQuestion .h5p-dragnbar-a:before {
  font-family: 'H5PFontAwesome4';
  content: '?';
}
.dragQuestion .h5p-dragnbar-a:hover {
  text-decoration: none;
}
.dragQuestion .h5p-dragnbar-advancedtext-button:before {
  font-size: 1.125em;
  font-weight: bold;
  content: 'T';
}
.dragQuestion .h5p-dragnbar-image-button:before {
  content: '\f03e';
}
.dragQuestion .h5p-dragnbar-dropzone-button:before {
  content: '\f140';
}

.h5peditor-dragquestion {
  padding: 0.5em 1em;
}
.h5peditor-dragquestion:focus {
  outline: none;
}
.h5peditor-dragquestion.h5p-ready {
  padding: 0;
  background-size: 100% 100%;
  background-color: #ffffff;
  position: relative;
  border: 1px solid #ccc;
  border-radius: 0;
  overflow: hidden;
}

.h5peditor-dragquestion .h5p-dragnbar-element.focused {
  outline-offset: -2px;
}

.h5peditor-dragquestion .h5p-dragnbar-element:not(.focused):focus {
  outline: none;
}

.h5p-dq-element {
  --padding: 0.3em;
  position: absolute;
  line-height: 1.25em;
  z-index: 1;
  cursor: pointer;
  padding: var(--padding);
  border: solid 2px transparent;
  &:not(:has(.h5p-draggable)):has(.h5p-image) {
    padding: 0;
    border: 0;
  }
}

.h5p-dq-element {
  position: absolute;
}
.h5p-dragnbar-element.focused > .h5p-dragnresize-handle {
  z-index: 5;
}

.h5p-dq-element.h5p-draggable .h5p-dq-element-inner {
  padding: 0;
  overflow: hidden;
  width: 100%;
}

.h5p-dq-element .h5p-image,
.h5p-dq-element .ui-draggable,
.h5p-dq-element .h5p-draggable {
  width: 100%;
  height: 100%;
}

.h5p-dq-element .h5p-draggable span {
  padding: var(--h5p-theme-spacing-xxs) 0;
}

.h5p-draggable > ul {
  text-align: left;
  margin: 0.5em 0.5em 0.5em 2.25em;
  padding: 0;
}

.h5p-draggable > ul > li {
  background: transparent;
  list-style: disc outside none;
  padding: 0;
  margin: 0;
}

.h5p-dq-element p {
  margin: 0;
  padding: 0;
}
.h5p-dq-element span {
  line-height: 1em;
}
.h5p-dq-dz {
  cursor: pointer;
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.5em;
  z-index: 2;
  box-sizing: border-box;
}
.h5p-dq-dz:before {
  content: ' ';
  display: block;
  position: absolute;
  border: 2px dashed var(--h5p-theme-contrast-cta-white);
  border-radius: var(--h5p-theme-border-radius-medium);
  width: 100%;
  height: 100%;
  top: -2px;
  left: -2px;
}

.h5p-dq-dz.h5p-has-label {
  border-radius: 0 0 0.5em 0.5em;
}
.h5p-dq-dz .joubel-tip-container {
  position: absolute;
  right: 0.5em;
  bottom: 0;
  font-size: 0.8em;
}

.h5peditor-dragquestion .h5p-moving {
  opacity: 0.75;
}

.h5p-dq-label {
  position: absolute;
  bottom: 100%;
  font-size: 0.75em;
}

.h5peditor-fluid-dialog {
  display: none;
  background: #fff;
  border: 1px solid #ccc;
  -webkit-box-shadow: 0 0 4px #a7a7a7;
  -moz-box-shadow: 0 0 4px #a7a7a7;
  box-shadow: 0 0 4px #a7a7a7;
}
.h5peditor-fd-inner {
  padding: 0.5em;
}
.h5peditor-fd-buttons {
  overflow: hidden;
  border-top: 1px solid #ccc;
  background: #f5f5f5;
}
a.h5peditor-fd-button {
  font-size: 0.75em;
  float: right;
  padding: 0.625em 2em;
  margin: 0.5em;
  border-radius: 0.25em;
  border: 1px solid #ccc;
  color: #fff;
  background: #3673b5;
  background: -webkit-linear-gradient(top, #5a94d3 0, #3673b5 100%);
  background: -moz-linear-gradient(top, #5a94d3 0, #3673b5 100%);
  background: -ms-linear-gradient(top, #5a94d3 0, #3673b5 100%);
  background: -o-linear-gradient(top, #5a94d3 0, #3673b5 100%);
  border-color: #20588f;
}
a.h5peditor-fd-button:hover {
  background: #3275bc;
  background: -webkit-linear-gradient(top, #3275bc 0, #285585 100%);
  background: -moz-linear-gradient(top, #3275bc 0, #285585 100%);
  background: -ms-linear-gradient(top, #3275bc 0, #285585 100%);
  background: -o-linear-gradient(top, #3275bc 0, #285585 100%);
}
a.h5peditor-fd-button.h5peditor-remove {
  background: none;
  border: none;
  color: #a00;
  padding-right: 0;
}
a.h5peditor-fd-button.h5peditor-remove:hover {
  color: #e40000;
}
.h5p-dq-dz-label {
  background: none repeat scroll 0 0 var(--h5p-theme-alternative-dark);
  margin-bottom: 0.1em;
  line-height: 1.25em;
  padding-left: 0.5em;
  padding-right: 0.5em;
  position: absolute;
  bottom: 100%;
  left: -0.1em;
  right: -0.1em;
  white-space: nowrap;
  border-radius: 0.5em 0.5em 0 0;
}

.h5p-dq-dz-label > div {
  text-overflow: ellipsis;
  overflow: hidden;
}

.h5peditor-dynamiccheckboxes-select,
.h5peditor-dynamiccheckboxes-select > li {
  margin: 0;
  padding: 0;
  list-style: none;
  background: transparent;
}
.h5peditor-dynamiccheckboxes-select > li {
  margin: 0.1em 1em;
}
.h5peditor-dynamiccheckboxes-select > li > .h5p-editor-label {
  font-weight: normal;
}
.h5peditor-dynamiccheckboxes-select > li > .h5p-editor-label > input,
.h5peditor-dynamiccheckboxes-select .h5p-label-text {
  vertical-align: middle;
  display: inline-block;
  padding-left: 0.2em;
}
.field.dynamicCheckboxes .h5p-selectall {
  margin-left: 1em;
  font-size: 1em;
  color: #105ace;
  padding-left: 1.3em;
  position: relative;
}
.field.dynamicCheckboxes .h5p-selectall:before {
  font-family: 'H5PFontAwesome4';
  content: '\f096';
  margin-right: 0.5em;
  position: absolute;
  display: inline-block;
  left: 0;
  top: 0.2em;
}
.field.dynamicCheckboxes .h5p-deselectall:before {
  content: '\f046';
}

.h5p-dragquestion-editor .h5peditor-panes > .field.dragQuestion {
  background-color: #fff;
  padding: 20px;
}

.h5p-dragquestion-editor .h5peditor-form {
  border-radius: 0;
  padding: 0;
  background: #fff;
}

.h5p-dragquestion-editor .field.wizard > .h5peditor-panes > .group > .content {
  border: 0;
}

.h5p-dragquestion-editor .field.wizard .h5peditor-tab-settings:before {
  content: '\e916';
}
.h5p-dragquestion-editor .field.wizard .h5peditor-tab-task:before {
  content: '\e991';
}

.h5p-dragquestion-editor .common {
  background-color: #fafbfc;
}

.field-name-backgroundOpacity .h5peditor-text {
  width: 75px;
}

.h5p-dragquestion-editor .toggle-metadata {
  top: 1.2em;
}

.h5p-dragquestion-editor .h5p-editor-dialog.h5p-metadata-wrapper {
  left: 3%;
}

.h5p-dragquestion-editor .h5p-draggable {
  --padding: 0.3em;
  line-height: 1.25em;
  padding-block: var(--padding);
  margin: calc(-1 * var(--padding) - 2px);
  position: absolute;
}

.h5p-dragquestion-editor .h5p-draggable:not(.h5p-draggable--has-handle) {
  padding-inline: var(--padding);
}

.h5p-dragquestion-editor .h5p-draggable .h5p-advanced-text {
  margin-inline: auto;
  width: 100%;
}

.h5p-dragquestion-editor .h5p-draggable .h5p-image {
  height: 100%;
  width: 100%;
}

.h5p-dragquestion-editor .h5p-draggable p,
.h5p-dragquestion-editor .h5p-draggable span {
  display: inline-block;
  align-content: center;
  width: 100%;
  margin: auto;
  color: var(--h5p-theme-text-primary);
  padding: 0;
  line-height: 1;
  font-size: var(--h5p-theme-font-size-m);
}

.h5p-dragquestion-editor:not(
    :has(.h5p-question-evaluation-container.evaluation-mode)
  )
  .h5p-draggable:has(.h5p-image):hover.h5p-draggable--has-handle,
.h5p-dragquestion-editor:not(
    :has(.h5p-question-evaluation-container.evaluation-mode)
  )
  .h5p-draggable:has(.h5p-image):focus.h5p-draggable--has-handle {
  padding-left: calc(
    var(--border-width) + var(--handle-width) + var(--padding)
  );
  transform: translateX(calc(-1 * var(--border-width) - var(--handle-width)));
}

.h5p-dragquestion .h5p-draggable:has(.h5p-image).h5p-draggable--has-handle {
  padding-inline: var(--padding);
}
.h5p-dragquestion-editor
  .h5p-draggable:has(.h5p-image):not(:hover):not(
    :focus
  ).h5p-draggable--has-handle::before {
  display: none;
}

.h5p-dragquestion-editor
  .h5p-draggable.h5p-draggable--has-handle:has(.h5p-image):not(
    .h5p-draggable-correct
  ):not(.h5p-draggable-wrong) {
  padding-inline: var(--padding);
}
