/* dl gets used both for defining each top-level `.. autofunc` on a page (where we want vertical margsin)
   and is wrapped around multiline signatures (where we don't).
   If a dl is being used inside a .sig, that's a multiline signature; remove its margins. */
.sig > dl {
  margin-block-start: 0rem;
  margin-block-end: 0rem;
}

/* with thanks to https://github.com/pradyunsg/furo/discussions/749 */
.sig:not(.sig-inline) {
  padding-left: 0.5em;
  text-indent: 0;
}

/* override table width restrictions */
/* thanks to https://github.com/readthedocs/sphinx_rtd_theme/issues/117#issuecomment-153083280 */
@media screen and (min-width: 767px) {

    .wy-table-responsive table td {
        /* !important prevents the common CSS stylesheets from
            overriding this as on RTD they are loaded after this stylesheet */
        white-space: normal !important;
    }

    .wy-table-responsive {
        overflow: visible !important;
    }

}

/* disable autoscroll-to-target behavior
   https://github.com/pradyunsg/furo/discussions/384#discussioncomment-2249243 */
html {
    scroll-behavior: auto;
}

/*
See https://github.com/HypothesisWorks/hypothesis/issues/4588 and
https://github.com/pradyunsg/furo/discussions/909. Once this is fixed in furo,
we can remove this.
*/

body[data-theme="dark"] .tooltip .tooltip-content {
    background-color: var(--color-background-primary);
}

body[data-theme="dark"] .tooltip .arrow {
    background: var(--color-background-primary);
}

/*
Furo also renders dark when the theme is "auto" (the default) and the OS
prefers dark, via this same media query. Cover that case too; see
https://github.com/HypothesisWorks/hypothesis/issues/4734.
*/
@media (prefers-color-scheme: dark) {
    body:not([data-theme="light"]) .tooltip .tooltip-content {
        background-color: var(--color-background-primary);
    }

    body:not([data-theme="light"]) .tooltip .arrow {
        background: var(--color-background-primary);
    }
}

a:has(> .std-term),
a:has(> .std-term):hover {
    color: inherit;
    text-decoration-color: currentColor;
    text-decoration-style: dotted;
}
