/** plugin: Basics - Display Fix #0.2 beta code **/
/***********************/
/* INTEGRATED PLUGINS */

/** Plugin: No Fluff by felixnightshade (https: //marketplace.kanka.io/profiles/17967) **/

/* Removes "Boosted" text and boosted rocket */
strong.text-maroon,
strong.text-maroon~p.help-block,
strong.text-maroon~br {
    display: var(--boosted-text-nofluff, none);
}

.fas.fa-rocket,
.label.label-default.bg-maroon.pull-right {
    display: var(--boosted-rocket-nofluff, none);
}

/**********************************/
/********** GLOBAL PAGES *********/
/********************************/

/* Alert Notifications */
.alert-success,
.bg-green,
.callout.callout-success,
.label-success,
.modal-success .modal-body {
    margin-top: 20px;
}

/* WRAPS AND WEBSITE CONTENT */
section.content-header {
    padding: 0px;
}

section.content {
    padding-top: 0px;
}

.content-header ol.breadcrumb {
    padding: 15px 25px 10px 25px;
}

.content-header h1 {
    padding: 0 0 15px 15px;
}

.campaign-header {
    margin-bottom: 15px;
}

/* Content Wrapper Fix */
.content-wrapper {
    min-height: calc(100vh - 50px) !important;
}

.btn-block+.btn-block {
    margin-top: 10px;
}

.help-block {
    margin-top: 15px;
    margin-left: 2px;
}

.box-footer .help-block {
    display: inline-block;
    margin-left: 15px;
    margin-top: 0;
}

.form-group .help-block {
    margin-top: 5px;
}

/* Adding the pointer cursor on the checkboxes */
input[type=checkbox]:hover {
    cursor: pointer;
}

/*****************/
/* MAIN SIDEBAR */

/* Reduce the default campaign-name size */
section.sidebar-campaign .campaign-name {
    font-size: 16px;
}

/* Fixed the Custom Links tab in .active mode */
li.active.sidebar-quick-links {
    background: none !important;
    box-shadow: none !important;
}

li.active.sidebar-quick-links>a {
    background: rgba(0, 0, 0, .24) !important;
    box-shadow: inset 1px 2px 6px rgb(0 0 0 / 16%) !important;
}

/* Removal of last update date */
.campaign-updated {
    display: none;
}

/**********/
/* FORMS */

.nav-tabs-custom>.tab-content {
    padding: 20px;
}

.form-group .form-control {
    border-radius: 4px;
    padding: 6px 10px;
}

.selection .select2-selection {
    /* old /* height: 33px */
    min-height: 33px;
    padding: 6px 10px;
    margin-top: 0;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding: 0;
    line-height: 2.4;
    margin-top: -6px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered .select2-selection__placeholder {
    color: var(--input-text-color);
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    right: 25px !important;
    top: 0;
}

.form-group label {
    margin-left: 2px;
}

.form-group label input[type="checkbox"] {
    position: relative;
    top: 2px;
    margin-right: 3px;
}

#main-content>section.content>div>form>div.panel-body>div.required:nth-child(2),
#main-content>section.content>div>form>div.panel-body>div:nth-child(2)>p.help-block {
    margin-bottom: 0;
}

textarea#tooltip::placeholder,
.form-group input::placeholder {
    opacity: 0.65;
}

.form-group label input[name="is_dead"] {
    position: relative;
    top: 1px;
    margin-right: 5px;
}

.form-group input.image[type="file"] {
    padding-left: 6px;
}

.entity-modification-history div.help-block,
#entity-attributes-all .entity-attributes .help-block {
    margin-top: 0;
}

#form-organisations div:first-child {
    margin-bottom: 15px;
}

.panel .panel-body,
.panel-body .form-group:last-child,
.tab-content div.tab-pane.active div:not(.form-group):last-child,
.tab-content div.tab-pane.active div:last-child .help-block {
    margin-bottom: 0;
    padding-bottom: 0;
}

/***************************************/
/* ARTICLES, ENTITY, BOXES AND TABLES */

/** Headers **/

.entity-header-image>div {
    border-radius: 5px !important;
}

.entity-grid .entity-header {
    grid-template-columns: 225px auto;
}

.entity-grid .entity-header .entity-banner {
    min-height: 245px;
}

.entity-grid .entity-header .entity-header-image {
    padding: 20px 0 0 25px !important;
}

.entity-grid .entity-header.with-entity-banner .entity-header-image {
    padding: 20px 0 25px 25px !important;
}

.entity-grid .entity-header .entity-header-text {
    padding: 25px 25px 0 20px !important;
}

.entity-grid .entity-header.with-entity-banner .entity-header-text {
    padding: 25px 25px 25px 20px !important;
}

/** Content **/

/* Internal margin of article content increased */
.box-body {
    padding: 10px 20px;
}

