/* global variables */
:root {
	--page-width: 893px;
	--page-height: 1188px;
	--text-dimmed: #9b9b9b;
	--input-background: rgba(231, 230, 255, 0.71);
	--black: #0A0A0D;
	--background: white;
}

@font-face {
	font-family: scala-sans;
	src: url('fonts/Scala_Sans_Regular_LF.woff2') format('woff2');
}

@font-face {
	font-family: scala-sans;
	font-weight: bold;
	src: url('fonts/Scala_Sans_Bold_LF.woff2') format('woff2');
}

@font-face {
	font-family: SegoeUI;
	src: url('fonts/SegoeUI.woff2') format('woff2');
}

/* index styles */
.tablink {
	background-color: var(--background);
	color: #333;
	border: none;
	outline: none;
	cursor: pointer;
	padding: 4px 8px;
	font-size: 17px;
	height: 28px;
}

.tablink:hover {
	background-color: #ddd;
}

.page {
	display: none;
}

#button-container {
	text-align: center;
}

#page-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* page styles */
.page-container {
	position: relative;
	background-color: var(--background);
	overflow: hidden;
	margin: 0;
	border: 0;
	box-shadow: 1px 1px 3px 1px #333;
	border-collapse: separate;
	width: var(--page-width);
	height: var(--page-height);
	unicode-bidi: bidi-override;
}

.pane {
	position: absolute;
	font-family: scala-sans;
	font-size: 10.6px;
}

.pane .pane-bg {
	position: absolute;
}

.textlabel {
	position: absolute;
	border: none;
	background: none;
}

.textlabel-bold {
	position: absolute;
	border: none;
	background: none;
	font-size: 9.7px;
	font-weight: bold;
	text-align: center;
	line-height: 9.3px;
}

.textlabel-dimmed {
	position: absolute;
	color: var(--text-dimmed);
	border: none;
	background: none;
	font-size: 8px;
}

.button {
	position: absolute;
	border-color: #7c7c7c;
	border-style: solid;
	border-width: 3px;
	color: var(--background);
	background-color: #a8a8a8;
	font-family: 'scala-sans';
	font-size: 8px;
	line-height: 7px;
	padding: 0px;
	cursor: pointer;
	z-index: 1;
}

.inputfield {
	position: absolute;
	background-color: var(--input-background);
	border: none;
	border-width: 0px;
	color: var(--black);
	font-family: SegoeUI;
	overflow: hidden;
	resize: none;
}

.inputfield-notched {
	position: absolute;
	text-align: center;
	background-color: #DEDDDE;
	color: var(--black);
	font-family: SegoeUI;
	border: none;
	border-width: 0px;
	clip-path: polygon(15% 0, 100% 0%, 100% 76%, 85% 100%, 0% 100%, 0% 24%);
	outline: none;
	overflow: hidden;
}

.inputfield-notched-wide {
	position: absolute;
	text-align: center;
	background-color: #DEDDDE;
	color: var(--black);
	border: none;
	border-width: 0px;
	clip-path: polygon(4% 0%, 100% 0%, 100% 80%, 96% 100%, 0% 100%, 0% 20%);
	outline: none;
	overflow: hidden;
}

