/*
Theme Name: Blocks (2017)
Theme URI: http://www.dcthomson.co.uk
Author: DC Thomson
Author URI: http://www.dcthomson.co.uk
Description: Blaize plugin CSS for the Blocks theme (2017).
*/

/* Header > Verticals > Blaize Login */
.blaize-login-register > .sub-menu {
	background-color: #06c;
	opacity: 0;
	visibility: hidden;
}

.blaize-login-register > .sub-menu > .menu-item {
	float: none;
	margin: 0;
}

/* Header > Verticals > Blaize Verticals */
.blaize-verticals {
	list-style: none;
}

.blaize-verticals .blaize-login-register > a {
	display: block;
	padding-left: 10px;
	padding-right: 10px;
	height: 29px;
	line-height: 29px;
	white-space: nowrap;
}

.blaize-verticals .blaize-login-register:hover > a,
.blaize-verticals .blaize-login-register:hover > a:after {
	color: #fff;
}

/*********
E-Editions
*********/

.pagesuite__group-title,
.pagesuite__brand-title {
	display: none;
}

.pagesuite__group {
	padding: 2rem;
}

/* E-Editions > Brands */
.pagesuite__brand {
	margin: 0 !important;
}

.pagesuite__brand-group:not(:last-child) {
	margin-bottom: 3rem; /* Non-Grid fallback */
}

.pagesuite__brand-title:hover,
.pagesuite__brand-title:focus {
	color: #555;
}

/* E-Editions > Brands > Editions */
.pagesuite__edition-title {
	display: block;
	margin-bottom: .75rem;
	font-size: 93.75%;
}

.pagesuite__edition {
	list-style: none;
	margin: 0 !important;
	padding: 0;
}

.pagesuite__links {
	margin: 0 !important;
}

/* E-Editions > Brands > Editions > Buy/View Buttons */
.pagesuite__links {
	list-style: none;
}

.pagesuite__link-item {
	display: inline-block;
	margin: 0 !important;
}

.pagesuite__link {
	display: block;
	padding-left: 10px;
	padding-right: 10px;
	width: 100%;
	height: 32px;
	line-height: 32px;
	font-size: 93.75%;
	text-decoration: none;
	border-radius: 3px;
	-webkit-transition: all ease .12s;
	transition: all ease .12s;
	box-sizing: border-box;
}

.pagesuite__link:hover {
	cursor: pointer;
	text-decoration: none;
}

.pagesuite__link:hover,
.pagesuite__link:focus {
	text-decoration: none !important;
	box-shadow: inset 2px 2px rgba(0,0,0,.15);
}

.pagesuite__link--buy {
	background-color: #06c;
	background-color: var(--sm-blue, #06c);
	color: #fff !important;
}

.pagesuite__link--buy:hover,
.pagesuite__link--buy:focus {
	background-color: #07e;
}

.pagesuite__link--view {
	background-color: #eee;
	color: #444 !important;
}

.pagesuite__link--view:hover,
.pagesuite__link--view:focus {
	background-color: #555;
	color: #fff !important;
}

/*************
Media: >=768px
*************/

@media only screen and (max-width: 767px) {

	/* Header > Blaize Login button */
	.blaize-login-btn {
		z-index: 9999;
		position: absolute;
		right: 48px;
	}

	.blaize-login-btn.js-on {
		background-color: #06c;
		color: #fff !important; /* Style must be immutable */
	}

	.blaize-login-btn .b-icon-profile {
		display: block;
		height: 24px;
		line-height: 24px;
		font-size: 18px;
		color: inherit;
	}

	/* Header > Blaize login > Dropdown */
	.blaize-mobile-dropdown {
		z-index: 10000000000;
		position: fixed;
		top: 48px;
		bottom: 0;
		left: 0;
		right: 0;
		display: none;
		padding: 10vw;
		width: 100%;
		list-style: none;
		background-color: #06c;
		background-color: rgba(0, 102, 204, .95);
		box-sizing: border-box;
		color: #fff;

		-webkit-transition: all ease .12s;
		transition: all ease .12s;
	}

	.blaize-mobile-dropdown.js-on {
		display: block;
	}

	.blaize-mobile-dropdown li {
		margin-bottom: 20px;
	}

	.blaize-mobile-dropdown a {
		font-size: 20px;
	}
}

/*************
Media: >=768px
*************/

@media only screen and (min-width: 768px) {

	.blaize-mobile-dropdown {
		display: none !important; /* This element is a JS clone, and should never be visible on desktop. */
	}

	/* Header > Verticals > Blaize login button */
	.blaize-login-register {
		position: relative;
	}

	.blaize-login-register,
	.blaize-login-register > a:after {
		-webkit-transition: all ease .1s;
		transition: all ease .1s;
	}

	.site-header--fixed.js-off .blaize-login-register .sub-menu {
		display: none !important; /* Style must be immutable */
	}

	.verticals:not(.js-on) .blaize-login-register > a {
		padding-left: 10px;
		padding-right: 10px;

		-webkit-transition: all ease .15s;
		transition: all ease .15s;
	}

	.verticals:not(.js-on) .blaize-login-register:hover {
		background-color: #06c;
	}

	.verticals:not(.js-on) .blaize-login-register:hover > a {
		text-decoration: none !important; /* No underlines on this button link, please. */
	}

	.verticals:not(.js-on) .blaize-login-register:hover > a,
	.verticals:not(.js-on) .blaize-login-register:hover > a:after {
		color: #fff !important; /* Style must be immutable */
	}

	/* Header > Verticals > Blaize login > Dropdown */
	.blaize-login-register:hover > a {
		background-color: #06c;
		color: #fff;

		transition: all ease .12s;
	}

	.blaize-login-register > .sub-menu {
		z-index: 10;
		position: absolute;
		display: block !important; /* Must be immutable to override Blaize plugin. */
		padding: 10px;
		min-width: 150px;
		list-style: none;

		-webkit-transition: opacity ease .15s;
		transition: opacity ease .15s;
	}

	.blaize-verticals.js-on .blaize-login-register > .sub-menu {
		top: 20px;
		left: 0;
	}

	.blaize-verticals:not(.js-on) .blaize-login-register > .sub-menu {
		top: 29px;
		right: 0;
	}

	body.blaize-logged-in .blaize-login-register:hover > .sub-menu {
		visibility: visible;
		opacity: 1;
	}

	.blaize-login-register > .sub-menu a {
		display: block;
		height: auto;
		line-height: 20px;
		white-space: nowrap;
		color: #fff;
	}
}

/***
Grid
***/

@supports ((display: -ms-grid) or (display: grid)) {

	/* E-Editions */
	.pagesuite__brand {
		display: -ms-grid;
		display: grid;
		-ms-grid-columns: (minmax(180px, 1fr))[auto-fill];
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	}

	.pagesuite__brand-group {
		margin: 0 !important; /* Style must be immutable if Grid supported */
	}

	/* Media: <=767px */
	@media only screen and (max-width: 767px) {
		.pagesuite__brand {
			grid-gap: 2rem;
		}
	}

	/* Media: >=768px */
	@media only screen and (min-width: 768px) {
		.pagesuite__brand {
			grid-gap: 3rem;
		}
	}
}
