/*
@font-face {
    font-family: 'Pedantic Devanagari';
    src: url('fonts/PedanticDevanagariLight.woff');
    unicode-range: U+0900-097F,U+A8E0-A8FB,U+1CD0-1CF6,U+2E24;
}

@font-face {
    font-family: 'Pedantic Devanagari';
    src: url('fonts/PedanticDevanagariBold.woff');
    unicode-range: U+0900-097F,U+A8E0-A8FB,U+1CD0-1CF6,U+2E24;
    font-weight: bold;
}

@font-face {
    font-family: 'Pedantic Malayalam';
    src: url('fonts/PedanticMalayalam.woff');
    unicode-range: U+0D00-0D7F,U+25CC;
}

@font-face {
    font-family: 'Pedantic Malayalam';
    src: url('fonts/PedanticMalayalamBold.woff');
    unicode-range: U+0D00-0D7F,U+25CC;
    font-weight: bold;
}

@font-face {
    font-family: 'TST Grantha';
    src: url('fonts/TSTGrantha.woff');
    unicode-range: U+0D00-0D7F,U+25CC;
}

@font-face {
    font-family: 'Pedantic Telugu';
    src: url('fonts/PedanticTelugu.woff');
    unicode-range: U+0C00-0C7F;
}

@font-face {
    font-family: 'Pedantic Telugu';
    src: url('fonts/PedanticTeluguBold.woff');
    unicode-range: U+0C00-0C7F;
    font-weight: bold;
}

@font-face {
    font-family: 'TSTTamil';
    src: url('fonts/TSTTamil.woff');
    unicode-range: U+0020,U+0B80-0BFF;
    font-weight: normal;
    font-style: normal;
}
*/

@font-face {
  'Alegreya Sans';
  src: url('../fonts/AlegreyaSans-Regular.ttf');
  font-weight: normal;
  font-style: normal;
}
@font-face {
  'Alegreya Sans';
  src: url('../fonts/AlegreyaSans-Bold.ttf');
  font-weight: bold;
  font-style: normal;
}

body {
    font-family: 'Alegreya Sans', 'PedanticDevanagari', 'PedanticMalayalam', 'PedanticTelugu', 'Noto Serif Tamil', 'TST Grantha', sans-serif;
    color: black;
    max-width: 100vw;
    margin: 0 auto;
    line-height: 1.2;
    padding-top: 20px;
    font-size: 1.5em;
    letter-spacing: 0;
    position: relative;
    padding: 0;
    background: rgb(232,232,231);
}

.grantha.scripter, .grantha.text-box, .grantha .tree-lemma, .grantha td.lemma {
    font-family: 'eGranthamil 7', sans-serif;
}

.grantha .tree-lemma [lang="en"] {
    font-family: 'Alegreya Sans';
}

#views > div#splash {
    height: 400px;
    text-align: center;
    align-self: center;
}

#full-tree {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#full-tree svg {
    padding-right: 20px;
}

svg text {
    font-size: 11px;
    font-family: 'Alegreya Sans';
}

.littletree {
    cursor: pointer;
}

.witness, .internal {
    font-size: 0.9rem;
    font-variant: small-caps;
    cursor: pointer;
}

.internal .orphan {
    color: rgba(0,0,0,0.5);
}

.internal {
    display: inline-block;
    position: relative;
    left: -3px;
    top: -2px;
}

.internal:hover {
    color: red;
}

.internal svg {
    display: inline-block;
    vertical-align: bottom;
}

.witness::after {
    content: ': ';
}

.witness.inactive::after {
    content: '';
}

.witness:hover {
    text-decoration: underline;
    
}

.tree-box {
    overflow-x: auto;
}

.tree-lemma {
    font-size: 1rem;
}

.tree-div {
    position: absolute;
    white-space: nowrap;    
}

h4 {
    margin-bottom: 50px;
}

h4.title {
    margin-bottom: 10px;
}

h5 {
    margin-top: 5px;
}

hr {
    margin: 0;
    padding: 0;
}

#views {
    display: flex;
    flex-direction: row;
/*    justify-content: flex-start; */
    justify-content: center;
