/*
 * Library - Layouts list:
 */

/* Wraps the list of layouts. */
.sclib-query {
	display: flex;
	flex-flow: column nowrap;
	gap: 30px;
	padding: 10px;
	--mobile-bg-mask: #fffc;
}

/* Wraps a layout from the list. */
.sclib-query-post {
	display: flex;
	gap: 10px;
	width: 100%;
	overflow: hidden;
	position: relative;
}

/* Wraps the layout thumbnail. */
.sclib-query-img-wrapper {
	display: block;
	overflow: hidden;
	min-width: 300px;
}

/* The layout thumbnail. */
.sclib-query-img {
	display: block;
	object-fit: cover;
	min-width: 300px;
	width: auto;
	height: 100%;
}

/* Wraps the layout info. */
.sclib-query-text-wrapper {
	padding: 10px;
	width: 100%;
}

/* Layout title link. */
.sclib-query-title {
	display: inline-block;
	text-decoration: none;
	margin-bottom: 10px;
	transition: all 300ms ease;
}
.sclib-query-title:hover {
	text-decoration: underline;
}
/* Layout title: The heading element itself. */
.sclib-query-title h2 {
	color: var(--vid-dark);
	margin: 0;
}

/* Wraps the tags and categories. */
.sclib-query-tags,
.sclib-query-cats {
	display: flex;
	flex-flow: row wrap;
	gap: 5px;
	margin: 5px 0;
	max-width: 200px;
}

/* The tag and category links style. */
.sclib-query-tags a,
.sclib-query-cats a {
	display: inline-block;
	padding: 0 5px 4px 5px;
	background-color: transparent;
	color: var(--vid-dark);
	border-radius: 3px;
	text-decoration: none;
	transition: all 300ms ease;
}
.sclib-query-tags a:hover,
.sclib-query-tags a.current,
.sclib-query-cats a:hover,
.sclib-query-cats a.current {
	background-color: var(--vid-dark);
	color: var(--vid-light);
}

/* Categories style. */
.sclib-query-cats {
	max-width: none;
	--vid-dark: #008866;
}

/* Layout dependency list. */
.sclib-deps {
	margin-right: 5px;
}

/* Layout excerpt / description. */
.sclib-query-excerpt {
	margin-top: 20px;
}

/* Info row. Wraps some info like Author, Date, Plugin version, Tags. */
.sclib-query-info-wrapper {
	display: flex;
	flex-flow: row wrap;
	gap: 40px;
}
/* A info entry that wraps the info itself. */
.sclib-query-info {
	display: flex;
	flex-flow: column nowrap;
}
/* Media query: Small screens, tablets */
@media (max-width: 1000px) {
	/* Bigger thumbnail. */
	.sclib-query-img-wrapper {
		width: 50%;
	}
	.no-img .sclib-query-img-wrapper {
		width: auto;
	}
}
/* Media query: Small tablets, mobiles */
@media (max-width: 600px) {
	/* Thumbnail as a background. */
	.sclib-query-post {
		flex-flow: column nowrap;
	}
	.sclib-query-img-wrapper {
		position: absolute;
		inset: 0;
		z-index: 0;
		width: 100%;
	}
	.sclib-query-img {
		width: 100%;
		height: 100%;
	}
	.sclib-query-img-wrapper::after {
		content: '';
		display: block;
		position: absolute;
		inset: 0;
		background-color: var(--mobile-bg-mask);
		}
	.sclib-query-text-wrapper {
		z-index: 1;
	}
}

/* Pagination. */
.sclib-query-paging-wrapper {
	display: flex;
	flex-flow: row wrap;
	justify-content: center;
	width: 100%;
	gap: 5px;
}

/* Each page button. */
.sclib-query-paging-wrapper .page-numbers:not(.dots) {
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: var(--vid-light);
	color: var(--vid-dark);
	border: 1px solid #c3c4c7;
	padding: 4px 8px;
	text-decoration: none;
}

/* Page button on hover or current page. */
.sclib-query-paging-wrapper .page-numbers:not(.dots):hover,
.sclib-query-paging-wrapper .page-numbers.current {
	background-color: var(--vid-dark);
	color: var(--vid-light);
}

