/*
 * Partner page /links (component com_nmlinks) and the right-column module "Друзі проекту" (custom HTML module 34).
 * Loaded only there: the component adds it to its own <head>, the module links it from its own markup. No images, no fonts, no external resources.
 * Look: the site's own portal style: solid blue title bars, square boxed panels, light blue zebra rows. Plain system fonts.
 * Colours: bar #2a5d9f, deep #1d4577, row #eaf0f8, light bar #d6e2f2, border #b9c7da, text #1c2430, muted #46546a, link #1d4f94, focus #9b2c20.
 * The template stylesheet is linked after custom head tags, so rules that compete with it use id/element selectors.
 * No fixed widths; long words and URLs wrap.
 */

/* page title: a solid blue bar, like the module headers of the portal */
table.nml-title td.contentheading {
	border-bottom: 0;
}

table.nml-title .contentheading h2 {
	background: #2a5d9f;
	color: #fff;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 17px;
	line-height: 1.3;
	font-weight: bold;
	padding: 8px 12px;
	margin: 0;
}

/* =PAGE ================================================================== */

#nmlinks {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	color: #1c2430;
	max-width: 860px;
	overflow-wrap: anywhere;
}

#nmlinks ul,
#nmlinks li,
#nmlinks p,
#nmlinks h3 {
	margin: 0;
	padding: 0;
}

#nmlinks ul.nml-list {
	list-style: none;
	border: 1px solid #b9c7da;
	margin: 0 0 16px;
}

#nmlinks li.nml-item {
	list-style: none;
	border-top: 1px solid #b9c7da;
	background: #fff;
}

#nmlinks li.nml-item:first-child {
	border-top: 0;
}

#nmlinks li.nml-item:nth-child(even) {
	background: #eaf0f8;
}

/* a row: banner column (88 px) and the text; rows without a banner keep the text aligned */
#nmlinks a.nml-link {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	column-gap: 12px;
	align-items: center;
	min-height: 44px;
	padding: 8px 12px;
	color: #1d4f94;
	text-decoration: underline;
}

#nmlinks a.nml-link .nml-text {
	grid-column: 2;
}

#nmlinks a.nml-link img.nml-img {
	grid-column: 1;
	grid-row: 1;
	display: block;
	width: 88px;
	height: 31px;
	max-width: 100%;
	border: 0;
}

#nmlinks a.nml-link:hover,
#nmlinks a.nml-link:hover .nml-text {
	color: #1c2430;
	text-decoration: none;
}

#nmlinks a:focus,
#nmlinks pre:focus {
	outline: 3px solid #9b2c20;
	outline-offset: -3px;
}

/* "Наша кнопка" */
#nmlinks h3.nml-bar {
	background: #2a5d9f;
	color: #fff;
	font-size: 15px;
	line-height: 1.3;
	font-weight: bold;
	padding: 7px 12px;
	margin: 0;
}

#nmlinks .nml-panel {
	border: 1px solid #b9c7da;
	border-top: 0;
	padding: 12px;
	background: #eaf0f8;
}

#nmlinks p.nml-btn {
	margin: 0 0 10px;
}

#nmlinks p.nml-btn a {
	display: inline-block;
}

#nmlinks p.nml-btn img {
	display: block;
	border: 0;
	width: 88px;
	height: 31px;
}

#nmlinks p.nml-codelabel {
	color: #46546a;
	font-size: 13px;
	margin: 0 0 4px;
}

#nmlinks pre.nml-code {
	margin: 0;
	padding: 8px 10px;
	background: #fff;
	border: 1px solid #b9c7da;
	color: #1c2430;
	font-family: Consolas, "Courier New", monospace;
	font-size: 13px;
	line-height: 1.45;
	white-space: pre-wrap;
	overflow-wrap: anywhere;
}

/* =MODULE (right column; also when the template stacks the columns below 860 px) ================ */

div.nml-mod {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #1c2430;
	overflow-wrap: anywhere;
}

div.nml-mod ul {
	list-style: none;
	margin: 0 0 8px;
	padding: 0;
	border: 1px solid #b9c7da;
}

div.nml-mod li {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 1px solid #b9c7da;
	background: #fff;
}

div.nml-mod li:first-child {
	border-top: 0;
}

div.nml-mod li:nth-child(even) {
	background: #eaf0f8;
}

div.nml-mod li a {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
	padding: 6px 8px;
	min-height: 44px;
	justify-content: center;
	color: #1d4f94;
	text-decoration: underline;
}

div.nml-mod li a:hover {
	color: #1c2430;
	text-decoration: none;
}

div.nml-mod li a img {
	display: block;
	border: 0;
	max-width: 100%;
	height: auto;
}

div.nml-mod p.nml-more {
	margin: 0;
	text-align: right;
}

div.nml-mod p.nml-more a {
	color: #1d4f94;
	text-decoration: underline;
}

div.nml-mod a:focus {
	outline: 3px solid #9b2c20;
	outline-offset: -3px;
}
