/*
 * 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 keeps the stock Read-the-Docs styling. */

/* 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;
}
