/*
 * Shared modern shell for every public UKV legacy section.
 * Section names and marks are configured in /templates/ukv_site.php.
 */

body.ukv-modern-site {
	width: 100%;
	max-width: none;
	background-color: #eaf1f5;
	color: #173447;
}

body.ukv-modern-site #page-bg,
body.ukv-modern-site #mainbody.wrapper {
	width: 100% !important;
	max-width: none !important;
	margin-right: 0 !important;
	margin-left: 0 !important;
	padding-right: 0 !important;
	padding-left: 0 !important;
	box-sizing: border-box;
}

body.ukv-modern-site #main-shadow,
body.ukv-modern-site #main-shadow2,
body.ukv-modern-site .side-shadow1,
body.ukv-modern-site .side-shadow2 {
	margin-right: 0;
	margin-left: 0;
	background-image: none;
}

body.ukv-modern-site #header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 72px;
	height: auto !important;
	padding: 10px 24px;
	border-bottom: 1px solid #cbdce5;
	background: linear-gradient(90deg, #f9fcfd 0%, #e9f3f7 100%);
	box-sizing: border-box;
}

body.ukv-modern-site #header > a.ukv-site-brand,
body.ukv-modern-site #header > a.ukv-site-brand:visited {
	display: inline-flex;
	flex: 0 1 auto;
	align-items: center;
	min-width: 0;
	max-width: none;
	color: #073f59;
	text-decoration: none;
}

body.ukv-modern-site .ukv-site-brand-mark {
	display: inline-flex;
	flex: 0 0 44px;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-right: 13px;
	border-radius: 12px;
	background: #087b9f;
	color: #fff;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
	box-shadow: 0 5px 14px rgba(7, 63, 89, 0.14);
	box-sizing: border-box;
}

body.ukv-modern-site .ukv-site-brand-name {
	min-width: 0;
	font-family: Arial, Helvetica, sans-serif;
	font-size: 25px;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.12;
}

body.ukv-modern-site #header > a.ukv-site-brand:hover .ukv-site-brand-name {
	color: #087b9f;
}

body.ukv-modern-site #header > a.ukv-site-brand:focus {
	outline: 3px solid #ffd34e;
	outline-offset: 4px;
}

body.ukv-modern-site #horiz-menu {
	height: 48px;
	margin: 0;
	overflow: hidden;
	border-radius: 0;
	background: #073f59;
}

body.ukv-modern-site #horiz-menu li {
	margin-right: 2px;
}

body.ukv-modern-site #horiz-menu a,
body.ukv-modern-site #horiz-menu li.active a {
	height: 48px;
	padding: 0 22px;
	background: transparent;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	line-height: 48px;
}

body.ukv-modern-site #horiz-menu li.active a,
body.ukv-modern-site #horiz-menu li:hover a,
body.ukv-modern-site #horiz-menu li.sfHover a {
	background: #0b789d;
}

body.ukv-modern-site #horiz-menu a:focus {
	outline: 3px solid #ffd34e;
	outline-offset: -3px;
}

body.ukv-modern-site #main-content {
	margin: 0;
	overflow: hidden;
	border: 1px solid #d6e1e8;
	border-top: 0;
	border-right: 0;
	border-left: 0;
	border-radius: 0;
	background: #f4f7f9;
}

body.ukv-modern-site #main-content2,
body.ukv-modern-site #maincol2,
body.ukv-modern-site td.maincol {
	background: #fff;
}

body.ukv-modern-site table.mainbody {
	width: 100%;
	max-width: none;
	table-layout: fixed;
	border-spacing: 0;
}

body.ukv-modern-site table.mainbody td.leftcol {
	width: 286px !important;
	height: auto;
	border-right: 1px solid #dbe5eb;
	background: #f4f7f9;
}

body.ukv-modern-site table.mainbody td.maincol {
	width: auto;
	min-width: 0;
}

body.ukv-modern-site table.mainbody td.rightcol {
	width: 280px !important;
	border-left: 1px solid #dbe5eb;
	background: #f4f7f9;
	vertical-align: top;
}

body.ukv-modern-site td.leftcol > .padding {
	display: flex;
	flex-direction: column;
	height: auto;
	min-height: calc(100vh - 121px);
	padding: 24px 18px;
	box-sizing: border-box;
}

body.ukv-modern-site td.maincol > #maincol1 > #maincol2 > .padding {
	padding: 28px 24px 34px;
}

body.ukv-modern-site td.rightcol > .padding {
	padding: 24px 16px;
}

