/*
Theme Name: Semicolon
Theme URI: http://kovshenin.com/themes/semicolon/
Author: Konstantin Kovshenin
Author URI: http://kovshenin.com
Description: Quite possibly the cleanest magazine theme for WordPress. Demo at http://semicolon.kovshenin.com/
Version: 0.9
License: GNU General Public License
License URI: license.txt
Text Domain: semicolon
Domain Path: /languages/
Tags: white, blue, light, one-column, two-columns, three-columns, four-columns, right-sidebar, responsive-layout, featured-images, threaded-comments, translation-ready, custom-colors, editor-style, microformats

Semicolon is based on Underscores http://underscores.me/, (C) 2012-2013 Automattic, Inc.

Resetting and rebuilding styles have been helped along thanks to the fine work of
Eric Meyer http://meyerweb.com/eric/tools/css/reset/index.html
along with Nicolas Gallagher and Jonathan Neal http://necolas.github.com/normalize.css/
and Blueprint http://www.blueprintcss.org/
*/

$font-headings: 'PT Serif', Georgia, 'Times New Roman', serif;
$font-regular: 'Open Sans', Arial, sans-serif;

$debug: false;
$vrhythm-debug: false;

@import 'css/reset';
@import 'css/underscores';

body {
	background: white;
	@if $vrhythm-debug { background: url('24.png'); }

	font-family: $font-regular;
	font-size: 16px;
	line-height: 24px;
	font-weight: 400;
	color: #444;
}

h1 {
	font-size: 52px;
	line-height: 72px;
	font-family: $font-headings;
	font-weight: 300;

	margin-top: 24px;
	padding-top: 24px;
	margin-bottom: 24px;
}

h2 {
	@extend h1;
	font-size: 28px;
	line-height: 48px;
}

h3 {
	@extend h2;
	font-family: $font-regular;
	font-weight: 700;
	font-size: 18px;
	line-height: 24px;

	/* font size: 16px; */
}

a, a:visited, a:link {
	text-decoration: underline;
}

#page {
	width: 1140px;
	margin: 0 auto;
	/* background: #ccc; */
}

.site-header {
	margin-top: 60px;
}

.site-title {
	@extend h2;
	font-size: 36px;
	margin: 0;
	padding: 0;
}

.site-title a {
	text-decoration: none;
}

.site-description {
	font-family: $font-regular;
	font-size: 14px;
	line-height: 24px;
	margin: 0;
	padding: 0;
	font-weight: 400;
}

.main-navigation {
	margin-top: 48px;
	margin-bottom: 48px;
	border-top: solid 1px;
	position: relative;

	@if $debug { background: rgba(1,0,0,0.04); }

	a {
		text-decoration: none;
		margin-top: -1px;
		padding: 0px 20px;
		border-top: solid 4px transparent;
		height: 48px;
		font-size: 16px;
		line-height: 40px;
	}

	/* Temporarily disable submenus */
	.sub-menu { display: none !important; }

	.menu-toggle { display: none; }
}

ul.semicolon-social {
	padding: 0;
	list-style: none;
	float: right;
	margin-right: 12px;
	color: transparent;

	li a {
		padding-left: 8px;
		padding-right: 8px;
		line-height: 1;
	}

	li:hover { background: none; }
	a span { position: absolute; top: -9999px; left: -9999px; }

	li a::before       { font: normal 20px/40px 'Genericons'; content: '\f408'; }

	li a[href*="codepen.io"]::before      { content: '\f216'; }
	li a[href*="digg.com"]::before        { content: '\f221'; }
	li a[href*="dribbble.com"]::before    { content: '\f201'; }
	li a[href*="facebook.com"]::before    { content: '\f203'; }
	li a[href*="flickr.com"]::before      { content: '\f211'; }
	li a[href*="plus.google.com"]::before { content: '\f206'; }
	li a[href*="github.com"]::before      { content: '\f200'; }
	li a[href*="instagram.com"]::before   { content: '\f215'; }
	li a[href*="linkedin.com"]::before    { content: '\f208'; }
	li a[href*="pinterest.com"]::before   { content: '\f210'; }
	li a[href*="polldaddy.com"]::before   { content: '\f217'; }
	li a[href*="getpocket.com"]::before   { content: '\f224'; }
	li a[href*="reddit.com"]::before      { content: '\f222'; }
	li a[href*="skype.com"]::before,
	li a[href*="skype:"]::before          { content: '\f220'; }
	li a[href*="stumbleupon.com"]::before { content: '\f223'; }
	li a[href*="tumblr.com"]::before      { content: '\f214'; }
	li a[href*="twitter.com"]::before     { content: '\f202'; }
	li a[href*="vimeo.com"]::before       { content: '\f212'; }
	li a[href*="wordpress.org"]::before,
	li a[href*="wordpress.com"]::before   { content: '\f205'; }
	li a[href*="youtube.com"]::before     { content: '\f213'; }
	li a[href$="/feed/"]::before,
	li a[href$="/feed"]::before,
	li a[href$="?feed=rss2"]::before      { content: '\f413'; }
}

