@keyframes h5p-essay-input-field-message-save-opacity {
  from {opacity: 0;}
  to {opacity: 1;}
}

.h5p-essay .h5p-essay-title {
  width: auto;
  overflow-y: auto;
}

.h5p-essay .h5p-essay-solution-container {
  background: var(--h5p-theme-ui-base, #FAFAFA);
  margin: var(--h5p-theme-spacing-m, 0 1em 0.5em 1em);
}

.h5p-essay:not(.h5p-theme) .h5p-essay-solution-container {
  padding: 1em;
}

.h5p-essay .h5p-essay-solution-title {
  font-size: var(--h5p-theme-font-size-xl, 1.125em);
  margin-bottom: var(--h5p-theme-spacing-m, 0.5em);
}

.h5p-essay.h5p-theme .h5p-essay-solution-title {
  color: var(--h5p-theme-text-primary);
  font-weight: 600;
}

.h5p-essay .h5p-essay-solution-introduction {
  font-size: var(--h5p-theme-font-size-m-small, 1em);
  margin-bottom: var(--h5p-theme-spacing-s, 1em);
}

.h5p-essay.h5p-essay:not(.h5p-theme) .h5p-essay-solution-introduction {
  line-height: 1.2;
}


.h5p-essay .h5p-essay-solution-sample {
  background: var(--h5p-theme-ui-base, #FFFFFF);
  overflow: auto;
  overflow-x: hidden;
  list-style: none;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.h5p-essay.h5p-theme .h5p-essay-solution-sample {
  border: 2px solid var(--h5p-theme-alternative-darker);
  border-radius: var(--h5p-theme-border-radius-medium);
}

.h5p-essay:not(.h5p-theme) .h5p-essay-solution-sample {
  border: 1px solid #e0e0e0;
  margin: 0;
  padding: 0;
}


.h5p-essay.h5p-theme .h5p-essay-solution-sample-text {
  padding: calc(var(--h5p-theme-spacing-xs) / 2) var(--h5p-theme-spacing-xs);
  margin: 0;
  line-height: 1.5;
}

.h5p-essay:not(.h5p-theme) .h5p-essay-solution-sample-text {
  padding: 0.5em 1em 0.5em 1em;
  margin: 0;
  line-height: 1.4;
}

.h5p-essay.h5p-theme .h5p-essay-input-field-textfield {
  background-color: var(--h5p-theme-ui-base);
  border: 2px solid var(--h5p-theme-alternative-darker);
  border-radius: var(--h5p-theme-border-radius-medium);
  color: var(--h5p-theme-text-primary);
  padding: calc(var(--h5p-theme-spacing-xs) / 2) var(--h5p-theme-spacing-xs);
  width: 100%;
  box-sizing: border-box;
  resize: none;
  min-height: calc(var(--h5p-theme-font-size-m) * 3);
  font-size: var(--h5p-theme-font-size-m);
  font-family: var(--h5p-theme-font-family);
  line-height: 1.5;
}

.h5p-essay:not(.h5p-theme) .h5p-essay-input-field-textfield {
  padding: 0.25em 0.4em;
  width: 100%;
  box-sizing: border-box;
  resize: none;
  border: 1px solid #C7C7C7;
  border-top: 2px solid #C7C7C7;
  font-size: 16px;
  font-family: Arial, sans-serif;
  line-height: 1.5;
}

.h5p-essay.h5p-theme .h5p-essay-input-field-textfield:focus {
  box-shadow: 0 0 0.5em 0 var(--h5p-theme-main-cta-base);
  border-color: var(--h5p-theme-main-cta-base);
  outline: 1px ridge var(--h5p-theme-main-cta-base);
}

.h5p-essay.h5p-essay:not(.h5p-theme) .h5p-essay-input-field-textfield:focus {
  background-color: #fff;
}

/* Reduce bottom and top margin of children */
.h5p-essay:not(.h5p-theme) .h5p-essay-input-field-label > * {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}

.h5p-essay.h5p-theme .h5p-essay-input-field-textfield:disabled {
  background-color: var(--h5p-theme-alternative-light);
}

.h5p-essay.h5p-theme .h5p-essay-input-field-message-wrapper {
  background-color: var(--h5p-theme-alternative-light);
  border: solid 1px var(--h5p-theme-alternative-base);
  color: var(--h5p-theme-text-secondary);
  font-weight: 500;
  padding: 0 var(--h5p-theme-spacing-s);
}

.h5p-essay .h5p-essay-input-field-message-wrapper {
  overflow: auto;
}

.h5p-essay .h5p-essay-input-field-message-char {
  font-size: var(--h5p-theme-font-size-s-small, 0.8em);
  float: left;
}

.h5p-essay .h5p-essay-input-field-message-char:focus-visible {
  outline: 2px ridge var(--h5p-theme-contrast-cta-white);
  outline-offset: -1px;
}

.h5p-essay .h5p-essay-input-field-message-char-important {
  font-weight: bold;
}

.h5p-essay .h5p-essay-input-field-message-save {
  color: var(--h5p-theme-text-primary);
  font-size: var(--h5p-theme-font-size-s-small, 0.8em);
  float: right;
}

.h5p-essay .h5p-essay-input-field-message-save-animation {
  animation-name: h5p-essay-input-field-message-save-opacity;
  animation-duration: 1s;
}

.h5p-essay .h5p-essay-feedback-empty {
  color: var(--h5p-theme-feedback-neutral-main, #999999);
}

.h5p-essay.h5p-theme .h5p-question-explanation-container {
  margin-bottom: var(--h5p-theme-spacing-m);
  margin-inline: var(--h5p-theme-spacing-m);
}

.h5p-essay.h5p-essay:not(.h5p-theme) .h5p-question-explanation-container {
  margin: 0 1em;
}

.h5p-essay.h5p-theme .h5p-question-evaluation-container {
  margin-inline: var(--h5p-theme-spacing-m);
}

/* Custom styles to remove border if no toolbar is set. (VA-893)*/
.h5p-no-frame > .h5p-essay.h5p-theme .h5p-essay-solution-container {
  margin-inline: 0;
}

.h5p-no-frame > .h5p-essay.h5p-theme .h5p-question-explanation-container {
  margin-inline: 0;
}

.h5p-no-frame > .h5p-essay.h5p-theme .h5p-question-evaluation-container {
  margin-inline-end: 0;
}