/*
 * Library - Single layout:
 */

/* Layout title. */
.sclib-single-title {
	font-size: 1.6em;
}

/* Layout container. */
.sclib-single-container {
    width: 100%;
    display: flex;
    flex-flow: column nowrap;
}

/* Layout top bar - wrapper. */
.sclib-single-top-bar {
	display: flex;
	flex-wrap: wrap;
    justify-content: space-between;
	align-items: center;
	margin: 0 0 20px 0;
}

/* Wraps the layout columns. */
.sclib-single-wrapper {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 20px;
}

/* The content column. */
.sclib-single-content {
	overflow: hidden;
}
/* The side column. */
.sclib-single-side {
    display: flex;
    flex-flow: column nowrap;
    gap: 10px;
	overflow: hidden;
}
/* Layout excerpt / description. */
.sclib-single-excerpt {
	margin: 10px 0;
	font-size: 15px;
}
/* Layout info entry. */
.sclib-single-info {
    display: flex;
    gap: 10px;
	align-items: baseline;
}
/* Info property. */
.info-prop {
	font-weight: bold;
}
/* Info value. */
.info-value {
	font-style: italic;
}
/* Styles the background color and border of the boxes. */
.sclib-query-post,
.sclib-single-top-bar,
.sclib-single-content,
.sclib-single-side {
	background-color: #fff;
	border: 1px solid #c3c4c7;
    box-sizing: border-box;
}

/* Adds padding to boxes. */
.sclib-single-top-bar,
.sclib-single-content,
.sclib-single-side {
	padding: 10px;
}

/* Scales the thumbnail to fit its container's width. */
.sclib-single-thumbnail img {
    width: 100%;
    height: auto;
}

/* Media query: tablets */
@media (max-width: 768px) {
	/* Single column. */
    .sclib-single-wrapper {
        grid-template-columns: 1fr;
	}
}

/*
 * Library - Upload a layout page.
 */
.sc-layout-upload-wrapper {
	max-width: 640px;
	margin: 0 auto;
}
.sc-intro {
	padding: 10px;
	font-size: 1.4em;
	line-height: 1.4;
	background-color: #c7ebc7;
	border-radius: var(--vid-border-radius);
}
.sc-disclaimer {
	padding: 10px;
	font-size: 1.4em;
	line-height: 1.4;
	background-color: #ffebcc;
	border-radius: var(--vid-border-radius);
}
.sc-step-num {
	position: relative;
	display: inline-flex;
	justify-content: center;
	align-items: center;
	font-weight: bold;
	width: 30px;
	height: 30px;
	background-color: #e6eef5;
	border-radius: 50%;
	margin-right: 5px;
}
.sc-result {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
}

/*
 * Library - Other elements.
 */

/* Code snippet */
.vid-code-snippet {
	font-family: monospace !important;
	background-color: #222c;
	color: #fff;
	overflow-y: scroll;
	border-left: 6px solid #fff3;
	box-shadow: 6px 0 3px #0004;
	max-height: 300px;
	margin: 5px 1vw 5px 1vw;
	tab-size: 4;
}
.vid-code-snippet::selection {
	background-color: #bbb !important;
	color: #333 !important;
}
.vid-code-snippet code {
	font-size: 11px;
}
.vid-code-snippet-wrapper {
	position: relative;
	}
.vid-code-snippet-wrapper .vid-button {
	position: absolute;
	right: 35px;
	top: 10px;
}
/* Code snippet: Copy button, A button */
.vid-button, .vid-copy-btn {
    background-color: var(--vid-dark);
	color: var(--vid-light) !important;
	white-space: nowrap;
	border: 0px;
	border-radius: 2px;
	padding: 10px 20px;
	line-height: 1.2;
}
.vid-button:hover, .vid-copy-btn:hover {
	background-color: var(--vid-darker);
}
.vid-button:focus, input[type=submit]:focus {
	background-color: var(--vid-darker);
	outline: 2px solid var(--vid-darker);
	box-shadow: 0 0 0 1px inset var(--vid-light);
}
a.vid-button {
	display: block;
	width: fit-content;
	color: var(--vid-light) !important;
	background-image: none !important;
}