.page-description {
	margin: 0 0 48px 0;
	padding: 12px 24px;
	p { margin-bottom: 0; margin-top: 24px; }
}

.entry-title,
.page-title {
	margin-top: 0;
	padding-top: 0;
	margin-bottom: 24px;
	overflow: hidden;

	@if $debug { background: purple; }
}

hr {
	border-top: solid 1px #ccc;
	border: 0;
	height: 24px;
	margin-top: 0;
	margin-bottom: 0;

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

.grid .page-title {
	@extend h2;
	margin-top: 0;
	padding-top: 0;
	margin-bottom: 0;
	font-size: 18px;
	line-height: 36px;
}

@mixin grid-item {
	float: left;
	width: 150px;
	margin-bottom: 48px;
	margin-right: 60px;

	.post-thumbnail {
		display: block;
		float: left;
		clear: both;
		margin-bottom: 6px;
		width: 150px;
		height: 150px;
		text-align: center;
		overflow: hidden;

		span {
			display: block;
			width: 1000px;
			margin-left: -1 * ( ( 1000px - 150px ) / 2 );
			height: 100%;
		}

		img {
			height: 100%;
			width: auto;
			max-width: none;
			display: inline-block;
		}
	}

	.entry-title {
		@extend h2;
		width: 150px + 30px;

		margin-top: 0;
		padding-top: 0;
		margin-bottom: 0;
		font-size: 16px;
		line-height: 24px;
		a {
			text-decoration: none;
			margin-bottom: 12px;
			display: block;
		}
	}

	.entry-header {
		position: relative;
	}

	&.semicolon-last {
		margin-right: 0;
	}
}

.grid article {
	@include grid-item;
}

/* Featured images are featured in JS-mode only */
.js.grid {
	article.semicolon-featured {
		@include grid-item;

		width: 360px;
		.post-thumbnail {
			width: 360px;
			height: 210px;

			span { margin-left: -1 * ( ( 1000px - 360px ) / 2 ); }
		}

		.entry-title {
			width: 360px + 30px;
			font-size: 24px;
			line-height: 36px;
		}
	}
}

body.no-js {
	/* There's an h3 before the first article in related content, hence +1 */
	&.grid article:nth-child(4n+0),
	.related-content article:nth-child(4n+1) {
		@if $debug { background: red; }
		margin-right: 0;
	}

	&.grid article:nth-child(4n+0) + article,
	.related-content article:nth-child(4n+1) + article {
		@if $debug { background: blue; }
		clear: left;
	}
}

.entry-content {
	margin: 0;

	iframe,
	embed {
		margin-top: 24px;
		margin-bottom: 24px;
	}

	img.size-full,
	img.size-large {
		margin-top: 36px;
		margin-bottom: 36px;
		display: block;
	}

	img.alignnone,
	.wp-caption.alignnone img {
		display: block;
	}

	img.alignright,
	img.alignleft,
	.wp-caption.alignleft img,
	.wp-caption.alignright img {
		margin-top: 0;
	}

	.wp-caption img.size-full,
	.wp-caption img.size-large {
		margin-bottom: 0;
	}

	.wp-caption {
		margin-bottom: 24px;
		max-width: 100%;
	}

	.wp-caption-text {
		@extend .entry-meta;
		margin-top: 12px;
		margin-bottom: 12px;
		display: block;
	}
}

table {
	td, th {
		padding: 8px 8px;
	}

	thead th {
		border-bottom: solid 3px;
	}

	tbody th, td {
		border-bottom: solid 1px;
	}
}

.post-password-form {
	input[type="submit"] {
		margin-top: 12px;
	}
}

.gallery {
	margin-left: -60px;
	margin-top: 24px;
	padding-top: 0px;
	margin-bottom: 0px;
	float: left;

	.gallery-item {
		width: 220px;
		float: left;
		margin-left: 60px;
		min-height: 220px + 68px;

		.gallery-icon,
		.gallery-icon a, img, .gallery-caption {
			float: left;
		}
	}

	.gallery-caption {
		margin-top: 8px;
		margin-bottom: 24px;
		width: 100%;
	}

	&.gallery-columns-1 .gallery-item {
		clear: left;
		width: 100%;
		min-height: 0;
		margin-bottom: 24px;
	}

	&.gallery-columns-2 .gallery-item {
		&:nth-child(2n+1) { clear: left; }
		width: 360px;
		min-height: 360px + 60px;

		.gallery-caption { margin-top: 12px; }
	}
	&.gallery-columns-3 .gallery-item {
		&:nth-child(3n+1) { clear: left; }
		width: 220px;
		min-height: 220px + 68px;
	}
	&.gallery-columns-4 .gallery-item {
		&:nth-child(4n+1) { clear: left; }
		width: 150px;
		min-height: 150px + 66px;

		.gallery-caption { margin-top: 6px; }
	}
}

blockquote:before {
	content:'\201C';
	display: block;
	position: absolute;
	margin-left: -40px;
	margin-top: 26px;
	font-family: $font-headings;
	font-size: 64px;
	line-height: 16px;
}

.related-content {
	float: left;
	width: 100%;

	.related-content-title {
		@extend h2;
		font-size: 18px;
		padding-top: 0;
	}

	article {
		@include grid-item;
	}
}

.entry-meta {
	font-size: 13px;
	line-height: 24px;

	a {
		text-decoration: none;
	}
}

.single .author {
	margin-bottom: 24px;
	float: left;
	width: 100%;
	clear: both;

	h3 {
		@extend h2;
		font-size: 18px;
		padding-top: 0;
		margin-top: 0;
		margin-bottom: 0;

		a {
			text-decoration: none;
		}
	}

	.author-bio {
		display: block;
		margin-left: 80px;
		
		h3, p { clear: none; }
	}

	.avatar {
		width: 60px;
		height: 60px;
		float: left;
		margin-top: 17px;
	}

	time {
		font-size: 13px;
		font-family: $font-regular;
		font-weight: normal;

		&::before {
			content: ' / ';
		}
	}
}

body.page .author {
	display: none;
}

.taxonomy {
	float: left;
	width: 100%;
	clear: both;
	margin-bottom: 24px;
	margin-top: 24px;
}

.post-categories,
.post-tags {
	list-style: none;
	margin: 0;
	float: left;

	li { float: left; }

	a {
		float: left;
		padding: 0 10px;
		font-size: 13px;
		line-height: 32px;
		height: 32px;
		text-decoration: none;
		margin-right: 4px;
		margin-bottom: 4px;
	}
}

time.updated {
	display: none;
}

.grid .entry-meta .author,
.related-content .author {
	display: none;
}

#primary {
	width: 150px * 4 + 3 * 60;
	float: left;
	display: block;
	@if $debug { background: yellow; }
}

