* {

    --fade-time: 1s;
    --color-accent-desat: #82AFBC;
    --color-accent: rgb(168, 236, 255);
    --bg-dark: #003241;
    /* --bg-dark: #1a2427; */
    --bg-alt: #252424;
    --border-rad-m: 16px;
    
    font-family: 'Roboto';
    box-sizing: border-box;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.699);


    /* --main-color: #003241; */
    --accent-color: #82AFBC;
    /* --accent-color: var(--color-accent); */
    --bg-color: rgb(34, 34, 34);
    /* --bg-color: var(--bg-dark); */
    --bg-color-light: rgb(39, 39, 39);
    /* --bg-color-light: var(--bg-alt); */

    --main-color: rgb(35, 73, 155);
    --main-color: var(--bg-dark);
    /* --main-color: #137e89;
    --main-color: #003241; */
    --fg-color: white;
    --button-color: rgba(255, 255, 255, 0.034);
    --button-color-hover: rgba(255, 255, 255, 0.274);
    --transition-time-hover: 0.5s;
    --main-content-width: 55%;
    --side-panel-gap: 2%;
    --border-radius: 32px;

    color: var(--fg-color);
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    letter-spacing: 2px;

    box-sizing: border-box;




    
}

::selection {
    color: black;
    background: var(--accent-color);
    border-radius: 4px;
}

/* width */
::-webkit-scrollbar {
    width: 12px;
}

/* Track */
::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 8px;
}

/* Handle */
::-webkit-scrollbar-thumb {
    background: var(--main-color);
    border-radius: 8px;
}

/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

html {
    background-color: var(--bg-color);
    width: 100%;
}

body {
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#main-content {
    width: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: var(--side-panel-gap);
}

#file-upload-wrapper{
    height: auto;
    width: 100%;
    /* margin-top: 32px; */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#drop-zone{
    height: 100%;
    width: 100%;
    padding: 16px 0;
    border: solid 1px lightgray;
    border-radius: var(--border-radius);
    background-color: unset;
    transition: background-color 1s;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    > p {
        font-size: 8pt;
        color: lightslategray;
        font-weight: 100;
        margin-top: 8px;
        margin-bottom: 16px;
        opacity: 0.6;
    }

    span {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        opacity: 0.6;

        p {
            font-size: 20pt;
            color: lightslategray;
            font-weight: 100;
        }

        img {
            height: 48px;
            margin-right: 8px;

        }
    }
}

#drop-zone.drag-over {
    transition: background-color 1s;
    background-color: var(--accent-color);
}

#preview-container {
    text-align: center;
    height: fit-content;
}

.preview-image {
    object-fit: cover;
    width: 100px;
    height: 100px;
    margin: 10px;
    border: 1px solid #ddd;
  }

#side-panel{
    display: flex;
    flex-direction: column;
    width: calc((100% - var(--main-content-width))/2 - var(--side-panel-gap)) ;
    height: 100%;
    margin-top: 8px;
    border: solid 1px rgb(53, 53, 53);
    border-top-right-radius: 32px;
    border-bottom-right-radius: 32px;
    align-self: flex-start;
}

.spacer {
    flex: 1;
    height: 100%;
}
.side-item {
    display: flex;
    flex-direction: column;
    align-items: start;
    justify-content: center;
    padding: 12px;
    border-bottom: solid 1px rgb(53, 53, 53);
    color: rgb(92, 92, 92);
    font-size: small;

    

    img{
        height: 48px;
        margin-right: 8px;
        opacity: 0.4;
        object-fit: contain;

    }

    > span{
        width: 100%;
        display: flex;
        flex-direction: row;
        justify-content: start;
        align-items: center;
    }
}

.side-item#change-passwd{
    text-decoration: none;
    border: none;
    border-top: solid 1px rgb(53, 53, 53);
}

.side-item:hover{
    color: white;
    background-color: #ffffff28;
}

.side-item.expandable{
    cursor: pointer;
}


.side-item.expandable:has(>.side-item-sub.active){
    color: white;
    /* background-color: #66baff28; */
    background-color: var(--main-color);
}



.side-item.expandable .side-item-sub{
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 16px;
    padding-top: 8px;

    height: 0px;
    overflow: hidden;
    transition: height 1s ease-in-out;
}

