/* OVERALL STRUCTURE*/
main {
	max-width: var(--global-width);
	margin: 0 5px;

	display:grid;
	grid-template-areas: 
		"preview  	downloads"; 
	grid-template-columns: 7fr 3fr ;
	grid-auto-rows: fit-content(1em);


	--download-columns: 2;
}

/* PREVIEW */

main .MainPreview{
	height: 900px;
	grid-area: preview;
	/*transform: scale(1.25);*/
	display: grid;
    grid-template-rows: 1fr min-content;
}

main .MainPreview > input{
	display: none;
}

main input[data-preview-type="PBRShading"]:checked ~ div[data-preview-type="PBRShading"],
main input[data-preview-type="PBRTiling"]:checked ~ div[data-preview-type="PBRTiling"],
main input[data-preview-type="HDRILighting"]:checked ~ div[data-preview-type="HDRILighting"],
main input[data-preview-type="HDRIExposure"]:checked ~ div[data-preview-type="HDRIExposure"],
main input[data-preview-type="Thumbnail"]:checked ~ div[data-preview-type="Thumbnail"] { 
	display: block; 
}

main input[data-preview-type="PBRShading"]:checked ~ .PreviewTypeSelector label[for="PBRShading"],
main input[data-preview-type="PBRTiling"]:checked ~ .PreviewTypeSelector label[for="PBRTiling"],
main input[data-preview-type="HDRILighting"]:checked ~  .PreviewTypeSelector label[for="HDRILighting"],
main input[data-preview-type="HDRIExposure"]:checked ~  .PreviewTypeSelector label[for="HDRIExposure"],
main input[data-preview-type="Thumbnail"]:checked ~ .PreviewTypeSelector label[for="Thumbnail"] { 
	font-weight: bolder;
}

main .MainPreview > div{
	display:none;
}

main .PreviewTypeSelector{
	display: flex;
	justify-content: center;
	overflow: hidden;
	margin-bottom: 30px;
}

main .PreviewTypeSelector label{
	font-weight: lighter;
	padding: 5px 5px;
	border-radius: 3px;
	display: flex;
    align-items: center;
}

main .PreviewTypeSelector label:hover{
	cursor: pointer;
	background-color: var(--text);
	color: var(--bg);
}

main .PreviewContainer{
	width: 100%;
	overflow: hidden;
}

main .PreviewContainer iframe{
	padding: 15px;
	border:none;
	border-radius: 25px;
	width: 100%;
	height: 100%;
}

main .PreviewContainer img{
	width: 100%;
	height: 100%;
	object-fit:contain;
	background-size: auto 100%;
	background-repeat:no-repeat;
	background-position:center;
}

/* DOWNLOADS AND INFO */

main .Title{
	margin-top: 0px;
	margin-bottom: 0px;
	font-size: max(2em,2cqw);
	text-wrap:nowrap;
	white-space: nowrap;
}

main .AssetInformation{
	grid-area: downloads;
	display: flex;
    flex-direction: column;
    justify-content: flex-start;
	background-color: #00000000;
	z-index: 2;
	background-color: var(--bg);
	margin: 15px;
}

main  .DownloadButtons{
	--column-counter : 2;
	display: grid;
	grid-template-columns: repeat(var(--column-counter),1fr);
	margin: 10px 0px;
	font-size: .95em;
}

main .DownloadCategoryTitle{
	font-weight: bold;
}

main .DownloadCategoryContainer{
	padding: 7px;
}

main .DownloadAttributes{
	margin-left: 5px;
	font-family: 'Fira Mono',monospace;
}
main .DownloadFileType {
    /*background-color: var(--accent-4);*/
	font-family: 'Fira Mono',monospace;
	color:var(--text-subtle);
}

main .DownloadButton{
	display: flex;
	align-items: flex-start;
	padding:5px;
	/*margin: 5px;*/
	/*outline: 3px var(--bg) solid;*/
	border-radius:3px;
	/*border: 1px solid var(--text-subtle-active);*/
	white-space: nowrap;
	flex-wrap: nowrap;
}

main .DownloadButtonSpacer{
	flex-grow:1;
}

main  .DownloadSize{
	text-align: right;
	padding:2px;
	font-size: 1em;
    font-weight: normal;
	opacity: 0.8;
	padding-left: 10px;
	font-family: 'Fira Mono',monospace;
}

main .Details{
	display:grid;
	grid-template-columns: 50% 50%;
	display: grid;
	/*grid-auto-columns: minmax(0,1fr);*/
	grid-template-areas: 
		"type dimensions"
		"tags method"
		"released downloads"
		"shortlink share "
		"description description";
}

main .Details > span{
	padding: 7px;
}

main .Details .DataLabel{
	font-size: .85em;
	font-weight:bold;
}

main .Details .DataLabel::after{
	content: "\a";
	white-space: pre; /* or pre-wrap */
}

main .Details .DataValue{
	display: flex;
	flex-wrap: wrap;
}

main .Details .DataValue input{
	width: 100%;
	background:var(--bg);
	border: 1px solid var(--text);
	border-radius: 2px;
	color: var(--text);
}

main .RelatedAssetsList {
	display: flex;
	flex-wrap: wrap;
}

/* PATREON */

main .PatreonLink{
	padding: 15px;
	min-height: 200px;
	background-size: cover;
	display: flex;
	justify-content: right;
	align-items: center;

	background-blend-mode: multiply;
	border-radius: 4px;

	color: white;
	text-decoration: none;
}

main .PatreonLink:hover{
	text-decoration: underline;
}

main .PatreonLink p{
	width: 66%;
	padding:10px;
	text-align: right;
	font-size: 1.2em;
}

/* RESPONSIVE */

@media only screen and (max-width: 1500px) {
	main{
		grid-template-areas: 
		"preview"
		"downloads"; 
		grid-template-columns: 100% ;
	}

	main .MainPreview{
		height:650px;
	}
}

@media only screen and (max-width: 935px) {
	main .MainPreview{
		height:500px;
	}
}

@media only screen and (max-width: 550px) {
	main .DownloadButtons{
		--column-counter : 1;
	}
}