.widget-area {
	float: right;
	width: 300px;

	.sidebar-primary,
	.sidebar-secondary,
	.sidebar-tertiary {
		/*padding: 24px 24px;*/
	}

	.sidebar-primary {
		aside:last-child {
			p:last-child {
				margin-bottom: 0;
			}
		}
	}

	.widget-title {
		@extend h2;
		font-size: 18px;
		line-height: 24px;
		margin-top: 0;
		padding-top: 0;
		margin-bottom: 24px;
	}

	.widget {
		margin-bottom: 12px;
		padding: 24px 24px;
	}
}

.home .widget-area .sidebar-primary {
	min-height: 240px;
}

.paging-navigation {
	width: 100%;
	display: block;
	float: left;
	clear: both;
	border-top: solid 1px;
	text-align: center;

	.pagination {
		margin-top: -1px;
	}

	.page-numbers {
		display: inline-block;
		padding: 0px 14px;
		font-size: 20px;
		line-height: 40px;
		height: 48px;
		font-weight: 400;
		border-top: solid 4px transparent;
		text-decoration: none;
	}
}

.comments-area {
	float: left;
	width: 100%;
}

.comments-title {
	@extend h2;
	margin-top: 0;
	padding-top: 0;
}

.comment-list {
	list-style: none;
	margin-left: 80px;

	ul.children {
		list-style: none;
		margin-left: 80px;
	}
}