.box-gallery .box-body {
    padding: 10px
}

.entity-notes .box-body {
    padding: 8px 20px;
}

.entity-grid .entity-submenu {
    padding-left: 25px;
}

.entity-grid .entity-sidebar {
    padding-right: 25px;
}

/* Formatting bulleted/number lists */
.entity-note-body li,
.entity-grid .entity-content>ul>li {
    margin-bottom: 10px;
}

.entity-note-body>ul>li>ul>li:nth-child(1) {
    margin-top: 8px;
}

/* Adding a margin at the bottom of the campaign title */
#campaign-dashboard .campaign-head {
    margin-bottom: 12px;
}

/*********************************************/

/* Fixed the display of labels corresponding to numbers */
.entity-submenu>.hidden-xs>.box-solid>div>ul>li>a>span:not(.bg-maroon) {
    padding: 0.5em 0.6em 0.3em;
}

.hidden-xs.hidden-sm ul>li>a>span.bg-maroon {
    padding: .5em .6em .3em;
}

/* Do not display the "Entry"title of the first entry */
.box-entity-entry .box-header.with-border[id=""],
.box-entity-entry .box-header.with-border:not([id]) {
    display: none;
}

.entity-story-block .box-entity-entry:first-child,
.entity-main-block .box-entity-entry:first-child {
    margin: 0;
}

/* When the Input entity has content, add a margin below 20px */
.box-entity-entry>.entity-content {
    margin-bottom: 20px;
    padding-top: 15px;
}

/* New grid proportions */
.entity-grid {
    grid-template-columns: 250px minmax(auto, calc(100% - 300px)) 250px;
}

/* Correction of margins due to character traits */
#character-appearance-body p:nth-child(1),
#character-appearance-body p:nth-child(2) {
    margin-top: 8px;
}

/* Checkbox formatting on tables */
.table-striped>thead>tr>th:nth-child(1),
.table-striped>tbody>tr>td:nth-child(1) {
    text-align: center;
}

.table-striped>thead>tr>th:nth-child(1)>input,
.table-striped>tbody>tr>td:nth-child(1)>input {
    cursor: pointer;
    height: 15px;
    width: 15px;
    opacity: 0.75;
}

/* Footer */
footer.main-footer {
    padding-bottom: 0px !important;
}

/* New border-radius on entity image */
a.entity-image {
    border-radius: 10%;
}

/** Permissions Category **/
#crud_permissions .row {
    margin-right: 15px;
    margin-left: 15px;
}

#crud_permissions .row:not(:last-child) {
    padding-bottom: 15px;
}

#crud_permissions .row hr {
    display: block;
    height: 20px;
    margin: 0 -15px 5px -15px;
}

/****************/
/* ADMIN PANEL */

.element-live-reorder .element:last-child {
    margin-bottom: 0;
}

#datagrid-parent .table tr th:first-child,
#datagrid-parent .table tr td:first-child {
    padding-left: 20px;
}

/* Campaign Title adjustement */
section.sidebar-campaign .campaign-block {
    padding: 120px 24px 0;
}

/**********/
/* BOXES */

.box-header .box-title i {
    margin-right: 5px;
}

.box-header {
    padding: 14px 10px 10px 20px;
}

.box,
.box-body,
.box.box-solid,
.sidebar-section-box {
    border-radius: 5px;
}

.box-entity-story-reorder .box-body,
.box-entity-story-reorder .box-footer,
.box-profile {
    padding: 20px;
}

.box-footer {
    line-height: 0px;
}

.box .box-header i.pull-right {
    margin-right: 10px;
}

.box .box-header i.fa-filter {
    margin-right: 5px;
}

/* Fixing Footer Box Buttons Display */
.datagrid-bulk-actions .btn-group,
.datagrid-bulk-actions #datagrids-bulk-actions-delete {
    margin-right: 5px
}

/***********/
/* TABLES */

.table {
    margin-bottom: 0;
}

/*********/
/* BODY */

/* Calendars */

.calendar-toolbar .calendar-current .btn {
    margin-left: 25px;
}

.month-alias {
    float: none;
    margin-bottom: 0;
    font-size: 2rem;
}

/* Conversations */

.box-conversation .box-comments .box-comment {
    margin: 0 0 20px 0;
    padding: 10px;
}

.box-conversation .box-comments .box-comment:first-child {
    margin-top: 10px;
}

.box-conversation .box-comments strong.user {
    display: inline-block;
    margin-bottom: 5px;
}

.box-conversation .box-comments .box-comment .comment-text {
    padding-left: 10px;
    border-left: 2px solid #afafb940;
}

.box-conversation .box-footer {
    padding: 20px 0;
}

/******************/
/* RIGHT SIDEBAR */

/* Only used for adding a default background */
:root {
    --sidebar-section-background: var(--box-background);
    --sidebar-section-padding: 10px 15px 0px 15px;
}

