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

/**********
Blocks: All
**********/

.block {
	margin-top: 20px;
	margin-bottom: 20px;
}

.block > .wrap {
	padding-top: 20px;
	padding-bottom: 20px;
}

/* Blocks > All > Titles */
.title--block {
	margin-bottom: 20px;
}

.package--main .title--sm,
.block--feature .title--md {
	margin-top: 10px;
	margin-bottom: 10px;
}

.block--feature .timestamp,
.block--grid .timestamp,
.block--carousel .timestamp {
	padding-top: 5px;
	border-top: 1px solid #e5e5e5;
}

/*************
Block: Package
*************/

/* Block: Package > All */
.package-list {
	padding-top: 5px;
	border-top: 1px solid #e5e5e5;
}

/* Block: Package > Top Package */
.package--top {
	float: none;
	width: 100%;
}

.package--top__title--caps {
	display: inline-block;
}

.package--top__title {
	margin-top: .25em;
	margin-bottom: .5em;
}

.package-list--top {
	margin-top: 10px;
}

/* Block: Package > Signup */
.package--top__signup {
	position: relative;
	display: block;
	padding: 20px;
	overflow: hidden;
}

.package--top__signup:after {
	background-image: none;
}

.package--top__signup .signup__icon {
	position: relative;
	width: 20px;
	height: 20px;
}

.package--top__signup .signup__title {
	margin-left: 4px;
	margin-right: 0;
	font-size: 87.5%;
}

/* Block: Package > Shared */
.package--top .cta--bg,
.package--top__signup {
	width: 300px;
}

/* Block: Package > Main Packages */
.block--package .row-tablet {
	margin-top: 20px;
}

.package--main {
	margin-bottom: 20px;
}

.package--main:nth-child(2n+1) {
	clear: both;
}

.package-content {
	float: left;
	width: 66.667%;
}

/**********
Block: News
**********/

/* Block: News > Feature */
.post--feature {
	margin-bottom: 20px;
}

/* Block: News > Splash */
.column--splash + .column--splash {
	margin-top: 20px;
}

.post--splash .title--lg {
	margin-top: 10px;
	margin-bottom: 10px;
}

/* Block: News > Grid */
.column--grid:nth-child(2n + 1) {
	clear: both;
}

.block--grid .post--grid .title--sm {
	padding-top: 10px;
	padding-bottom: 10px;
}

.block--grid .post--grid {
	margin-bottom: 20px;
}

.block--grid .post--grid {
	position: relative;
	padding-bottom: 32px;
}

.block--grid .post--grid .timestamp {
	position: absolute;
	bottom: 10px;
	left: 0;
	display: block;
}

.block-has-bg .post--grid .timestamp {
	margin-left: 10px;
}

/*************
Block: Gallery
*************/

/* Block: Gallery > Pager */
.gallery__pager,
.gallery__page {
	display: -webkit-box;
	display: -webkit-flex;
	display: -ms-flexbox;
	display: flex;
}

.gallery__pager {
	-webkit-flex-flow: row;
	-ms-flex-flow: row;
	flex-flow: row;

	-webkit-flex-wrap: wrap;
	flex-wrap: wrap;

	background-color: #fafafa;
}

.gallery__page {
	float: left;

	-ms-flex-direction: column;
	-webkit-flex-direction: column;
	flex-direction: column;

	position: relative;
	padding: 10px;
	width: 33.333%;
	line-height: 130%;
	background-color: #eee;
	font-size: 75%;
}

.gallery__page:hover {
	background-color: #ddd;
}

.gallery__page.js-pager-active {
	color: #fff;
}

.gallery__page.js-pager-active:before {
	content: '\f500';
	z-index: 1000;
	position: absolute;
	top: -18px;
	left: 50%;
	display: block;
	margin-left: -10px;
	width: 20px;
	height: 20px;
	line-height: 20px;
	font-family: 'Genericons';
	font-size: 20px;
}

.gallery__pager--default {
	width: 100%;
}

.gallery__pager--default > .gallery__page {
	display: block;
	width: 100%;
	font-size: 100%;
}

/* Block: Gallery > Gallery */
.gallery__viewport {
	position: relative;
}

.gallery__container {
	position: relative;
	overflow: hidden;
}

.gallery__container:before {
	background-color: transparent;
}

.gallery__container.js-gallery-not-ready img {
	display: none;
}

.gallery__group {
	position: relative;
	left: 0;
	width: 1000%;
	background-color: #333;
	overflow: hidden;
}

.gallery__group.gallery-position__0{left:0}
.gallery__group.gallery-position__1{left:-100%}
.gallery__group.gallery-position__2{left:-200%}
.gallery__group.gallery-position__3{left:-300%}
.gallery__group.gallery-position__4{left:-400%}
.gallery__group.gallery-position__5{left:-500%}
.gallery__group.gallery-position__6{left:-600%}

