/*
 * cassiopeia_animalex - user.css
 *
 * Target: old live Protostar page from input/screenshots/Screenshot_9.png.
 * The important pieces are the 980px boxed layout, flat blue header,
 * separate banner strip, white content box, and plain footer on grey.
 */

:root {
	--ax-brand: #045c95;
	--ax-brand-dark: #034472;
	--ax-page-bg: #f3f5f6;
	--ax-surface: #ffffff;
	--ax-text: #333333;
	--ax-muted-text: #333333;
	--ax-border: rgba(0, 0, 0, 0.15);
	--ax-panel-border: #d6d6d6;
	--ax-panel-shadow: 0 2px 5px rgba(0, 0, 0, 0.12);
	--ax-max-width: 980px;
	--ax-page-width: min(100% - 90px, var(--ax-max-width));

	--cassiopeia-color-primary: var(--ax-brand);
	--cassiopeia-color-link: var(--ax-brand);
	--cassiopeia-color-hover: var(--ax-brand-dark);
	--bs-primary: var(--ax-brand);
	--bs-link-color: var(--ax-brand);
	--bs-link-hover-color: var(--ax-brand-dark);
}

html {
	overflow-y: scroll;
	background: var(--ax-page-bg);
}

body,
body.site {
	margin: 0;
	padding: 0;
	background: var(--ax-page-bg);
	color: var(--ax-text);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 24px;
	border-top: 0;
}

/* Page width: old Bootstrap container was 980px on desktop. */
.container-header,
.container-banner,
.site-grid,
.container-footer {
	box-sizing: border-box;
	width: var(--ax-page-width);
	max-width: var(--ax-max-width);
	margin-left: auto;
	margin-right: auto;
}

/* Header: flat blue box, no Cassiopeia gradient/card chrome. */
.container-header,
.header {
	position: relative;
	display: block;
	min-height: 135px;
	margin-bottom: 15px;
	padding: 28px 20px 0;
	background: var(--ax-brand) !important;
	background-image: none !important;
	border: 0;
	border-radius: 0;
	box-shadow: var(--ax-panel-shadow);
	color: #ffffff;
}

