/** plugin: Vertical Timelines #1.5.1 code **/
/* BEGIN Salvatos Vertical Timeline */
@media (min-width:768px) {
	/* Set vars */
	.timeline {
		--svtlinecolor: white;
		--svtbgc: grey;
	}
	/* Set line color */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline::before {
		left: calc(50% - 3px);
		width: 6px;
		background-color: var(--svtlinecolor);
	}
	/* Position events */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li {
		left: 44%;
		margin: 0 0 15px 0;
		width: 50%;
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li:nth-child(2n+1) {
		left: 0;
		padding-right: 25px;
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li:nth-child(2n) {
		left: 50%;
		padding-left: 25px;
	}
	/* Position markers */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li > :is(.ra, .fa, .fas, .fab, .far) {
		position: absolute;
		top: 7px;
		background-color: var(--svtbgc);
		color: white;
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li:nth-child(2n) > :is(.ra, .fa, .fas, .fab, .far) {
		left: calc(0% - 15px);
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li:nth-child(2n+1) > :is(.ra, .fa, .fas, .fab, .far) {
		left: calc(100% - 15px);
	}
	/* Reshape event blocks */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li > .timeline-item {
		margin: 0;
	}
	/* Set date markers */
	.bg-aqua + .timeline-item .text-muted {--svtbgc:#00c0ef;}
	.bg-black + .timeline-item .text-muted {--svtbgc:#111;}
	.bg-brown + .timeline-item .text-muted {--svtbgc: #a35831;}
	.bg-green + .timeline-item .text-muted {--svtbgc:#00a65a;}
	.bg-gray + .timeline-item .text-muted {--svtbgc:#d2d6de;}
	.bg-light-blue + .timeline-item .text-muted {--svtbgc:#3c8dbc;}
	.bg-maroon + .timeline-item .text-muted {--svtbgc:#d81b60;}
	.bg-navy + .timeline-item .text-muted {--svtbgc:#001f3f;}
	.bg-orange + .timeline-item  .text-muted {--svtbgc:#ff851b;}
	.bg-pink + .timeline-item .text-muted {--svtbgc:#ebbde9;}
	.bg-purple + .timeline-item .text-muted {--svtbgc:#605ca8;}
	.bg-red + .timeline-item .text-muted {--svtbgc:#dd4b39;}
	.bg-teal + .timeline-item .text-muted {--svtbgc:#39cccc;}
	.bg-yellow + .timeline-item .text-muted {--svtbgc:#f39c12;}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline .box-title > .text-muted {
		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: white;
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li:nth-child(2n) .text-muted {
		right: calc(100% + 80px);
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li:nth-child(2n+1) .text-muted {
		left: calc(100% + 80px);
	}
	/* Fancy arrowheads */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li:nth-child(2n) .text-muted:after,
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li:nth-child(2n+1) .text-muted:before {
		content: "";
		display: var(--svtarrow);
		position: absolute;
		top: -1px;
		border-top: 15px solid transparent;
		border-bottom: 15px solid transparent;
		border-radius: 50%;
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li:nth-child(2n) .text-muted:after {
		right: -24px;
		border-right: none;
		border-left: 25px solid var(--svtbgc);
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .timeline > li:nth-child(2n+1) .text-muted:before {
		left: -24px;
		border-left: none;
		border-right: 25px solid var(--svtbgc);
	}
}
/* END Salvatos Vertical Timeline */

/** plugin: Simplified Journals #2.2 code **/
.kanka-entity-journal .entity-sidebar-submenu, .kanka-entity-journal .entity-sidebar-pins {
  visibility: hidden;
  position: absolute;
}

.kanka-entity-journal .entity-story-block {
  width: 100%;
  margin-top: 1em;
}

/** plugin: Elegant Music Embeds #1.0 code **/
/*Music  Embeds */
.panel-body iframe {
    width: 100%;
    height: 85px;
}

.box-body iframe {
    width: 100%;
    height: 85px;
}

/** plugin: Drawer Sidebar #2.3 code **/
/* BEGIN POP-OUT SIDEBAR */
.main-sidebar {
	--sidedar-scrollbar-track-color: var(--sidebar-background);
	--sidedar-scrollbar-slider-color: #bbb;
	--popout-sidebar-heading-bg: #333;
	--popout-sidebar-heading-color: currentColor;
	--sidedar-scrollbar-width: auto;
}
.main-sidebar .sidebar {
	background-color: var(--sidebar-background);
}
@media (min-width: 768px) {
	/* Position main sidebar */
	body:not(#map-body):not(.sidebar-collapse) .main-sidebar {
		position: fixed;
		height: 100vh;
		width: 70px;
		padding-top: 10px;
		background-position-x: 70px;
	}
	/* Remove the main content area’s artificial height*/
	.content-wrapper {
		min-height: unset !important;
	}
	/* Reduce entity creator */
	body:not(#map-body):not(.sidebar-collapse) .sidebar-creator {
		height: 50px;
	}
	body:not(#map-body):not(.sidebar-collapse) .sidebar-creator:not(:hover) {
		width: 70px;
	}
	body:not(#map-body):not(.sidebar-collapse) .sidebar-creator:not(:hover) span {
		display: none;
	}
	body:not(#map-body):not(.sidebar-collapse) .sidebar-creator:hover {
		width: auto;
		padding: 0 15px;
	}
	/* Tweak content margins to account for smaller sidebar */
	body:not(#map-body):not(.sidebar-collapse) .main-sidebar ~ :is(.content-wrapper, #footer),
	body:not(#map-body):not(.sidebar-collapse) .main-sidebar ~ form .content-wrapper,
	body:not(#map-body):not(.sidebar-collapse) #app .navbar {
		margin-left: 70px;
	}
	/* Campaign block */
	body:not(#map-body) section.sidebar-campaign {
		height: auto;
	}
	body:not(#map-body) section.sidebar-campaign .campaign-block {
		padding: 0;
		height: auto;
	}
	body:not(#map-body) section.sidebar-campaign .campaign-head {
		height: auto;
	}
	body:not(#map-body) section.sidebar-campaign .campaign-name {
		font-weight: 600;
		writing-mode: vertical-lr;
		height: max-content;
		margin-bottom: 40px;
		max-height: 50vh;
		padding: 0 33%;
		text-overflow: ellipsis;
		white-space: nowrap !important;
	}
	body:not(#map-body) section.sidebar-campaign .campaign-updated {
		display: none;
	}
	/* Keep the campaign switcher closer to the top and reorient its toggle */
	.fa-caret-down::before {
		content: "\f0da" !important;
	}
	section.sidebar-campaign .campaign-block .campaign-head .campaign-name .fa-caret-down.flipped {
		transform: rotate(90deg);
	}
	.campaign-switcher {
		top: 90px;
	}
	/* Menu-tree */
	body:not(#map-body) .sidebar:hover {
		position: fixed;
		padding: 10px;
		border-radius: 10px;
		top: 50px;
		bottom: 50px;
		overflow-y: auto;
		direction: rtl;
		scrollbar-color: var(--sidedar-scrollbar-slider-color, #84817f) var(--sidedar-scrollbar-track-color);
		border-bottom: 3px solid var(--sidedar-scrollbar-slider-color);
		border-top: 3px solid var(--sidedar-scrollbar-slider-color);
		scrollbar-width: var(--sidedar-scrollbar-width, auto);
	}
	body:not(#map-body) .sidebar-menu {
		padding-left: 12px;
	}
	body:not(#map-body) .sidebar:hover .sidebar-menu {
		margin-left: -7px;
		margin-bottom: 0;
	}
	body:not(#map-body) .sidebar li {
		padding: 0;
	}
	body:not(#map-body) .sidebar:hover .sidebar-menu > li > :is(a, i, span) {
		font-variant: small-caps;
		color: var(--popout-sidebar-heading-color);
		background-color: var(--popout-sidebar-heading-bg);
	}
	body:not(#map-body) .sidebar-menu li a {
		padding: 5px 10px 5px 15px;
	}
	body:not(#map-body) .sidebar-menu > li > a {
		font-weight: bold;
	}
	body:not(#map-body) .sidebar:hover li a {
		width: auto;
		min-width: min-content;
	}
	body:not(#map-body) .sidebar li > * {
		visibility: hidden;
	}
	body:not(#map-body) .sidebar li a > i {
		visibility: visible;
	}
	body:not(#map-body) .sidebar:hover li > * {
		visibility: visible;
		padding-left: 5px;
		text-transform: unset;
	}
}
/* END POP-OUT SIDEBAR */

/** plugin: Scrollable Map Sidebar #2.1 code **/
/* BEGIN Scrollable Map Sidebar */
.main-sidebar {
  --map-sidebar-scrollbar-track-color: auto;
  --map-sidebar-scrollbar-slider-color: auto;
  --map-sidebar-scrollbar-width: thin;
}
@media (min-width:768px) {
	/* Main sidebar sizing and scrolling */
	#map-body .main-sidebar .sidebar {
		margin-bottom: 0;
		padding: 0;
	}
	#map-body #sidebar-content {
		max-height: unset;
		padding: 0;
		scrollbar-width: var(--map-sidebar-scrollbar-width);
		scrollbar-color: var(--map-sidebar-scrollbar-slider-color) var(--map-sidebar-scrollbar-track-color);
	}
	
	/* Legend */
	#map-body #sidebar-map {
		max-height: 100vh;
	}
	#map-body #sidebar-map .map-legend:not(:last-child) {
		padding: 0 10px;
	}
	
	/* Marker */
	#map-body #sidebar-marker {
		max-height: 100vh;
	}
	#map-body .pull-right.marker-close {
		margin-right: 5px;
	}
	#map-body :is(.entity-title, .entity-content, .marker-entry) {
		padding: 0 10px;
	}
	
	/* Both */
	#map-body .marker-details {
		padding: 0;
	}
	#map-body .marker-details .marker-name {
		position: sticky;
		top: 0;
		padding: 10px 5px;
		background: var(--sidebar-background);
		min-height: 40px;
	}
	#map-body #sidebar-map .map-legend:last-child,
	#map-body #sidebar-marker .marker-actions {
		position: sticky;
		bottom: 0;
		margin: 0;
		padding: 10px 0px;
		background: var(--sidebar-background);
		width: 420px;
	}
	
	/* Webkit patch */
	#map-body #sidebar-content::-webkit-scrollbar {
		background-color: var(--map-sidebar-scrollbar-track-color);
	}
	#map-body #sidebar-content::-webkit-scrollbar-thumb {
		background-color: var(--map-sidebar-scrollbar-slider-color);
	}
}
/* END Scrollable Map Sidebar */