/*    padding-bottom: 10px; */
}

#views > div {
    top: 0;
/*    position: sticky;
     height: 100%; 
     height: fit-content; */
    flex: 1 1 0;
    max-width: 600px;
    text-align: justify;
    background: white;
    position: relative;
    height: calc(100vh - 60px);
    overflow-y: auto;
    overflow-x: auto;
    border-left: 1px solid rgb(185,185,182);
    border-right: 1px solid rgb(185,185,182);
    border-bottom: 1px solid rgb(185,185,182);
    border-radius: 2px 2px 0 0;
}
#views > div.matrix {
	background: rgb(232,232,231);
  padding-bottom: 10px;
}

#views > div.matrix, #views > div.tree-box {
    max-width: 100vw;
/*    max-height: calc(100vh - 180px);
    overflow: scroll;
    */
    overflow-x: auto;
}

#views > div ~ div, #descs > div ~ div {
    margin-left: 12px;
}

#stickytop {
    position: sticky;
    top: 0;
    z-index: 8;
    background: rgb(232,232,231);
    display: flex;
    /*justify-content: space-between;*/
}

#menu {
    display: flex;
/*    position: absolute;
    top: 30px; */
    position: relative;
    top: 0;
    z-index: 100;
    cursor: default;
    flex-direction: row;
    /*width: 100%;*/
    justify-content: space-between;
    background: rgb(232,232,231);
}

#right_menu, #left_menu {
    display: flex;
    flex-direction: row;
}
#right_menu {
    font-size: 1.1rem;
    margin-right: 1rem;
}

#menu div.open {
    background: rgba(68,24,155,0.9);
    color: white;
}

#menu div {
    padding: 0 0.3rem 0 0.3rem;
    font-size: 1.2rem;
    border-radius: 2px 2px 0 0;
}

#menu ul {
/*    margin: 5px 0 10px 0; */
    margin: 0 0 0 -0.3rem;
    padding: 5px 15px 5px 15px;
    list-style: none;
    display: none;
    position: absolute;
    background: rgba(68,24,155,0.9);
    border-radius: 0 2px 2px 2px;
    max-height: calc(100vh - 50px);
    overflow-y: auto; 
}

#menu li {
	padding-left: 0.2rem;
	padding-right: 0.2rem;
    display: flex;
    flex-direction: row;
	justify-content: space-between;
	gap: 2rem;
}

.shortcut {
    font-variant: small-caps;
	align-self: end;
}
#menu div .shortcut {
    font-size: 80%;
}

#menu li.greyedout, .greyedout {
    color: grey;
}

#menu li:hover {
    background-color: rgba(252,255,124,0.4);
    cursor: pointer;
}

.heading {
    position: relative;
/*    border: 1px solid grey; */
}

#descs {
    font-size: 0.8em;
    /*padding-top: 10px;*/
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
}

#descs > div {
    text-align: left;
    hyphens: auto;
    flex: 1 1 0;
    /*max-width: 595px;*/
    padding-left: 3px;
    background: white;
    border: 1px solid rgb(185,185,182);
    border-radius: 2px 2px 0 0;
}

/*
#descs > div ~ div {
    margin-left: 12px;
}
*/
.closer, .opener, .scripter {
    float: left;
    margin-right: 3px;
    margin-top: 3px;
    cursor: pointer;
/*    background: rgb(216,34,34);
    color: white; */
    color: black;
    height: 1rem;
    width: 1rem;
    border: 1px solid rgb(185,185,182);
    border-radius: 2px;
    line-height: 78%;
    text-align: center;
}

.scripter {
    font-size: 0.8em;
    line-height: 100%;
}

.closer:hover, .opener:hover, .scripter:hover {
    background: rgba(68,24,155,0.9);
    /*background: rgb(102,15,15); */
    color: white;
}

#info_box {
    position: absolute;
    top: 5px;
    right: 0px;
    text-align: right;
    border-width: 1px;
    border-color: black;
    font-size: 1rem;
}

