
:root {
    --primary: hsl(from var(--main) h s calc(l * 1));
    --primary-bright: hsl(from var(--main) h s calc(l * 2.5));
    --primary-hover: hsl(from var(--main) h s calc(l * 10));
    --primary-selected: hsl(from var(--main) h s calc(l * 12));

    --secondary: #2492c9;
    --secondary-hover: color-mix(in srgb, var(--secondary) 80%, white 20%);

    --success: #5CCD5C;
    --success-hover: color-mix(in srgb, var(--success) 80%, white 20%);

    --error: indianred;
    --error-hover: color-mix(in srgb, var(--error) 80%, white 20%);

    --primary-text: #F0F0F0;

    --transition-all: all 200ms;
    --input-border: 1px solid rgb(98, 98, 98);
}

#homeScreen {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    left: 100px;

    background: #24292E;
    z-index: 99990;
    display: none;
    transition: left 180ms ease, right 180ms ease;
}

#homeScreen.visible {
    display: block;
    transition: left 180ms ease, right 180ms ease;
}

.homeDivider{
    width: 80%;
    margin: 10px !important;
    display: block;
}

.sortable-chosen,
sortable-chosen.sortable-ghost {
    opacity: 0;
}

.sortable-ghost {
    background-color: var(--primary);
    opacity: 1;
}
#header {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 8px;
    color: white;
}

#header #badges {
    justify-self: center;
    display: flex;
    gap: 6px;
}

#header #badges .profile_badge {
    width: 20px;
    height: 20px;
    margin: 0;
}

#header #headerRight {
    justify-self: end;
}


#mainLayout{
    display: flex;
    flex-direction: column;
    flex: 1;

    height: 100%;
    width: 100%;
    max-width: 100%;

    position: relative;
}

#contentLayout{
    display: flex;
    flex-direction: row;

    flex: 1;
    min-height: 0;
    max-width: 100%;
}

#serverlist {
    display: flex;
    height: 100%;
    width: 80px;
    flex-shrink: 0;

    padding: 8px;

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

    color: white;
    overflow-x: hidden;
    overflow-y: auto;

    position: relative;
}

#content {
    display: flex;
    flex-direction: column;
    flex-shrink: 1;

    height: auto;
    flex-grow: 1;
    padding: 16px;
    margin-bottom: 4px;

    color: white;
    overflow-y: auto;

    overflow-anchor: none !important;
    transition: all 200ms ease-in-out;
}

#content-container {
    display: flex;
    flex-direction: column;
    flex: 1;

    color: white;

    border-top-right-radius: 6px;
    border-top-left-radius: 6px;
    overflow-anchor: none;
}

#channelname-bar {
    height: fit-content;
    width: 100%;
    flex-direction: row;

    padding: 16px;

    font-weight: bold;
    font-size: 20px;

    box-shadow: 0 4px 8px -2px black !important;
    position: relative;
    /* should fix overlapping issue */
}

#channelname {
    float: left;
}

#channelname-icons{
    display: flex;
    justify-content: center;
    flex-direction: row;
    gap: 20px;
}

#channelname-icons .icon {
    border-radius: 50%;

    width: 25px !important;
    height: 25px !important;

    background-size: cover;

    object-fit: cover;
    background-color: transparent;
    background-position: center center;
    cursor: pointer;
    user-select: none;
}

.screenshare-view-current {
    width: 400px !important;
    height: auto;
    float: left;
}

.ql-editor{
    white-space: pre-wrap;
    word-break: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
    box-sizing: border-box;
}

#editor-toolbar #message-actions-image{
    margin-left: auto;
    justify-self: end;
    margin-right: -18px;
}
#editor-toolbar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 20px;
    z-index: 10;
    padding: 2px 8px;
    margin-top: -2px;
}

#messagebox-content {
    background-color: transparent;
    color: white;

    border: none;
    padding: 8px;

    height: calc(100% - 3px);
    width: calc(100% - 32px - 40px - 25px - 5px);

    outline: none;
    resize: none !important;
    margin: -20px 8px 0 8px;
    overflow-y: hidden;

    max-width: 100%;
    box-sizing: border-box;
}

#messagebox-media {
    width: 25px;
    height: 25px;
    text-align: center;

    float: left;
    display: block;
    background-color: transparent;
}

#message-actions-image {
    width: 30px;
    height: 30px;
    display: block;
    float: right;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
}