body.ukv-modern-site #content-padding {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body.ukv-modern-site #sub-menu ul.menu {
	display: block;
	margin: 0 0 24px;
	padding: 0;
}

body.ukv-modern-site #sub-menu ul.menu li {
	margin: 0 0 8px;
}

body.ukv-modern-site #sub-menu ul.menu span.top {
	display: block;
}

body.ukv-modern-site #sub-menu ul.menu a,
body.ukv-modern-site #sub-menu ul.menu a:visited {
	display: flex;
	align-items: center;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid #d6e2e9;
	border-radius: 9px;
	background: #fff;
	background-image: none;
	color: #16445f;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.35;
	text-indent: 0;
	text-decoration: none;
	box-sizing: border-box;
}

body.ukv-modern-site #sub-menu ul.menu li.active a,
body.ukv-modern-site #sub-menu ul.menu a:hover {
	border-color: #0b789d;
	background: #e5f2f7;
	color: #073f59;
	box-shadow: inset 4px 0 0 #0b789d;
}

body.ukv-modern-site #sub-menu ul.menu a:focus {
	outline: 3px solid #ffd34e;
	outline-offset: 1px;
}

body.ukv-modern-site .ukv-site-metric-slot {
	width: 100%;
	margin-top: auto;
	padding-top: 32px;
	box-sizing: border-box;
}

body.ukv-modern-site .ukv-site-metric-slot #ukv-metric,
body.ukv-modern-site .ukv-site-metric-slot > div {
	margin: 0 auto !important;
	color: #29495c;
}

body.ukv-modern-site td.rightcol .module,
body.ukv-modern-site td.rightcol .module > div,
body.ukv-modern-site td.rightcol .module > div > div,
body.ukv-modern-site td.rightcol .module > div > div > div {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
}

body.ukv-modern-site td.rightcol .module {
	margin-bottom: 18px;
	overflow: hidden;
	border: 1px solid #d6e2e9;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 7px 20px rgba(16, 62, 88, 0.06);
}

body.ukv-modern-site td.rightcol .module h3 {
	margin: 0;
	padding: 13px 15px;
	border-bottom: 1px solid #d6e2e9;
	background: #e5f2f7;
	color: #073f59;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
}

body.ukv-modern-site td.rightcol .module h3 ~ * {
	margin-right: 14px;
	margin-left: 14px;
}

body.ukv-modern-site td.rightcol .module table {
	width: calc(100% - 28px) !important;
	margin: 10px 14px 14px !important;
	border-collapse: collapse;
	font-size: 14px;
	line-height: 1.4;
}

body.ukv-modern-site td.rightcol .module td {
	padding: 7px 5px;
	border-bottom: 1px solid #e5edf2;
}

body.ukv-modern-site td.rightcol .module a,
body.ukv-modern-site td.rightcol .module a:visited {
	color: #0a6f94;
	font-weight: 600;
}

body.ukv-modern-site .componentheading,
body.ukv-modern-site .contentheading {
	color: #103e58;
	font-family: Arial, Helvetica, sans-serif;
	letter-spacing: -0.02em;
}

body.ukv-modern-site .componentheading {
	margin: 0 0 22px;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.18;
}

body.ukv-modern-site .contentheading {
	margin-top: 0;
	padding-bottom: 12px;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.2;
}

body.ukv-modern-site .contentpaneopen {
	background: transparent;
}

body.ukv-modern-site #content-padding > table.contentpaneopen img {
	max-width: 100%;
	height: auto !important;
	border-radius: 14px;
}

/*
 * Newsroom media keeps its stored aspect ratio on both the homepage and the
 * article view. In particular, portrait 4:5 and editorial 235:197 images must
 * never be forced through a landscape cover box by the public template.
 */
body.ukv-modern-site #content-padding img.ukv-news-image,
body.ukv-modern-site #content-padding img[src^="/images/newsroom/"],
body.ukv-modern-site #content-padding img[src^="images/newsroom/"] {
	display: block;
	width: auto;
	max-width: 100%;
	height: auto !important;
	max-height: none;
	margin: 0 auto 20px;
	object-fit: contain;
	object-position: center;
	border-radius: 14px;
	box-sizing: border-box;
}

body.ukv-modern-site #content-padding details.ukv-news-spoiler {
	max-width: 100%;
	box-sizing: border-box;
}

/*
 * Let the longest desktop column define the document height. The previous
 * table-cell percentage-height workaround could leave a long navigation menu
 * outside the scrollable page in some Chromium-based browsers.
 */
