/** plugin: Scrollable Map Sidebar #EOL code **/
/* BEGIN Scrollable Map Sidebar by Salvatos */
.main-sidebar {
	--map-sidebar-scrollbar-track-color: auto;
	--map-sidebar-scrollbar-slider-color: auto;
	--map-sidebar-scrollbar-width: thin;
}
@media (min-width:768px) {
	#map-body {
		/* Prevent scrollbar in main pane */
		#sidebar-map, .main-sidebar {
			max-height: calc(100vh - 3.1rem);
		}

		/* Scrollbar width and colors */
		#sidebar-content {
			scrollbar-width: var(--map-sidebar-scrollbar-width);
			scrollbar-color: var(--map-sidebar-scrollbar-slider-color) var(--map-sidebar-scrollbar-track-color);
		}
		/* Webkit patch */
		#sidebar-content::-webkit-scrollbar {
			background-color: var(--map-sidebar-scrollbar-track-color);
		}
		#sidebar-content::-webkit-scrollbar-thumb {
			background-color: var(--map-sidebar-scrollbar-slider-color);
		}

		/* Legend spacing */
		#sidebar-map {
			.marker-actions {
				padding-block: 1em;
			}
			.map-legend:not(:last-child) {
				padding: 0 10px;
			}
		}

		/* Sticky Back/Remove button */
		.map-legend:last-child,
		.marker-header ~ div .marker-actions {
			position: sticky;
			bottom: 0px;
			margin: 0;
			padding: 10px 0px;
			background: var(--sidebar-background, hsl(var(--si)));
		}
		.marker-header + .gap-3 {
			gap: unset;
		}
	}
}
/* END Scrollable Map Sidebar by Salvatos */

/** plugin: Inverted Timeline Ordering #2.0 code **/
ul.timeline:not(.hidden) { 
    display: flex;
    flex-direction: column-reverse;
}

/** plugin: Mention Type Indicators #2.0 code **/
/* BEGIN Mention Type Indicators by Salvatos */
.entity-mention::after {
	font-size: var(--mention-icon-size, 12px);
}
.entity-mention[data-entity-type="character"]::after {
	content: " \f007";
	font-family: "Font Awesome 6 Pro";
	font-weight: 900;
}
.entity-mention[data-entity-type="location"]::after {
	content: " \EAD2";
	font-family: RPGAwesome;
	font-weight: 400;
}
.entity-mention[data-entity-type="map"]::after {
	content: " \f279";
	font-family: "Font Awesome 6 Pro";
	font-weight: 900;
}
.entity-mention[data-entity-type="race"]::after {
	content: " \EAEB";
	font-family: RPGAwesome;
	font-weight: 400;
}
.entity-mention[data-entity-type="organisation"]::after {
	content: " \EA03";
	font-family: RPGAwesome;
	font-weight: 400;
}
.entity-mention[data-entity-type="family"]::after {
	content: " \E99E";
	font-family: RPGAwesome;
	font-weight: 400;
}
.entity-mention[data-entity-type="calendar"]::after {
	content: " \f073";
	font-family: "Font Awesome 6 Pro";
	font-weight: 900;
}
.entity-mention[data-entity-type="timeline"]::after {
	content: " \f252";
	font-family: "Font Awesome 6 Pro";
	font-weight: 900;
}
.entity-mention[data-entity-type="race"]::after {
	content: " \EAEB";
	font-family: RPGAwesome;
	font-weight: 400;
}
.entity-mention[data-entity-type="creature"]::after {
	content: " ";
	font-family: "RPGAwesome";
	font-weight: 400;
}
.entity-mention[data-entity-type="quest"]::after {
	content: " \EAE9";
	font-family: RPGAwesome;
	font-weight: 400;
}
.entity-mention[data-entity-type="journal"]::after {
	content: " \EA75";
	font-family: RPGAwesome;
	font-weight: 400;
}
.entity-mention[data-entity-type="item"]::after {
	content: " \E9DF";
	font-family: RPGAwesome;
	font-weight: 400;
}
.entity-mention[data-entity-type="event"]::after {
	content: " \f0e7";
	font-family: "Font Awesome 6 Pro";
	font-weight: 900;
}
.entity-mention[data-entity-type="ability"]::after {
	content: " \E9C2";
	font-family: RPGAwesome;
	font-weight: 400;
}
.entity-mention[data-entity-type="note"]::after {
	content: " \f518";
	font-family: "Font Awesome 6 Pro";
	font-weight: 900;
}
.entity-mention[data-entity-type="tag"]::after {
	content: " \f02c";
	font-family: "Font Awesome 6 Pro";
	font-weight: 900;
}
/* END Mention Type Indicators by Salvatos */

