/** plugin: Calligraphic Headings V2 #1.0 fonts **/
@import url('https://fonts.googleapis.com/css2?family=Eagle+Lake&display=swap');

/** plugin: Calendar: Inverted Full Moon Icons #2 code **/
/* new moon hollow */
.kanka-entity-calendar .calendar .moon.fa-solid.fa-circle::before { font-weight: 400; }
/* full moon filled */
.kanka-entity-calendar .calendar .moon.far.fa-circle::before { font-weight: 900; }

/** plugin: Vertical Timelines #1.7 code **/
/* BEGIN Salvatos Vertical Timeline */
@media (min-width:768px) {
	/* Set vars */
	.timeline {
		--svtlinecolor: white;
		--svtbgc: grey;
	}
	/* Position events */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"] {
		width: 50%;
		padding-bottom: 25px;
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]:nth-child(2n+1) {
		left: 0;
		padding-right: 25px;
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]:nth-child(2n) {
		left: 50%;
		padding-left: 25px;
	}
	/* Position markers*/
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"] > i {
		position: absolute;
		top: 7px;
		background-color: var(--svtbgc);
		color: white;
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]:nth-child(2n) > i {
		left: calc(0% - 15px);
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]:nth-child(2n+1) > i {
		left: calc(100% - 15px);
	}
	/* Position lines */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]::before {
		display: block;
      	width: 6px;
		border-radius: 0;
		background-color: var(--svtlinecolor);
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]:nth-child(2n)::before {
		left: calc(0% - 2px);
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]:nth-child(2n+1)::before {
		left: calc(100% - 2px);
	}
	/* Set radius of line start */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) :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 */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) :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 */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) .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) li[id|="timeline-element"]:nth-child(2n) .text-muted {
		right: calc(100% + 80px);
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]:nth-child(2n+1) .text-muted {
		left: calc(100% + 80px);
	}
	/* Fancy arrowheads */
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]:nth-child(2n) .text-muted:after,
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]: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) li[id|="timeline-element"]:nth-child(2n) .text-muted:after {
		right: -24px;
		border-right: none;
		border-left: 25px solid var(--svtbgc);
	}
	.kanka-entity-timeline:not(.kanka-tag-horizontaltimeline) li[id|="timeline-element"]:nth-child(2n+1) .text-muted:before {
		left: -24px;
		border-left: none;
		border-right: 25px solid var(--svtbgc);
	}
}
/* END Salvatos Vertical Timeline */

/** plugin: Scrollable Main Sidebar #1.11 code **/
/* BEGIN Scrollable Main Sidebar */
.main-sidebar {
  --sidebar-scrollbar-track-color: auto;
  --sidebar-scrollbar-slider-color: auto;
  --sidebar-scrollbar-width: thin;
}
@media (min-width:768px) {
	.main-sidebar {
		position: fixed;
	}
	.main-sidebar .sidebar-menu {
		margin-bottom: 0;
	}
	/* Main site sidebar */
	body:not(#map-body) .main-sidebar .sidebar {
		height: calc(100vh - 50px - 10rem) !important;
		overflow-y: scroll;
		scrollbar-width: var(--sidebar-scrollbar-width);
		scrollbar-color: var(--sidebar-scrollbar-slider-color) var(--sidebar-scrollbar-track-color);
	}

	/* Webkit patch */
	body:not(#map-body) .main-sidebar .sidebar::-webkit-scrollbar {
		background-color: var(--sidebar-scrollbar-track-color);
	}
	body:not(#map-body) .main-sidebar .sidebar::-webkit-scrollbar-thumb {
		background-color: var(--sidebar-scrollbar-slider-color);
	}
}
/* END Scrollable Main Sidebar */

/** plugin: Figure Box and Floats #1.2 code **/
/*Adds functionality to Salvatos' userscript plugin*/
:root {
	--summernote-insert-figure-box: enabled;
}

/*Left float with margin*/
.l {
	float: left;
	margin-left: 0.5em;
	margin-right: 0.5em;
}
/* Right float with margin*/
.r {
	float: right;
	margin-left: 0.5em;
	margin-right: 0.5em;
}
/*Adds a clear class to avoid a tetris stack*/
.clear {
    clear:both;
}

/*Figure box. For an image with optional title or subtitle*/
div.figure {
	width: 25%;
	text-align: center;
	font-style: italic;
	font-size: smaller;
	text-indent: 0;
	border: thin silver solid;
	margin: 0.5em;
	margin-top: 0em;
	padding: 0.5em;
}
/*adding margin to the figure image to give space for the text*/

.figure img {
	margin-bottom: 0.5em;
}
div.figure::after {
    clear: both;

}

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

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

/** plugin: Round Entity Images #1.1 code **/
.entity-header-image :is(.entity-image, picture > img) {
    border-radius: 100%;
}

/** plugin: Entry Box Backgrounds #1.0 code **/
.sidebar-section-box {
	--sidebar-section-background: var(--box-background);
	--sidebar-section-padding: 10px;
	border-radius: 3px;
	box-shadow: 0 1px 1px rgba(0,0,0,.1);
}

