/*
 * SPDX-FileCopyrightText: 2026 Plesty Development Team
 * SPDX-FileContributor: Yunshuang Yuan
 * SPDX-License-Identifier: LGPL-3.0-or-later
 *
 * Light touch-ups for the hub-module Read-the-Docs theme (plesty-sdk#18):
 * Plesty-cyan links to match the nav header, and rounded pill badges for the
 * schema shields. Everything else is the stock RTD look.
 */

:root {
  --plesty-cyan: #0891b2;
  --plesty-cyan-dark: #0e7490;
}

/* Links in Plesty cyan. */
.rst-content a,
.wy-menu-vertical a:hover {
  color: var(--plesty-cyan);
}
.rst-content a:hover {
  color: var(--plesty-cyan-dark);
}

/* The sidebar header (hub-templates/layout.html): the mark and the module type
   on one row, the module name below it as the title. The mark and the type are
   one line tall, so they line up exactly whatever the name's length; a long
   name wraps under them instead of beside a mark it cannot line up with. Mark,
   type, name and search field share one left edge. */
.wy-side-nav-search > a.plesty-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.4em;
  max-width: 100%;
  padding: 4px 0;
  text-align: left;
}
.wy-side-nav-search > a.plesty-brand:hover {
  background: transparent;
}
.plesty-brand-row {
  display: flex;
  align-items: center;
  gap: 0.5em;
}
/* a.plesty-brand, not a: the theme's own `> a img.logo` (margin-top 0.85em) is
   as specific and loads later. */
.wy-side-nav-search > a.plesty-brand img.logo {
  flex: none;
  width: 1.5em;
  height: 1.5em;
  margin: 0;
  padding: 0;
}
/* The type as a pill in the PLESTY module-type colour:
   device violet, analyzer amber, experiment mint, core blue; plain "plesty"
   when the module declares none. */
.plesty-brand-type {
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1;
  text-transform: uppercase;
  padding: 0.35em 0.7em;
  border-radius: 999px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
}
.plesty-type-device {
  background: #8b5cf6;
}
.plesty-type-analyzer {
  background: #f59e0b;
  color: #1f2937;
}
.plesty-type-experiment {
  background: #34d399;
  color: #064e3b;
}
.plesty-type-core {
  background: #3b82f6;
}
.plesty-brand-name {
  font-size: 1.15em;
  line-height: 1.25;
}

/* The version picker styles itself from plesty-versions.css. */

/* Schema shields → soft rounded pills. */
.rst-content .sd-badge {
  border-radius: 999px;
  font-weight: 500;
  letter-spacing: 0.01em;
  padding: 0.28em 0.72em;
  vertical-align: middle;
}

/* ── Parameters: definition list entries ──────────────────────────────────── */

/* Flatten RTD's default box on the term so it does not sit under the inline
 * code pill (which was the "two overlapping boxes"). The parameter name keeps
 * a single pill — the `<code>` element — recoloured to Plesty cyan. */
.rst-content dl.simple > dt {
  background: transparent;
  border: none;
  padding: 0;
  margin-bottom: 0.35rem;
  font-weight: 600;
}
.rst-content dl.simple > dt code.literal {
  color: var(--plesty-cyan);
  background: #f3f6f9;
  border: 1px solid #e1e4e8;
  border-radius: 6px;
  padding: 0.1rem 0.5rem;
  font-weight: 600;
}
.rst-content dl.simple > dd {
  margin: 0 0 1.35rem 0;
  color: #4a5568;
}

/* ── Functions: standard Python API reference blocks ──────────────────────── */

/* Give the signature a cyan accent rule instead of the default RTD green. */
.rst-content dl.py > dt {
  border-top-color: var(--plesty-cyan);
  background: #f8fbfc;
}
.rst-content dl.py > dt .sig-name {
  color: var(--plesty-cyan);
}

/* In the signature, the argument name is bold and its type is normal weight. */
.rst-content dl.py .sig-param {
  font-weight: 400;
  font-style: normal;
}
.rst-content dl.py .sig-param > .n:first-child {
  font-weight: 700;
}

/* Tables: prose cells wrap normally (the theme's responsive wrapper nowraps
   every cell, forcing horizontal scroll), while the first column — typically
   an identifier such as a package or parameter name — stays on one line. */
.wy-table-responsive table td,
.wy-table-responsive table th {
  white-space: normal;
}
.rst-content table.docutils td:first-child,
.rst-content table.docutils th:first-child {
  white-space: nowrap;
}
.rst-content table.docutils td:first-child code,
.rst-content table.docutils td:first-child a {
  white-space: nowrap;
  word-break: keep-all;
  overflow-wrap: normal;
}
