/**
 * Metamanager — HTML Sitemap Shortcode Styles
 * Applied to the [gcm_sitemap] shortcode output on the front-end.
 */

.gcm-html-sitemap {
	margin: 0 0 24px;
}

/* Multi-column layouts */
.gcm-html-sitemap--cols-2 > .gcm-sitemap-section {
	display: inline-block;
	width: calc(50% - 12px);
	vertical-align: top;
	margin-right: 16px;
	box-sizing: border-box;
}

.gcm-html-sitemap--cols-2 > .gcm-sitemap-section:nth-child(2n) {
	margin-right: 0;
}

.gcm-html-sitemap--cols-3 > .gcm-sitemap-section {
	display: inline-block;
	width: calc(33.333% - 12px);
	vertical-align: top;
	margin-right: 16px;
	box-sizing: border-box;
}

.gcm-html-sitemap--cols-3 > .gcm-sitemap-section:nth-child(3n) {
	margin-right: 0;
}

/* Individual section */
.gcm-sitemap-section {
	margin-bottom: 28px;
}

.gcm-sitemap-heading {
	font-size: 1.1em;
	font-weight: 700;
	margin: 0 0 10px;
	padding-bottom: 6px;
	border-bottom: 2px solid currentColor;
	color: inherit;
}

/* List */
.gcm-sitemap-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.gcm-sitemap-item {
	padding: 3px 0;
	line-height: 1.5;
}

.gcm-sitemap-item a {
	text-decoration: none;
}

.gcm-sitemap-item a:hover {
	text-decoration: underline;
}

/* Nested (hierarchical) lists */
.gcm-sitemap-item > .gcm-sitemap-list {
	margin-left: 18px;
	margin-top: 4px;
}

/* Date suffix */
.gcm-sitemap-date {
	font-size: 0.8em;
	color: #888;
	margin-left: 6px;
}

/* Term post count */
.gcm-sitemap-count {
	font-size: 0.8em;
	color: #888;
	margin-left: 4px;
}
.gcm-sitemap-count::before { content: "("; }
.gcm-sitemap-count::after  { content: ")"; }

/* Responsive: collapse columns on small screens */
@media (max-width: 640px) {
	.gcm-html-sitemap--cols-2 > .gcm-sitemap-section,
	.gcm-html-sitemap--cols-3 > .gcm-sitemap-section {
		display: block;
		width: 100%;
		margin-right: 0;
	}
}
