/*
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;
	background-color: #fff;
}

/* 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 {
	padding-left: 10px;
	padding-right: 10px;

	-moz-box-sizing: border-box;
	-ms-box-sizing: border-box;
	-o-box-sizing: border-box;
	-webkit-box-sizing: border-box;
	box-sizing: border-box;
}

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

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

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

.package--top .excerpt {
	margin-bottom: 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;
}

/**********
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 */
.block--grid .column--grid {
	margin-bottom: 20px;
}

.block--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 {
	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--grid.block-has-bg .category-label,
.block--feature.block-has-bg .category-label {
	padding-left: 10px;
}

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

/* Block: Gallery > Pager */
.gallery__pager {
	background-color: #fafafa;
}

.gallery__page {
	float: left;
	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__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: 11px;
	text-transform: uppercase;
	color: #fff;
	border-radius: 4px;
}

.gallery-caption__read-more:hover {
	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__thumbs::-webkit-scrollbar-thumb {
	border-radius: 4px;
}

.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;
}

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

/**************
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: #FFFFFF url(../images/icons/carousel-loader.gif) center center no-repeat;
}

.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 {
	cursor: pointer;
}

.carousel__prev {
	left: 0;
}

.carousel__next {
	right: 0;
}

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

.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;
}

.carousel.js-off {
	height: auto;
	overflow: visible;
}

.carousel.js-off .carousel__slide {
	float: left;
	width: 31%;
	min-height: 340px;
}

@media screen and (max-width: 895px ) {
	.carousel.js-off .carousel__slide {
		width: 46%;
	}
}

@media screen and (max-width: 600px ) {
	.carousel.js-off .carousel__slide {
		width: 100%;
	}
}

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

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

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

/**********
Block: Text
**********/

.block--text .cms {
	padding-left: 10px;
	padding-right: 10px;
}

.block--text .cms p:first-of-type {
	padding-bottom: 0;
	border-bottom: 0;
	line-height: 150%;
	font-family: inherit;
	font-size: 100%;
}

/**********
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;
}

.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;
}