.container-header .grid-child,
.container-header .header-inside,
.container-header .container-below-top,
.container-header .container-nav,
.container-header .container-topbar,
.container-header .container-search {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.container-header .grid-child {
	display: block;
}

.container-header > .grid-child {
	min-height: 40px;
}

.container-header .container-below-top .mod-custom,
.container-header .container-below-top p {
	margin: 0;
	padding: 0;
}

.container-header .container-below-top {
	min-height: 40px;
}

/* Main site title from the below-top module. */
.container-header .container-below-top .site-title {
	display: inline-block;
	max-width: calc(100% - 160px);
	margin: 7px 0 0;
	padding: 0;
	color: #ffffff !important;
	font-size: 22px;
	font-weight: normal;
	letter-spacing: 1px;
	line-height: 1.2;
	text-decoration: none;
	overflow-wrap: break-word;
	white-space: normal;
}

.container-header .container-below-top .site-title:lang(en),
.container-header .container-below-top .site-title:lang(fr),
.container-header .container-below-top .site-title:lang(it) {
	font-size: 20px;
}

/* Fallback only if Cassiopeia brand is enabled again. */
.container-header .navbar-brand,
.container-header .brand-logo,
.container-header .navbar-brand .site-title,
.header .brand-logo,
.header .navbar-brand .site-title {
	display: inline-block;
	max-width: calc(100% - 160px);
	margin: 0;
	padding: 0;
	color: #ffffff !important;
	font-size: 26px;
	font-weight: normal;
	letter-spacing: 1px;
	line-height: 1.2;
	text-decoration: none;
	overflow-wrap: break-word;
	white-space: normal;
}

.container-header .navbar-brand {
	margin-top: 5px;
}

.container-header a:hover,
.container-header a:focus {
	color: #ffffff;
	text-decoration: none;
}

/* Language flags: top-right like the old header-search position. */
.container-header .container-topbar {
	position: absolute;
	top: 13px;
	right: 24px;
	z-index: 3;
	width: auto;
}

.container-header .mod-languages,
.header .mod-languages {
	position: static;
	width: auto;
}

.container-header .mod-languages ul,
.container-header ul.lang-inline,
.header .mod-languages ul {
	display: flex;
	gap: 15px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.container-header .mod-languages li,
.header .mod-languages li {
	margin: 0;
	padding: 0;
	line-height: 1;
	list-style: none;
}

.container-header .mod-languages img,
.header .mod-languages img {
	display: block;
	vertical-align: top;
}

/* Navigation: horizontal nav-pills inside the blue header. */
.container-header .container-nav {
	margin-top: 25px;
	clear: both;
}

.container-header .navbar,
.container-header nav,
.header nav.navigation {
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent !important;
	border: 0;
	box-shadow: none;
	font-size: 14px;
}

.container-header .navbar-collapse {
	padding: 0;
}

.container-header .mod-menu,
.header ul.mod-menu,
.container-header .navbar-nav {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: flex-start;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.container-header .mod-menu > li,
.container-header .mod-menu__item,
.container-header .navbar-nav > li {
	margin: 0 2px 0 0;
	padding: 0;
	list-style: none;
}

.container-header .mod-menu > li + li {
	margin-left: 0;
}

.container-header .mod-menu__item > a,
.container-header .mod-menu a,
.container-header .navbar a,
.container-header .nav-link,
.header ul.mod-menu a {
	display: block;
	margin: 0;
	padding: 8px;
	background: transparent;
	border: 0;
	border-radius: 0;
	color: #ffffff !important;
	font-size: 14px;
	font-weight: normal;
	line-height: 14px;
	text-decoration: none;
}

.container-header .mod-menu__item.active > a,
.container-header .mod-menu__item.current > a,
.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.current > a,
.container-header .navbar .active > a,
.container-header .nav-link.active,
.container-header .mod-menu a:hover,
.container-header .mod-menu a:focus,
.container-header .navbar a:hover,
.container-header .navbar a:focus,
.header ul.mod-menu .active > a,
.header ul.mod-menu .current > a,
.header ul.mod-menu a:hover,
.header ul.mod-menu a:focus {
	background: #ffffff;
	color: var(--ax-brand) !important;
	text-decoration: none;
}

.navbar-toggler,
.header .navbar-toggler {
	margin: 0 0 8px;
	padding: 7px 10px;
	background: transparent;
	border: 0;
	box-shadow: none;
	color: #ffffff;
}

/* Banner: separate full-width image strip below the header. */
.container-banner {
	width: var(--ax-page-width);
	max-width: var(--ax-max-width);
	margin-bottom: 15px;
	padding: 0;
	background: var(--ax-surface);
	border: 1px solid var(--ax-panel-border);
	border-radius: 0;
	box-shadow: var(--ax-panel-shadow);
	overflow: hidden;
}

.site-grid > .container-banner {
	width: 100%;
	max-width: 100%;
	margin-top: 0;
	grid-column: full-start / full-end;
}

.container-banner .moduletable,
.container-banner .banneritem,
.container-banner p {
	margin: 0;
	padding: 0;
}

.container-banner img {
	display: block;
	width: 100%;
	height: auto;
}

/* Content: only the component becomes the old white panel. */
.site-grid,
.wrapper-fluid .site-grid {
	margin-bottom: 15px;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
	grid-template-columns: [full-start main-start] minmax(0, 1fr) [main-end full-end];
	grid-template-areas:
		"banner"
		"top-a"
		"top-b"
		"side-l"
		"comp"
		"side-r"
		"bot-a"
		"bot-b";
}

.container-component,
.site-grid > main,
main#content {
	box-sizing: border-box;
	grid-column: full-start / full-end;
	grid-area: comp;
	width: 100%;
	max-width: none;
	margin-left: 0;
	margin-right: 0;
	min-height: 350px;
	padding: 20px;
	background: var(--ax-surface);
	border: 1px solid var(--ax-panel-border);
	border-radius: 0;
	box-shadow: var(--ax-panel-shadow);
	color: var(--ax-text);
}

.container-component > *:first-child,
main#content > *:first-child {
	margin-top: 0;
}

.container-component > #system-message-container:empty {
	display: none;
}

.container-component > main {
	margin-top: 0;
}

/* Typography: compact heading scale matching the legacy page. */
h1,
h2,
h3,
h4,
h5,
h6 {
	margin: 12px 0;
	word-wrap: break-word;
	color: var(--ax-text);
	font-weight: normal;
}

.container-component h1,
.container-component .page-header h1,
.item-page h1,
main#content h1 {
	font-size: 21px;
	line-height: 27px;
}

h2,
.container-component h2,
main#content h2 {
	font-size: 21px;
	line-height: 27px;
}

h3,
.container-component h3,
main#content h3 {
	font-size: 18px;
	line-height: 24px;
}

h4,
.container-component h4,
main#content h4 {
	font-size: 16px;
	line-height: 22px;
}