#tooltip {
    display: block;
    position: fixed;
    background: rgba(17,17,17,0.8);
    border-radius: 4px;
    color: #fff;
    font-size: 1rem;
    vertical-align: middle;
    padding: .5em 1em;
    margin-bottom: 11px;
    max-width: 200px;
    z-index: 3;
}


.tamil {
    font-variant-ligatures: historical-ligatures;
}
.text-box.tamil {
    word-spacing: 1em;
    line-height: 1.4em;
    font-size: 1.3rem;
}

.lemma:not(.dragging):hover {
    background-color: rgba(252,255,124,0.4);
}

.lemma:not(.dragging):hover > .space {
    background-color: rgb(216,219,63);
}
.nohover .lemma:not(.dragging):hover, .nohover .lemma:not(.dragging):hover > .space {
  background-color: rgb(247,198,24);
}

span.group::after {
    content: ' ';
}

.space {
    background-color: #ccd5e5;
}

.emphasis {
    font-weight: bold;
}

.invisible {
    display: none;
}

.invisible.highlit {
    display: inline;
}

.hidden {
    visibility: hidden;
}

.tohighlight {
    transition: background-color 1s ease;
}

.translit {
 /*   background-color: rgb(104,232,104); */
    background-color: rgb(252,255,124);
}
.lemma.transposed {
    text-decoration: underline;
    text-decoration-style: dashed;
    text-decoration-color: rgb(0,198,0);
}


.floater {
    position: absolute;
    white-space: nowrap;
    display: block;
    padding-right: 10px;
}

/* matrix view */

.matrix {
    position: relative;
}

.matrix table {
    background: white;
    border-collapse: collapse; 
    table-layout: auto;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    border-right: 1ch solid rgb(232,232,231);
}

.matrix .scroller {
}

.matrix tr.header {
    top: 0;
    position: sticky;
    z-index: 3;
}

.matrix tr.header th {
    z-index: 3;
    top: 0;
    position: sticky;
    text-align: left;
    cursor: auto;
    font-weight: normal;
    /*max-width: 0.5em;*/
    font-size: 0.5em;
    padding: 0;
}

.matrix tr.header th .readings {
    writing-mode: vertical-lr;
}

.matrix tr.header th input {
    transform: scale(0.6);
    margin-left: -2px;
}

.matrix tr.header form {
    display: none;
    padding: 0;
    margin: 0;
}

.matrix td.anchor {
    background: white;
    z-index: 4;
    top: 0;
    left: 0;
    position: sticky;
}

.matrix th, .matrix td {
    border: 1px solid #e5e9f5;
    padding: 0.2em 0.3em 0.2em 0.3em;
    /*white-space: nowrap;*/
    font-size: 1rem;
}

.matrix th {
    position: sticky;
    left: 0;
    /*background: rgb(104,59,160);*/
    background: rgb(68,24,155,0.9);
    background-clip: padding-box;
    z-index: 2;
    cursor: grab;
    color: white;
}

.matrix td {
    position: relative;
    background-clip: padding-box;
    white-space: pre;

}

td[data-insignificant='true'] {
    color: grey !important;
}

td:empty {
    background-color: rgb(245,245,245);
}

td[data-binary='true']:empty {
    background-color: rgb(219,219,219);
}

td[data-emended='true'], span.lemma[data-emended='true'] {
    border-bottom: 2px dotted rgb(230,152,174);
}

td.pending {
    background-color: rgb(230,230,230);
}

.matrix td.group-start {
    border-right: 0;
    border-left: 4px solid #e5e9f5;
    padding-right: 0;
}
.matrix td.group-internal {
    border-left: 0;
    border-right: 0;
    padding-left: 0;
    padding-right: 0;
}
.matrix td.group-end {
    border-left: 0;
    border-right: 4px solid #e5e9f5;
    padding-left: 0;
}

#views.normalized .lemma[data-normal], #views.normalized .tree-lemma[data-normal] {
    color: rgb(106,87,208);
}

td.highlit:empty {
    background-color: rgb(238,238,153);
}

td.highlit[data-binary='true']:empty {
    background-color: rgb(228,231,112);
}

.highlit, .highlit > .space {
    background-color: rgb(252,255,124) /*!important */;
    /*opacity: 0.7; */
}

