
/* GLOBAL /

/* calc width of aside and main related to body's datasets (device-width
 * and aside-state)*/

.total{
    font-size: 92%;
    display: table;
}
.total:before{
    content: "(";
}
.total:after{
    content: ")";
}
body, aside{
    /*transition: 250ms;*/
}
body[data-aside-state="open"] aside {
    width: var(--asideWidth);
    max-width: 100%;
    opacity: 1;
}

body[data-aside-state="close"] aside {
    width: 0;
    opacity: 0;
}

body[data-device-width="large"][data-aside-state="open"] main {
    margin-left: var(--asideWidth);
    width: calc(100% - var(--asideWidth));
}

body[data-device-width="large"][data-aside-state="close"] main {
    margin-left: 0;
    width: calc(100% - 0);
}

body[data-device-width="small"][data-aside-state="open"] {
    height: 100%;
    overflow: hidden;
}

#TOC > ul > li ul{
    padding-left: 1rem;
}

/* scrim (the transparent/black thing for small devices when aside is open) */

#scrim {
    position: fixed;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: none;

    background-color: black;
    opacity: 0.4;
}

body[data-device-width="large"] #scrim {
    display: none;
}

body[data-device-width="small"][data-aside-state="open"] #scrim {
    display: block;
}

body[data-device-width="small"][data-aside-state="close"] #scrim {
    display: none;
}

/* aside */

aside {
    width: 0;
    max-width: 100%;
    height: calc(100% - var(--headerHeight));
    position: fixed;
    top: var(--headerHeight);
    left: 0;
    overflow-y: scroll;
    z-index: 2;

    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: flex-start;

    background-color: var(--colorSecond);
    border-right: 1px solid var(--colorFourth);

    font-family: 'muli';
    font-weight: 100;
    font-size: var(--fsSmall);
    line-height: var(--lhSmall);
}

aside a {
    /*color: inherit;*/
    text-decoration: inherit;
}

/* togglableModule */

aside > ul {
    padding: 1rem;
}

aside > ul > li {
    display: inline-block;
    margin-right: 6px;
    padding: 0.4rem;
    
    border-radius: 4px;
    border: 1px solid var(--colorThird);

    color: var(--colorFourth);
}

aside > ul > li:hover {
    cursor: pointer;
    /*background-color: var(--colorThird);*/
    /* border: 1px solid transparent;*/
    border-color: var(--colorFourth);
    color: var(--colorFourth);
    /*text-decoration: underline;*/
}

aside > ul > li.active {
    background-color: white;
    font-weight: 300;    
    border: 1px solid var(--colorFourth);
    color: var(--colorDark);
    text-decoration: none;
}

/* section */

aside > div[data-module] > section {}

aside > div[data-module] > section > div:first-child {
    border-top: 1px solid var(--colorThird);

    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;

    margin: 0;
    color: var(--colorDark);
    font-family: 'muli';
    font-weight: 400;
    font-size: var(--fsSmall);
    background-color: white;
}
aside > div[data-module] > section > div:first-child > span {}

aside > div[data-module] > section > div:last-child {
    padding-left: 1.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    padding-bottom: 1rem;
    background-color: var(--colorSecond);
}

aside > div[data-module] > section > div:last-child > ul {
    margin-top: 0.4rem;
    margin-top: 1rem;
    font-family: 'muli';
    font-weight: 100;
    font-size: var(--fsSmall);
    line-height: var(--lhSmall);
    color: var(--colorDark);
    /*padding-bottom: 1rem;*/
}

aside > div[data-module] > section > div:last-child > ul > li {
    padding-left: 1rem;

}
aside > div[data-module] > section > div:last-child > ul > li > div:first-of-type{
    width: calc(256px - 1rem);
    /*white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;*/
}
ul.item-list > li{
    font-family: 'jannon';
    margin-bottom: 0.56rem;
    color: var(--colorDark);
    line-height: 1.2rem;
    margin-bottom: 0.56rem;
}
ul.item-list > li > a{
    color: var(--colorDark);
    line-height: 1.2rem;
}

aside > div[data-module] > section > div:last-child > ul > li > a:hover {
    text-decoration: underline;
}

aside > div[data-module] > section > div:last-child > ul > li > a.active {
    text-decoration: underline;
}

/* INDEX */

#index-input {
    /*height: 32px;*/
    width: 100%;
    margin: 0;
    padding: 10px 1rem;


    border: 0px solid var(--colorThird);
    /*border-radius: 4px;*/

    color: var(--colorFifth);
    font-size: var(--fontsizeSmall);
    font-family: 'muli';
    font-weight: 100;
}

/* PAGE */

aside nav li {
    display: block;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

aside nav a:hover {
    text-decoration: underline;
}

#clipboard-target{
    margin-bottom: var(--lhSmall);

}
#clipboard-target > span:last-of-type{
    color: black;
    /*word-break: break-all;*/
}
#clipboard-target-bibtex {
    padding-top: 1rem;
    border-top: 1px solid var(--colorFourth);
    display: none;
}
#rights{
    display: table;
    padding-top: 1rem;
    border-top: 1px solid var(--colorFourth);
    /*margin-bottom: var(--lhSmall);*/
}

