/**
 * @file styles/objects/issue_toc.less
 *
 * Copyright (c) 2014-2020 Simon Fraser University
 * Copyright (c) 2003-2020 John Willinsky
 * Distributed under the GNU GPL v3. 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 {
		&:extend(.pkp_unstyled_list);
	}

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

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

	.galleys_links {
		&:extend(.pkp_unstyled_list);
		margin-top: @base;

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

			&:last-child {
				margin-right: 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;

			&:before {
				content: '';
				position: absolute;
				top: 45px;
				left: 0;
				width: 100%;
				border-top: @bg-border;
			}

			h2 {
				display: inline-block;
				position: relative;
				left: -15px;
				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;
			}
		}
	}
}
