/* 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. */

// Include third-party CSS into a single output file
// to reduce the number of HTTP requests.

// Note: this is not part of dartdoc
@use '../../../third_party/css/github-markdown.css';

// TODO: Consider using same github.css we use on pub.dev
@use '../../../third_party/dartdoc/resources/github.css';
@use '../../../third_party/dartdoc/resources/styles.css';

@use 'src/_staging_ribbon.scss';

// Included after dartdoc/resources in order to make sure we will be able to migrate to it.
@use 'src/base_dash';

// This is meant for a temporary override for highlight.js. We need to
// figure out a better way to customize the syntax highlights for dark
// mode, both in dartdoc and on pub.dev pages.
// TODO(https://github.com/dart-lang/pub-dev/issues/7868)
.dark-theme .markdown-body pre {
  /* TODO(https://github.com/dart-lang/pub-dev/issues/7101): Investigate if this should be fixed in dartdoc's styles.css: the dark theme is not applied there. */
  background-color: inherit;
}

.dark-theme .hljs .hljs-deletion,
.dark-theme .hljs .hljs-addition {
  /* TODO(https://github.com/dart-lang/pub-dev/issues/7101): Investigate if this should be fixed in dartdoc's styles.css: the dark theme is not applied there. */
  color: black;
}

/* Note: light-theme was added to prevent non-visible table text in dartdoc's dark mode. */
.light-theme .markdown-body table tr {
  background-color: var(--pub-neutral-bgColor);
  border-top: 1px solid #c6cbd1;
}

/* Note: light-theme was added to prevent non-visible table text in dartdoc's dark mode. */
.light-theme .markdown-body table tr:nth-child(2n) {
  background-color: #f6f8fa;
}

/* Note: light-theme was added to prevent non-visible table text in dartdoc's dark mode. */
.light-theme .markdown-body .highlight pre,
.light-theme .markdown-body pre {
  background-color: #f6f8fa;
}

/* Note: override for the image path, as the dartdoc.css is served from /static/hash-<hash>/css/ */
.tt-wrapper .typeahead {
  background-image: url('../dartdoc/resources/search.svg');
}