.gallery {
	float: left;
	width: 10%;
	overflow: hidden;
}

.gallery.js-gallery-active {
	opacity: 1;
}

.gallery__slide {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

/* Block: Gallery > Images */
.gallery__link {
	position: relative;
	display: block;
	height: 100%;
	background-color: #222;
}

.gallery__media {
	display: block;
	margin: 0 auto;
	width: auto;
	height: 100%;
	opacity: .95;
}

.gallery__media:hover {
	opacity: 1;
}

/* Block: Gallery > Meta */
.gallery__meta {
	padding-bottom: 16px;
	max-height: 0;
}

.js-active-gallery .gallery__meta {
	max-height: 300px;
}

/* Block: Gallery > Meta > Captions */
.gallery-caption__wrap {
	position: relative;
	padding: 10px 118px 10px 10px;
	min-height: 48px;
}

.gallery-caption {
	display: block;
	font-size: 81.25%;
	color: #fff;
}

.gallery-caption:after {
	content: 'Read More';
	position: absolute;
	top: 10px;
	right: 10px;
	display: block;
	padding: 4px 6px;
	border: 1px solid #555;
	background-color: transparent;
	font-weight: 600;
	font-size: 87.5%;
	text-transform: uppercase;
	color: #fff;
}

.gallery-caption:hover:after {
	border-color: #fff;
	background-color: #fff;
	color: #000;
}

/* Block: Gallery > Meta > Gallery Thumbnails */
.gallery__thumbs {
	padding: 8px;
	border-top: 1px solid #444;
	width: auto;
	height: 64px;
	list-style: none;
	white-space: nowrap;
	overflow-x: scroll;
}

.gallery__thumbs::-webkit-scrollbar {
	height: 8px;
}

.gallery__thumbs::-webkit-scrollbar-track {
	background-color: #222;
}

.gallery__thumb-item {
	display: inline-block;
	margin-right: 4px;
	border: 1px solid #333;
	width: 80px;
	height: 48px;
	background-color: #eee;
	opacity: .33;
	vertical-align: top;
}

.gallery__thumb-item:hover {
	cursor: pointer;
	opacity: 1;
}

.gallery__thumb-item.cycle-pager-active {
	border-color: #999;
	opacity: 1;
}

.gallery__thumb-item.format-video-play {
	position: relative;
	background-color: #222;
}

.gallery__thumb-item.format-video-play:before {
	position: absolute;
	top: 50%;
	left: 50%;
	margin-top: -10px;
	margin-left: -10px;
	width: 20px;
	height: 20px;
	line-height: 20px;
	font-size: 16px;
	text-align: center;
	text-indent: 2px;
	color: #fff;
}

/**************
Block: Carousel
**************/

.block--carousel__title {
	position: relative;
}

.block--carousel__title {
	margin-bottom: 20px;
	min-height: 32px;
}

.block--carousel__title > .title--block {
	margin-bottom: 0;
	padding-left: 40px;
	padding-right: 40px;
	min-height: 32px;
	line-height: 32px;
}

.block--carousel__title .title--block__link:hover {
	color: #000;
}

.carousel {
	height: 320px;
}

.carousel.js-off {
	background: #fff url(../images/icons/carousel-loader.gif) center center no-repeat;
	overflow: hidden;
}

.carousel__ui {
	z-index: 1000;
	position: absolute;
	top: 0;
	display: block;
	width: 32px;
	height: 32px;
	line-height: 32px;
	text-align: center;
	font-size: 24px;
	font-weight: bold;
}

.carousel__ui:hover {
	background-color: #000 !important;
	cursor: pointer;
}

.carousel__prev{left:0}
.carousel__next{right:0}

.carousel__slide {
	padding-left: 10px;
	padding-right: 10px;
	vertical-align: top;
}

.carousel.js-off .carousel__slide {
	display: none !important;
}

.carousel__slide .post {
	margin: 0 auto;
	max-width: 320px;
}

.carousel__slide .category-label {
	z-index: 1;
}

.carousel__slide .title--sm {
	padding-top: 10px;
	padding-bottom: 10px;
}

.carousel__slide a {
	white-space: normal;
}

/*************
Block: Product
*************/

/* Block: Product > Feature */
.post--feature {
	margin-bottom: 20px;
}

/* Block: Product > Grid */
.block--product .column--grid:nth-child(2n + 1){clear:none}
.block--product .column--grid:nth-child(3n + 1){clear:both}

/*****************
Block: Advertising
*****************/

.block--advertising > .wrap {
	max-width: 970px;
}

.block--advertising,
.block--advertising > .wrap {
	padding: 0;
}

/**********
Block: Poll
**********/

.poll__wrap {
	margin-left: auto;
	margin-right: auto;
	padding: 20px;
	width: 50%;
	min-width: 300px;
	background-color: #fff;
}

/***************
Block: Papertray
***************/

.block--papertray {
	min-height: 270px;
}

.block--papertray .lazyload_container:last-of-type > .post--list:last-of-type {
	border-bottom: 0;
}

/************
Block Widgets
************/

/* Block Widgets > All */
.block-widget__title {
	padding-bottom: 8px;
	border-bottom: 2px solid #e5e5e5;
	line-height: 100%;
	color: #000;
}

.block-widget--mpu,
.block-widget--promotion {
	max-width: 300px;
}

/* Block Widgets > MPU */
.block-widget--mpu {
	margin-bottom: 0;
}

.block-widget--mpu > .dfp-ad {
	margin-bottom: 20px;
}

/* Block Widgets > Collection */
.block-widget--collection .category-label {
	display: none;
}

.block-widget--collection .excerpt {
	display: block;
	font-size: 75%;
}

.block-widget--collection .package-list {
	padding-top: 5px;
	border-top: 1px solid #ddd;
}

.block-widget--collection .post--list {
	border: 0;
}

/* Block Widgets > Promotion */
.block-widget--promotion__link {
	display: block;
}

/* Block Widgets > Template Parts */
.block-widget .post--list {
	padding-left: 90px;
	min-height: 48px;
}

.block-widget .thumbnail {
	width: 80px;
	height: 48px;
}

/* Block Widgets > Text */
.block-widget--text .cms p:first-of-type {
	padding-bottom: 0;
	border-bottom: 0;
	line-height: 150%;
	font-size: 100%;
}

/* Block Widgets > Video */
.block-widget--video .block-widget__title {
	margin-bottom: 10px;
	line-height: 20px;
}

.block-widget--video .genericon {
	float: left;
	margin-right: 6px;
	padding: 2px;
	width: 16px;
	height: 16px;
	line-height: 16px;
	background-color: #555;
	font-size: 12px;
	color: #fff;
}

/* Block Widgets > Third Party */
.block-widget--dianomi iframe {
	display: block;
	margin: 10px auto 0 !important;
}

/***********
Post Package
***********/

.package--post {
	margin-bottom: 0;
}

/* Post Package > Default */
.package--post .thumbnail {
	float: left;
	width: 66%;
	width: calc(100% - 320px);
}

.package--post .package-list {
	float: right;
	width: 34%;
	width: 300px;
}

.entry--featured .icon-list .list__item {
	padding-top: 5px;
	padding-bottom: 5px;
}

.entry--featured .icon-list .list__link {
	font-size: 87.5%;
	font-weight: 300;
}

/*************
Error Handling
*************/

.block__error-message {
	padding: 20px;
	background: url('../images/backgrounds/bg_error.png') repeat;
}

.block__error-title,
.block__error-desc {
	float: left;
	padding: 10px;
	background-color: #fff;
}

.block__error-title {
	font-size: 150%;
}

.block__error-title .genericon {
	font-size: 24px;
}

.block__error-desc {
	clear: both;
	line-height: 140%;
	font-size: 87.5%;
}

.block__error-desc > strong {
	font-weight: 700;
}

/*******************
CSS3 Vendor Prefixes
*******************/

.gallery__thumbs::-webkit-scrollbar-thumb,
.gallery-caption:after {
	-moz-border-radius: 4px;
	-ms-border-radius: 4px;
	-o-border-radius: 4px;
	-webkit-border-radius: 4px;
	border-radius: 4px;
}

.gallery__media,
.gallery__thumb-item {
	-moz-transform: translateZ(0);
	-ms-transform: translateZ(0);
	-o-transform: translateZ(0);
	-webkit-transform: translateZ(0);
	transform: translateZ(0);
}

/*************
Media: <=767px
*************/

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

	.title--block {
		margin-bottom: 10px;
		font-size: 150%;
	}

	.block {
		margin-top: 10px;
		margin-bottom: 10px;
	}

	.block > .wrap {
		padding-top: 10px;
		padding-bottom: 10px;
	}

	/* Block: Package > Top Package */
	.synopsis__package--top,
	.package--top .package-list {
		position: static;
		margin-top: 10px;
		width: 100%;
	}

	.package--top .thumbnail {
		margin-bottom: 10px;
	}

	.package--top .cta--bg,
	.package--top__signup {
		position: relative;
		bottom: auto;
		right: auto;
		margin: 20px auto 0 auto;
		width: 100%;
	}

	/* Block: Package > Main Packages */
	.package--main {
		margin-top: 20px;
		margin-bottom: 0;
	}

	/* Block: News */
	.block--grid .post--grid .title {
		min-height: 0 !important;
	}

	/* Block: Gallery */
	.gallery__pager {
		display: block !important;
		height: auto;
		background-color: transparent;
		overflow: hidden;
	}

	.gallery__page {
		display: block;
		float: none;
		margin: 0;
		padding-left: 30px;
		border-bottom: 1px dashed #ddd;
		width: 100%;
		height: auto;
		min-height: 40px;
		background-color: transparent;
		font-size: 87.5%;
		text-align: left;
	}

	.gallery__page:last-child {
		border: 0;
	}

	.gallery__page.js-pager-active {
		background-color: transparent;
	}

	.gallery__page.js-pager-active:before {
		content: '\f429';
		position: relative;
		top: -1px;
		left: 0;
		float: left;
		margin-left: -30px;
		padding: 2px;
		width: 16px;
		height: 16px;
		line-height: 16px;
		font-family: 'Genericons';
		font-size: 20px;
		font-weight: bold;
		text-indent: -1px;
		color: #fff;

		-moz-border-radius: 50%;
		-ms-border-radius: 50%;
		-o-border-radius: 50%;
		-webkit-border-radius: 50%;
		border-radius: 50%;
	}

	.gallery__page.js-pager-active:after {
		content: '';
		position: absolute;
		bottom: 65%;
		left: 8px;
		display: block;
		width: 4px;
		height: 600px;
	}

	.gallery .cycle-slideshow {
		min-height: 0;
	}

	.gallery-caption__wrap {
		padding: 10px;
	}

	.gallery-caption__text {
		position: static;
		display: block;
		margin: 20px auto 10px auto;
		padding: 10px;
		border-color: #fff;
		width: 120px;
		background-color: #fff;
		font-size: 15px;
		text-align: center;
		color: #000;
	}

	/* Post Package > Default */
	.package--post .thumbnail {
		float: none;
		width: 100%;
	}

	.package--post .package-list {
		float: none;
		margin-top: 10px;
		width: 100%;
	}

	.gallery__pager--default > .gallery__page {
		border-bottom: 1px dashed #ddd;
		font-weight: 600;
	}
}

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

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

	.package--top__synopsis {
		position: absolute;
		top: 0;
		bottom: 0;
		right: 0;
		width: 300px;
	}

	.package--top__synopsis-wrap {
		height: 100%;

		-webkit-justify-content: space-between;
		justify-content: space-between;
	}

	.package--top__synopsis-wrap,
	.package--top__synopsis-wrap > div,
	.package--top__synopsis-wrap > ul,
	.package--top__synopsis-wrap > a {
		display: -webkit-box;
		display: -webkit-flex;
		display: -ms-flexbox;
		display: flex;

		-webkit-flex-direction: column;
		-ms-flex-direction: column;
		flex-direction: column;
	}

	.gallery__page {
		-moz-box-shadow: inset 1px 1px 0px rgba(0,0,0,.05);
		-ms-box-shadow: inset 1px 1px 0px rgba(0,0,0,.05);
		-o-box-shadow: inset 1px 1px 0px rgba(0,0,0,.05);
		-webkit-box-shadow: inset 1px 1px 0px rgba(0,0,0,.05);
		box-shadow: inset 1px 1px 0px rgba(0,0,0,.05);
	}
}

/*************************
Media: >=768px && <=1024px
*************************/

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

	.block .wrap {
		width: 100%;
	}

	/* Block: Gallery */
	.gallery__page {
		font-size: 75%;
	}

	/* Post Blocks */
	.package--post .icon-list .list__item {
		padding-top: 5px;
		padding-bottom: 5px;
	}

	/* Post Package > Gallery */
	.gallery__pager--default > .gallery__page {
		padding: 15px;
		text-align: center;
	}
}

/**************
Media: >=1025px
**************/

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

	/* Block: Package > Main Packages */
	.package--main .title {
		height: 75px;
	}

	/* Post Package > Default */
	.package--post .icon-list .list__item {
		padding-top: 10px;
		padding-bottom: 10px;
		border-bottom: 1px solid #eee;
	}

	.package--post .icon-list .list__item:last-of-type {
		border: 0 none;
	}

	/* Post Package > Gallery */
	.gallery__pager--default > .gallery__page {
		padding: 20px;
		text-align: center;
	}

	.gallery__pager--default > .gallery__page.js-pager-active:before {
		top: -31px;
		margin-left: -16px;
		width: 32px;
		height: 32px;
		line-height: 32px;
		font-size: 32px;
	}
}