#message-actions {
    display: block;
    float: right;
    width: 30px;
    margin: -2px 2.5px 0px 0px;
    overflow: hidden;
}

#infolist {
    display: flex;
    flex-direction: column;
    flex-shrink: 0 !important;

    height: 100%;
    width: 250px;
    padding: 16px;
    color: white;
    overflow-y: auto;
}

.server-icon {
    width: 45px;
    height: 45px;

    background-size: cover !important;
    object-fit: cover;
     background-position: center center;
     
    filter: grayscale(100%);
    background-color: transparent;
}

.server-entry {
    margin-bottom: 8px;
    cursor: pointer;
}


.server-icon:hover {
    border-radius: 10%;
    transition: all 400ms;

    -webkit-transform: scale(1.1);
    -moz-transform: scale(1.1);
    -o-transform: scale(1.1);
    transform: scale(1.1);
    filter: grayscale(0%);
}

.server-icon:not(:hover) {
    border-radius: 50%;
    transition: all 400ms;

    -webkit-transform: scale(1);
    -moz-transform: scale(1);
    -o-transform: scale(1);
    transform: scale(1);
    filter: grayscale(100%);
}

#profile-qa #vcStatusText {
    margin: 0;
}
#profile-qa {
    height: fit-content;
    width: 100%;
    padding: 10px;

    display: flex;
    flex-direction: column;
    bottom: 0;
}

#profile-qa .row {
    display: flex;
    flex-direction: row;
    gap: 4px;
}

#profile-qa-img-container {
    display: flex;
    align-items: center;

    width: 50px;
    height: 100%;

    border-radius: 50%;
    overflow: hidden;

    -webkit-transition: transform .5s ease;
}

#profile-qa-img {
    background-size: cover;
    object-fit: cover;
    background-position: center center;

    width: 50px;
    height: 50px;

    box-sizing: border-box;
    border: 4px solid transparent;

    border-radius: 50%;
    cursor: pointer;
}

#profile-qa-img:hover {
    transform: scale(1.1);
    transition: all 400ms;
}

#profile-qa-img.talking {
    border-color: #aa1515;
    outline-offset: 6px;
}

#profile-qa-img:not(:hover) {
    transform: scale(1);
    transition: all 400ms;
}

#profile-qa-info {
    padding: 10px;

    overflow: hidden;
    background-color: transparent;

    width: 60%;
    height: fit-content;
    cursor: pointer;
}

#profile-qa-info label {
    width: 150px;
    height: 20px;

    overflow: hidden;
    background-color: transparent;
}

#profile-qa #webrtc-controls {
    background-color: transparent;

    padding: 12px 12px 0 32px;

    height: 45px;
    width: auto;
    cursor: pointer;
}

.memberlist-container {
    display: flex;
    flex-direction: row;
    flex-shrink: 0;
    gap: 4px;

    width: 100%;
    background-color: transparent;
    margin-bottom: 12px;
    cursor: pointer;

    text-overflow: ellipsis;
    overflow: hidden;
}

.memberlist-img {
    width: 35px;
    height: 35px;
    min-width: 35px;
    min-height: 35px;

    border-radius: 50%;

    background-size: cover;
    object-fit: cover;
    background-position: center center;
    user-select: none;
}

.memberlist-member-info {
    box-sizing: border-box;
    height: 20px;
    overflow: hidden;
    margin-left: 8px;
    background-color: transparent;
    user-select: none;
}

.memberlist-member-info.status {
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: none;
}

.infolist-role {
    margin-bottom: 0;
    margin-top: 8px;
    user-select: none;
}

.message-container .content iframe {
    float: left;
    display: block;

    border-radius: 6px;
}

code.markdown {
    font-size: 12px;
    background-color: #292a2d !important;
    font-weight: bold;
    padding: 4px 8px 4px 8px;
    border-radius: 4px;

    margin: 0 4px 0 4px !important;
    font-family: "Lucida Console", "Courier New", monospace;
}

.iframe-container {
    display: inline-block;
    float: left;
    width: 100%;
    height: fit-content;
    border: none;

    /* margin: 8px 0 8px 0; */
}

.iframe-container iframe{
    width: 500px;
    height: 255px;
    user-select: none;
}

.ql-editor img{
    max-width: 100px;
    max-height: 100px;
}

