/* default line height makes the unicode box drawing characters have spacing
   between lines which looks ugly */
.rst-content div.highlight-output div.highlight pre {
	line-height: normal;
	font-weight: 600;
}

/* workaround for https://github.com/readthedocs/sphinx_rtd_theme/issues/1505 */
.wy-table-responsive table td,
.wy-table-responsive table th {
	white-space: normal
}

/* prevent wrapping in code sections */
.rst-content code.literal {
	white-space: nowrap;
}

/* makes numbers in benchmark on async page be right aligned */
.aiobench-table td:not(:first-child),
.aiobench-table th:not(:first-child) {
	text-align: right;
	font-family: monospace;
}

.aiobench-table td,  .aiobench-table th {
	padding: 4px 8px !important;
}

.aiobench-table {
	width: 100%;
}

/* next ones generated by chatgpt with mild editing by me */

/* Base zebra shading inside each 8-row group */
.aiobench-table tbody tr:nth-child(8n+1),
.aiobench-table tbody tr:nth-child(8n+3),
.aiobench-table tbody tr:nth-child(8n+5),
.aiobench-table tbody tr:nth-child(8n+7) {
    background-color: #fafafa;
}

/* Slightly darker alternate rows */
.aiobench-table tbody tr:nth-child(8n+2),
.aiobench-table tbody tr:nth-child(8n+4),
.aiobench-table tbody tr:nth-child(8n+6),
.aiobench-table tbody tr:nth-child(8n+8) {
    background-color: #f3f3f3;
}

/* Visual separation between groups of 8 */
.aiobench-table tbody tr:nth-child(8n+1) {
    border-top: 4px solid #ddd;
}

/* Optional: make first column (th) visually distinct */
.aiobench-table tbody th {
    font-weight: 600;
    background-color: rgba(0, 0, 0, 0.03);
}


/* async badge stuff - unfortunately it isn't possible to have a
   generic badge class so we have to select all of them each time.

   the contents are the joint work of claude, chatgpt, and
   gemini merged by me
*/
a.reference.internal[href*="#badge-close"],
a.reference.internal[href*="#badge-async-sync"],
a.reference.internal[href*="#badge-async-async"],
a.reference.internal[href*="#badge-async-dual"],
a.reference.internal[href*="#badge-async-value"] {
	float: right;
	margin: 0 0 0.6em 1.2em;
	padding: 0.25em 0.8em;
	font-size: 0.75rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: 0.05em;
	border-radius: 2em;
	white-space: nowrap;
	text-decoration: none;
	color: #5c4d00;
	background: linear-gradient(to bottom, #fff5cc 0%, #ffe680 100%);
	border: 1px solid #d4b100;
	box-shadow:
		0 1px 2px rgba(0, 0, 0, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.4);
	transition: transform 0.1s ease, box-shadow 0.1s ease;
}

a.reference.internal[href*="#badge-close"]:hover,
a.reference.internal[href*="#badge-async-sync"]:hover,
a.reference.internal[href*="#badge-async-async"]:hover,
a.reference.internal[href*="#badge-async-dual"]:hover,
a.reference.internal[href*="#badge-async-value"]:hover {
	transform: translateY(-2px);
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.18);
	background: linear-gradient(to bottom, #fff9dd, #ffed99);
}

a.reference.internal[href*="#badge-async-close"]:active,
a.reference.internal[href*="#badge-async-sync"]:active,
a.reference.internal[href*="#badge-async-async"]:active,
a.reference.internal[href*="#badge-async-dual"]:active,
a.reference.internal[href*="#badge-async-value"]:active {
	transform: translateY(0);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}