/**
 * @file styles/objects/issue_toc.less
 *
 * Copyright (c) 2014-2017 Simon Fraser University
 * Copyright (c) 2003-2017 John Willinsky
 * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
 *
 * @brief Styles applying to an issue table of contents view
 * @link templates/frontend/objects/issue_toc.tpl
 */
.obj_issue_toc {

	h3 {
		display: inline-block;
		margin-top: @double * 2;
		border-bottom: 2px solid @text;
		font-size: @font-base;
		line-height: @double - 2; // Adjust for border
	}

	.cover {
		display: block;
		margin-bottom: @double;

		img {
			display: block;
			max-height: 250px;
			width: auto;
		}
	}

	.description {

		> *:first-child {
			margin-top: 0;
		}

		> *:last-child {
			margin-bottom: 0;
		}
	}

	.pub_id {
		margin: @double 0;

		.type {
			font-weight: @bold;
		}
	}

	.published {
		margin: @double 0;

		.label {
			font-weight: @bold;
		}
	}

	.articles,
	.galleys_links {
		&:extend(.pkp_unstyled_list);
	}

	.galleys_links {

		li {
			display: inline-block;
			margin-right: 1em;

			&:last-child {
				margin-right: 0;
			}
		}
	}

	.articles > li {
		.pkp_helpers_clear();
		margin-bottom: @triple;
	}

	.sections:not(:first-child) {
		margin-toP: @triple * 2;
	}

	.section:last-child .articles > li:last-child {
		margin-bottom: 0;
	}

	@media(min-width: @screen-tablet) {

		.heading {
			.pkp_helpers_clear;
		}

		.cover {
			float: left;
			width: 25%;
			height: auto;
			max-height: none;
			margin-right: @double;
		}

		.galleys,
		.section {
			position: relative;
			margin: @triple -@double;
			padding: @triple;
			border-top: @bg-border;

			h2 {
				position: absolute;
				top: -15px;
				left: @triple / 2;
				margin-top: 0;
				padding: 0 (@triple / 2);
				background: @lift;
				font-size: @font-bump;
				font-weight: @normal;
				color: @text-light;
			}
		}
	}

	@media(min-width: @screen-desktop) {

		.galleys,
		.section {
			margin: @triple -@triple;
		}

		.cover {
			margin-right: @triple;
			margin-bottom: @triple;

			img {
				max-height: none;
			}
		}
	}
}