td.highlit.highlitcell, td.highlit.highlitcell:empty {
    background-color: rgb(247,198,24);
}

td[contenteditable='true'] {
    outline: 2px ridge rgb(183,110,55);
}

.dragging, td.dragging, .dragging th {
    /*color: rgb(191, 186, 197) !important;
    background-color: #ffa !important;*/
    background-color: rgb(247,198,24);
    /*box-shadow: 0 0 6px #44d;*/
    background-clip: border-box;
	filter: drop-shadow(0px 2px 2px #44d);
    z-index: 2;
}

.dragenter, .moveinprogress:hover {
    border-bottom: 2px dashed rgb(82,59,109) !important;
}

.contextmenu {
    box-shadow: 0 1px 2px 1px rgba(0,0,0,0.2);
    background: white;
    position: absolute;
    width: 120px;
    z-index: 5;
    font-size: 1rem;
    cursor: pointer;
}

.contextmenu ul {
    list-style: none;
    padding: 3px;
    margin: 0;
}

.contextmenu li {
    padding: 2px 0 2px 0;
}

.contextmenu li:hover {
    background-color: rgb(237,236,329);
}

.contextmenu form, .menubox form {
    display: inline;
}

.hidden-checkbox {
    display: none;
}

.contextmenu input {
    cursor: pointer;
}

#blackout {
    z-index: 10;
    position: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    left: 0;
    top: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(50,50,50,0.5);
}

.popup {
    max-width: 50%;
    background: white;
    padding: 10px;
    font-size: 0.7em;
}

#spinner {
    display: inline-block;
    width: 0.8em;
    height: 0.8em;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    vertical-align: bottom;
    margin-right: 0.5em;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/*.matrix td.highlit::before {
    background-color: #ffa;
    content: '';
    height: 100%;
    left: -100vw;
    width: 200vw;
    top: 0;
    z-index: -2;
    position: absolute;
}

.matrix td.highlit::after {
    background-color: #ffa;
    content: '';
    height: 200vh;
    left: 0;
    position: absolute;
    top: -100vh;
    width: 100%;
    z-index: -1;
}
*/
/* transcription rendering tags */

del {
    text-decoration-color: red;
    color: grey;
}

.tree-lemma del {
    color: inherit;
}

ins {
    color: red;
    text-decoration: none;
}

.tree-lemma ins {
    color: inherit;
    font-weight: bold;
}

span.lb {
    font-size: 70%;
    margin-right: 1em;
    color: black;
    font-weight: normal;
}

span.lb-minimal {color:#FF9900;
        letter-spacing:-0.15em;
        font-size:1.5rem;
        line-height:0.76;
        font-family: serif;
        font-weight:normal;
        vertical-align: -0.1em;
        cursor: default;
        white-space: nowrap;
}

h3.pb {
    color: black;
}

span.pb {
        color: grey;
        font-size: 1rem;
        line-height: 0.76;
        font-weight: normal;
        font-family: sans-serif;
        text-decoration: none;
        vertical-align: super;
        white-space: nowrap;
        cursor: default;
}

div.fw {
    margin-top: 1em;
    font-weight: normal;
    font-size: 1.5rem;
}

.right {
    float: right;
    clear: right;
    position: relative;
    margin-right: -80px;
    width: 74px;
    text-align: center;
}

.left {
    float: left;
    clear: left;
    position: relative;
    margin-left: -80px;
    width: 74px;
    text-align: center;
}

span.story {
    font-size: 70%;
    margin-right: 1em;
    margin-left: 1em;
    font-variant: small-caps;
}

h3.story {
    color: black;
    font-weight: normal;
}

span.verse {
    display: block;
    margin-left: 1em;
    margin-right: 1em;
}

span.l {
    display: inline-block;
    padding-bottom: 0.3em;
}

.gaiji {
    text-decoration: underline;
    text-decoration-style: wavy;
    text-decoration-color: red;
}

img.link {
    width: 12px;
    margin-left: 0.1em;
    vertical-align: super;
}


.aalt {
    font-feature-settings: "aalt" 1;
}
