/**
 * Cassiopeia user.css - McDaniel College Budapest (CIBP)
 *
 * Re-creates the look of the old Acronym (Gantry 5) site:
 *  - white page, McDaniel logo on the left, upper-case green "HOME" link on the right
 *  - centred 500px "LOG IN" box (grey fill, navy border, green button)
 *  - grey "(c) 2018 by McDaniel College Budapest." line in the footer
 * Install as  media/templates/site/cassiopeia/css/user.css  (Lato files: ../fonts/lato/).
 *
 * Page layout assumed (see README.md): logo set in the template style, "Main Menu" module in position
 * "menu", "Log in" module in position "main-top" with module class suffix "loginModule", a custom module
 * with the copyright text in position "footer"; breadcrumbs / sidebar modules unpublished.
 */

/* ------------------------------------------------------------------ fonts */
@font-face {
	font-family: lato;
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("../fonts/lato/Lato-Regular.woff2") format("woff2");
}

@font-face {
	font-family: lato;
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("../fonts/lato/Lato-Bold.woff2") format("woff2");
}

/* ------------------------------------------------------------------ base */
:root {
	--mcd-text: #9091a2;
	--mcd-navy: #324268;
	--mcd-green: #359a4c;
	--mcd-green-light: #8ec89a;
	--mcd-green-hover: #c6d486;
	--mcd-blue: #4063fb;
	--mcd-field: #f6f6f6;
	--mcd-font: lato, Helvetica, Tahoma, Geneva, Arial, sans-serif;

	--cassiopeia-font-family-body: var(--mcd-font);
	--cassiopeia-font-family-headings: var(--mcd-font);
	--cassiopeia-color-primary: var(--mcd-green);
	--cassiopeia-color-hover: var(--mcd-green);
	--cassiopeia-color-link: var(--mcd-green);
	--body-color: var(--mcd-text);
}

html {
	font-size: 100%;
}

body.site {
	background: #fff;
	color: var(--mcd-text);
	font-family: var(--mcd-font);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	/* the old site did not allow text selection (see also js/preventcopy.js of the old template) */
	-webkit-user-select: none;
	-moz-user-select: none;
	user-select: none;
}

body.site input,
body.site textarea {
	-webkit-user-select: text;
	-moz-user-select: text;
	user-select: text;
}

/* ------------------------------------------------------------------ header */
.container-header {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	background: #fff;
	background-image: none;
	box-shadow: none;
	color: var(--mcd-text);
	/* content column of 1084 px, like the old page (10% side margin at 1440 px) */
	padding: 34px max(1rem, calc((100% - 1084px) / 2));
}

.container-header .grid-child {
	padding: 0;
}

.container-header .grid-child:first-child {
	flex: 0 0 auto;
	width: auto;
}

.container-header .navbar-brand {
	margin: 0;
	padding: 0;
	line-height: 0;
}

.container-header .navbar-brand a,
.container-header .brand-logo {
	display: block;
	color: var(--mcd-text);
}

/* the logo file is 200 x 81 px, the old site showed it at 139 x 56 px */
.container-header .brand-logo img {
	display: block;
	width: 139px;
	max-width: 100%;
	height: auto;
}

.container-header .container-nav {
	flex: 1 1 auto;
	padding: 0;
	justify-content: flex-end;
}

.container-header nav,
.container-header .container-nav nav {
	margin: 0;
}

/* main menu: small, bold, upper case, green underline on the active item */
.container-header .mod-menu {
	flex: 0 1 auto;
	justify-content: flex-end;
	color: var(--mcd-text);
}

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

.container-header .mod-menu > li > a,
.container-header .mod-menu > li > span {
	display: block;
	padding: 0.625rem 0.925rem;
	color: var(--mcd-text);
	font-family: var(--mcd-font);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: 1px;
	text-transform: uppercase;
	text-decoration: none;
	transition: color 0.35s ease;
}

.container-header .mod-menu > li > a:hover,
.container-header .mod-menu > li.active > a,
.container-header .mod-menu > li.active > span {
	color: var(--mcd-green);
	text-decoration: none;
}

/* replace the Cassiopeia hover bar by a 3px underline under the text of the active item */
.container-header .mod-menu > li::after {
	display: none;
}

.container-header .mod-menu > li.active > a {
	position: relative;
}

.container-header .mod-menu > li.active > a::after {
	content: "";
	position: absolute;
	left: 0.925rem;
	right: 0.925rem;
	bottom: 0.2rem;
	border-bottom: 3px solid var(--mcd-green);
}

.container-header .navbar-toggler {
	color: var(--mcd-text);
	border-color: var(--mcd-text);
}

/* ------------------------------------------------------------------ page */
/* nothing but the log-in box on the home page: no breadcrumbs, no "Home" heading, no sidebar */
.mod-breadcrumbs__wrapper,
body.view-featured .blog-featured > .page-header {
	display: none;
}