/** plugin: Scrollable Map Sidebar #2.3 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) {
	/* Page sizing and scrolling */
	#map-body {
		overflow-y: hidden;
	}
	#map-body .content-wrapper {
		min-height: unset !important;
	}
	
	/* Main sidebar sizing and scrolling */
	#map-body #sidebar-map,
	#map-body .main-sidebar {
		max-height: calc(100vh - 3rem);
	}
	#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 .map-legend:not(:last-child) {
		padding: 0 10px;
	}
	
	/* Marker */
	#map-body #sidebar-marker {
		max-height: calc(100vh - 3rem);
	}
	#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;
		margin: 0;
		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);
	}
	
	/* 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 by Salvatos */

/** plugin: External Link Icon and Styling #1.2 code **/
:root {
	--external-link-color: var(--link-text);
	--external-link-hover-color: var(--link-hover);
	--external-link-font: inherit;
	--external-link-size: inherit;
	--external-link-weight: inherit;
	--external-link-decoration: inherit;
}
.entity-content a[href*="//"]:not([href*="kanka.io"]) {
	color: var(--external-link-color);
	font-family: var(--external-link-font);
	font-size: var(--external-link-size);
	font-weight: var(--external-link-weight);
	text-decoration: var(--external-link-decoration);
}
.entity-content a[href*="//"]:not([href*="kanka.io"]):hover {
	color: var(--external-link-hover-color);
}
.entity-content a[href*="//"]:not([href*="kanka.io"]):after {
	font-family: "Font Awesome 5 Pro";
	font-weight: 900;
	content: "\f35d";
	font-size: 9px;
	vertical-align: top;
	margin-left: 2px;
}

/** plugin: Calendar: Inverted Quarter Moon Icons #1.0 code **/
/* Northern hemisphere moon icons */
/* last quarter on the left */
.kanka-entity-calendar .calendar .moon.fa-solid.fa-circle-half-stroke.fa-flip-horizontal { transform: unset; }
/* first quarter on the right */
.kanka-entity-calendar .calendar .moon.fa-solid.fa-circle-half-stroke { transform: scaleX(-1); }

/** plugin: Longer Titles in Entry Grids #2 code **/
/* BEGIN Longer Titles in Entity Grids by Salvatos */
/* Undo default overflows and replace with multiline overflow */
.entities-grid div.entity.block:not(.entity-stack) .truncate.h-12 {
	text-overflow: unset;
	white-space: unset;
	height: auto;
	padding-bottom: 0;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--entity-grid-max-lines, 4);
    overflow: hidden;
}
/* More available height for text when no image */
.entities-grid .block.avatar[style*="images/defaults/"] + .truncate.h-12 {
    -webkit-line-clamp: var(--entity-grid-max-lines-noimg, 5);
}
/* Fix padding */
.entities-grid div.entity.block:not(.entity-stack) {
    padding-bottom: 1rem;
}
/* Consistent height for the Back tile in nested pages */
a.entity.block:first-of-type > .bg-box {
	height: auto;
}
/* Mobile view is %-based, tweak accordingly */
@media(max-width:639px) {
    /* Lines of text with & without image */
    .entities-grid .entity.block:not(.entity-stack) .truncate.h-12 {
        -webkit-line-clamp: var(--entity-grid-mobile-max-lines, 3);
        
    }
    .entities-grid .block.avatar[style*="images/defaults/"] + .truncate.h-12 {
        -webkit-line-clamp: var(--entity-grid-mobile-max-lines-noimg, 4);
    }
    /* More suitable padding */
    .entities-grid .entity.block:not(.entity-stack) {
        padding-bottom: 0.6rem;
    }
}
/* END Longer Titles in Entity Grids by Salvatos */

/** plugin: Notice Articles #1.1 code **/
/* BEGIN Notice Posts by Salvatos */
/* Hide unwanted elements */
.notice-post :is(.box-header h3, .box-header .box-tools > i, .post-details, .post-footer) {
	display: none;
}
.notice-post .box-header.with-border {
	padding: 0;
	border: none;
}
/* Keep box-tools for admins but take them out of the stacking context to keep the box lean */
.notice-post .box-header .box-tools {
	position: absolute;
	top: 3px;
	right: 0;
}
.notice-post .box-header .box-tools > a {
	vertical-align: unset;
	padding: 8px 3px 0 0;
}
/* Center paragraphs vertically and text horizontally */
.notice-post .entity-content p:last-child {
	margin-bottom: 0;
}
.notice-post .post-body {
	text-align: center;
	padding: 0 5px;
}
/* Set up easy background changes via bg-* classes and switch bottom-margin for easier styling */
.notice-post {
	background: var(--box-background);
  	margin-bottom: 20px;
}
.notice-post .box {
	background-color: inherit;
  	margin-bottom: 0;
}
/* END Notice Posts by Salvatos */

/** plugin: Better Grid View - Dead Characters #1.1 code **/
div[data-dead="true"]{
    border-color: #484848;
    border-width: .35em;
 }

.entity.block[data-dead="true"] a{
  filter: grayscale(100%);
 }

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

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

/** plugin: Calligraphic Headings V2 #1.0 code **/
.entity-actions h1 {
margin: 0;
padding: 1px 0px 4px 4px;
font-size: 1.8em;
letter-spacing: 0.40px;
display: inline-block;
text-align: center;
font-weight: 400;
font-family: 'Eagle Lake', cursive, 'Palatino Linotype', fantasy, 'Book Antiqua', Palatino, serif; }


h1, h2, h3, h4, h1 a, h2 a, h3 a, h4 a, #campaign-dashboard body a, #campaign-dashboard a { font-family: 'Eagle Lake'; }

