/** plugin: DnD5 Condition Tooltips #2.1 fonts **/
@import url('https://fonts.googleapis.com/css2?family=Andada+Pro:wght@500&family=Libre+Baskerville&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: DnD5 Condition Tooltips #2.1 code **/
/* BEGIN DnD5 Condition Tooltips by Salvatos */
/** Style outer container (requires :has) **/
/* Background */
body:has(a.entity-mention[data-entity-tags~="dd5condition"][aria-expanded="true"]) .tippy-box {
	background: url(https://cdn-ugc.kanka.io/entities/files/OnfHKKTT4rtOeeQZLHwv1ddpZtKMJbykZ52WUwsg.jpg), #dbcbae;
	padding: 5px 8px;
}
/* Border and arrow */
body:has(a.entity-mention[data-entity-tags~="dd5condition"][aria-expanded="true"]) .tippy-box {
	padding: 0;
	border: 3px solid #333;
}
body:has(a.entity-mention[data-entity-tags~="dd5condition"][aria-expanded="true"]) .tippy-box[data-placement^="bottom"]>.tippy-arrow:before {
	border-bottom-color: #333;
}
body:has(a.entity-mention[data-entity-tags~="dd5condition"][aria-expanded="true"]) .tippy-box[data-placement^="top"]>.tippy-arrow:before {
	border-top-color: #333;
}
body:has(a.entity-mention[data-entity-tags~="dd5condition"][aria-expanded="true"]) .tippy-box[data-placement^="left"]>.tippy-arrow:before {
	border-left-color: #333;
}
body:has(a.entity-mention[data-entity-tags~="dd5condition"][aria-expanded="true"]) .tippy-box[data-placement^="right"]>.tippy-arrow:before {
	border-right-color: #333;
}
body:has(a.entity-mention[data-entity-tags~="dd5condition"][aria-expanded="true"]) .tippy-box[data-placement^="top"] > .tippy-arrow {
	bottom: -1px;
}
body:has(a.entity-mention[data-entity-tags~="dd5condition"][aria-expanded="true"]) .tippy-box[data-placement^="bottom"] > .tippy-arrow {
	top: -1px;
}
/* Fallback for :has */
@supports not (body:has(a.entity-mention)) {
	.tooltip-content.kanka-tag-dd5condition {
		background: url(https://cdn-ugc.kanka.io/entities/files/OnfHKKTT4rtOeeQZLHwv1ddpZtKMJbykZ52WUwsg.jpg), #dbcbae;
		padding: 5px 8px;
		border-radius: 3px;
	}
}

/** Style inner container **/
/* Style name */
.tooltip-content.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;
}
/* Hide tags*/
.tooltip-content.kanka-tag-dd5condition .tooltip-tags {
	display: none;
}
/* Style paragraphs: mimic list items, which are not parsed in tooltips */
.tooltip-content.kanka-tag-dd5condition p::before {
	content: "• ";
}
.tooltip-content.kanka-tag-dd5condition p {
	font-family: "Libre Baskerville", sans-serif;
	font-size: 12px;
	color: #111;
	margin-bottom: 5px;
  	hyphens: auto;
}
/* Tooltip definitions */
.tooltip-content.kanka-tag-dd5condition p a[title] {
	text-decoration: underline dotted;
	font-style: italic;
	color: inherit;
	font-family: inherit;
}
/* Exceptions for Exhaustion */
.tooltip-content.kanka-tag-dd5condition .exhaustion p:first-child::before {
	content: "";
}
.tooltip-content.kanka-tag-dd5condition tr:not(:last-child) {
	border-bottom: 1px dotted #777
}
.tooltip-content.kanka-tag-dd5condition table {
	font-family: "Libre Baskerville", sans-serif;
	font-size: 12px;
	color: #111;
	vertical-align: baseline;
  	margin-bottom: 5px;
}
.tooltip-content.kanka-tag-dd5condition td {
	padding-left: 5px;
}
.tooltip-content.kanka-tag-dd5condition th {
	padding-inline: 2px 5px;
	border-right: 1px dotted #777;
	font-weight: normal;
}
/* END DnD5 Condition Tooltips by Salvatos */

/** plugin: Dashboard Banners #1.1 code **/
/* dashboard */
.widget-map .panel-body { height: 350px; }
.panel-heading-entity .panel-title { line-height: 0.1; }
.panel-heading-entity { height: 175px; }
#campaign-dashboard .campaign { display: none; }
#campaign-dashboard .campaign + .row:before { content: "World Map"; }
#campaign-dashboard .campaign + .row:after { content: "Characters"; }
#campaign-dashboard .campaign + .row:after, #campaign-dashboard .campaign + .row:before {
    font-size: xx-large;
    position: relative;
    text-align: center;
    margin-left: 50%;
    transform: translateX(-50%);
    display: inline-block;
    margin-bottom: 20px;
    width: 95%;
    padding-top: 10px;
    padding-bottom: 10px;
    background-image: linear-gradient(to right, rgba(0,0,0,0), rgb(30, 30, 30), rgba(0,0,0,0));
}

.panel-title .ra,
.panel-title .fa,
.panel-title .fab,
.panel-title .fad,
.panel-title .fal,
.panel-title .far,
.panel-title .fas {
    line-height: 0.1;
}

