/*
 * FormStatus component
 *
 */

@import '../../../style/core/utilities.scss';

.dnb-form-status {
  --form-status-radius: 0.25rem;

  display: flex;

  opacity: 1;

  &__shell {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;

    min-width: inherit;

    border-radius: var(--form-status-radius);
  }

  &__text {
    max-width: var(--prose-max-width); // to enhance readability

    padding: 0.625rem 1rem;

    cursor: text;

    button & {
      cursor: inherit;
    }
    color: inherit;
    line-height: var(--line-height-small);
    font-size: var(--font-size-small);

    .dnb-ul,
    .dnb-anchor {
      font-size: inherit;
    }
    .dnb-ul:not([class*='dnb-space__left']) {
      padding-left: 1rem;
    }
    .dnb-spacing & .dnb-ul:not([class*='dnb-space__bottom']) {
      .dnb-li {
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
      }
      margin-bottom: 0.5rem;
    }

    white-space: normal;
  }

  .dnb-icon + &__text {
    padding-left: 0.5rem;
  }

  &__shell > .dnb-icon {
    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0.3333333em 0.3333333em 0.3333333em 0.6666666em;
  }

  // Large
  &__size--large &__text {
    padding-top: 1.125rem;
    padding-bottom: 1.125rem;
  }

  &__size--large &__shell > .dnb-icon {
    margin-top: 0.6666666em;
    margin-bottom: 0.6666666em;
  }

  // This would be a "real" large sizing
  // &__size--large &__text {
  //   padding: 1rem 1.5rem;
  // }
  // &__size--large .dnb-icon + &__text {
  //   padding-left: 1rem;
  // }
  // &__size--large &__shell > .dnb-icon {
  //   margin: 0.6666666em 0.3333333em 0.6666666em 0.9999999em;
  // }

  // Stretch support
  &--stretch {
    flex-grow: 1;
  }

  &--stretch &__shell {
    width: 100%;
  }

  &[hidden] {
    display: none;
  }
}