@media screen and (min-width: 981px) {
	body.ukv-modern-site table.mainbody,
	body.ukv-modern-site table.mainbody > tbody {
		display: block;
		width: 100%;
	}

	body.ukv-modern-site table.mainbody > tbody > tr,
	body.ukv-modern-site table.mainbody > tr {
		display: flex;
		align-items: stretch;
		width: 100%;
	}

	body.ukv-modern-site table.mainbody td.maincol,
	body.ukv-modern-site table.mainbody td.rightcol {
		display: block;
		height: auto;
	}

	body.ukv-modern-site table.mainbody td.leftcol {
		display: flex;
		flex: 0 0 auto;
		height: auto;
	}

	body.ukv-modern-site table.mainbody td.maincol {
		flex: 1 1 0%;
		width: auto;
		min-width: 0;
	}

	body.ukv-modern-site table.mainbody td.rightcol {
		flex: 0 0 auto;
	}

	body.ukv-modern-site td.leftcol > .padding {
		flex: 1 1 auto;
		width: 100%;
		height: auto;
	}
}

@media screen and (max-width: 1100px) {
	body.ukv-modern-site table.mainbody td.leftcol,
	body.ukv-modern-site table.mainbody td.rightcol {
		width: 250px !important;
	}

	body.ukv-modern-site td.leftcol > .padding {
		padding: 20px 14px;
	}

	body.ukv-modern-site td.maincol > #maincol1 > #maincol2 > .padding {
		padding: 24px 18px 30px;
	}

	body.ukv-modern-site td.rightcol > .padding {
		padding: 20px 12px;
	}
}

@media screen and (max-width: 980px) {
	body.ukv-modern-site #header {
		min-height: 66px;
		padding: 9px 14px;
	}

	body.ukv-modern-site #header > a.ukv-site-brand {
		flex: 0 1 auto;
		max-width: none;
	}

	body.ukv-modern-site .ukv-site-brand-mark {
		flex-basis: 40px;
		width: 40px;
		height: 40px;
		margin-right: 11px;
		border-radius: 10px;
		font-size: 14px;
	}

	body.ukv-modern-site .ukv-site-brand-name {
		font-size: 21px;
	}

	body.ukv-modern-site table.mainbody,
	body.ukv-modern-site table.mainbody > tbody {
		display: block;
		width: 100%;
		max-width: 100%;
	}

	body.ukv-modern-site table.mainbody > tbody > tr,
	body.ukv-modern-site table.mainbody > tr {
		display: flex;
		flex-direction: column;
		width: 100%;
		max-width: 100%;
	}

	body.ukv-modern-site table.mainbody td.maincol,
	body.ukv-modern-site table.mainbody td.leftcol,
	body.ukv-modern-site table.mainbody td.rightcol {
		display: block;
		width: 100% !important;
		max-width: 100%;
		height: auto;
		border-top: 1px solid #dbe5eb;
		border-right: 0;
		border-left: 0;
	}

	body.ukv-modern-site table.mainbody td.maincol {
		order: 1;
	}

	body.ukv-modern-site table.mainbody td.leftcol {
		order: 2;
	}

	body.ukv-modern-site table.mainbody td.rightcol {
		order: 3;
	}

	body.ukv-modern-site table.mainbody {
		table-layout: auto;
	}

	body.ukv-modern-site td.leftcol > .padding,
	body.ukv-modern-site td.rightcol > .padding,
	body.ukv-modern-site td.maincol > #maincol1 > #maincol2 > .padding {
		padding: 20px 14px 26px;
	}

	body.ukv-modern-site td.leftcol > .padding {
		height: auto;
		min-height: 0;
	}

	body.ukv-modern-site .ukv-site-metric-slot {
		margin-top: 0;
		padding-top: 20px;
	}

	body.ukv-modern-site td.rightcol .module {
		margin-bottom: 14px;
	}
}

@media screen and (max-width: 520px) {
	body.ukv-modern-site #header {
		min-height: 60px;
		padding: 8px 10px;
	}

	body.ukv-modern-site .ukv-site-brand-mark {
		flex-basis: 36px;
		width: 36px;
		height: 36px;
		margin-right: 9px;
		border-radius: 9px;
		font-size: 12px;
	}

	body.ukv-modern-site .ukv-site-brand-name {
		font-size: 18px;
	}

	body.ukv-modern-site #horiz-menu a,
	body.ukv-modern-site #horiz-menu li.active a {
		padding-right: 14px;
		padding-left: 14px;
		font-size: 15px;
	}

	body.ukv-modern-site .componentheading {
		font-size: 25px;
	}

	body.ukv-modern-site .contentheading {
		font-size: 23px;
	}
}