.inputfield-noneditable {
	position: absolute;
	background-color: transparent;
	border: none;
	border-width: 0px;
	color: var(--black);
	font-family: SegoeUI;
	overflow: hidden;
	resize: none;
	pointer-events: none;
	text-align: center;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

input[type=number] {
	appearance: textfield;
	-moz-appearance: textfield;
}

.radiobox-hint {
	font-size: 7px;
	font-weight: bold;
	position: absolute;
	width: 22px;
	height: 22px;
}

.rotate_m118 {
	-webkit-transform: rotate(-118deg);
	/* Chrome, Opera 15+, Safari 3.1+ */
	-ms-transform: rotate(-118deg);
	/* IE 9 */
	transform: rotate(-118deg);
	/* Firefox 16+, IE 10+, Opera */
}

.rotate_m84 {
	-webkit-transform: rotate(-84deg);
	-ms-transform: rotate(-84deg);
	transform: rotate(-84deg);
}

.rotate_m50 {
	-webkit-transform: rotate(-50deg);
	-ms-transform: rotate(-50deg);
	transform: rotate(-50deg);
}

.rotate_m16 {
	-webkit-transform: rotate(-16deg);
	-ms-transform: rotate(-16deg);
	transform: rotate(-16deg);
}

.rotate_5 {
	-webkit-transform: rotate(5deg);
	-ms-transform: rotate(5deg);
	transform: rotate(5deg);
}

.rotate_41 {
	-webkit-transform: rotate(41deg);
	-ms-transform: rotate(41deg);
	transform: rotate(41deg);
}

.rotate_77 {
	-webkit-transform: rotate(77deg);
	-ms-transform: rotate(77deg);
	transform: rotate(77deg);
}

.pane .checkcircle {
	position: absolute;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background-color: var(--input-background);
	border: 1.5px solid var(--text-dimmed);
	appearance: none;
	-webkit-appearance: none;
	outline: none;
	cursor: pointer;
}

.pane .checkcircle:hover {
	border-color: var(--black);
}

.pane .checkcircle:checked {
	border-color: var(--black);
	background-color: var(--black);
}

.pane .checkbox-ammunition {
	position: absolute;
	background-color: var(--input-background);
	appearance: none;
	-webkit-appearance: none;
	outline: none;
	cursor: pointer;
	margin: 0;
}

.pane .checkbox-ammunition:checked {
	border: none;
	background-color: transparent;
}

.pane .ammunition-arrow {
	width: 10px;
	height: 30px;
	background-image: url("img/page_stats/ammunition/arrow_unchecked.svg");
}

.pane .ammunition-arrow:checked {
	background-image: url("img/page_stats/ammunition/arrow_checked.svg");
}

.pane .ammunition-axe-top {
	width: 10px;
	height: 30px;
	background-image: url("img/page_stats/ammunition/axe_unchecked.svg");
	margin-right: -15px;
	padding-right: 15px;
}

.pane .ammunition-axe-base {
	width: 10px;
	height: 30px;
	background-image: url("img/page_stats/ammunition/axe_unchecked.svg");
	-webkit-transform: rotate(180deg);
	-ms-transform: rotate(180deg);
	transform: rotate(180deg);
	margin-left: -5px;
	padding-left: 15px;
}

.pane .ammunition-axe-top:checked {
	background-image: url("img/page_stats/ammunition/axe_checked.svg");
	margin-right: -15px;
	padding-right: 15px;
}

.pane .ammunition-axe-base:checked {
	background-image: url("img/page_stats/ammunition/axe_checked.svg");
	-webkit-transform: rotate(180deg);
	-ms-transform: rotate(180deg);
	transform: rotate(180deg);
	margin-left: -5px;
	padding-left: 15px;
}

.pane .ammunition-bullet {
	width: 10px;
	height: 12px;
	background-image: url("img/page_stats/ammunition/bullet_unchecked.svg");
}

.pane .ammunition-bullet:checked {
	background-image: url("img/page_stats/ammunition/bullet_checked.svg");
}

.pane .ammunition-dagger {
	width: 10px;
	height: 30px;
	background-image: url("img/page_stats/ammunition/dagger_unchecked.svg");
}

.pane .ammunition-dagger:checked {
	background-image: url("img/page_stats/ammunition/dagger_checked.svg");
}

.pane .ammunition-flask {
	width: 10px;
	height: 30px;
	background-image: url("img/page_stats/ammunition/flask_unchecked.svg");
}

.pane .ammunition-flask:checked {
	background-image: url("img/page_stats/ammunition/flask_checked.svg");
}

.pane .ammunition-hammer-top {
	width: 10px;
	height: 30px;
	background-image: url("img/page_stats/ammunition/hammer_unchecked.svg");
	margin-left: -2.5px;
	padding-left: 10px;
	margin-right: -2.5px;
	padding-right: 5px;
}

.pane .ammunition-hammer-base {
	width: 10px;
	height: 30px;
	background-image: url("img/page_stats/ammunition/hammer_unchecked.svg");
	-webkit-transform: rotate(180deg);
	-ms-transform: rotate(180deg);
	transform: rotate(180deg);
	margin-left: -2.5px;
	padding-left: 10px;
	margin-right: -2.5px;
	padding-right: 5px;
}

.pane .ammunition-hammer-top:checked {
	background-image: url("img/page_stats/ammunition/hammer_checked.svg");
	margin-left: -2.5px;
	padding-left: 10px;
	margin-right: -2.5px;
	padding-right: 5px;
}

.pane .ammunition-hammer-base:checked {
	background-image: url("img/page_stats/ammunition/hammer_checked.svg");
	-webkit-transform: rotate(180deg);
	-ms-transform: rotate(180deg);
	transform: rotate(180deg);
	margin-left: -2.5px;
	padding-left: 10px;
	margin-right: -2.5px;
	padding-right: 5px;
}

.pane .ammunition-spear {
	width: 10px;
	height: 30px;
	background-image: url("img/page_stats/ammunition/spear_unchecked.svg");
	margin-top: -20px;
	padding-top: 50px;
}

.pane .ammunition-spear:checked {
	background-image: url("img/page_stats/ammunition/spear_checked.svg");
}

.pane .whiteout {
	border: none;
	background-color: var(--background);
	position: absolute;
}

.bluetext {
	color: #4055FF;
}


#modalCanvas {
	position: fixed;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, 0.8);
	z-index: 100;
}

.modalDialog {
	position: fixed;
	top: 50%;
	left: 50%;
	-webkit-transform: translate(-50%, -50%);
	transform: translate(-50%, -50%);
	z-index: 101;
	background-color: white;
	border: 2px solid black;
}