h5,
h6,
.container-component h5,
.container-component h6,
main#content h5,
main#content h6 {
	font-size: 15px;
	line-height: 21px;
}

p {
	margin-top: 0;
	margin-bottom: 24px;
}

b,
strong {
	font-weight: 600;
}

.container-component b,
.container-component strong,
main#content b,
main#content strong {
	color: #444444;
}

.container-component a b,
.container-component a strong,
main#content a b,
main#content a strong {
	color: inherit;
}

a {
	color: var(--ax-brand);
	text-decoration: none;
}

a:visited {
	color: var(--ax-brand);
	text-decoration: none;
}

a:not([class]),
a:not([class]):visited {
	color: var(--ax-brand);
	text-decoration: none;
}

a:hover,
a:focus,
a:visited:hover,
a:visited:focus,
a:not([class]):hover,
a:not([class]):focus,
a:not([class]):visited:hover,
a:not([class]):visited:focus {
	color: var(--ax-brand);
	text-decoration: underline;
}

hr {
	margin: 18px 0;
	border: 0;
	border-top: 1px solid var(--ax-border);
	border-bottom: 1px solid #ffffff;
	opacity: 1;
}

.page-header {
	margin: 0 0 10px;
	padding-bottom: 0;
	border-bottom: 1px solid var(--ax-border);
}

.blog .items-leading .page-header {
	border-top: 1px solid var(--ax-border);
}

.blog .items-leading > div:first-child .page-header,
.blog .items-leading .leading-0 .page-header {
	border-top: 0;
}

/* Lists: old blue cube marker. */
ul {
	margin-left: 0;
	padding-left: 0;
}

.item-page ul li,
.blog ul li,
.blog-featured ul li,
.container-component ul li,
main#content ul li {
	margin: 0;
	padding: 0 0 7px 15px;
	background: url("/images/li_cube.png") no-repeat 0 0.6em;
	line-height: 24px;
	list-style: none;
}

.container-header .mod-languages .lang-active,
.container-header .mod-languages .lang-active > a,
.container-header .mod-languages a[aria-current="true"] {
	background: transparent;
	box-shadow: none;
}

.container-header .mod-languages .lang-active img,
.container-header .mod-languages a[aria-current="true"] img,
.header .mod-languages .lang-active img {
	outline: 1px solid #ffffff;
	outline-offset: 1px;
}

.item-page ol li,
.container-component ol li,
main#content ol li {
	padding-left: 10px;
	padding-bottom: 7px;
	line-height: 24px;
}

/* Buttons and forms inherit the old blue without Bootstrap gradients. */
.btn-primary {
	background: var(--ax-brand);
	border-color: var(--ax-brand);
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
	background: var(--ax-brand);
	border-color: var(--ax-brand);
	color: #ffffff;
}

label,
input,
button,
select,
textarea {
	font-size: 14px;
}

input,
textarea,
.uneditable-input {
	width: 60%;
}

.contact h3 {
	display: none;
}

.com-contact__form #contact-form legend,
.com-contact__form #contact-form .field-spacer {
	display: none;
}

.com-contact__container > h2 {
	display: none;
}

.com-contact {
	display: flex;
	flex-direction: column;
}

.com-contact .page-header {
	order: 0;
}

.com-contact__container {
	order: 1;
	display: block;
	margin-bottom: 0;
}

.com-contact__container .com-contact__info {
	grid-area: auto;
}

.com-contact__form + h2 {
	order: 2;
}

.com-contact__miscinfo {
	order: 3;
	/* margin-bottom: 1.5rem; */
}

.com-contact__container + h2 {
	order: 4;
}

.com-contact__form {
	order: 5;
}

