:root {
  --bg: #f7f4ed;
  --bg9: #f7f4ed;
  --header: #3f801e;
  --header0: #4f902e;
  --link: #d18f00;
  --dull: #aaa;
}

body {
  background-color: var(--main-bg-color);
}

/* basic reset*/
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* revert some crazy defaults from base style */
input, textarea {
    width: auto;
}

a.plain {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
}

p {
  line-height: 1.5em;

}

/* overrides for campl theme stuff */



a, a:visited {
  color: var(--link);
}

.campl-content {
  background-color: var(--bg);
}

.campl-theme-6 .campl-page-header, .campl-theme-6 .campl-local-footer {
  background: var(--header);
  background-size: 200px;
}
.campl-theme-6 .campl-page-header a, .campl-theme-6 .campl-local-footer a {
  color: white;
}

.campl-theme-6 .campl-main-content h1, .campl-theme-6 .campl-main-content h2 {
    color: var(--header);
    font-size: 2.4em;
}

.campl-theme-6 .campl-main-content h2 {
    font-size: 1.9em;
    font-weight: normal;
}

.campl-theme-6 .campl-local-navigation,
.campl-theme-6 .campl-local-navigation a {
    background: var(--header);
    border-bottom: 1px solid var(--header0);
    border-top: 1px solid var(--header0);
    border-right: 1px solid var(--header0);
}

.campl-theme-6 .campl-local-navigation a:focus, .campl-theme-6 .campl-local-navigation a:hover, .campl-theme-6 .campl-local-navigation a:active {
    background-color: var(--header);
}

.campl-theme-6 th {
    background-color: var(--header);
}

.campl-theme-6 .campl-table-striped tbody tr:nth-child(odd) td, .campl-theme-6 .campl-table-striped tbody tr:nth-child(odd) th {
    background-color: var(--bg9);
}

.campl-theme-6 table, .campl-theme-6 .campl-table-bordered {
    border-bottom: 2px solid var(--header);
}

body .campl-page-title {
    display: inline-block;
    padding: 10px;
    margin: -10px 0 0 -20px;
    font-size: 36px;
    line-height: 22px;
    font-weight: bold;
}
.login_status {
    color: white;
    float: right;
    padding: 3px 6px;
}

body .campl-wrap.fullwidth {
    width: auto;
    overflow-x: initial;
    white-space: nowrap;
}


#content .alert {
  background-color: #cef;
  padding: 1em 2em;
}
#content .alert-warning {
  background-color: #fce;
}

/* aramaic text is displayed using Charis for it extensive character set */
@font-face {
  font-family: CharisSILW;
  src: url(../fonts/CharisSIL-R.woff);
}
@font-face {
  font-family: CharisSILW;
  font-style: italic;
  src: url(../fonts/CharisSIL-I.woff);
}
@font-face {
	font-family: CharisSILW;
	font-weight: bold;
	src: url(../fonts/CharisSIL-B.woff);
}
@font-face {
	font-family: CharisSILW;
	font-weight: bold;
	font-style: italic;
	src: url(../fonts/CharisSIL-BI.woff);
}

h3 {
    margin-top: 1.5em;
}

.loading {
  opacity: 0.3;
}

.thumbnail {
  display: inline-block;
  vertical-align: top;
  width: 100px;
  height: 100px;
  margin: 4px;
  background: no-repeat var(--dull);
  background-size: cover;
}
.thumbnail.add {
  color: white;
  font-size: 70px;
  line-height: 90px;
  text-align:center;
}

.campl-page-title {
    font-size: 22px;
    line-height: 22px;
}

.campl-main-content {
    font-size: 1.3em;
    line-height: 1.3em;
}

ul{
    list-style-type: none;
}

.instruction_list {
  margin: 2em 6em;
}
.instruction_list > li {
  margin: 1em;
}


.dialect_select {
  position: absolute;
  bottom: 0;
  font-size: 1.2em;
  width: 95%;
  height: auto;
  background-color: var(--header);
  border-radius: 5px;
  border-color: var(--header0);
  color: white;
}

/* map stuff */

#map {
  width: 100%;
  min-height: 500px;
  border-radius: 30px;
  box-shadow: 4px 4px 8px rgba(0,0,0,0.3)
}