.modalTitle {
	border-bottom: 2px solid black;
	padding-bottom: 5px;
	padding-left: 5px;
	padding-right: 5px;
}

.modalContent {
	padding-left: 5px;
	padding-right: 5px;
}

.modalDialogButtonsElement {
	padding: 2px;
	display: grid;
	align-items: center;
	text-align: center;
}

.modalDialogButton {
	display: inline;
	margin-left: 2px;
	margin-right: 2px;
}

.modalDialogButton a.modalDialogButtonLink {
	background-color: #bbbbbb;
	border: 1px solid black;
	padding: 2px;
	text-decoration: none;
	color: black;
}

.modalDialogButton a.modalDialogButtonLink:hover {
	border-width: 2px;
	padding: 1px;
}

.modalDialogButton a.modalDialogButtonLink:focus {
	box-shadow: 0px 0px 0px 1px white inset;
}

#menu {
	position: absolute;
	background-color: #bbbbbb;
	display: grid;
}

/* Context menu */

.cm_container {
	z-index: 201;
}

.cm_container li {
	font-size: 9.3px;
}


/**************/
/* New Styles */
/**************/

/********************/
/* pane backgrounds */
/********************/

/* grey-bg */
div.grey-bg-tb-fancy {
	background-color: #DEDDDE;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

div.grey-bg-tb-fancy::before {
	background-image: url(img/decorators/background_abilities/top.svg);
	background-repeat: no-repeat;
	background-size: 100%;
	filter: invert(100%) sepia(96%) saturate(15%) hue-rotate(212deg) brightness(104%) contrast(104%);
	width: 100%;
	height: 20px;
	content: '';
	position: absolute;
	top: 0;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

div.grey-bg-tb-fancy::after {
	background-image: url(img/decorators/background_abilities/bottom.svg);
	background-repeat: no-repeat;
	background-size: 100%;
	filter: invert(100%) sepia(96%) saturate(15%) hue-rotate(212deg) brightness(104%) contrast(104%);
	width: 100%;
	height: 20px;
	content: '';
	position: absolute;
	bottom: -3px;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

/******************/
/* display styles */
/******************/

div.display-field {
	position: absolute;
	border: none;
	padding: 0;
	font-family: SegoeUI;
	overflow: hidden;
	resize: none;
	pointer-events: none;
	text-align: center;
	display: flex;
	justify-content: center;
	align-items: center;
}

/****************/
/* input styles */
/****************/

.inputfield-regular {
	position: absolute;
	background-color: var(--input-background);
	border: none;
	border-width: 0px;
	color: var(--black);
	font-family: SegoeUI;
	overflow: hidden;
	resize: none;
	padding: 0;
	text-align: center;
	display: flex;
	justify-content: center;
	align-items: center;
}

/*********************/
/* element positions */
/*********************/

/* Abilities */
#CSfront div.abilities {
	top: 16.55%;
	left: 3.8%;
	width: 10.15%;
	display: flex;
	flex-direction: column;
	justify-content: space-evenly;
	padding-top: 1%;
	padding-bottom: 1%;
}

#CSfront div.abilities-6 {
	height: 55.6%;
}

#CSfront div.abilities-7 {
	height: 64.65%;
}

#CSfront div.abilities div.ability {
	background-image: url(img/decorators/background_abilities/entry.svg);
	background-repeat: no-repeat;
	background-size: 100%;
	margin-left: 6.75%;
	width: 86.5%;
	aspect-ratio: 0.843;
	position: relative;
	-webkit-print-color-adjust: exact;
	print-color-adjust: exact;
}

#CSfront div.abilities div.ability div.ability-name {
	top: 8.5%;
	width: 100%;
	text-transform: uppercase;
}

#CSfront div.abilities div.ability div.ability-mod {
	top: 16%;
	width: 100%;
	height: 48%;
	font-size: 38px;
}

#CSfront div.abilities div.ability input.ability-value {
	width: 44%;
	height: 25%;
	bottom: 2%;
	left: 28%;
	font-size: 20px;
}


/******************/
/* Print settings */
/******************/

@media print {
	@page {
		margin: 0;
	}

	#button-container,
	#button-separator {
		display: none !important;
	}

	.page-container {
		margin-top: 20px;
		box-shadow: none;
		zoom: 85%;
		-moz-transform: scale(0.9) translate(0, -60px);
	}

	.page:not(.templ) {
		display: block !important;
		break-after: always;
		page-break-after: always;
	}

	#prefe {
		break-after: avoid !important;
		page-break-after: avoid !important;
	}

	#page-wrapper {
		display: block;
	}

	.nonprintable {
		display: none !important;
	}

	.inputfield {
		background-color: transparent;
	}

	.pane .checkcircle {
		border-color: var(--black);
		background-color: var(--background);
	}

	.pane .checkcircle:checked {
		background-color: var(--black);
	}
}