.contact-form .well,
.well {
	padding: 0;
	margin-bottom: 0;
	background: #ffffff;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

.contact-form {
	padding-top: 0;
}

.com-contact__address {
	margin-bottom: 1.5rem;
}

.com-contact dl.dl-horizontal dd,
.com-contact .dl-horizontal dd {
	margin-left: 0;
	padding: 0 0 0 0;
}

.invalid {
	color: #9d261d;
	font-weight: normal;
}

input.invalid {
	border: 1px solid #9d261d;
}

.alert.alert-error {
	display: none;
}

/* Hide the home banner on old article subpages, matching the old template. */
body.view-article.itemid-107 .container-banner,
body.view-article.itemid-103 .container-banner,
body.view-article.itemid-105 .container-banner,
body.view-article.itemid-109 .container-banner {
	display: none;
}

/* Footer: plain grey page background, text left and links/badge right. */
.container-footer,
.footer {
	max-width: var(--ax-max-width);
	margin: 0 auto;
	padding: 0 20px 25px;
	background: transparent !important;
	background-image: none !important;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: var(--ax-text);
	font-size: 14px;
	line-height: 24px;
}

.container-footer .grid-child,
.footer .container,
.footer .grid-child {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.container-footer p,
.footer p {
	margin: 0;
}

.container-footer .mod-custom,
.footer .mod-custom,
.container-footer .moduletable,
.footer .moduletable {
	flex: 1 1 100%;
	width: 100%;
	min-width: 0;
}

.animalex-footer {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	width: 100%;
}

.animalex-footer-links {
	text-align: right;
}

.container-footer a,
.footer a,
.container-footer .animalex-footer a,
.footer .animalex-footer a {
	color: var(--ax-brand) !important;
	background: transparent !important;
	text-decoration: none;
}

.container-footer a:hover,
.container-footer a:focus,
.footer a:hover,
.footer a:focus,
.container-footer .animalex-footer a:hover,
.container-footer .animalex-footer a:focus,
.footer .animalex-footer a:hover,
.footer .animalex-footer a:focus {
	color: var(--ax-brand) !important;
	background: transparent !important;
	text-decoration: underline;
}

.container-footer .mod-menu,
.footer .mod-menu {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.container-footer .mod-menu li,
.footer .mod-menu li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.container-footer .mod-menu a,
.footer .mod-menu a {
	padding: 0 4px 0 0;
	background: none;
}

.container-footer .mod-menu li + li a::before,
.footer .mod-menu li + li a::before {
	content: "| ";
}

.container-footer .mod-menu .active > a,
.container-footer .mod-menu .current > a,
.container-footer .mod-menu a[aria-current="page"],
.footer .mod-menu .active > a,
.footer .mod-menu .current > a,
.footer .mod-menu a[aria-current="page"] {
	color: var(--ax-brand);
	background: none;
	text-decoration: none;
}

.container-footer hr,
.footer hr {
	display: none;
}

.container-footer img,
.footer img {
	margin-left: 8px;
	vertical-align: middle;
}

/* Temporary test: subtle page-entry and hover smoothing. */
@media (prefers-reduced-motion: no-preference) {
	.container-header .navbar-brand,
	.container-header .container-topbar,
	.site-grid {
		animation: animalex-page-in 200ms ease-out both;
	}

	@keyframes animalex-page-in {
		from {
			opacity: 0.96;
		}

		to {
			opacity: 1;
		}
	}

	a,
	.container-header .mod-menu a,
	.footer a {
		transition: color 120ms ease, background-color 120ms ease, text-decoration-color 120ms ease;
	}
}

/* Responsive fallback: keep the old look but avoid horizontal overflow. */
@media (max-width: 1020px) {
	.container-header,
	.container-banner,
	.site-grid,
	.container-footer {
		width: calc(100% - 30px);
		max-width: none;
	}
}

@media (max-width: 700px) {
	.container-header,
	.header {
		min-height: 0;
		padding: 20px 15px 0;
	}

	/*
	.container-header .container-below-top .site-title {
		max-width: 100%;
		font-size: 20px;
	}
	*/

	.container-header .navbar-brand,
	.container-header .brand-logo,
	.container-header .navbar-brand .site-title,
	.header .brand-logo,
	.header .navbar-brand .site-title {
		max-width: 100%;
		padding-right: 0;
		font-size: 23px;
	}

	.container-header .container-topbar,
	.container-header .mod-languages,
	.header .mod-languages {
		position: static;
		margin-top: 12px;
	}

	.container-header .container-nav {
		width: 100%;
		margin-top: 18px;
	}

	.container-header .mod-menu,
	.header ul.mod-menu,
	.container-header .navbar-nav {
		display: block;
	}

	.container-header .mod-menu__item > a,
	.container-header .mod-menu a,
	.container-header .navbar a,
	.container-header .nav-link,
	.header ul.mod-menu a {
		padding: 9px 8px;
	}

	.container-component,
	.site-grid > main,
	main#content {
		padding: 24px 18px 28px;
	}

	.container-footer .grid-child,
	.footer .container,
	.footer .grid-child {
		display: block;
	}

	.container-footer .mod-menu,
	.footer .mod-menu {
		justify-content: flex-start;
		margin-top: 6px;
	}

	.animalex-footer {
		display: block;
	}

	.animalex-footer-links {
		margin-top: 6px;
		text-align: left;
	}

	input,
	textarea,
	.uneditable-input {
		width: 100%;
	}
}
