/*
 * Oninit Log Ripper - page-specific CSS overlay.
 *
 * Loaded by /ripper/content.php so it applies to every ripper page
 * without touching the shared site CSS. Adds rules the legacy site
 * stylesheet does not provide (notably table styling) and aligns the
 * heading / list / pre / em / link rendering with the surrounding
 * legacy.css typography so headings, paragraphs, lists, and tables
 * read as one cohesive page.
 */

/* Tables: visible grid, tahoma cells matching the legacy <td>/<th> rules */
.forensic-content table.legacy {
	border-collapse: collapse;
	margin: 8px 4px 12px 4px;
	font-family: tahoma;
	font-size: 12px;
	color: #000000;
	width: auto;
	max-width: 100%;
	text-align: left;
}

.forensic-content table.legacy th,
.forensic-content table.legacy td {
	border: 1px solid #c0a880;
	padding: 6px 10px;
	vertical-align: top;
	text-align: left;
}

.forensic-content table.legacy th {
	background-color: #f2eddc;
	color: #7e4400;
	font-weight: bold;
}

.forensic-content table.legacy tr:nth-child(even) td {
	background-color: #fbf8ee;
}

/* Lists: legacy.css sets font but not list-style; round bullets plus
 * a sensible indent so the bullet itself shows up. li is left without
 * the tahoma colour cascade from li.legacy (#cccccc) which would make
 * the bullet itself invisible on the cream background. */
.forensic-content ul.legacy {
	list-style-type: disc;
	margin-left: 24px;
	padding-left: 16px;
	font-family: tahoma;
	font-size: 12px;
	color: #000000;
}

.forensic-content ul.legacy li {
	margin-top: 2px;
	margin-bottom: 2px;
	color: #000000;
}

/* Ordered lists: same baseline as ul.legacy plus an explicit
 * list-style-type so site-wide framework CSS that resets list-style
 * to none does not leave the steps unnumbered. The number is the
 * point of an ordered list - if it disappears the procedure reads
 * as a flat block of unrelated paragraphs. */
.forensic-content ol.legacy {
	list-style-type: decimal;
	list-style-position: outside;
	margin: 8px 4px 12px 24px;
	padding-left: 16px;
	font-family: tahoma;
	font-size: 12px;
	color: #000000;
}

.forensic-content ol.legacy li {
	display: list-item;
	margin-top: 2px;
	margin-bottom: 2px;
	color: #000000;
}

/* Headings: legacy.css sets h2.legacy / h3.legacy, but raw <h3> tags
 * (used by some pages for the page title) and <h2> without class are
 * unstyled. Bring them in line. */
.forensic-content h3 {
	font-size: 16px;
	font-family: tahoma;
	color: #7e4400;
	margin-top: 8px;
	margin-bottom: 12px;
}

.forensic-content h2.legacy {
	margin-top: 18px;
	margin-bottom: 6px;
}

/* Inline em used for code-ish identifiers - legacy.css declares the
 * font but not the colour distinction; use the same olive code shade
 * as pre.legacy / .command so they read as code inline. */
.forensic-content em.legacy,
.forensic-content em {
	color: #6b5a1f;
	font-style: normal;
}

/* Body paragraphs: keep them readable with a comfortable line-height. */
.forensic-content p,
.forensic-content p.legacy {
	line-height: 1.45;
	max-width: 64em;
	text-align: left;
}

/* Code blocks: the legacy class sets monospace + olive but no
 * background; a faint cream wash makes long pre blocks separable
 * from the surrounding prose. */
.forensic-content pre.legacy {
	background-color: #fbf8ee;
	border: 1px solid #e8e0c8;
	padding: 8px 10px;
	overflow-x: auto;
	max-width: 100%;
	white-space: pre;
	margin: 8px 0;
}

/* Icon action buttons (copy / download / etc.) — convention from
 * CODE_ACTIONS.MD (the CDC ripper/builder.html reference impl).
 * 24×24 transparent buttons with 14×14 inline SVG inside; cream
 * legacy palette matches the surrounding chrome. The button.
 * specificity-qualifier ties with sibling .forensic-content button
 * rules and wins on document order — without this, the icon picks
 * up surrounding text-button styling and renders wrong. */
button.copy-icon-btn {
	width: 24px;
	height: 24px;
	padding: 4px;
	background-color: transparent;
	border: 1px solid #c0a880;
	border-radius: 3px;
	cursor: pointer;
	color: #7e4400;
	vertical-align: middle;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}
button.copy-icon-btn:hover {
	background-color: #f2eddc;
}
button.copy-icon-btn svg {
	width: 14px;
	height: 14px;
	display: block;
}
button.copy-icon-btn .icon-check { display: none; }
button.copy-icon-btn.copied {
	color: #2e7d32;   /* success green for the tick swap */
	border-color: #2e7d32;
}
button.copy-icon-btn.copied .icon-copy  { display: none; }
button.copy-icon-btn.copied .icon-check { display: block; }

/* Inset modifier — single icon, top-right over a code box */
button.copy-icon-btn--inset {
	position: absolute;
	top: 6px;
	right: 6px;
	margin: 0;
	background-color: #fbf8ee;
}

/* Code-block wrapper that anchors the absolute-positioned action group
 * per CODE_ACTIONS.MD §"Action-group". The 64px right-padding on the
 * <pre> reserves room for three icons (24px × 3 + 4px gaps + 6px edge). */
.forensic-content .code-block {
	position: relative;
	margin: 0 0 12px 0;
}
.forensic-content .code-block pre {
	margin: 0;
	padding-right: 92px;
}

/* Action-button group (top-right of the <pre> output, per CODE_ACTIONS.MD). */
.forensic-content .code-actions {
	position: absolute;
	top: 6px;
	right: 6px;
	display: inline-flex;
	gap: 4px;
}
.forensic-content .code-actions button.copy-icon-btn {
	margin: 0;
	background-color: #fbf8ee;
}

/* Inline status icon (used in result-status messages). 14×14
 * SVG inset into prose text; vertical-align to match the surrounding
 * text baseline. */
.forensic-content .status-icon {
	display: inline-flex;
	align-items: center;
	width: 14px;
	height: 14px;
	vertical-align: -2px;
	margin-right: 4px;
}
.forensic-content .status-icon.status-ok    { color: #2e7d32; }
.forensic-content .status-icon.status-error { color: #c62828; }

/* Sidenav section divider. Used to group "Documentation" links under
 * a non-clickable label without nesting markup. The legacy site CSS
 * has no rule for this, so style it inline-ish here. */
.sidenav .sidenav-section {
	display: block;
	margin-top: 14px;
	margin-bottom: 4px;
	padding: 4px 12px 4px 12px;
	border-top: 1px solid #d8c8a8;
	font-family: tahoma;
	font-size: 11px;
	font-weight: bold;
	letter-spacing: 0.5px;
	text-transform: uppercase;
	color: #7e4400;
}