#map .key {
  position: absolute;
  bottom: 0;
  left: 20px;
  z-index: 1000;
}
#map .key .icon_base:before {
  top: 2px;
  left: -2px;
  height: 10px;
  width: 10px;
}

#map .map_tooltip {
  font-family: CharisSILW;
  font-size: 24px;
  padding: 10px 20px;
}
#map .map_tooltip .entry {
  display: block;
}
#map .map_tooltip .dialect {
  display: block;
  font-size: 60%;
}

#map.print .map_tooltip {
  padding: 4px;
  font-size: 1.3em;
  box-shadow: none;
}
#map.print .map_tooltip .entry {
  display:none;
}
#map.print .map_tooltip .dialect {
  font-size: 100%;
}
#map.print .leaflet-control-layers-overlays label:not(.printable) {
  display:none;
}

#map .icon_base:before,
#map .label:before {
    display: inline-block;
    position: relative;
    top: -9px;
    left: -9px;
    padding: 0;
    width: 20px;
    height: 20px;
    text-align: center;
    background: #85173555;
    border-radius: 50%;
    line-height: 20px;
    font-size: 16px;
    color: white;
    text-shadow: 1px 2px 4px rgba(0,0,0,0.7);
    border: 2px solid transparent;
}
#map .label:before {
    top: 0px;
    left: -3px;
    background: #999;
    font-size: 13px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}
#map input:checked + span .label:before {
    background: #555;
}

#map .icon_base:hover {
    z-index: 10001!important;
}
#map .icon_base:hover:before {
    border: 2px solid white;
}

#map .icon_C:before {content: ' '; background: rgba(255,0,0,1);}
#map .icon_J:before {content: ' '; background: rgba(0,0,255,1);}

#toggle-colors:checked + #map .icon_C:before {background: gray;}
#toggle-colors:checked + #map .icon_J:before {background: gray;}

#map.print .icon_C:before {
    background: black;
    border-color: white;
    color: white;
}
#map.print .icon_J:before {
    background: white;
    border-color: black;
    color: black;
    text-shadow: none;
}

#map .icon_focus {
    z-index: 10000!important;
}
#map .icon_focus:before,
#map .icon_focus:hover:before {
    border: 5px solid white;
}

#map .leaflet-control-layers label input {
    display: none;
}
#map .leaflet-control-layers label {
   padding: 3px;
}

#map .leaflet-control-attribution {
  max-width: 80%;
  max-height: 1.5em;
}

#map .group_off:before {content:'+';}
#map .group_0:before {content:'1';}
#map .group_1:before {content:'2';}
#map .group_2:before {content:'3';}
#map .group_3:before {content:'4';}
#map .group_4:before {content:'5';}
#map .group_5:before {content:'6';}
#map .group_6:before {content:'7';}
#map .group_7:before {content:'8';}
#map .group_8:before {content:'9';}
#map .group_9:before {content:'10';}
#map .group_10:before {content:'11';}
#map .group_11:before {content:'12';}
#map .group_12:before {content:'13';}
#map .group_13:before {content:'14';}
#map .group_14:before {content:'15';}
#map .group_15:before {content:'16';}
#map .group_16:before {content:'17';}
#map .group_17:before {content:'18';}
#map .group_18:before {content:'19';}
#map .group_19:before {content:'20';}
#map .group_20:before {content:'21';}
#map .group_21:before {content:'22';}
#map .group_22:before {content:'23';}
#map .group_23:before {content:'24';}
#map .group_24:before {content:'25';}
#map .group_25:before {content:'26';}
#map .group_26:before {content:'27';}
#map .group_27:before {content:'28';}
#map .group_28:before {content:'29';}
#map .group_29:before {content:'30';}

#toggle-colors, #toggle-names {
  float: right;
  position: relative;
  margin-left: 140px;
}
#toggle-colors:before {
  content: 'Toggle colours';
  position: absolute;
  width: 100px;
  right: 150%;
  top: -3px;
  text-align: right;
}
#toggle-names:before {
  content: 'Toggle names';
  position: absolute;
  width: 100px;
  right: 150%;
  top: -3px;
  text-align: right;
}