.side-item.expandable .side-item-sub.active{
    height: auto;
    transition: height 1s ease-in-out;
    width: 100%;
    overflow: auto;
    max-height: 30vh;
}
/* width */
.side-item.expandable .side-item-sub.active::-webkit-scrollbar {
    width: 12px;
}

/* Track */
.side-item.expandable .side-item-sub.active::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 8px;
}

/* Handle */
.side-item.expandable .side-item-sub.active::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 8px;
}

/* Handle on hover */
.side-item.expandable .side-item-sub.active::-webkit-scrollbar-thumb:hover {
    background: white;
}


.side-item-sub-item .filename {
    flex: 1 1 auto;
    min-width: 0;

    white-space: normal;
    word-wrap: break-word;
    word-break: break-all;
    max-height: 5em;
    overflow: hidden;

    font-size: x-small;
}


.side-item-sub-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;

    img {
        height: 24px;
        margin-right: 8px;
    }


    button{
        background-color: transparent;
        border-radius: 32px;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        border: solid 1px rgb(53, 53, 53);
        flex-shrink: 0;

        img{
            opacity: 1;
            margin: 0;
            padding: 2px;
        }
    }

    button:hover{
        background-color: rgb(153, 0, 0);
        transition: all var(--transition-time-hover);
    }
}

header {
    width: 100%;
}

#content {
    width: var(--main-content-width);
}

#content > * {
    margin-top: 16px;
}

#header-wrapper {
    height: 18vh;
    width: 100%;
    display: flex;
}

#header-img {
    width: 100%;
    height: 100%;
    image-rendering: optimizeSpeed;
    object-fit: cover;
    object-position: 0 60%;
}

#header-overlay {
    position: absolute;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: inherit;
    background-color: #12404d00;
    background-color: var(--bg-dark);
    backdrop-filter: blur(8px);

    img{
        height: 100%;
    }

    h1{
        height: 100%;
        display: flex;
        justify-content: center;
        align-items: center;

    }
}

#status-bar {
    width: 100%;
    height: 48px;
    display: flex;
    justify-content: center;
    
    background-color: var(--main-color);
    border-bottom: solid 1px var(--accent-color);
}

.status-bar-content {
    display: flex;
    width: var(--main-content-width);
    flex-direction: row;
    justify-content: space-between;

    > *{
        height: 100%;
        min-width: 100px;
    }
}

#logo-statusbar{
    height: 48px;
    width: 48px;
    object-fit: cover;
    
    img {
        width: inherit;
        height: inherit;
    }
}

.button {
    display: flex;
    flex-direction: row;
    cursor: pointer;
    border: solid 1px var(--fg-color);
    border-radius: var(--border-radius);
    align-items: center;
    justify-content: center;
    padding: 4px 16px;
    background-color: var(--button-color);
    transition: background-color var(--transition-time-hover);
    margin: 4px 0;
}

.button:hover{
    background-color: var(--main-color);
    transition: background-color var(--transition-time-hover);
}



.button {
    position: relative;
    
    text-align: center;
    -webkit-transition-duration: 0.4s; /* Safari */
    transition-duration: 0.4s;
    text-decoration: none;
    overflow: hidden;
    cursor: pointer;
  }
  
  .button:after {
    content: "";
    background: #00c8ff38;
    display: block;
    position: absolute;
    padding-top: 300%;
    padding-left: 350%;
    margin-left: -20px!important;
    margin-top: -120%;
    opacity: 0;
    transition: all 1s ease-in-out;
  }
  
  .button:active:after {
    padding: 0;
    margin: 0;
    opacity: 1;
    transition: 0s
  }




#submit-btn {
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 20px 0;
}

.textarea-container {
    width: 100%;
}

pre, textarea , input[type="text"]{
    background-color: var(--bg-color-light);
    width: 100%;
    height: 220px;
    border-radius: var(--border-radius);
    padding: 16px;
    max-width: 100%;
    min-height: 64px;
    min-width: 100%;
}

#usr-txt {
    height: 64px;
    min-height: 64px;
    min-width: 100%;
    padding-top: 22px;
}

