@use "vars/vars";
@use "vars/vars-night";

@layer vetools {
	// region Custom statblock styling
	#pagecontent .stats__th-name .source {
		position: relative;
		margin-right: 0.2em;
	}

	#pagecontent {
		background:
			url("../img/bestiary/stat-block-top-texture.webp") no-repeat,
			repeat top center,
			vars.$rgb-bg-orange;
	}

	.ve-night-mode {
		#pagecontent {
			background: vars-night.$rgb-bg--night !important;
		}
	}
	// endregion

	// region Proficiency dice rollers
	[data-proficiency-dice-mode="dice"] {
		.rd__dc--rollable {
			color: vars.$rgb-link-blue;
			cursor: pointer;
		}

		.rd__dc--rollable-text,
		.rd__roller--roll-prof-bonus {
			display: none;
		}

		.rd__dc--rollable-dice,
		.rd__roller--roll-prof-dice {
			display: inline;
		}
	}

	[data-proficiency-dice-mode="bonus"] {
		.rd__dc--rollable-text,
		.rd__roller--roll-prof-bonus {
			display: inline;
		}

		.rd__dc--rollable-dice,
		.rd__roller--roll-prof-dice {
			display: none;
		}
	}

	.ve-night-mode [data-proficiency-dice-mode="dice"] .rd__dc--rollable {
		color: vars-night.$rgb-link-blue--night;
	}
	// endregion

	// region Encounter builder
	.best__ {
		&ecgen-active {
			.lst__row--bestiary-sublist {
				cursor: default;
			}

			.lst__row--bestiary-sublist:hover {
				background: initial;
			}
		}
	}

	.best-ecgen {
		&__ {
			&visible,
			&visible--flex,
			&visible--flex-col {
				display: none;
			}

			&btn-list {
				padding: 0 2px;
				line-height: 12px;
				font-size: 9px;
				border-radius: 3px;
			}
		}
	}

	.best__ecgen-active {
		.best-ecgen {
			&__visible {
				display: block;
			}

			&__visible--flex {
				display: flex;
			}

			&__visible--flex-col {
				display: flex;
				flex-direction: column;
			}

			&__hidden {
				display: none !important;
			}

			&__name {
				width: 26.6667%;
			}

			&__name--sub {
				width: 29.1667%;
			}
		}
	}
	// endregion
}
