/* Deprecated Function Styling for TypeDoc/sphinx-js output */

/* TypeDoc generates .tsd-is-deprecated class for deprecated items */
.tsd-is-deprecated,
.deprecated,
[data-deprecated],
.tsd-signature.deprecated {
  position: relative;
}

/* Strikethrough the function name */
.tsd-is-deprecated .tsd-kind-icon + span,
.tsd-is-deprecated > .tsd-signature,
.deprecated .sig-name,
dt.deprecated .sig-name {
  text-decoration: line-through;
  opacity: 0.7;
}

/* Deprecated badge styling */
.tsd-is-deprecated::before,
.deprecated::before {
  content: "DEPRECATED";
  display: inline-block;
  background-color: #f5f5f5;
  color: #c62828;
  font-size: 0.7em;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 3px;
  margin-right: 8px;
  vertical-align: middle;
  border: 1px solid #e0e0e0;
}

/* Style the deprecation warning/note - targets Sphinx {deprecated} directive output */
.deprecated-note,
.admonition.deprecated,
.deprecation-notice,
div.deprecated,
dd > p:first-child > em:first-child {
  background-color: transparent;
  border-left: 4px solid #ff0000;
  padding: 0.5em 1em;
  margin: 0.5em 0;
  border-radius: 0 4px 4px 0;
}

/* Style the version text in Sphinx deprecated directive */
div.deprecated .versionmodified.deprecated {
  font-weight: 600;
  color: #cc0000;
}

/* sphinx-js specific: function entries with @deprecated */
dl.js.function.deprecated dt,
dl.js.method.deprecated dt {
  background-color: #fff5f5;
  border-left: 3px solid #dc3545;
  padding-left: 8px;
}

dl.js.function.deprecated dt .sig-name,
dl.js.method.deprecated dt .sig-name {
  text-decoration: line-through;
  color: #888;
}

/* Add deprecated label to sphinx autodoc entries */
dl.js.function.deprecated dt::after,
dl.js.method.deprecated dt::after {
  content: " (deprecated)";
  font-size: 0.8em;
  color: #dc3545;
  font-style: italic;
}

/* Fade deprecated entries slightly */
dl.js.function.deprecated,
dl.js.method.deprecated {
  opacity: 0.85;
}

dl.js.function.deprecated:hover,
dl.js.method.deprecated:hover {
  opacity: 1;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .tsd-is-deprecated::before,
  .deprecated::before {
    background-color: #2d2d2d;
    color: #ef5350;
    border-color: #424242;
  }

  .deprecated-note,
  .admonition.deprecated,
  div.deprecated {
    background-color: transparent;
    border-left-color: #ff0000;
  }

  dl.js.function.deprecated dt,
  dl.js.method.deprecated dt {
    background-color: #3d2020;
    border-left-color: #ff6b6b;
  }
}

/* Sphinx Book Theme specific overrides */
.bd-article-container .deprecated dt {
  border-left: 3px solid #dc3545;
  padding-left: 10px;
  margin-left: -10px;
}

/* TOC entries for deprecated items */
.toc-entry.deprecated,
nav.bd-links li.deprecated a {
  text-decoration: line-through;
  opacity: 0.7;
}
