:root {

	/* COLORS */
	--text_color_light: hsl(130, 80%, 89%);

	--hover_color: hsl(135, 30%, 15%);

	--header_border_color: hsl(140, 40%, 37%);
	--link_color_main: hsl(130, 50%, 50%);

	--warning_color: hsl(50, 70%, 70%);
	--error_color: hsl(340, 70%, 70%);
	--error_color_dark: hsl(340, 60%, 10%);
	
	--global_border_radius: 12px;

	/* GRADIENTS */

	--header_gradient: linear-gradient(180deg, #96c27a, #40a755 10%, #255940 90%, #1b3e37);
	--content_gradient: linear-gradient(
		135deg,
		#ffffff04,
		#ffffff25 10%,
		#ffffff04 25%,
		#ffffff04 45%,
		#ffffff25 60%,
		#ffffff04 75%,
		#ffffff04
	);

	--button_gradient: linear-gradient(180deg, #bce1a2, #47b95d 25%, #2b6c4c 75%, #1f4b43);
	--button_gradient_hover: linear-gradient(180deg, #d0eabe, #59cd70 25%, #45b45e 75%, #328874);

	--danger_button_gradient: linear-gradient(180deg, #e1bce1, #b9475d 25%, #6c2c4c 75%, #4b1f43);
	--danger_button_gradient_hover: linear-gradient(180deg, #dea0be, #cd5970 25%, #b4455e 75%, #883274);
	
	--image_backing_gradient: linear-gradient(0deg, #93c785, #47b96d 10%, #2b6c4c 75%, #1f4b43);

	--tag_gradient: linear-gradient(180deg, #9cc5a5, #3ea26c 5%, #286851 95%, #153836);

	--search_gradient: linear-gradient(0deg, #aacd94, #47b95d 5%, #2b6c4c 95%, #1f4b43);
	
	--list_gradient: linear-gradient(180deg, #b3dca5, #7fbb70 5%, #4e985d 25%, #2b6c4c 75%, #1f4b43);

	--pack_view_gradient: linear-gradient(180deg, #bce1a2, #47b95d 10%, #2b6c4c 75%, #1f4b43);

	--gallery_gradient: linear-gradient(180deg, #bce1b2, #47b96d 10%, #2b6c4c 90%, #1f4b43);
	--gallery_gradient_hover: linear-gradient(180deg, #d0eabe, #59cd70 10%, #45b45e 90%, #328874);

	--footer_gradient: linear-gradient(180deg, #77777777, #33333377 10%, #22222277 75%, #00000077);


	/* FONT SIZES */
	--font_size_header_normal: 18px;
	--font_size_header_small: 14px;

	--font_size_gallery: 16px;

	--font_size_list_header: 20px;
	--font_size_list_detail: 16px;

	--font_size_gargantuan: 40px;
	--font_size_massive: 27px;
	--font_size_large: 22px;
	--font_size_medium: 18px;
	--font_size_small: 14px;

	--gallery_entries_per_row: 12;
}

/*
 * Shrink gallery entries based on screen size
 * Do this because firefox cant calc(px / px)
 */
@media (max-width: 1400px) {
	:root {
		--gallery_entries_per_row: 10;
	}
}
@media (max-width: 1200px) {
	:root {
		--gallery_entries_per_row: 8;
	}
}
@media (max-width: 1000px) {
	:root {
		--gallery_entries_per_row: 6;
	}
}
@media (max-width: 800px) {
	:root {
		--gallery_entries_per_row: 4;
	}
}
@media (max-width: 400px) {
	:root {
		--gallery_entries_per_row: 2;
	}
}

@font-face {
	font-family: mainFont;
	src: url(../font/main.woff2);
}

html {
	font-family: mainFont;
	text-shadow: 2px 2px #000000;
	text-overflow: ellipsis;
}

body {
	color: var(--text_color_light);
    background-position: center;
    background-repeat: repeat;
    background-size: 100% 100%;
	margin: 0px;
}

textarea {
	resize: none;
}


@keyframes fade-in {
	0% { transform: scale(1.01); opacity: 0; }
	100% { transform: scale(1); opacity: 1;}
}

main {
	border-radius: var(--global_border_radius);
	background: var(--content_gradient);
	animation: fade-in 0.4s ease-out;
	box-sizing: border-box;
	width: 80%;
	backdrop-filter: blur(4px);
	margin: 32px auto 0px auto;
	box-shadow: 0px 0px 4px #000000;
	transform: translate3d(0,0,0);
}

header {
	padding-top: 32px;
	padding-bottom: 16px;
	background: var(--footer_gradient);
	width: 100%;
	border-radius: var(--global_border_radius);
	box-shadow: 0px 0px 4px #000000;
}


.content {
	box-sizing: border-box;
	margin: 32px auto 0px auto;
	padding: 32px 32px 0 32px;
}

footer {
	margin: 64px 0 64px 0;
	padding-top: 32px;
	padding-bottom: 16px;
	background: var(--footer_gradient);
	width: 100%;
	border-radius: 0 0 var(--global_border_radius) var(--global_border_radius);
	box-shadow: 0px 0px 4px #000000;
}

a {
	color: var(--text_color_light);
	transition: 0.1s;
	text-decoration: none;
}

ul {
	margin: 0px 0px 8px 0px;	
	font-size: var(--font_size_medium);
}

ol {
	margin: 0px 0px 8px 0px;	
	font-size: var(--font_size_medium);
}


h1 {
    text-align: center;
	font-size: var(--font_size_gargantuan);
}
h2 {
    margin: 8px 0px 8px 0px;
    font-size: var(--font_size_massive);
}
h3 {
	margin: 8px 0px 8px 0px;
    font-size: var(--font_size_large);
}

p {
    margin: 0px;
    font-size: var(--font_size_medium);
}

input[type="file"] {
  display: none;
}

th {
	font-size: var(--font_size_large);
}

td {
	font-size: var(--font_size_medium);
}

img {
	border-radius: var(--global_border_radius);
}

.bg {
	height: 100%;
	width: 100%;
	opacity: 1;
	top: 0px;
	left: 0px;
	z-index: -1;
	position: fixed;
	background: url(../img/bg.jpg);
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
}

@keyframes slide-in-left {
	0% { transform: translateX(-20px); opacity: 0; } 
	100% { transform: translateX(0); opacity: 1;} 
}
.slide-in-left {
	animation: slide-in-left 0.5s
}

.form-label {
	color: var(--text_color_light);
	margin: 4px 0 0 0;
	padding: 8px;
	border-radius: var(--global_border_radius) var(--global_border_radius) 0 0;
	display: inline-block;
	box-shadow: 0px 0px 4px #000000 inset, 0px 0px 4px #000000;
	background: var(--button_gradient);
	text-shadow: 2px 2px #000000;
}

.text-input {
	background: var(--search_gradient);
	box-shadow: 0px 0px 4px #000000;
	border-radius: 0 var(--global_border_radius) var(--global_border_radius) var(--global_border_radius);
	border: 0;
	color: var(--text_color_light);
	padding: 8px;
	display: flex;
	font-size: var(--font_size_medium);
	font-family: mainFont;
}

::placeholder {
	opacity: 0.6;
	color:  var(--text_color_light);
}

.warning-text {
	color: var(--warning_color);
}

.error-text {
	color: var(--error_color);
	margin: 8px 0 4px 0;
}

.header {
    overflow: hidden;
    padding-top: 8px;
    padding-bottom: 8px;
	padding-left: 10px;
	padding-right: 10px;
    position: sticky;
    top: 0;
    left: 0;
    width: 100%;
    height: 55px;
    background: var(--header_gradient);
	box-sizing: border-box;
	display: flex;
	z-index: 1;
	justify-content: space-between;
}

.header-title {
	display: flex;
	margin-right: auto;
	flex: 1
}

.header-spacer {
	flex-grow: 1;
}

.header-text {
	font-family: mainFont;
	text-align: left;
	width: fit-content;
	display: inline-block;
	margin: 0;
	font-size: var(--font_size_header_normal);
	flex-shrink: 0;
}

.header-text-site-name {
	color: var(--text_color_light);
	font-size: var(--font_size_header_normal);
	text-decoration: underline;
}

.header-text-site-name:hover {
	color: var(--hover_color);
	text-shadow: 0 0;
}

.header-text-page-name {
    font-size: var(--font_size_header_small);
    animation: slide-in-left 0.5s;
	line-height: normal;
}

.header-search {
	display: absolute;
	flex-grow: 1;
	flex-shrink: 1;
	display: flex;
	max-width: 40%;
}

.header-logo-anchor {
	display: block;
	height: 90%;
	margin-right: 4px;
	margin-top: auto;
	margin-bottom: auto;
	flex-shrink: 0;
}

.header-logo {
	max-height: 100%;
    max-width: 100%;
}


.header-form {
	font-size: var(--font_size_medium);
	font-family: mainFont;
	background: var(--search_gradient);
	color:  var(--text_color_light);
	box-shadow: 0px 0px 2px #000000 inset;
	border: 2px solid var(--header_border_color);
	border-radius: var(--global_border_radius);
	padding: 2px 4px 2px 0px;
	font-weight: 400;
	height: 100%;
	cursor: pointer;
	line-height: 100%;
	box-sizing: border-box;
	margin-top: auto;
	margin-bottom: auto;
	flex-grow: 1;
	flex-shrink: 1;
	display: flex;
}

.header-form-item {
	font-family: mainFont;
	margin: 0px 4px 0px 4px;
}

.header-search-input {
	font-size: var(--font_size_header_normal);
	font-family: mainFont;
	background-color: #00000000;
	color:  var(--text_color_light);
	border: 0px;
	border-radius: var(--global_border_radius);
	padding: 3px 8px 3px 8px;
	height: 100%;
	cursor: pointer;
	box-sizing: border-box;
	margin-top: auto;
	margin-bottom: auto;
	flex-grow: 1;
	flex-shrink: 1;
}

.footer-text {
	font-family: mainFont;
	color: hsl(0, 0%, 80%);
	font-size: var(--font_size_small);
	text-align: center;
	width: 90%;
	margin-left: auto;
	margin-right: auto;
}

.header-button-group {
	display: flex;
	justify-content: end;
	height: 100%;
	flex: 1
}

.button-header {
	font-family: mainFont;
	text-shadow: 2px 2px #000000;
	font-size: var(--font_size_header_normal);
	color:  var(--text_color_light);
    border: 0px;
	border-radius: var(--global_border_radius);
	box-shadow: 0px 0px 4px #000000 inset;
	font-weight: 400;
	height: 100%;
	cursor: pointer;
	transition: 0.1s;
    line-height: 100%;
	box-sizing: border-box;
	margin: auto 2px auto 2px;
	padding: 4px 6px 4px 6px;
	flex-shrink: 0;
	background-image: var(--button_gradient);
}

.button-header:hover {
	color: var(--hover_color);
	text-shadow: 0 0;
	background-image: var(--button_gradient_hover);
	transform: scale(1.02);
	z-index: 1;
}
@media (max-width: 1200px) {
	.no-text-on-small-screen {
		font-size: 0px;
	}
}

.button-header-image {
	height: 100%;
	margin: auto;
	display: inline;
	vertical-align: middle;
}

.button-main {
	font-family: mainFont;
	text-shadow: 2px 2px #000000;
	font-size: var(--font_size_medium);
	color:  var(--text_color_light);
	border: 0px;
	border-radius: var(--global_border_radius);
	box-shadow: 0px 0px 4px #000000 inset;
	font-weight: 400;
	cursor: pointer;
	transition: 0.1s;
	box-sizing: border-box;
	margin: 4px 0px 4px 0px;
	padding: 8px 6px 8px 6px;
	flex-shrink: 0;
	background-image: var(--button_gradient);
	display: inline-block;
}

.button-main:hover {
	color: var(--hover_color);
	text-shadow: 0 0;
	background-image: var(--button_gradient_hover);
	transform: scale(1.02);
	z-index: 1;
}

.button-warning {
	font-family: mainFont;
	text-shadow: 2px 2px #000000;
	font-size: var(--font_size_medium);
	color:  var(--error_color);
	border: 0px;
	border-radius: var(--global_border_radius);
	box-shadow: 0px 0px 4px #000000 inset;
	font-weight: 400;
	cursor: pointer;
	transition: 0.1s;
	box-sizing: border-box;
	margin: 8px 0px 8px 0px;
	padding: 8px 6px 8px 6px;
	flex-shrink: 0;
	background-image: var(--danger_button_gradient);
}

.button-warning:hover {
	color: var(--error_color_dark);
	text-shadow: 0 0;
	background-image: var(--danger_button_gradient_hover);
	transform: scale(1.02);
	z-index: 1;
}

.form-footer {
	margin-top: 4px;
	font-size: var(--font_size_small);
}

/*
 * GALLERY
 * Galleries are horizontal lists of packs, with their thumbnail and title.
 */

.gallery-root {
	opacity: 0;
	margin: 16px 0 16px 0;
	animation: fade-in 0.6s ease-out .2s forwards;
}

.gallery-header {
	color: var(--text_color_light);
	margin: 0;
	padding: 8px;
	border-radius: var(--global_border_radius) var(--global_border_radius) 0 0;
	display: inline-block;
	box-shadow: 0px 0px 4px #000000 inset, 0px 0px 4px #000000;
	background: var(--button_gradient);
	text-shadow: 2px 2px #000000;
}

.gallery-contents {
	background: var(--search_gradient);
	box-shadow: 0px 0px 4px #000000;
	border-radius: 0 var(--global_border_radius) var(--global_border_radius) var(--global_border_radius);
	flex-wrap: wrap;
	box-sizing: border-box;
	display: flex;
	padding: 4px 8px 4px 8px
}

.gallery-item-root {
	box-sizing: border-box;
	width: calc((100% / var(--gallery_entries_per_row)) - 8px);
	aspect-ratio: 2/3;
	overflow: hidden;
	display: block;
	background: var(--gallery_gradient);
	margin: 4px;
	border-radius: var(--global_border_radius);
	transition: 0.2s;
	padding: 4px;
	box-shadow: 0px 0px 4px #000000;
}

.gallery-item-root:hover {
	transform: scale(1.05);
	background: var(--gallery_gradient_hover);
}

.pack-link {
	border-radius: var(--global_border_radius);
	margin: 12px auto 12px auto;
	width:80%;
	width:80%;
	display: block;
}

.gallery-image-parent {
	position: relative;
	width: 90%;
	aspect-ratio: 1;
	margin: 5% auto 5% auto;
	border-radius: var(--global_border_radius);
	z-index: 3;
	display: flex;
	justify-content: center;
	align-items: center;
}

.gallery-image-parent::before {
	background: var(--image_backing_gradient);
	border-radius: var(--global_border_radius);
	z-index: -1;
	content: "";
	width: 100%;
	height: 100%;
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	left: 0;
}

.gallery-image-parent::after {
	box-shadow: 0px 0px 4px #000000 inset;
	border-radius: var(--global_border_radius);
	content: "";
	display: block;
	height: 100%;
	width: 100%;
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	left: 0;
}

.pack-icon {
	object-fit: contain;
	width: 100%;
	aspect-ratio: 1;
	display: inline-block;
	border-radius: var(--global_border_radius);
}

.gallery-entry-name {
	text-align: center;
	text-overflow: ellipsis;
	font-size: var(--font_size_gallery);
	overflow: hidden;

	display: -webkit-box;
  	-webkit-box-orient: vertical;
  	-webkit-line-clamp: 2;
}


@keyframes gallery-item-dropdown {
	0% { transform: translateY(-30px); opacity: 0; }
	100% { transform: translateY(0); opacity: 1;}
}

/*
 * LISTS
 * Lists are as they sound, vertical lists of packs with their name, thumbnail, and description
 */

.list-root {
	background: var(--search_gradient);
	box-shadow: 0px 0px 4px #000000;
	border-radius: 0 var(--global_border_radius) var(--global_border_radius) var(--global_border_radius);
	overflow: hidden;
	flex-wrap: wrap;
	box-sizing: border-box;
	display: flex;
	padding: 8px;
	flex-direction: column;
	min-height: 125px;
}

.list-item-root {
	height: 8rem;
	margin: 4px;
	padding: 4px 12px 4px 6px;
	font-family: mainFont;
	text-shadow: 2px 2px #000000;
	font-size: var(--font_size_small);
	color:  var(--text_color_light);
	border: 0px;
	border-radius: var(--global_border_radius);
	box-shadow: 0px 0px 4px #000000 inset;
	font-weight: 400;
	cursor: pointer;
	transition: 0.1s;
	box-sizing: border-box;
	flex-shrink: 0;
	background-image: var(--list_gradient);
	overflow: hidden;
	width: 100%;
	display: flex;

}

.list-item-root:hover {
	transform: scale(1.005);
	background: var(--gallery_gradient_hover);
}

.list-image-parent {
	display: inline-block;
	position: relative;
	height: 90%;
	max-height: 100px;
	aspect-ratio: 1;
	margin: auto 12px auto 12px;
	border-radius: var(--global_border_radius);
	z-index: 3;
}

.list-image-parent::after {
	box-shadow: 0px 0px 4px #000000 inset;
	border-radius: var(--global_border_radius);
	bottom: 0;
	content: "";
	display: block;
	left: 0;
	height: 100%;
	position: absolute;
	right: 0;
	top: 0;
	width: 100%;
}

.list-contents {
	display: flex;
	flex-direction: column;
	width: 100%
}

.list-image {
	vertical-align: middle;
}

.list-entry-name {
	color: var(--text_color_light);
	font-size: var(--font_size_list_header);
	display: inline-block;
	margin-right: auto;
	max-width: 75%;
	max-height: 2rem;
	text-shadow: 2px 2px #000000;
	overflow: hidden;
	padding-right: 4px; /* Ensures drop shadow renders properly */
}

.list-entry-description {
	color: var(--text_color_light);
	font-size: var(--font_size_list_detail);
	text-shadow: 2px 2px #000000;
	container-type: inline-size;
	overflow: hidden;
	width: 100%;
	text-overflow: ellipsis;
	overflow-wrap: anywhere;
	display: -webkit-box;
  	-webkit-box-orient: vertical;
  	-webkit-line-clamp: 2;
}

.list-entry-tags-parent {
	display: flex;
	margin: auto 0 4px 0;
	flex-wrap: wrap;
}

.list-entry-tag {
	box-sizing: border-box;
	background: var(--tag_gradient);
	margin: 4px 8px 4px 0;
	border-radius: var(--global_border_radius);
	padding: 4px;
	box-shadow: 0px 0px 2px #000000;
}

.list-entry-maker {
	color: var(--text_color_light);
	font-size: var(--font_size_list_detail);
	text-shadow: 2px 2px #000000;
	display: inline-block;
	margin: auto 0 auto auto;
}

@keyframes list-item-dropdown {
	0% { transform: translateX(-30px); opacity: 0; }
	100% { transform: translateX(0); opacity: 1;}
}

/*
 * PACK PAGES
 * Cannot put on its own, as both /pack and /pack/manage use these references
 */

.pack-root {
	display: flex;
	margin-top: 16px;
	overflow: hidden;
}

.pack-left {
	background: var(--pack_view_gradient);
	box-shadow: 0px 0px 4px #000000;
	border-radius: var(--global_border_radius);
	overflow: hidden;
	color: var(--text_color_light);
	box-sizing: border-box;
	width: 300px;
	padding: 8px;
	z-index: 1;
}

@keyframes pack-slide-in {
	0% { transform: translateX(-10%); opacity: 0; }
	100% { transform: translateX(0); opacity: 1;}
}

.pack-right {
	background: var(--pack_view_gradient);
	box-shadow: 0px 0px 4px #000000;
	border-radius: 0 var(--global_border_radius) var(--global_border_radius) 0;
	overflow: hidden;
	color: var(--text_color_light);
	box-sizing: border-box;
	width: 100%;
	margin-top: 32px;
	margin-bottom: 32px;
	padding: 16px;
}



.tos-contents {
	background: var(--tag_gradient);
	box-shadow: 0px 0px 4px #000000;
	border-radius: var(--global_border_radius) var(--global_border_radius);
	overflow: hidden;
	color: var(--text_color_light);
	box-sizing: border-box;
	width: 80%;
	margin: 32px auto 32px auto;
	padding: 16px;
}