#toggle-colors:checked + #map .group_0:before {content:''; background-color: #6b98ff;}
#toggle-colors:checked + #map .group_1:before {content:''; background-color: #ff776b;}
#toggle-colors:checked + #map .group_2:before {content:''; background-color: #01bf00;}
#toggle-colors:checked + #map .group_3:before {content:''; background-color: #ffed5c;}
#toggle-colors:checked + #map .group_4:before {content:''; background-color: #fd8d08;}
#toggle-colors:checked + #map .group_5:before {content:''; background-color: #c89bff;}
#toggle-colors:checked + #map .group_6:before {content:''; background-color: #cb9d7c;}
#toggle-colors:checked + #map .group_7:before {content:''; background-color: #bce3ff;}
#toggle-colors:checked + #map .group_8:before {content:''; background-color: #fdabff;}
#toggle-colors:checked + #map .group_9:before {content:''; background-color: #97ec7d;}
#toggle-colors:checked + #map .group_10:before {content:''; background-color: #6b98ff;}
#toggle-colors:checked + #map .group_11:before {content:''; background-color: #ff776b;}
#toggle-colors:checked + #map .group_12:before {content:''; background-color: #01bf00;}
#toggle-colors:checked + #map .group_13:before {content:''; background-color: #ffed5c;}
#toggle-colors:checked + #map .group_14:before {content:''; background-color: #fd8d08;}
#toggle-colors:checked + #map .group_15:before {content:''; background-color: #c89bff;}

#toggle-colors:checked + #map .icon_C:before {content: ''; border-radius: 0; }
#toggle-colors:checked + #map .icon_J:before {content: '';}

#toggle-names:checked + input + #map .leaflet-tooltip-pane {display:none;}

.country1 {
    stroke: #999;
    fill: none;
}

/* buttons and controls */

.button {
    font-size: 1em;
    line-height: 1.3em;
    display: inline-block;
    border: 0;
    margin: 0 2px;
    padding: 0.4em 0.8em;
    cursor: pointer;
    text-align: center;
    transition: color 0.1s linear;
    border-radius: 0.2em;
    background: var(--header);
    color: #f0f0f0;
}

.button,
.buttonlink,
.button:active,
.button:hover,
.button:visited {
    text-decoration: none;
    color: #fff;
}

.button:hover {
    background: var(--header0);
}

.button.dull {
    background: var(--dull);
    color: #fff;
}
.button.dull:hover {
    background: #ddd;
}

.round {
    border-radius: 0.6em;
}

.utf8-text {
    font-family: CharisSILW, Arial, liberation-sans, sans-serif !important;
}

.aramaic {
    font-family: CharisSILW, Arial, liberation-sans, sans-serif !important;
    font-size: 120%;
    font-weight: bold;
    background-color: #fec4;
    padding: 0.1em 0.2em;
    margin: -0.1em -0.2em;
}
/* aramaic classes can be present in old data, don't extra-pad-and-margin them */
.aramaic .aramaic {
    font-size: 100%;
    background-color: transparent;
    padding: 0;
    margin: 0;
}
.aramaic.marginal {
    color: #999;
}

.comment {
  opacity: 0.6;
  position: relative;
  float: right;
  cursor: default;
  padding: 0.3em;
  border-top-left-radius: 0.3em;
  border-bottom-left-radius: 0.3em;
}
.comment:hover {
  opacity: 1;
  background-color: #cef;
  z-index: 2;
}
.comment:hover:before {
  content: attr(data-text);
  position: absolute;
  display: block;
  left: 100%;
  top: 0;
  max-width: 400px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0.3em 0.6em;
  background-color: #cef;
  border-top-right-radius: 0.3em;
  border-bottom-right-radius: 0.3em;
}

img {
    max-width:600px;
}

.ilb { display: inline-block }

.fr { float: right; }

.ar { text-align: right; }


/* padding enough to get off the side of a grid container */
.p-3 { padding: 0.5em 1em; }


a.plain {
    color: inherit;
    text-decoration: none;
}

#grammar_tree_heading {
    display: block;
    margin: 0.5em 0;
    padding: 0.5em 0 0 1em;
    position: sticky;
    top: -2px;
    z-index: 3;
    background-color: var(--bg);
    'box-shadow: 0 2px 5px rgba(255,255,255,1);
}
#grammar_tree_heading .controls {
    display: inline-block;
    width: 543px;
    margin-bottom: 6px;
}
#compare_form {
    display: block;
    text-align:right;
}
#grammar_tree_heading .dialect_header {
    font-size: 2em;
    padding-top: 0!important;
    margin-top: -6px;
}