/** plugin: Background Image #1.1 code **/
:root {
--background-image: url(https://cdn-ugc.kanka.io/notes/8ly9AmgnOqMJecSFiLzSMMkItIdyK9TEKVO2WXbt.jpeg);
}

/* background image */
.wrapper {
  background: var(--background-image) !important;
  background-repeat: no-repeat !important;
  background-attachment: fixed !important;
  background-position: right bottom !important;
  -webkit-background-size: cover !important;
  -moz-background-size: cover !important;
  -o-background-size: cover !important;
  background-size: cover !important;
}
.content-wrapper, .main-footer { background: none; }

/** plugin: Back to top #1.0 code **/
.content-wrapper {
  position: relative;
  padding-bottom: 50px;
}

.back-to-top {
  display: block !important;
}

/** plugin: Entry Box Backgrounds #2.2.1 code **/
/* BEGIN Entity Box Backgrounds by Salvatos */
@media screen {
    .sidebar-section-box {
        --sidebar-section-background: hsl(var(--b1)/1);
        --sidebar-section-padding: 10px;
        border-radius: .25rem;
        box-shadow: 0 1px 1px rgba(0,0,0,.1);
    }

    /* Post headings */
    .post-header {
        background-color: var(--box-background, hsl(var(--b1)/var(--tw-bg-opacity)));
        border-radius: .25rem;
        padding: .2rem .5rem;
    }
    .post-title {
        margin: 0;
    }
}
/* END Entity Box Backgrounds by Salvatos */

/** plugin: .boxquote | A Secondary Blockquote #v1.2 code **/
/*BOXQUOTE*/
.boxquote {
display: inline-flex;
padding: 0% 10% 0% 10%;
margin: 20px 0px 25px 0px; }

.boxquote::before {
content: "";
border-left: 4px double;
padding-left: 20px;
border-color: inherit;
opacity: 0.3; }
/*END BOXQUOTE*/

/** plugin: Add Folder Icon to List Entities With Children in Nested View #1.2.1 code **/
.table-nested tr[data-children]:not([data-children="0"]) td:nth-child(1):after {
    content: "\f07c";
    font-family: 'Font Awesome 6 Pro';
    font-size: 1.2rem;
    padding-left: 13px;
    margin-right: -40px;
}

/** plugin: Vertical Timelines #2.2 code **/
/* BEGIN Vertical Timelines by Salvatos */
/* Set vars */
.timeline {
	--svtlinecolor: hsl(var(--s));
	--svtbgc: hsl(var(--n));
	--svtbgt: hsl(var(--nc));
}
/* Container shorthand */
.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .entity-main-block {
	container: svt / inline-size;
}
@container svt (width > 600px) {
	/* Position events */
	li[id|="timeline-element"] {
		width: 50%;
		padding-bottom: 25px;
	}
	li[id|="timeline-element"]:nth-child(2n+1) {
		left: 0;
		padding-right: 25px;
	}
	li[id|="timeline-element"]:nth-child(2n) {
		left: 50%;
		padding-left: 25px;
	}
	/* Shorten the bar on the last item so it doesn't collide with buttons */
	li[id|="timeline-element"]:last-child {
		padding-bottom: 0;
		margin-bottom: 15px;
	}
	/* Position markers*/
	li[id|="timeline-element"] > i {
		position: absolute;
		top: 7px;
		background-color: var(--svtbgc);
		color: var(--svtbgt);
	}
	li[id|="timeline-element"]:nth-child(2n) > i {
		left: calc(0% - 15px);
	}
	li[id|="timeline-element"]:nth-child(2n+1) > i {
		left: calc(100% - 15px);
	}
	/* Position lines */
	li[id|="timeline-element"]::before {
		display: block !important; /* important otherwise Kanka sets the last one to 'table' */
		width: 6px;
		border-radius: 0;
		background-color: var(--svtlinecolor);
	}
	li[id|="timeline-element"]:nth-child(2n)::before {
		left: calc(0% - 2px);
	}
	li[id|="timeline-element"]:nth-child(2n+1)::before {
		left: calc(100% - 2px);
	}
	/* Set radius of line start */
	:is(li[id|="timeline-element"]::after, li[id|="timeline-element"]:first-of-type::before) {
		border-top-left-radius: 5px !important;
		border-top-right-radius: 5px !important;
	}
	/* Fix length and set radius of line end */
	:is(li[id|="timeline-element"]::after, li[id|="timeline-element"]:last-of-type::before) {
		display: initial;
		height: calc(100% - 25px);
		border-bottom-left-radius: 5px !important;
		border-bottom-right-radius: 5px !important;
	}
	/* Reshape event blocks */
	.timeline-item {
		margin: 0;
	}
	/* Remove the misplaced box-shadow from Kanka */
	.timeline > li .timeline-item {
		box-shadow: unset;
	}
  	/* More consistent spacing around the toggle */
  	.element-toggle .icon-hide {
		padding-inline: 2px;
	}
	/* Set date markers */
	.bg-aqua + .timeline-item .text-neutral-content {--svtbgc:#00c0ef;--svtbgt:#fff}
	.bg-black + .timeline-item .text-neutral-content {--svtbgc:#111;--svtbgt:#fff}
	.bg-brown + .timeline-item .text-neutral-content {--svtbgc: #a35831;--svtbgt:#fff}
  	.bg-grey + .timeline-item .text-neutral-content {/* use defaults */}
	.bg-green + .timeline-item .text-neutral-content {--svtbgc:#00a65a;--svtbgt:#fff}
	.bg-light-blue + .timeline-item .text-neutral-content {--svtbgc:#3c8dbc;--svtbgt:#fff}
	.bg-maroon + .timeline-item .text-neutral-content {--svtbgc:#d81b60;--svtbgt:#fff}
	.bg-navy + .timeline-item .text-neutral-content {--svtbgc:#001f3f;--svtbgt:#fff}
	.bg-orange + .timeline-item  .text-neutral-content {--svtbgc:#ff851b;--svtbgt:#fff}
	.bg-pink + .timeline-item .text-neutral-content {--svtbgc:#ebbde9;--svtbgt:#fff}
	.bg-purple + .timeline-item .text-neutral-content {--svtbgc:#605ca8;--svtbgt:#fff}
	.bg-red + .timeline-item .text-neutral-content {--svtbgc:#dd4b39;--svtbgt:#fff}
	.bg-teal + .timeline-item .text-neutral-content {--svtbgc:#39cccc;--svtbgt:#111}
	.bg-yellow + .timeline-item .text-neutral-content {--svtbgc:#f39c12;--svtbgt:#fff}
	.timeline-item-head .text-neutral-content {
		position: absolute;
		top: 7px;
		width: max-content;
		padding: 5px 8px;
		border: 1px solid var(--svtbgc);
		border-radius: 3px;
		box-shadow: 0 1px 1px rgba(0,0,0,.1);
		background-color: var(--svtbgc);
		color: var(--svtbgt);
      	overflow: visible;
	}
	li[id|="timeline-element"]:nth-child(2n) .text-neutral-content {
		right: calc(100% + 75px);
	}
	li[id|="timeline-element"]:nth-child(2n+1) .text-neutral-content {
		left: calc(100% + 75px);
	}
	/* Fancy arrowheads */
	li[id|="timeline-element"]:nth-child(2n) .text-neutral-content:after,
	li[id|="timeline-element"]:nth-child(2n+1) .text-neutral-content:before {
		content: "";
		display: block;
		position: absolute;
		top: 1px;
		border-top: 15px solid transparent;
		border-bottom: 15px solid transparent;
		border-radius: 50%;
	}
	li[id|="timeline-element"]:nth-child(2n) .text-neutral-content:after {
		right: -25px;
		border-right: none;
		border-left: 25px solid var(--svtbgc);
	}
	li[id|="timeline-element"]:nth-child(2n+1) .text-neutral-content:before {
		left: -25px;
		border-left: none;
		border-right: 25px solid var(--svtbgc);
	}
}
/* END Vertical Timelines by Salvatos */

