/* Copyright (c) 2024, the Dart project authors.  Please see the AUTHORS file
   for details. All rights reserved. Use of this source code is governed by a
   BSD-style license that can be found in the LICENSE file. */

.markdown-alert {
  border-left: 0.25em solid var(--pub-inset-bgColor);
  padding: 0.5rem 1rem;
  margin: 1rem 0;

  >:last-child {
    margin-bottom: 0;
  }

  &.markdown-alert-note {
    border-left-color: var(--pub-markdown-alert-note);

    .markdown-alert-title {
      color: var(--pub-markdown-alert-note);
    }

    // NOTE: This is a copy of the dartdoc alert style, for using Material Symbols font.
    // TODO: remove or fix this rule
    // .markdown-alert-title:before {
    //   content: 'info';
    // }
  }

  &.markdown-alert-tip {
    border-left-color: var(--pub-markdown-alert-tip);

    .markdown-alert-title {
      color: var(--pub-markdown-alert-tip);
    }

    // NOTE: This is a copy of the dartdoc alert style, for using Material Symbols font.
    // TODO: remove or fix this rule
    // .markdown-alert-title:before {
    //   content: 'lightbulb';
    // }
  }

  &.markdown-alert-important {
    border-left-color: var(--pub-markdown-alert-important);

    .markdown-alert-title {
      color: var(--pub-markdown-alert-important);
    }

    // NOTE: This is a copy of the dartdoc alert style, for using Material Symbols font.
    // TODO: remove or fix this rule
    // .markdown-alert-title:before {
    //   content: 'feedback';
    // }
  }

  &.markdown-alert-warning {
    border-left-color: var(--pub-markdown-alert-warning);

    .markdown-alert-title {
      color: var(--pub-markdown-alert-warning);
    }

    // NOTE: This is a copy of the dartdoc alert style, for using Material Symbols font.
    // TODO: remove or fix this rule
    // .markdown-alert-title:before {
    //   content: 'warning';
    // }
  }

  &.markdown-alert-caution {
    border-left-color: var(--pub-markdown-alert-caution);

    .markdown-alert-title {
      color: var(--pub-markdown-alert-caution);
    }

    // NOTE: This is a copy of the dartdoc alert style, for using Material Symbols font.
    // TODO: remove or fix this rule
    // .markdown-alert-title:before {
    //   content: 'report';
    // }
  }
}

.markdown-alert-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;

  font-weight: bold;
  -webkit-font-smoothing: antialiased;

  // NOTE: This is a copy of the dartdoc alert style, for using Material Symbols font.
  // TODO: remove or fix this rule
  // &:before {
  //   font: 24px / 1 'Material Symbols Outlined';
  // }
}
