// Drupal messages (error, warning, success)

.messages {
  background-image: none;
  border-width: 2px;
  box-shadow: none;
  padding: 1rem 3rem;
  position: relative;
  color: $color-text;
  margin-bottom: (2*$grid-gutter);

  &:before {
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    font-size: 1.1rem;
    position: absolute;
    left: .8rem;
    padding-bottom: .5rem;
  }

  a,
  a:hover {
    color: inherit;
    display: inline;
    font-weight: bold;
    text-decoration: underline;
    &:hover {
      background: transparent;
      border-bottom: 2px solid currentColor;
    }
  }

  &.messages--error {
    background-color: $color-bg-danger;
    border-color: $color-danger;
    //color: $color-danger;
    &:before {
      // @see https://fontawesome.com/v5/icons/times-circle
      content: "\f057";
      color: $color-danger;
    }
  }

  &.messages--status {
    background-color: $color-bg-success;
    border-color: $color-success;
    //color: $color-success;

    &:before {
      // @see https://fontawesome.com/v5/icons/check-circle
      content: "\f058";
      color: $color-success;
    }
  }

  &.messages--warning {
    //color: $color-warning;
    border-color: $color-warning;
    background-color: $color-bg-warning;
    &:before {
      // @see https://fontawesome.com/icons/triangle-exclamation
      content: "\f071";
      color: $color-warning;
    }
  }

  &.messages--info {
    //color: $color-info;
    border-color: $color-info;
    background-color: $color-bg-info;
    &:before {
      // @see https://fontawesome.com/icons/circle-info
      content: "\f05a";
    }
  }
}

// Unpublished nodes highlighting

.node--unpublished {
  background-color: transparent;
}
//.node--unpublished .node--unpublished {
//  border: 0 none;
//}

.node--unpublished:before,
.node--workflow-pending:before {
  content: "Unpublished";
  font-weight: bold;
  display: block;
  width: auto;
  padding: 1.25rem 2.5rem;
  color: var(--color-danger);
  background-color: var(--color-bg-danger-light);
}

.node--workflow-pending:before {
  content: "Review pending";
  color: var(--color-warning);
  background-color: var(--color-bg-warning);
}

.node--unpublished .node--unpublished:before {
  display: none;
}

html[lang="de"] .node--unpublished:before {
  content: "Unveröffentlicht";
}
html[lang="de"] .node--workflow-pending:before {
  content: "Freigabe ausstehend";
}

.profile-teaser.node--unpublished:before,
.profile-teaser.node--workflow-pending:before {
  font-size: var(--font-size-s);
  padding: 0.5*$grid-gutter $grid-gutter;
}

.profile-teaser.view-mode-embedded-teaser.node--unpublished:before,
.profile-teaser.view-mode-embedded-teaser.node--workflow-pending:before {
  position: absolute;
  z-index: +1;
  width: 100%;
  top: 2rem;
  opacity: .8;
}

.node--unpublished.view-mode-compact {
  margin-top: 3rem;
}
.node--unpublished.view-mode-compact:before {
  font-size: var(--font-size-s);
  position: absolute;
  top: -1.5em;
  left: auto;
  z-index: +1;
  padding: 0 .25rem;
}