/* list setup and expanding */
#grammar_tree {
    min-height:600px;
    margin-bottom: 100px;
    }
#grammar_tree ul {
        max-height:0;
        overflow:hidden;
        margin: 0 0 0 40px;
        transition: max-height 1s;
        }
#grammar_tree li {
        position: relative;
        padding: 2px 2px 8px 2px;
        background-color: var(--bg);
        color: var(--dull);
        }
#grammar_tree.bulk_edit li.level_1 {
        max-height: 3.018em;
        white-space: nowrap;
        border-bottom: 1px solid var(--dull);
}
#grammar_tree .pop_open {
        display: none;
        }
#grammar_tree .pop_open + ul {
            transition: max-height 1s;
            transition-timing-function: ease-out;
            }
#grammar_tree .pop_open:checked + ul {
            max-height:250000px;
            transition: max-height 5s;
            transition-timing-function: ease-in;
            }
/* li contents */
#grammar_tree li > label {
        font-size: 1em;
        display: inline-block;
        margin: 0;
        padding: 12px 0 5px 48px;
        line-height: 1.4em;
        }
#grammar_tree .section_link {
        color: var(--dull);
        text-decoration: none;
        display: none;
        }
#grammar_tree label:hover .section_link {
            display: inline-block;
            }
#grammar_tree .section_link:hover {
            color: var(--header);
            }
#grammar_tree_heading .dialect_header,
#grammar_tree .example {
        display: inline-block;
        padding: 12px 5px 5px 5px;
        line-height: 1.4em;
        vertical-align: top;
        }
#grammar_tree_heading .dialect_header,
#grammar_tree.multi_dialect .example {
        width: 280px;
}
#grammar_tree label > .edit,
#grammar_tree .example .edit {
        display: none;
}
#grammar_tree label:hover > .edit,
#grammar_tree li:hover > .example .edit {
        display: inline-block;
}

/* folder is the big stripe down the LHS of an expanded section */
#grammar_tree .folder{
        padding: 9px 5px;
        background-color: var(--dull);
        position: absolute;
        top: 2px;
        left: 2px;
        bottom:2px;
        width: 29px;
        color: white;
        text-align: center;
        font-size: 15px;
        font-weight: bold;
        pointer-events: none;
        }
#grammar_tree .folder:before {
            content:'{';
            position: absolute;
            top: 9px;
            left: 4px;
            width: 10px;
            height:20px;
            color:white;
            }
#grammar_tree .folder:after {
            content:'}';
            position: absolute;
            bottom: 8px;
            right: 4px;
            color:white;
            width: 10px;
            height:20px;
            }

/* show and hide based on having entries or not */
#grammar_tree li { display: none; }
#grammar_tree.grammar_only li, #grammar_tree.bulk_edit li{ display: block; color: black; }
#grammar_tree.show_entries li.has_entry { display: block }
#grammar_tree.show_empties li.has_empty { display: block }
#grammar_tree.show_empties:not(.show_entries) .folder{ background-color: var(--dull); } /* when only showing empties make folders faded */
#grammar_tree .has_entry { color: black; } /* if a node has entries beneath it don't fade it */
#grammar_tree.grammar_only .folder,
#grammar_tree .has_entry>.folder { background-color: var(--header); } /* if we're just showing grammar, or folder has entries show colours */

/* entry content */
#grammar_tree .details_link { margin-left: 20px; visibility: hidden; float: right; }
#grammar_tree li:hover > * > .details_link { visibility: visible }

/* make the folders fade out as you go deeper */
#grammar_tree .level_0>.folder { opacity: 1; }
#grammar_tree .level_1>.folder { opacity: 0.8; }
#grammar_tree .level_2>.folder { opacity: 0.6; }
#grammar_tree .level_3>.folder { opacity: 0.4; }
#grammar_tree .level_4>.folder { opacity: 0.3; }
#grammar_tree .level_5>.folder { opacity: 0.2; }

/* make labels same width without a bounding box */
#grammar_tree .level_0>label { width: 542px; }
#grammar_tree .level_1>label { width: 500px; }
#grammar_tree .level_2>label { width: 458px; }
#grammar_tree .level_3>label { width: 416px; }
#grammar_tree .level_4>label { width: 374px; }
#grammar_tree .level_5>label { width: 332px; }