#input-txt-wrapper {
    /* display: flex;
    flex-direction: row; */

    position: relative;


    img {
        position: relative;
        height: 48px;
        
        top: -56px;
        right: calc(-100% + 56px);

        opacity: 0.4;

        transition: opacity 1s;
    }

    img:hover {
        transition: opacity 1s;
        opacity: 1;

        cursor: pointer;
    }
}

#file-upload-wrapper.show-menu {
    display: flex;
    height: auto;
}

#file-upload-wrapper:not(.show-menu) {
    display: none;
    height: 0;
}

#settings-panel {
    display: none;
    position: fixed;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0,0,0,0.5);
    overflow: hidden;
    top:0;
    left:0;
}

#settings-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 200px;
    padding: 24px;

    background-color: var(--bg-color-light);
}

#settings-exit {
    position: absolute;
    font-size: x-large;
    right:32px;
    top: 16px;

    width: 80px;
    height: 80px;

    border: solid 1px var(--fg-color);
    border-radius: 128px;

    cursor: pointer;
}

#output-txt {
    height: 500px;
}

.input-container {
    display: flex;
    flex-direction: row;
    
    justify-content: space-between;
    align-items: center;

    padding: 8px;

    label {
        width: 84px;
    }
}

.input-container >* {
    padding: 8px;
}

.input-value-display {
    width: 84px;
}


footer {
    display:flex;
    flex-direction: column;
    gap: 12px;
    height: 200px;
    align-self: flex-end;
    width: 100%;
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--main-color);
    border-top: solid 1px var(--accent-color);
}

/* #logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: calc(100% - 8px);
    margin:4px;
    border: solid 1px white;
    border-radius: var(--border-radius);

    > * {

    }
} */

#logout-btn:hover {
    background-color: rgb(153, 0, 0);
    transition: background-color var(--transition-time-hover);
}

#output-controls{
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 8px;
}

#thread-reset-btn{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: row;
    background-color: transparent;
}

#thread-reset-btn:hover{
    background-color: var(--main-color);
    transition: background-color var(--transition-time-hover);
}

#login-panel {
    padding: 24px 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    form{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        

        input{
            margin: 4px;
            background-color: var(--bg-color-light);
            border-radius: var(--border-radius);
            border: solid 1px var(--fg-color);
            padding: 8px;
        }
    }
}


#main-content.login-page{
    flex-direction: column;
}

.side-tab-wrapper{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.expand-trigger{
    display: flex;
    flex-direction: row;
    width: 100%;
    align-items: center;
}


#password-change-form{   
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 10vh;
    gap: 1vh;
    
    input{
        margin: 4px;
        background-color: var(--bg-color-light);
        border-radius: var(--border-radius);
        border: solid 1px var(--fg-color);
        padding: 8px;
    }
}

#password-change-wrapper {
        display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%
}

.status-bar-content .button{
    margin: 0;
}

.button:disabled{
    opacity: 0.3;
}

.button:disabled:hover{
    background-color: transparent;
    cursor: default ;
}

#rename-thread-modal{
    position: absolute;
    z-index: 10000;
    top: 25vh;
    box-shadow: 0px 0px 50px 30px rgba(0,0,0,0.42);

    border-radius: var(--border-radius);

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;

    width: 80vw;
    height: 40vh;

    background-color: var(--bg-alt);
    z-index: 10;

    #modal-close-btn{
        position: absolute;
        top: 24px;
        right: 24px;
        padding: 6px;
    }

    #modal-close-btn:hover{
        background-color: rgb(153, 0, 0);
    }

    .modal-content{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;

        input[type="text"]{
            height: 1em;
        }
    }
}
#modal-backdrop{
    position: fixed;
    width: 100vw;
    height: 100vh;
    background-color: #00000057;
    backdrop-filter: blur(30px);
}

.hidden{
    display: none !important;
}

#output-controls-right{
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 8px;
}

#accept-rename-btn{
    padding: 16px !important;
}

#request-state-indicator{
    display: none;
    height: 0;
    margin-top: -2em;
    margin-bottom: 3em;
    margin-left: 2em;
    color: darkgray;

    animation: pulsing 2s ease-in-out 0s infinite;
}


@keyframes pulsing {
    0% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.5;
    }
}