.site-grid {
	margin-top: 34px;
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ log-in box (module class suffix "loginModule") */
.loginModule.card,
.loginModule {
	width: 500px;
	max-width: 100%;
	margin: 0 auto 0.75rem;
	background: var(--mcd-field);
	border: 1px solid var(--mcd-navy);
	border-radius: 0;
	color: var(--mcd-text);
}

.loginModule .card-body {
	padding: 0 0 1.6rem;
}

/* "LOG IN" title = the pre-text of the module */
.loginModule .mod-login__pretext {
	margin: 0;
	padding: 30px 0 7px;
	height: 66px;
	text-align: center;
}

.loginModule .mod-login__pretext p {
	margin: 0;
	font-family: "Playfair Display", serif;
	font-size: 30px;
	font-weight: 700;
	line-height: 26px;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	color: var(--mcd-navy);
}

.loginModule .mod-login__userdata {
	width: 350px;
	max-width: calc(100% - 2rem);
	margin: 0 auto;
	padding-top: 46px;
}

.loginModule .form-group {
	margin-bottom: 14px !important;
}

.loginModule label {
	display: block;
	height: 16px;
	margin: 0 0 5px;
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 16px;
	letter-spacing: 0.4px;
	text-align: left;
	color: var(--mcd-navy);
}

.loginModule .form-control,
.loginModule input[type="text"],
.loginModule input[type="email"],
.loginModule input[type="password"] {
	height: 35px;
	padding: 6px;
	background: var(--mcd-field);
	border: 1px solid var(--mcd-navy);
	border-radius: 0;
	box-shadow: none;
	color: var(--mcd-text);
	font-family: var(--mcd-font);
	font-size: 14px;
	line-height: 21px;
}

.loginModule .form-control::placeholder {
	color: #8f8f8f;
	opacity: 1;
}

.loginModule .form-control:focus {
	border-color: var(--mcd-navy);
	box-shadow: 0 0 0 2px rgba(50, 66, 104, 0.2);
}

/* show-password button: flat, same border as the field */
.loginModule .input-group .btn {
	height: 35px;
	padding: 0 10px;
	background: var(--mcd-field);
	border: 1px solid var(--mcd-navy);
	border-left: 0;
	border-radius: 0;
	color: var(--mcd-navy);
}

/* remember me */
.loginModule .form-check {
	display: flex;
	align-items: center;
	gap: 4px;
	min-height: 0;
	margin: 0;
	padding-left: 0;
}

.loginModule .form-check-input {
	float: none;
	margin: 0 2px 0 0;
	border-color: var(--mcd-navy);
	border-radius: 0;
	vertical-align: -2px;
}

.loginModule .form-check-input:checked {
	background-color: var(--mcd-navy);
	border-color: var(--mcd-navy);
}

.loginModule .form-check-label {
	display: inline-block;
	height: auto;
	margin: 0;
}

/* LOG IN button */
.loginModule .mod-login__submit {
	margin-top: 25px;
	text-align: center;
}

.loginModule .mod-login__submit .btn,
.loginModule .mod-login__submit .btn.w-100 {
	display: inline-block;
	width: 100px !important;
	height: 30px;
	padding: 0;
	background: var(--mcd-green-light);
	border: 0;
	border-radius: 0;
	color: var(--mcd-navy);
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 30px;
	letter-spacing: 0.4px;
	text-align: center;
	text-transform: uppercase;
}

.loginModule .mod-login__submit .btn:hover,
.loginModule .mod-login__submit .btn:focus {
	background: var(--mcd-green-hover);
	color: var(--mcd-navy);
}

/* "Forgot your password?" - green link with a blue arrow; the old page had no user-name reminder */
.loginModule .mod-login__options {
	margin: 1.6rem 0 0;
	padding: 0;
	list-style: none;
}

.loginModule .mod-login__options li {
	padding: 0.3rem 0;
}

.loginModule .mod-login__options li:nth-child(n + 2) {
	display: none;
}

.loginModule .mod-login__options a,
.loginModule .mod-login__options a:visited {
	display: inline-block;
	padding: 0.3rem 1.25rem;
	color: var(--mcd-green-light);
	font-size: 1rem;
	text-decoration: none;
}

.loginModule .mod-login__options a::before {
	content: "\2192";
	display: inline-block;
	margin-right: 0.9rem;
	color: var(--mcd-blue);
	font-weight: 700;
}

.loginModule .mod-login__options a:hover {
	color: var(--mcd-green-light);
	text-decoration: underline;
}

/* logged-in state of the same module: greeting + grey log-out button */
.loginModule .mod-login-logout {
	padding: 1.25rem 1rem;
	text-align: right;
}

.loginModule .mod-login-logout .btn {
	background: #8d8989;
	border: 0;
	border-radius: 0;
	color: #fff;
}

.loginModule .mod-login-logout .btn:hover {
	background: #6b6767;
}

/* ------------------------------------------------------------------ footer */
.container-footer,
.footer {
	margin-top: 0;
	background: #fff;
	background-image: none;
	color: rgba(144, 145, 162, 0.5);
}

.footer .grid-child {
	padding: 2.5rem 0.5rem;
	justify-content: center;
	align-items: center;
	text-align: center;
}

.footer p {
	margin: 0;
}

.footer,
.footer a:not(.btn),
.footer a:not(.btn):visited {
	color: rgba(144, 145, 162, 0.5);
	text-decoration: none;
}

.footer a:not(.btn):hover,
.footer a:not(.btn):focus {
	color: var(--mcd-blue);
}

.back-to-top-link {
	background: var(--mcd-green);
}

/* ------------------------------------------------------------------ small screens */
@media (max-width: 767.98px) {
	.container-header {
		flex-wrap: wrap;
		padding: 1rem;
	}

	.container-header .brand-logo img {
		width: 139px;
	}

	.loginModule .mod-login__pretext p {
		font-size: 24px;
	}

	.loginModule .mod-login__userdata {
		padding-top: 24px;
	}

	.site-grid {
		margin-top: 1rem;
	}
}