.image-embed,
.message-container .content img {
    max-width: 300px;
    max-height: 300px;
    height: auto;
    text-align: left;
    margin: 8px 0 8px 0;
    border-radius: 6px;
    user-select: none;
}

.video-embed {
    display: block;
    float: left !important;
    margin: 8px 0 8px 0;
    border-radius: 6px;
    border: none;

    width: fit-content;
    max-width: 400px;
    max-height: 400px;
}

#modalBox {
    background-color: #1D2125;
    border: 1px solid #ABB8BE;
    border-radius: 6px;

    color: #ABB8BE;

    padding: 16px;

    filter: blur(0) !important;
    z-index: 1;

    position: fixed;
    top: 50%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);

    display: none;
}

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

    width: fit-content;
    max-width: 80%;
    border-radius: 8px;

    box-shadow: 0 0 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    opacity: 0;

    transition: all 250ms ease-in-out;
}

#popup-container {
    position: fixed;
    inset: 0;
    display: none;
    opacity: 0;

    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);

    z-index: 30;
    justify-content: center;
    align-items: center;
    transition: all 250ms ease-in-out;
    user-select: none;
}

#popup-container img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: 100%;
    height: 100%;
    object-fit: contain;
    cursor: pointer;
    border-radius: 4px;
    user-select: none;
}


#modalBoxTitle {
    font-size: 20px;
    margin-top: 0;
}

#channeltree h2 {
    margin-top: -10px;
    margin-bottom: -0px;
    font-size: 16px;
    user-select: none;
}

#channeltree hr {
    margin-bottom: 40px;
}

#serverlist .selectedGroup,
#mobile_GroupList .selectedGroup {
    border-radius: 6px !important;
    filter: grayscale(0%) !important;
    user-select: none;
}

.home-indicator {
    position: absolute;
    display: none;

    font-size: 14px;
    color: white;
    font-weight: bold;

    background-color: indianred;
    border-radius: 50%;
    border: 2px solid black;

    z-index: 2;
    text-align: center;
    font-style: normal;

    top: 0px;
    left: 50px;

    margin: 0;
    padding: 2px 6px;
}

#mobile_GroupList .home-indicator{
    top: 2px !important;
    left: 38px !important;
}

.home-indicator.visible {
    display: inline-block !important;
}

.profile-qa-icon.settings{
    background-image: url("/img/settings.png");
}

#profile-qa .row.voip #vcStatusChannelname {
    font-style: italic;
    font-weight: bold;
}

#profile-qa .row.voip.invisible{
    padding: 0;
    margin: 0;
    max-height: 0;
    opacity: 0;
    transition: all 500ms ease-in-out;
}
#profile-qa .row.voip{
    background-color: #02985f;
    padding: 6px;
    margin: -10px;
    opacity: 1;
    margin-bottom: 10px;
    transition: all 500ms ease-in-out;
    overflow: hidden;
    font-size: 14px;
}

.profile-qa-icon.voip{
    background-image: url("/img/endcall.png");
}

.profile-qa-actions{
    display: flex;
    flex-direction: column;
    height: 100%;

    justify-content: center;
    align-content: center;
    align-items: center;
    align-self: center;
}
.profile-qa-actions.right{
    margin-left: auto;
    margin-right: auto;
}
.profile-qa-actions.right.voip{
    margin-left: auto;
    margin-right: 0;
    justify-content: end !important;
}


.profile-qa-icon{
    display: flex;
    width: 20px !important;
    height: 20px !important;
    background-size: cover;

    object-fit: cover;
    background-color: transparent;
    background-position: center center;
    cursor: pointer;
}

#profile-qa-info-status {
    text-overflow: ellipsis;
    white-space: nowrap;
    user-select: none;
}

/* Details Markers */
/*
summary {list-style: none}
summary::-webkit-details-marker {display: none; }

details summary::before {
    margin-right: 4px;
      🡒🡑↓
    content:"🡒";
    color: #ABB8BE;
}

details[open] summary::before {
    margin-right: 4px;
    content:"↓  " ;
    color: #ABB8BE;
}
*/

.rainbow-border {
    --angle: 0deg;
    border: 1px solid;
    border-image: conic-gradient(from var(--angle), red, yellow, lime, aqua, blue, magenta, red) 1;
    animation: 10s rotate linear infinite;
}

@keyframes rotate {
    to {
        --angle: 360deg;
    }
}

