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

/** 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 */

/** 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: 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: 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'; }

/** plugin: Pinned Entity Image #0.4 code **/
/* BEGIN Pinned Entity Image */
/* Preset width and heights */
.pinned-attribute[data-attribute^="pinned portrait"] {
  	--pinned-portrait-width: 170px; /* Kanka default sidebar width */
  	--pinned-portrait-height: var(--pinned-portrait-width); /* Default to square images like the entity header */
}
.pinned-attribute[data-attribute^="pinned portrait 200"] {
  	--pinned-portrait-height: 200px;
}
.pinned-attribute[data-attribute^="pinned portrait 250"] {
  	--pinned-portrait-height: 250px;
}
.pinned-attribute[data-attribute^="pinned portrait 300"] {
  	--pinned-portrait-height: 300px;
}
.pinned-attribute[data-attribute^="pinned portrait 350"] {
  	--pinned-portrait-height: 350px;
}
.pinned-attribute[data-attribute^="pinned portrait 400"] {
  	--pinned-portrait-height: 400px;
}
.pinned-attribute[data-attribute^="pinned portrait 450"] {
  	--pinned-portrait-height: 450px;
}
.pinned-attribute[data-attribute^="pinned portrait 500"] {
  	--pinned-portrait-height: 500px;
}
/* Set background, dimensions and styles */
.pinned-attribute[data-attribute^="pinned portrait"] {
	padding: 0;
  	display: block; /* To force display on campaigns that hide attributes with empty values */
    border: unset;
}
.pinned-attribute[data-attribute^="pinned portrait"]:not([data-attribute*="caption"])::after,
.pinned-attribute[data-attribute^="pinned portrait"][data-attribute*="caption"]::before {
  	display: block;
	content: "";
    background-image: var(--entity-image-url, url("https://images.unsplash.com/photo-1528731708534-816fe59f90cb?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=300&q=80"));
    margin-left: calc(-1 * var(--sidebar-section-padding));
    width: var(--pinned-portrait-width);
    height: var(--pinned-portrait-height);
    background-size: var(--pinned-portrait-width) var(--pinned-portrait-height);
}
/* Hide the attribute’s name */
.pinned-attribute[data-attribute^="pinned portrait"] > strong {
    display: none;
}
/* Style the attribute’s value as a subheading */
.pinned-attribute[data-attribute^="pinned portrait"]:not([data-attribute*="caption"]) > .pull-right {
    display: block;
	float: unset !important;
	text-align: center;
	font-weight: bold;
}
/* Style the attribute’s value as a caption */
.pinned-attribute[data-attribute^="pinned portrait"][data-attribute*="caption"] > .pull-right {
    display: block;
	float: unset !important;
	text-align: center;
	font-style: italic;
}
/* Hide the gap after the attribute’s value */
.pinned-attribute[data-attribute^="pinned portrait"] > .pull-right + .clear {
    display: none;
}
/* Hide the bottom border */
.pinned-attribute[data-attribute^="pinned portrait"] + .pinned-attribute {
    border: unset;
}

/* Force pinned portrait to go above pinned relations */
/* Only applies when the pinned portrait is the first pinned attribute */
#sidebar-pinned-elements .pins {
	display: flex;
	flex-direction: column;
}
.pinned-relation + .pinned-attribute[data-attribute^="pinned portrait"] {
	order: -1;
}
/* Hide attribute from search pane entity preview */
.search-preview .entity-pinned-attributes [data-attribute^="pinned portrait"] {
	display: none;
}
/* END Pinned Entity Image */

