/**
 * Source Viewer — Night Owl theme.
 *
 * Lightweight PHP source viewer using PHP's built-in highlight_string().
 *
 * @package advanced-analytics
 * @since   5.3.0
 */

*,
*::before,
*::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html, body {
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: #011627;
	color: #d6deeb;
	font-family: 'Menlo', 'Consolas', 'DejaVu Sans Mono', 'Liberation Mono', monospace;
	font-size: 13px;
	line-height: 1.65;
	-webkit-font-smoothing: antialiased;
	-webkit-text-size-adjust: 100%;
}

/* ── Container — single scroll context for both axes ─────────────── */
.advan-sv {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	overflow: auto;
	-webkit-overflow-scrolling: touch;
}

/* ── Table layout — gutter + code on same row ────────────────────── */
.advan-sv-table {
	border-collapse: collapse;
}

/* ── Row ─────────────────────────────────────────────────────────── */
.advan-sv-row.is-hl {
	background: #1d3b53;
}

/* ── Line number gutter ──────────────────────────────────────────── */
td.advan-sv-gutter {
	padding: 0 12px 0 10px;
	text-align: right;
	color: #4b6479;
	background: #011627;
	border-right: 1px solid #1e3a4f;
	user-select: none;
	-webkit-user-select: none;
	vertical-align: top;
	white-space: nowrap;
	position: sticky;
	left: 0;
	z-index: 2;
}

.advan-sv-row.is-hl > td.advan-sv-gutter {
	color: #c5e4fd;
	background: #1d3b53;
}

/* ── Code cell ───────────────────────────────────────────────────── */
td.advan-sv-code {
	padding: 0 16px 0 12px;
	white-space: pre;
	vertical-align: top;
	tab-size: 4;
	-moz-tab-size: 4;
}

.advan-sv-row.is-hl > td.advan-sv-code {
	background: #1d3b53;
	box-shadow: inset 3px 0 0 #c792ea;
}

/* ── Scrollbar styling ───────────────────────────────────────────── */
.advan-sv::-webkit-scrollbar {
	width: 10px;
	height: 10px;
}
.advan-sv::-webkit-scrollbar-track {
	background: #011627;
}
.advan-sv::-webkit-scrollbar-thumb {
	background: #1e3a4f;
	border-radius: 5px;
}
.advan-sv::-webkit-scrollbar-thumb:hover {
	background: #2d5577;
}

/* ── Token colours (post-processed) ──────────────────────────────── */
.sv-var   { color: #addb67 !important; } /* variables: $name          */
.sv-fn    { color: #82aaff !important; } /* function calls            */
.sv-const { color: #ff5874 !important; } /* CONSTANTS                 */
.sv-num   { color: #f78c6c !important; } /* numeric literals          */
.sv-type  { color: #7fdbca !important; } /* type hints: int, string…  */
.sv-op    { color: #7fdbca !important; } /* operators: -> :: =>       */

/* ── Selection ───────────────────────────────────────────────────── */
::selection {
	background: #1d3b53;
	color: #d6deeb;
}

/* ── Mobile / small screens ──────────────────────────────────────── */
@media screen and (max-width: 768px) {
	html, body {
		font-size: 11px;
	}

	td.advan-sv-gutter {
		padding: 0 6px 0 4px;
	}

	td.advan-sv-code {
		padding: 0 8px 0 6px;
	}
}

@media screen and (max-width: 480px) {
	html, body {
		font-size: 10px;
	}

	td.advan-sv-gutter {
		padding: 0 4px 0 2px;
	}

	td.advan-sv-code {
		padding: 0 6px 0 4px;
	}
}