@property --angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

label.mention {
    all: unset;
    display: inline;
    background: rgba(135, 206, 235, 0.2);
    padding: 2px 4px;
    border-radius: 4px;
    cursor: pointer;
}

label.mention.member{
    color: skyblue;
}

label.mention.channel{
    color: skyblue;
}

.group-entry-marker {
    float: left;
    display: none;
    position: relative;

    margin-top: 28%;
    margin-left: -8px;

    background-color: white;
    border-radius: 50%;

    width: 6px;
    height: 6px;
    user-select: none;
}

.offline_pfp {
    filter: grayscale(100%);
}

@keyframes start-change-color {
    from {
        background-color: #ed7e07;
    }

    to {
        background-color: #ddb787;
    }
}

@keyframes stop-change-color {
    from {
        background-color: #ed7e07;
    }

    to {
        background-color: #ddb787;
    }
}

#profile-role-menu {
    position: fixed;
    z-index: 100000;
    width: calc(208px - 16px + 8px);
    height: 150px;

    padding: 8px;

    background-color: hsl(from var(--main) h s calc(l * 2.5));
    border: 2px solid hsl(from var(--main) h s calc(l * 4));
    color: hsl(from var(--main) h s calc(l * 10));


    border-radius: 6px;

    text-overflow: ellipsis;
    overflow-y: auto;
    display: none;
    /*display: none;*/
}

#role-menu-header,
#role-menu-search-input {
    display: inline-block;
    float: left;
}

#role-menu-header {
    width: 100%;
    float: left;
    position: sticky;
}

#role-menu-search-input {
    outline: none !important;
}

#role-menu-search-icon {
    margin-left: 8px;
}

#role-menu-search-icon {
    background-color: transparent;
    width: 22px;
    height: 22px;

    display: block;
    float: left;
}

#role-menu-list {
    height: 120px;
    width: 100%;

    margin-top: 8px;

    display: block;
    float: left;

    overflow-y: auto;
}

.role-menu-entry {
    padding: 10px 0 10px 0;
    border-radius: 4px;
}

.role-menu-entry:hover {
    background: hsl(from var(--main) h s calc(l * 3));;
}

#role-menu-search-input:hover,
.role-menu-entry:hover,
.role-menu-entry label:hover {
    cursor: pointer;
}

.role-menu-entry-roleName {
    -webkit-user-select: none;
    user-select: none;
}

#messagebox {
    bottom: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
    flex-grow: 0;
    padding: 10px 0;
    margin: auto;
}

.editor-container {
    display: flex;
    margin-bottom: 10px;
}

#typing-indicator {
    font-style: italic;
    font-size: 10px;
    width: 100%;
    overflow: hidden;
    color: transparent;
    user-select: none;
}

#typing-indicator-container {
    display: flex;
    margin-left: 20px;

    margin-top: 0;
    margin-bottom: 0;
    overflow: hidden;
}

#editor-hints{
    display: flex;
    font-size: 12px;

    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-left: 2px solid hsl(from var(--main) h s calc(l * 4) / 40%);
    border-top: 2px solid hsl(from var(--main) h s calc(l * 4) / 40%);
    border-right: 2px solid hsl(from var(--main) h s calc(l * 4) / 40%);
    border-bottom: 2px solid hsl(from var(--main) h s calc(l * 4) / 40%);
    background-color: hsl(from var(--main) h s calc(l * 2) / 100%);

    justify-content: center;
}

#editMsgHint {
    width: 100%;
    color: hsl(from var(--main) h s calc(l * 10) / 100%);
    margin: 0;

    margin: 6px;
    user-select: none;
}

#editMsgHint:hover {
    cursor: pointer;
}

.headerIcon {
    background-size: cover;
    width: 25px;
    height: 25px;
    margin-right: 10px;
    float: right;
    cursor: pointer;
    user-select: none;
}

.headerIcon.donators{    
    background-image: url('/img/heart_white.webp');
}

.headerIcon.help{    
    background-image: url('/img/help.png');
}

li.info {
    font-size: 12px;
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: gray;
    font-style: italic;
    list-style: none;
    /* remove real bullet */
}

li.info .bullet {
    color: gray;
    font-size: 1.5em;
    line-height: 1;
}

li.info span.bullet::before {
    content: "•";
}


li.info:hover {
    background-color: transparent !important
}