/* DialectFeature edit form */
.df_form {
  position: relative;
}
.df_form input[type=text]{
  padding: 1em 0.2em;
}
.df_form input,
.df_form textarea,
.df_form select
{
  vertical-align: top;
  border-radius: 0.2em;
}
.df_form label{
  padding: 0;
  vertical-align: top;
  display: inline-block;
}
.df_form select[id$="-frequency"]{
  width: 84px;
  height: 26px;
}

.df_form textarea {
  width: 300px;
  min-height: 40px;
}
.df_form .controls {
  text-align: right;
  padding: 3px 6px;
}
.df_form .controls > * {
  vertical-align: baseline;
}
.df_form [id$="-DELETE"] {
  float: right;
  margin-right: -26px;
}
.df_form [id$="-DELETE"]:checked + div {
  height: 3em;
  overflow-y: hidden;
}
.df_form [id$="-DELETE"]:checked + div * {
  text-decoration: line-through red;
  opacity: 0.6;
}
.df_form [name=is_absent]:checked + div {
  height: 0;
  overflow: hidden;
}
.df_form .cancel {
  cursor: pointer;
}
.df_form .add_new {
  height: 0px;
}
.df_form .add_new:before {
  content: '+ add another entry';
  position: absolute;
}
.df_form .add_new:checked {
  display:none;
}
.df_form .add_new+* {
  display:none;
}
.df_form .add_new:checked+* {
  display: block;
}

/* checkbox replacement */
/*   .chex is a styled up version of a normal checkbox */
input[type=checkbox].chex {
    position:relative;
    height:0;
    width:2.3em;
    vertical-align: baseline;
    }
input[type=checkbox].chex:before {
    content: '';
    display: block;
    position: absolute;
    top: -1.2em;
    left: 0.25em;
    width: 1.2em;
    height: 1.2em;
    border: 0.1em solid #aaa;
    border-radius: 25%;
    background-color: #fff;
    }
input[type=checkbox].chex:hover:before {
    box-shadow: 0 0 4px rgba(0,0,0,0.3) inset;
    }
input[type=checkbox].chex.flip:checked:after,
input[type=checkbox].chex:after{
    content: '';
    color: red;
    position: relative;
    top: -0.6em;
    font-size: 2em;
    padding: 0.2em;
    }
input[type=checkbox].chex.flip:after,
input[type=checkbox].chex:checked:after {
    content: '✔';
    position: relative;
    top: -0.6em;
    font-size: 2em;
    padding: 4px;
    color: var(--header);
    text-shadow: 1px 2px 2px rgba(0,0,0,0.3);
    }
input[type=checkbox].chex:hover:after {
    //color: #d61746; // commenting out as I don't know why we turn this red on hover
    }

/*   .chex_delete turns checkbox into an `x` for inline deletion, with optional tooltip taken attribute `data-chex` */
input[type=checkbox].chex_delete {
    position:relative;
    height:0;
    width:2.3em;
    }
input[type=checkbox].chex_delete:before {
    content: '🗙';
    display: block;
    position: absolute;
    color: var(--dull);
    font-size: 1.6em;
    }
input[type=checkbox].chex_delete:hover:after {
    content: attr(data-chex);
    display: block;
    position: absolute;
    left: 100%;
    color: var(--dull);
    font-size: 1em;
    }
input[type=checkbox].chex_delete:hover:before {
    content: '🗙';
    color: red;
    }
input[type=checkbox].chex_delete:checked:before {
    color: #f44;
    }


.translation_table {
  width: 80%;
}
.translation_table td {
  width: 50%;
  padding: 0.3em 0.6em;
  background: none;
}
.translation_table td.heading {
  width: 10%;
}
.translation_table .jump_to_time {
  cursor: pointer;
}
.translation_table .current_section {
  border: 1px solid #3f801e;
}

.audio_form #id_translation {
  font-size: 1.2em;
}
.audio_form textarea {
  width: 50em;
  height: 20em;
}

.filter {
  position: relative;
  height: 1em;
  width: 1em;
  overflow: hidden;
  visibility: hidden;
}
.filter > svg {
  position: absolute;
  top: 3px;
  left: 8px;
  width: 16px;
  height: 17px;
  fill: var(--header);
}
*:hover > .filter {
  visibility: visible;
}