/* Redefinition of the sidebar fonts */
.sidebar-section-box .sidebar-section-title {
    border-bottom: none;
}

.sidebar-section-box {
    margin-bottom: 20px;
}

.list-group .list-group-item strong:first-child {
    display: inline-block;
    width: 100%;
    margin-bottom: 3px;
}

.list-group .list-group-item span {
    float: left !important;
}

.sidebar-section-box .sidebar-elements .element .title {
    font-size: 14px;
    font-weight: bold;
    text-transform: none;
}

.sidebar-elements .element div.title {
    margin-bottom: 3px;
}

.sidebar-elements .element {
    margin-bottom: 5px !important;
}

/* Adding a separator between the different elements */
.sidebar-elements .element:not(:last-child) {
    border-bottom: 1px solid;
    border-color: var(--list-group-item-border);
    padding-bottom: 10px;
}

/**********************/
/* RESPONSIVE DESIGN */

@media (max-width: 767px) {
    .entity-grid .entity-header {
        grid-template-columns: 120px minmax(auto, calc(100% - 120px));
    }

    .entity-grid .entity-header .entity-header-text {
        padding: 20px 25px 0 20px !important;
        align-self: start;
    }

    .entity-grid .entity-header .entity-banner {
        min-height: 150px;
    }

    .entity-grid .entity-submenu {
        padding: 0 15px;
    }

    .entity-note-body ul {
        padding-left: 20px;
    }

    .help-block {
        float: none;
        margin-top: 15px !important;
        margin-left: 0 !important;
    }
    .nav-tabs-custom .form-group {
            margin-bottom: 10px;
    }    
}

/*****************************

Author : MisterHims
Created for : Kanka v1.27.0
Plugin Version : 0.1 beta

CREDITS :
felixnightshade - No Fluff - https://github.com/Xbozon/rpg-styled-ui - For the plugin
Davsama - For the idea and more

/** 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: 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: Tip Boxes #1.0 code **/
.tipbox-small { 
   float: right; margin: 10px; 
   width: 400px; padding:10px; 
   border-style: solid; border-width: 1px;
   text-align: justify; 
}

.tipbox-large { 
   float: right; margin: 10px; 
   width: 50%; padding:10px; 
   border-style: solid; border-width: 1px;
   text-align: justify; 
}

@media only screen and (max-width: 900px) {   .tipbox-small, .tipbox-large {  float: none;  width: 90%;  }   }

/** plugin: Easy Tabs #1.0 code **/
/* BEGIN Easy Tabs */
:root {
	--summernote-insert-easytabs: enabled;
}
.easytabs {
    --border-thickness: 1px;
    --tab-border: hsl(var(--bc));
    --tab-background: hsl(var(--s));
    --tab-text: hsl(var(--sc));
    --tab-hover-background: hsl(var(--sf));
    --tab-content-background: hsl(var(--b2));
}
/* Clickable tabs */
.easytabs-toggles {
	overflow-x: auto;
    display: flex;
}
.easytabs-tab {
	display: block;
    width: max-content;
    overflow: hidden;
    border: var(--border-thickness) solid var(--tab-border);
	background: var(--tab-background);
	padding: 5px 10px;
	color: var(--tab-text);
    font-size: 17px;
}
.easytabs-tab:not(:first-child) {
    margin-left: calc(-1 * var(--border-thickness)); /* fake border-collapse */
}
.easytabs-tab:first-child {
	border-top-left-radius: 5px;
}
.easytabs-tab:last-child {
	border-top-right-radius: 5px;    
}
.easytabs-tab:hover {
	background-color: var(--tab-hover-background);
    color: var(--tab-text);
}
/* Tab containers */
.easytabs-content {
	scroll-margin-top: 40px;
    margin-top: calc(-1 * var(--border-thickness)); /* fake border-collapse */
  	padding: 1em;
    border: var(--border-thickness) solid var(--tab-border);
    background-color: var(--tab-content-background);
}
/* Tab toggle logic: most hidden by default, last-child hidden specifically if another is targeted */
.easytabs-content, .easytabs-content:target ~ .easytabs-content:last-child {
  display: none;
}
/* Tab toggle logic: shown if targeted, or last-child if none is targeted */
.easytabs-content:last-child, .easytabs-content:target {
  display: block;
}
/* Consecutive display in Summernote, since you can’t activate the tabs, and an outline to distinguish each section */
.note-editable .easytabs-content {
	display: block;
	border: 1px dashed var(--tab-border);
}
/* Also show a hint of the tab’s id on hover to tell them apart if empty */
.note-editable .easytabs-content:empty:hover::after {
	content: "#"attr(id);
    display: block;
	font-style: italic;
    text-align: center;
}
/* END Easy Tabs */