/** plugin: DnD5 Condition Tooltips #1.3 code **/
/* BEGIN DnD5 Condition Tooltips by Salvatos */
/* Fix opacity on mentions (not possible on Kanka-generated links) */
a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip.in {
	opacity: 1;
}
/* Style container */
a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip .tooltip-inner,
a:not(.entity-mention) + .tooltip .kanka-tag-dd5condition {
	background: url(https://cdn-ugc.kanka.io/entities/files/OnfHKKTT4rtOeeQZLHwv1ddpZtKMJbykZ52WUwsg.jpg), #dbcbae;
	padding: 5px 8px;
}
a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip .tooltip-content,
a:not(.entity-mention) + .tooltip .kanka-tag-dd5condition {
	background-color: unset;
}
a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip {
	--n: 0 0% 20%;
}
/* Extras that only work on the outer container */
a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip .tooltip-inner {
	border: 4px solid #333;
}
/* Style name */
:is(a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip, .tooltip .kanka-tag-dd5condition) .entity-name {
	font-family: "Andada Pro", serif;
	font-variant: small-caps;
	font-size: 15px;
	font-weight: bold;
	text-align: left;
	text-decoration: underline;
	color: #a4280b;
}
:is(a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip, .tooltip .kanka-tag-dd5condition) .entity-tooltip-avatar {
	margin: 5px 0 0;
	text-align: left;
}
/* Style description */
a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip .dd5-condition {
	color: #222;
}
/* Darker text where opacity is reduced */
.tooltip .kanka-tag-dd5condition .dd5-condition {
	color: #000;
}
/* Style paragraphs: mimic list items, which are not parsed in tooltips */
:is(a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip, .tooltip .kanka-tag-dd5condition) .dd5-condition p::before {
	content: "• ";
}
:is(a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip, .tooltip .kanka-tag-dd5condition) .dd5-condition p {
	font-family: "Libre Baskerville", sans-serif;
	font-size: 12px;
	margin-bottom: 5px;
}
/* Hide tags*/
:is(a.entity-mention[data-entity-tags~="dd5condition"] + .tooltip, .tooltip .kanka-tag-dd5condition) .tooltip-tags {
	display: none;
}
/* END DnD5 Condition Tooltips by Salvatos */

/** plugin: Longer Titles in Entity 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: Context-Aware Classes #1.7 code **/
:root { --summernote-insert-context-aware-classes: enabled; }

.entity-content .dashboard-only { display: none; }
#campaign-dashboard .dashboard-only { display: initial; }

#campaign-dashboard .no-dashboard {	display: none; }

@media (min-width: 768px) {
	.entity-content .mobile-only { display: none; }
}
@media (max-width: 767px) {
	.entity-content .no-mobile { display: none; }
}

.entity-content .tooltip-only {	display: none; }
.tippy-box .tooltip-only { display: initial; }
.tippy-box .no-tooltip { display: none; }

.entity-content .marker-only { display: none; }
.marker-popup-entry .marker-only { display: initial; }

.entity-content .marker-details-only { display: none; }
#sidebar-marker .marker-details-only { display: initial; }

#map-body .no-map, .map-dashboard .no-map { display: none; }

@media print {
	.no-print { display: none; }
}
@media screen {
	.print-only { display: none; }
}

.editor-only { display: none; }
.note-editing-area .editor-only { display: initial; }

.entity-content .transclusion-only { display: none; }
.mention-entry-content .transclusion-only { display: initial; }
.mention-entry-content .no-transclusion { display: none; }

/** plugin: Profile Pane Reorder #1 code **/
.profile .list-none {order:0}
.profile .notifications {order:1}
.profile .releases {order:2}
.profile .subscription {order:3}
.profile .marketplace {order:4}

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

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

/** plugin: Entity Box Backgrounds #2.3 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)/1));
        border-radius: .25rem;
        padding: .2rem .5rem;
    }
    .post-title {
        margin: 0;
    }
}
/* END Entity Box Backgrounds by Salvatos */

/** plugin: Scrollable Main Sidebar #1.13 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: 3rem;
	}
	/* Main site sidebar */
	body:not(#map-body) .main-sidebar .sidebar {
		height: calc(100vh - (160px + 50px) - 3rem) !important;
		padding-bottom: 1em;
		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 */