.bibtex{
    display: none;
}


.fb-share-button{
    margin-top: 6px;
    margin-bottom: 6px;
}

#clipboard-button-chicago {
    position: relative;
}
#clipboard-target-chicago > span:last-of-type{
    /*background-color: yellow;*/
    /* These are technically the same, but use both */
    overflow-wrap: break-word;
    word-wrap: break-word;

    -ms-word-break: break-all;
    /* This is the dangerous one in WebKit, as it breaks things wherever */
    word-break: break-all;
    /* Instead use this non-standard one: */
    word-break: break-word;

    /* Adds a hyphen where the word breaks, if supported (No Blink) */
    -ms-hyphens: auto;
    -moz-hyphens: auto;
    -webkit-hyphens: auto;
    hyphens: auto;
}

#clipboard-button-bibtex {
    position: relative;
}

.button.success:after{
  animation-duration: .8s;
  animation-name: fade;
  content:"✔";
  z-index: 100;
  font-size:1.4em;
  color: green;
  position:absolute;
  top:0;
  left:0;
  width:calc(100% + 30px);
  text-align:right;
}

.button.error:after{
  animation-duration: .8s;
  animation-name: fade;
  content:"✘";
  z-index: 100;
  font-size:1.4em;
  color: red;
  position:absolute;
  top:0;
  left:0;
  width:calc(100% + 30px);
  text-align:right;
}

@keyframes fade {
  0% {
    opacity:0;
  }
  50% {
    opacity:1;
  }
  80% {
    opacity:1;
  }
  100% {
    opacity:0;
  }
}

/*aside toggler list*/
#aside-stay{
    display: none;
    position: fixed;
    width: auto; height: auto; height: calc(100% - var(--headerHeight));
    background-color: transparent;
    /*pointer-events: none;*/
    padding: 0;
    overflow-x: hidden;
    z-index: 11;
    /*here*/
    /*display: none; */
    opacity: 0.4;
}
#aside-stay:hover{
    opacity: 1;
}

#aside-stay > ul{
    /*padding-top: var(--headerHeight);*/
}
#aside-stay > ul > li{
    display: table;
    pointer-events: all;
}
#aside-stay > ul > li.active > button{
    background-color: white;
}
#aside-stay > ul > li > span{
    display: none;
}


#aside-stay > ul > li:first-of-type{
    border-top: 1px solid var(--colorThird);
}
#aside-stay > ul > li > button{
    width: 24px; height: 24px;
    width: var(--headerHeight); height: var(--headerHeight);
    margin: 0; padding: 0;
    outline: none;
   
    /*reset button styles*/
    padding: 0;
    margin: 0;
    border: none;
    background-color: transparent;
    
    background-color: var(--colorSecond);
    border: 1px solid var(--colorThird);
    color: var(--colorDark);
    border-left: 0px;
    border-top: none;
    border-radius: 2px;
    border-top-left-radius: 0px;
    border-bottom-left-radius: 0px;
    cursor: pointer;
}
#aside-stay > ul > li > button > img{
    display: table;
    width: 16px;
    margin: auto;
}

body[data-aside-state="open"] > #aside-stay{
    top: var(--headerHeight); left: var(--asideWidth);
}
body[data-aside-state="close"] > #aside-stay{
    left: 0; top: var(--headerHeight); 
}
body[data-aside-state="open"] > #aside-stay > ul > li{
    display: none;
}
body[data-aside-state="open"] > #aside-stay > ul > li:nth-child(1){
    /*display: table;*/
}

aside > div[data-module] > section:nth-child(1){
    margin-right: 0;
}
aside > div[data-module] > section:nth-child(1) > div:first-child {
/*    background-color: var(--colorThird);
    padding: 1rem;
    padding-left: 1.5rem;
    display: none;*/
}

body[data-aside-state="open"] > aside > #aside-navigation{
    display: table;
    width: 100%;
    padding: 0.56rem;
    padding-bottom: calc(0.56rem - 4px);
    background-color: var(--colorThird);
}
body[data-aside-state="open"] > aside > #aside-navigation > ul > li{
    display: inline-block;
    margin-bottom: 6px;
    margin-right: 2px;
    /*background-color: var(--colorThird);*/
}
body[data-aside-state="open"] > aside > #aside-navigation > ul > li > button{
    display: inline-block;
    border: 1px solid var(--colorThird);
    color: var(--colorDark);
    border-radius: 2px;
    cursor: pointer;
    padding: 6px 8px;
}
body[data-aside-state="open"] > aside > #aside-navigation > ul > li.active > button{
    background-color: white;
    font-weight: 300;
}
body[data-aside-state="open"] > aside > #aside-navigation > ul > li > button:hover{
    background-color: var(--colorFourth);
}
body[data-aside-state="open"] > aside > #aside-navigation > ul > li.active > button:hover{
    background-color: white;
}

/*body[data-aside-state="close"] > aside > #aside-navigation{
    display: none;
}*/
