body {
    font: normal 0.9em Verdana, Helvetica, Arial;
    margin: 20px;
    background: #f2f0b1;
    padding-bottom: 4em;
}

#invicta_logo {
    max-width: 150px;
}


#filter_clear {
    cursor: pointer;
}


div#tree {
    padding: 4px;  
    border: 1px solid #bbb;
    background: #f4f4ef;
    min-height: 1.5em;
    cursor: pointer;
    margin-top: 4px;        /* in case input box wraps */
}
  

#tree li {
    list-style: none;
    padding-right: 2px;
    margin-bottom: 1px;
    line-height: 1.6em;
}
  

#tree li.selected {
    padding-bottom: 0.5em;
}

#tree li.leaf {
    padding-left: 1.0em;
    /* text-indent: -1.0em; attempt at hanging indent, issue with comments though */
}

div.image img {
    max-width: 90px;
    margin: 0.5em 0 0 25px;
    border: 1px solid black;
}
    
#tree ul {
    margin: 0px 0px 0px 20px;
    padding-left: 0;
} 

/* Closed folder */
.folder::before {
    content: "📁 ";
}

/* Open folder */
.folder.open::before {
    content: "📂 ";
}

/* Leaf icons by type */
.leaf.music::before {
    content: "🎵 ";
}

.leaf.image::before {
    content: "🖼️ ";
}

.leaf.text::before {
    content: "📄 ";
}

.leaf.chat::before {
    content: "💬 ";
}


.folder > ul {
    display: none;
}

.folder.open > ul {
    display: block;
}

.selected {
    background-color: #d0e4ff;
    border: 1px solid #666;
    padding: 1px;
}

.info {
    margin-left: 1.0em;
    font-size: 0.7em;
    color: #888;
    white-space: nowrap;
}

ul.commentList li {
    margin-top: 4px;
    margin-left: 4px;
    color: #1366c4;
    background: #f5f5f5;
    white-space: pre-wrap;  /* keep any newlines in comments */
    border: 1px solid #888;
    padding: 4px;
    font-size: 0.9em;
    border-radius: 8px;
    cursor: default;
    line-height: 1.3em !important;
  }

ul.commentList li em{
    font-style: normal;   
    background: #1366c4;     
    padding: 1px 6px;     
    border-radius: 6px;   
    color: white;
    margin-right: 0.75em;
}
    
.commentArea {
    margin-left: 25px;
    margin-right: 1em;
    margin-top: 5px;
    padding: 8px;
    background: #f0f0f0;
    border: 1px solid #bbb;
    max-width: 800px;
}
  

.commentInput {
    width: 100%;
    margin-bottom: 3px;
}
  

textarea {
    box-sizing: border-box;
}


div#heading {
    display: grid;
    border-radius: 6px;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.2);
    grid-template-columns: auto 1fr;
    gap: 1rem;
    background: #feffed;
    border: 1px solid #bbb;
    margin-bottom: 1em;
}


div#heading div:nth-child(1) {
    padding: 5px;
}


div#heading h2 {
    margin-top: 0px;
}


div#heading div:nth-child(2) {
    padding: 5px;
    display: flex;
    flex-direction: column;
    justify-content: center; 
}

div#commentCount {
}

div#loading, div#login, div#logoff, div#links {
    padding: 8px;
    background: #feffed;
    border: 1px solid #bbb;
    margin-bottom: 1em;
    line-height: 1.8em;
    border-radius: 6px;
    box-shadow: 5px 5px 10px rgba(0,0,0,0.2);
}


div#login span {
    display: inline-block;
    width: 6em;
}


div#links {
    margin-top: 2em;
}

div#links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25em 1.5em;             /* space between items */
}


button.collapseAll, button.expandWithComments {
    margin: 0.5em 0.5em 0.5em 0em;
}

/* Lightbox */

#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

#lightbox img {
    max-width: 90%;
    max-height: 90%;
    box-shadow: 0 0 20px #000;
}

#lightbox_close {
    position: absolute;
    top: 20px;
    right: 30px;

    width: 40px;
    height: 40px;
    line-height: 40px;      /* vertically center the X */
    text-align: center;     /* horizontally center the X */

    background: #1366c5;    /* invicta blue */
    color: white;           /* white X */
    font-size: 28px;
    font-weight: bold;

    border-radius: 50%;     /* makes it round */
    cursor: pointer;
    user-select: none;

    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

#lightbox_close:hover {
    background: #3399ff;
}


@media (max-width:650px){
    div#heading {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.5rem;
    }
    
    div#heading div:nth-child(1),
    div#heading div:nth-child(2) {
        justify-content: center;
        align-items: center;
        display: flex;                /* ensures centring works */
    }
    
    /*
    #tree li:nth-child(1) span, #tree ul li {
        font-size: 1.1em;
    }
    */
}