.comment-meta {
	position: relative;

	.comment-author {
		@extend h2;
		font-size: 18px;
		line-height: 24px;
		margin-top: 24px;
		padding-top: 24px;
		margin-bottom: 0;

		b {
			font-weight: normal;
			display: block;
			font-style: normal;
			padding-top: 12px;
		}

		.says {
			display: none;
		}

		a {
			text-decoration: none;
		}
	}

	img.avatar {
		position: absolute;
		left: -80px;
		width: 60px;
		height: 60px;
		margin-top: 6px;
	}

	.comment-metadata {
		@extend .entry-meta;
		margin-bottom: 24px;
	}
}

#respond {
	label {
		display: block;
		margin-bottom: 12px;
	}

	#reply-title {
		@extend h2;
		font-size: 18px;
		margin: 0 0 12px 0;

		small {
			line-height: 24px;
		}
	}

	.required {
		color: darken( red, 5% );
	}

	textarea {
		height: 240px;
	}
}

.form-allowed-tags {
	display: none;
}

button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.button-primary,
a.button-primary {
	border: none;
	font-family: $font-regular;
	font-size: 16px;
	padding: 12px 20px;
	cursor: pointer;
	text-decoration: none;
	display: inline-block;
}

.button,
.button-secondary,
a.button,
a.button-secondary {
	@extend .button-primary;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
	border: solid 1px;
	line-height: 24px;
	font-size: 16px;
	display: block;
	padding: 8px;
	margin: 0;

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

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"] {
	height: 36px;
}

.site-footer {
	@extend .entry-meta;
	max-width: 780px;
	margin: 48px 0;

	.widget-area {
		width: 100%;
		margin-bottom: 24px;

		.footer-sidebar {
			margin-left: -60px;
		}

		ul {
			list-style: none;
			margin-left: 0;
		}

		.widget {
			padding: 0;
			margin: 0;
			float: left;
			margin-left: 60px;
			width: 220px;
		}
	}
}

.semicolon-clear-left {
	clear: left;
	@if $debug { background: red; }
}

.sticky, .bypostauthor { /* Nothing */ }

/* Inline Controls */
.semicolon-inline-controls { 
	display: none;
}

/* No inline controls when Customizer is active. */
body.semicolon-customizing .semicolon-inline-controls {
	display: none !important;
}

.semicolon-anchor {
	position: absolute;
	visibility: hidden;
	top: 0;
}

body.admin-bar .semicolon-anchor {
	top: -80px; /* Adjust for fixed header */
}

.grid article:hover .semicolon-inline-controls {
	display: block;
	position: absolute;
	top: 12px;
	right: 12px;
	background: red;
	float: left;
	background: #333;

	box-shadow: 0 1px 3px rgba(0,0,0,0.5);
	-webkit-box-shadow: 0 1px 3px rgba(0,0,0,0.5);
	-moz-box-shadow: 0 1px 3px rgba(0,0,0,0.5);

	a {
		display: block;
		float: left;
		clear: both;
		padding: 6px;
		width: auto;
		height: auto;
		color: white;
		text-decoration: none;
	}
}

.grid article.semicolon-featured a.semicolon-featured-toggle {
	color: #dfd319;
	&:hover {
		color: darken( #dfd319, 10% );
	}
}

@import 'css/respond';