/*
     * ####################################################################
     *
     * Chat Conversation Header
     *
     * ####################################################################
     */


#chat-messages .chat-vorschau-wrapper {
    display: grid;
    height: auto;
    grid-template-columns: 1fr 3fr 1fr;
    grid-template-areas:
        "chat-vorschau-avatar chat-vorschau-name     chat-vorschau-name    chat-vorschau-zeit"
        "chat-vorschau-avatar chat-vorschau-message  chat-vorschau-message chat-vorschau-message";
    gap: 0 12px;
}


#chat-messages .chat-vorschau-wrapper .chat-vorschau-avatar {
    grid-area: chat-vorschau-avatar;
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

#chat-messages .chat-vorschau-wrapper .chat-vorschau-avatar::before {
    content: '';
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #09e7f2;
    z-index: -1;
}

#chat-messages .chat-vorschau-wrapper .chat-vorschau-content {
    height: 18px;
}

#chat-messages .chat-vorschau-wrapper .chat-vorschau-name {
    grid-area: chat-vorschau-name;
    font-size: 15px;
    font-weight: 500;
}

#chat-messages .chat-vorschau-wrapper .chat-vorschau-zeit {
    grid-area: chat-vorschau-zeit;
    padding-right: 6px;
    font-size: 11px;
    opacity: .7;
}

#chat-messages .chat-vorschau-wrapper .chat-vorschau-message {
    grid-area: chat-vorschau-message;
    height: 18px;
    font-size: 13px;
    font-weight: 300;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 
 * ####################################################################
 * 
 * MARK: chatliste
 * 
 * ####################################################################
 */

hr {
    height: 1.5px !important;
    margin: 1rem -12px;
    background: rgba(255, 255, 255, .6);
}

[data-theme='dark'] hr {
    background: rgba(0, 10, 20, .6);
}

#neuer-chat {
    border-radius: 26px;
    touch-action: manipulation;
    /* Erlaubt das Scrollen und verhindert andere Touch-Interaktionen */
}

@media only screen and (max-width : 990px) {

    #neuer-chat {
        position: fixed;
        z-index: 1198;
        /* direkt unter der Navi */
        transition: opacity 0.1s linear;
        /* width: 355.333px; */
        margin-top: 0px;
        /* background: var(--2st-level-bg); */
        background: transparent;
        backdrop-filter: blur(0.25rem) !important;
        -webkit-backdrop-filter: blur(0.25rem) !important;
        margin-left: 0;
        opacity: 0;
        top: 72px;
        left: 10px;
        right: 10px;
        bottom: 10px;
        height: calc(100svh - 73px - 12px - 12px);
        padding: 6px;
    }
}

@media only screen and (min-width : 990px) and (max-width:1800px) {

    #neuer-chat {
        max-width: calc(100% - 37px - 12px);
        left: 16px;
        top: 78px;
    }
}

@media only screen and (min-width:1800px) {

    #neuer-chat {
        max-width: 1767px;
        margin: 6px;
    }
}

#neuer-chat .avatar-wrapper {
    transform: translateX(4px);
}

#neuer-chat .kontakte-scroller {
    overflow-x: hidden;
    overflow-y: scroll;
    scrollbar-width: thin;
    scrollbar-width: none;
    touch-action: auto;
}

#neuer-chat table {
    width: 100%
}

#neuer-chat td:first-child {
    width: 50px
}

#neuer-chat td {
    line-height: 15px;
    transition: color .15s ease-in-out;
}

#neuer-chat td:hover {
    color: var(--forced-gelb);
    cursor: pointer
}

#neuer-chat table {
    width: 100%;
    table-layout: fixed;
    /* Stellt sicher, dass die Tabelle nicht breiter als ihr Container wird */
    /* border-right:1px cyan solid; */
    caption-side: initial;
    border-collapse: initial;
}

#neuer-chat td {
    overflow: hidden;
    /* Verhindert, dass der Inhalt über die Zellengrenzen hinausgeht */
    white-space: nowrap;
    /* Verhindert Zeilenumbrüche innerhalb der Zelle */
    text-overflow: ellipsis;
    /* Fügt Punkte hinzu, wenn der Text zu lang ist */
}

/* MARK: Smart CSS */

:root {
    --navi-ausgleich: 72px;
}

@media only screen and (max-width: 576px) {
    .smartphone-modus {
        --navi-ausgleich: 10px;
    }
}


#chat-vorschau,
#neuer-chat {

    min-height: calc(100vh - var(--navi-ausgleich) - 10px);
    /* Fallback für ältere Browser */
    min-height: calc(100svh - var(--navi-ausgleich) - 10px);
    /* Kleinster Viewport */
    min-height: calc(100dvh - var(--navi-ausgleich) - 10px);
    /* Dynamischer Viewport, optimale Wahl */

    max-height: calc(100vh - var(--navi-ausgleich) - 10px);
    /* Fallback für ältere Browser */
    max-height: calc(100svh - var(--navi-ausgleich) - 10px);
    /* Kleinster Viewport */
    max-height: calc(100dvh - var(--navi-ausgleich) - 10px);
    /* Dynamischer Viewport, optimale Wahl */
}


@media only screen and (min-width: 768px) {
    #desktop-neuer-chat-outer {
        position: absolute;
        width: 100%;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        transition: background .3s ease-in-out;
    }

    #neuer-chat {
        margin: 0 0 0 calc((100% - 600px) / 2 - 13px + 26px - 10px);
        width: 574px;

        border-radius: 32px;
        border: 6px var(--white-10) solid;
        top: 72px;
        padding: 0;
    }

    [data-theme="dark"] #neuer-chat {
        border: 6px var(--forced-white-60) solid;
    }

    .desktop-neuer-chat-outer-bg {
        background: var(--very-dark-bg);
        z-index: 1;
    }
}

#neuer-chat .mess-box {
    min-height: calc(100vh - var(--navi-ausgleich) - 100px - 18px);
    min-height: calc(100svh - var(--navi-ausgleich) - 100px - 18px);
    min-height: calc(100dvh - var(--navi-ausgleich) - 22px);
    max-height: calc(100vh - var(--navi-ausgleich) - 100px - 18px);
    max-height: calc(100svh - var(--navi-ausgleich) - 100px - 18px);
    max-height: calc(100dvh - var(--navi-ausgleich) - 22px);

    background: var(--2st-level-bg);
}

body.smartphone-modus #neuer-chat .mess-box {
    min-height: calc(100vh - 10px - 100px - 18px);
    min-height: calc(100svh - 10px - 100px - 18px);
    min-height: calc(100dvh - 10px - 22px);
    max-height: calc(100vh - var(--navi-ausgleich) - 100px - 18px);
    max-height: calc(100svh - 10px - 100px - 18px);
    max-height: calc(100dvh - 10px - 22px);
}

#neuer-chat .kontakte-scroller {
    min-height: calc(100vh - var(--navi-ausgleich) - 100px - 6px);
    /* Fallback für ältere Browser */
    min-height: calc(100svh - var(--navi-ausgleich) - 100px - 6px);
    /* Kleinster Viewport */
    min-height: calc(100dvh - var(--navi-ausgleich) - 100px - 6px);
    /* Dynamischer Viewport, optimale Wahl */

    max-height: calc(100vh - var(--navi-ausgleich) - 100px - 6px);
    /* Fallback für ältere Browser */
    max-height: calc(100svh - var(--navi-ausgleich) - 100px - 6px);
    /* Kleinster Viewport */
    max-height: calc(100dvh - var(--navi-ausgleich) - 100px - 6px);
    /* Dynamischer Viewport, optimale Wahl */

    /* top: -20px; */
    position: relative;

    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
    margin: 0 -6px;
}

#chat-vorschau-liste {

    position: relative;

    min-height: calc(100vh - var(--navi-ausgleich) - 92px);
    /* Fallback für ältere Browser */
    min-height: calc(100svh - var(--navi-ausgleich) - 92px);
    /* Kleinster Viewport */
    min-height: calc(100dvh - var(--navi-ausgleich) - 92px);
    /* Dynamischer Viewport, optimale Wahl */

    max-height: calc(100vh - var(--navi-ausgleich) - 92px);
    /* Fallback für ältere Browser */
    max-height: calc(100svh - var(--navi-ausgleich) - 92px);
    /* Kleinster Viewport */
    max-height: calc(100dvh - var(--navi-ausgleich) - 92px);
    /* Dynamischer Viewport, optimale Wahl */

    overflow: hidden;
    overflow-y: auto;
    scrollbar-width: none;
}

/* Nur für iPad Querformat */
@media only screen and (min-width: 992px) and (max-width: 1200px) {
    #chat-vorschau-liste {
        max-height: calc(100vh - 208px);
        /* Fallback für ältere Browser */
        max-height: calc(100svh - 208px);
        /* Kleinster Viewport */
        max-height: calc(100dvh - 208px);
        /* Dynamischer Viewport, optimale Wahl */

        max-height: calc(100vh - 167px);
        /* Fallback für ältere Browser */
        max-height: calc(100svh - 167px);
        /* Kleinster Viewport */
        max-height: calc(100dvh - 167px);
        /* Dynamischer Viewport, optimale Wahl */
        overflow-y: scroll;
        scrollbar-width: none;
        position: relative;
    }
}

/* Für Laptop und größere Bildschirme */
@media only screen and (min-width: 1201px) {
    #chat-vorschau-liste {
        max-height: calc(100vh - 167px);
        /* Fallback für ältere Browser */
        max-height: calc(100svh - 167px);
        /* Kleinster Viewport */
        max-height: calc(100dvh - 167px);
        /* Dynamischer Viewport, optimale Wahl */
        overflow-y: scroll;
        scrollbar-width: none;
        position: relative;
    }
}

#chat-vorschau .chat-vorschau-wrapper {
    display: grid;
    height: auto;
    grid-template-columns: 1fr 5fr 1fr;
    grid-template-areas:
        "chat-vorschau-avatar chat-vorschau-name     chat-vorschau-name    chat-vorschau-zeit"
        "chat-vorschau-avatar chat-vorschau-message  chat-vorschau-message chat-vorschau-message";
    gap: 0 12px;
}


#chat-vorschau .chat-vorschau-wrapper .chat-vorschau-avatar {
    grid-area: chat-vorschau-avatar;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

#chat-vorschau .chat-vorschau-wrapper .chat-vorschau-avatar::before {
    content: '';
    position: absolute;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: #09e7f2;
    z-index: -1;
}

#chat-vorschau .chat-vorschau-wrapper .chat-vorschau-content {
    height: 18px;
}

#chat-vorschau .chat-vorschau-wrapper .chat-vorschau-name {
    grid-area: chat-vorschau-name;
    font-size: 15px;
    font-weight: 500;
    transition: color .15s ease-in-out;
}

#chat-vorschau .chat-vorschau-wrapper:hover .chat-vorschau-name {
    color: var(--forced-gelb);
}

#chat-vorschau .chat-vorschau-wrapper .chat-vorschau-zeit {
    grid-area: chat-vorschau-zeit;
    min-width: 64px;
    padding-right: 6px;
    font-size: 11px;
    opacity: .7;
    text-align: right;
}

#chat-vorschau .chat-vorschau-wrapper .chat-vorschau-message {
    grid-area: chat-vorschau-message;
    height: 18px;
    font-size: 13px;
    font-weight: 300;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}



/* 
 * ####################################################################
 * 
 * MARK: neuGrpErstell
 * 
 * ####################################################################
 */
.js-neue-gruppe-erstellen,
.js-neue-gruppe-erstellen-step-1 {
    display: inline-block;
    opacity: 1;
    transition: opacity .3s ease-in-out;
}

.js-neue-gruppe-erstellen-step-1 {
    display: none;
    opacity: 0;
    position: absolute;
    top: 20px;
    left: 62px;
    line-height: 1.15em;
    max-width: calc(100% - 128px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ungelesen-dot,
.pinned-dot {
    position: absolute;
    right: -4px;
    bottom: -4px;
    width: 20px;
    height: 20px;
    border: 2px var(--circle-border) solid;
    border-radius: 50%;
    background: var(--forced-gelb);
    color: #48412D;
    font-size: 8px;
    line-height: 16px;
    font-weight: bold;
    text-align: center;
}

.pinned-dot {
    position: absolute;
    right: initial;
    bottom: initial;
    background: var(--hellblau);
    color: var(--forced-white-80);
    z-index: 1;
    margin: -4px 0 0 -4px;
    font-size: 12px;
    transform: rotate(-41deg);
    line-height: 17px;
}

/*
    * ####################################################################
    *
    * Chat Conversation
    *
    * ####################################################################
    */
#chat-inner-box {
    margin-bottom: 1.5px;
    padding-top: 1px;
    min-height: calc(70vh - var(--navi-ausgleich) - 6px - 70px - 6px - 6px);
    padding-bottom: 135px;
}

@media only screen and (max-width: 900px) {

    #chat-inner-box {
        margin-bottom: 1.5px;
        padding-top: 1px;
        padding-bottom: 60px;
        /* padding-bottom: 10px; */
    }
}


/* 
 * ####################################################################
 * 
 * Regeln für Chat Box Inner in Desktopansicht
 * 
 * ####################################################################
 */
@media only screen and (min-width: 991px) {

    /* 
    unnötig :)
    .mess-box-wrapper {
        max-height: calc(100vh - 100px);
    } 
    */

    #chat-messages {
        /* max-height: calc(100vh - 171px); */
    }

    #chat-inner-box {
        /* max-height: calc(100vh - 207px);
        overflow: auto;
        scrollbar-width: none; */

        min-height: calc(100vh - 167px);
        min-height: calc(100svh - 167px);
        min-height: calc(100dvh - 167px);

        max-height: calc(100vh - 167px);
        max-height: calc(100svh - 167px);
        max-height: calc(100dvh - 167px);
        overflow-y: scroll;
        scrollbar-width: none;
        position: relative;
    }

    /* #chat-inner-box .chat-btn-delete-message {
        position: static;
    } */
}



#chat-messages .mess-box-header .mess-box-header-title.chat-actionbar {
    transform: translate(0, 4px);
}

#chat-messages .mess-box-header .mess-box-header-title table {
    height: 54px;
    width: 100%;
    padding: 0 !important;
    margin: 0 !important;
    vertical-align: middle;
}

#chat-messages .mess-box-header .mess-box-header-title table td {
    padding: 0 !important;
    margin: 0 !important;
    vertical-align: middle;
    line-height: 14px;
}

.chat-header-avatar {

    position: relative;
    display: inline-block;
    height: 54px;
    width: 54px;
    border-radius: 50%;
}

.chat-header-avatar::before {

    content: '';
    position: absolute;
    display: inline-block;
    height: 54px;
    width: 54px;
    border-radius: 50%;
    background-color: #09e7f2;
    left: 0;
    z-index: -1;
}

#chat-messages .mess-box-header .mess-box-header-title table {
    transform: translateY(2px);
}

#chat-messages .mess-box-header .mess-box-header-title table td.action-icon {
    padding: 0 10px !important;
    width: 48px !important;
}

#chat-messages .mess-box-header .mess-box-header-title table td.header-action-mobile {
    display: none;
}

/* zurückbutton auf desktop verbergen */
#chat-messages .mess-box-header .mess-box-header-title table td:first-child {
    display: none;
}

#chat-messages .mess-box-header .mess-box-header-title table td.table-avatar {
    width: 108px;
    text-align: right;
    padding-right: 20px !important;
}

#chat-messages .mess-box-header .mess-box-header-title table td.action-icon {
    width: 68px;
}

#chat-messages .mess-box-header .mess-box-header-title table td svg {
    height: 30px;
    width: 30px;
}

/* 
 * ####################################################################
 * 
 * Regeln für Chat Box Header in Mobilansicht
 * 
 * ####################################################################
 */
/*
    * ####################################################################
    *
    * Mobile Ansicht als Topbar
    *
    * ####################################################################
    */
#chat-topbar {
    position: static !important;
    width: 100% !important;
    top: unset !important;
    left: unset !important;
    display: block;
    justify-content: unset !important;
    height: unset !important;
    backdrop-filter: unset !important;
    padding: 0 !important;
    transition: none;
    transform: translateY(0px);
}

#chat-topbar table {
    transform: translate(-35px, 2px) !important;
    width: calc(100% + 24px) !important;
}



@media only screen and (min-width: 992px) {
    #chat-uebersicht {
        height: calc(100dvh - 80px);
        overflow: hidden;
    }
}

@media only screen and (max-width: 992px) {


    #chat-uebersicht {
        display: none;
    }

    #chat-topbar {
        display: none;
        position: fixed !important;
        z-index: 900;
        width: 100vw !important;
        top: 61px !important;
        left: 0 !important;
        justify-content: space-between !important;
        height: 54px !important;
        background: #06283ec4;
        /* #06283e */
        backdrop-filter: blur(0.25rem) !important;
        -webkit-backdrop-filter: blur(0.25rem) !important;
        /* <-- Ergänzt */
        padding: 3px 10px 10px 0 !important;
        transition: transform .2s ease;
        transform: translateY(-200px);
    }

    @media only screen and (max-width: 992px) {
        .smartphone-modus #chat-topbar {
            top: -8px !important;
            height: 48px !important;
            top: 3px !important;
            height: 37px !important;
            margin-left: 46px;
            margin-right: 46px;
            width: calc(100% - 92px) !important;
            border-bottom-left-radius: 12px;
            border-bottom-right-radius: 12px;
            border-radius: 12px !important;
        }

        .smartphone-modus #chat-topbar .avatar-size-54-wrapper.ausnahme-chats-topbar {
            transform: scale(.55) !important;
        }



        .smartphone-modus #chat-topbar table td:nth-child(3) {
            font-size: 12px;
        }


        #kontakte-auswahl-opener {
            margin: 32px 0 0 -38px;
        }

        [data-theme="dark"] #kontakte-auswahl-opener {
            color: #fff !important;
            background-color: var(--hellblau);
        }
    }

    /* [data-theme="dark"] #chat-topbar {
        background: var(--forced-hellblau);
    } */

    #chat-topbar table {
        width: 100% !important;
        transform: none !important;
    }

    .smartphone-modus #chat-topbar table {
        transform: translateY(-8px) !important;
    }

    #chat-topbar table td:nth-child(1) {
        width: 36px;
        padding: 0 8px 0 8px !important;
        /* padding: 0 6px !important; */
    }

    #chat-topbar table td:nth-child(2) {
        width: 40px;
        padding: 0 5px !important;
    }

    #chat-topbar table td:nth-child(2) .chat-header-avatar {
        width: 30px;
        height: 30px;
        transform: translateY(4px);
    }

    #chat-topbar table td:nth-child(3) {
        font-size: 13px;
        color: var(--forced-white-80);
        width: auto;
        line-height: 15px;
        padding: 0 0 0 12px !important;
        vertical-align: middle;
    }

    #chat-topbar table td:nth-child(4) {
        width: 40px;
    }

    #chat-topbar table td:nth-child(5) {
        width: 40px;
    }

    #chat-topbar table td:nth-child(4) svg,
    #chat-topbar table td:nth-child(5) svg {
        height: 24px;
        width: 24px;
    }



}

@media only screen and (min-width: 992px) {
    #chat-topbar {
        display: none;
    }
}

/* 
* MARK:Grp info 
*/

.chat-topbar-info {
    display: none;
    position: fixed !important;
    z-index: 901;
    top: calc(61px + 54px);
    right: 0;
    height: max-content !important;
    width: calc(100vw - 20px);
    max-width: 380px;
    background: #06283ec4;
    color: var(--forced-white);
    backdrop-filter: blur(0.25rem) !important;
    -webkit-backdrop-filter: blur(0.25rem) !important;
    /* <-- Ergänzt */
    padding: 24px;
    transition: transform .2s ease;
    border-radius: 32px;
    margin: 10px;
}

.smartphone-modus .chat-topbar-info {
    /* display: block; */
    top: calc(33px);
    border-radius: 12px;
    width: calc(100vw - 6px);
    left: -7px;
    height: calc(100vh - 152px) !important;
    padding-right: 0;
}


.chat-topbar-info-wrapper i.ti-x {
    display: block;
    position: absolute;
    font-size: 20px;
    right: 24px;
    transform: translate(6px, -6px);
}

.chat-topbar-info-h1 {
    display: block;
    color: var(--forced-gelb);
    margin-bottom: 5px;
}

.chat-topbar-info-wrapper {
    width: calc(100% - 20px);
    max-height: calc(100svh - 185px);
    overflow-y: auto;
    overflow-X: hidden;
    padding-right: 16px;
}

.chat-topbar-info-user-list .profilbild {
    display: inline-block;
    transform: translate(0, 8px);
}

.chat-topbar-info-user-list .voller-name {
    display: inline-block;
    height: 28px;
    margin-left: 10px;
}

@media only screen and (max-width: 900px) {

    #chat-messages .mess-box-header .mess-box-header-title.chat-actionbar {
        transform: translate(0, 4px);
    }

    #chat-messages .mess-box-header .mess-box-header-title .header-name {
        font-size: .66em;
        font-weight: 400;
    }

    #chat-messages .mess-box-header .mess-box-header-title table {
        height: 48px;
        width: 100%;
        padding: 0 !important;
        margin: 0 !important;
        vertical-align: middle;
        transform: translateY(5px);
    }

    #chat-messages .mess-box-header .mess-box-header-title table td.action-icon {
        padding: 0 8px !important;
        width: 36px !important;
    }

    #chat-messages .mess-box-header .mess-box-header-title table td:first-child {
        display: table-cell;
        padding-left: 0 !important;
        margin-left: -12px !important;
        position: absolute;

    }

    #chat-messages .mess-box-header .mess-box-header-title table td.table-avatar {
        width: 108px;
        text-align: right;
        padding-right: 20px !important;
    }

    #chat-messages .mess-box-header .mess-box-header-title table td:last-child {
        padding-right: 15px !important;
    }

    #chat-messages .mess-box-header .mess-box-header-title table td svg.icon-tabler-chevron-left {
        height: 42px;
        width: 42px;
    }

    #chat-messages .mess-box-header .mess-box-header-title table td svg {
        height: 28px;
        width: 28px;
    }

    #chat-messages .mess-box-header .mess-box-header-title table td.header-action-mobile {
        display: inline-block;
    }

    #chat-messages .mess-box-header .mess-box-header-title table td.header-action-desktop {
        display: none;
    }

    .chat-header-avatar {
        display: inline-block;
        height: 44px;
        width: 44px;
        border-radius: 50%;
    }
}

.chat-conversation-left,
.chat-conversation-right {
    margin: 20px auto 0px;
}

#chat-messages[data-chat_typ="gruppenchat"] .chat-conversation-left {
    margin-left: 35px;
}

.chat-conversation-right {
    text-align: right;
}


.chat-conversation-date {
    text-align: center;
}

.chat-bubble-date {
    display: inline-block;
    width: max-content;
    margin: 120px 0 30px;
    border: 1.5px var(--white) solid;
    color: var(--white);
    font-size: 12px;
    opacity: .8;
    padding: 6px 16px;
    border-radius: 36px;
}

.chat-bubble-date:first-of-type {
    margin: 10px 0 30px;
}

.chat-bubble-left,
.chat-bubble-right {
    box-shadow: 1px 1px 7px rgba(0, 0, 0, 0.1);
}

.chat-conversation-left .chat-bubble-left .nachrichten-text {
    /* padding-left: 68px !important; */
    /* min-height: 48px; */
    padding-bottom: 12px;
}

.chat-conversation-left .chat-bubble-left {
    position: relative;
    background-color: var(--white-20);
    border-radius: 16px;
    padding: 12px 16px 0;
    width: max-content;
    max-width: 85%;
    margin-bottom: 3px;
    backdrop-filter: blur(2px) !important;
    -webkit-backdrop-filter: blur(2px) !important;
}

.chat-conversation-left .js.chat-nachrichten-box:first-of-type .chat-bubble-left {
    border-top-left-radius: 4px;
}

.chat-conversation-left .chat-inner-box-zeit {
    text-align: left;
    font-size: 0.7em;
}

.chat-conversation-left .chat-inner-box-zeit span,
.chat-conversation-right .chat-inner-box-zeit span {
    opacity: .6;
}

.chat-conversation-right .chat-inner-box-zeit {
    text-align: right;
    font-size: 0.7em;
}

/* Check ob gelesen wurde */
.chat-conversation-left .chat-inner-box-zeit i,
.chat-conversation-right .chat-inner-box-zeit i {
    font-size: 1.6em;
    transform: translate(0, 3px);
    display: inline-block;
    margin-left: 4px;
}

.chat-conversation-left .chat-inner-box-zeit i.checkread,
.chat-conversation-right .chat-inner-box-zeit i.checkread {
    color: var(--gelb);
}


.chat-conversation-right .chat-bubble-right {
    position: relative;
    display: inline-block;
    background-color: #004d84be;
    color: var(--forced-white-80);
    border-radius: 16px;
    /* border-top-right-radius:6px; */
    padding: 12px 16px;
    width: max-content;
    max-width: 85%;
    margin-bottom: 3px;
    text-align: left;
}

[data-theme="dark"] .chat-conversation-right .chat-bubble-right {
    background-color: #004d84be;
}


.chat-conversation-right .js.chat-nachrichten-box:first-of-type .chat-bubble-right {
    border-top-right-radius: 4px;
}


/* 
 * ####################################################################
 * 
 * Sprachnachrichten
 * 
 * ####################################################################
 */


#audio-player-container {
    --gelb: #FFD705;
    --audio-grau: #aaa;
    --audio-hellgrau: #ddd;
    --audio-hellblau: #0089f7;
    --very-dark-bg: rgba(20, 14, 8, 0.8);
    --forced-blau: #004775;
    --white-20: rgba(255, 255, 255, 0.08);
    --forced-white-80: rgba(255, 255, 255, 0.8);

    --seek-before-width: 0%;
    --volume-before-width: 100%;
    --buffered-width: 0%;
    position: relative;
    margin: -12px -12px;
    padding: 0;
    width: 500px;
    max-width: calc(100% + 12px + 12px);
    border-radius: 16px;
    border-top-left-radius: 4px;
    /* kommt aus anderem style oder? */
}


.chat-bubble-left,
.chat-bubble-right {
    word-wrap: anywhere;
}

.chat-bubble-left #audio-player-container {
    /* background: var(--white-20); */
    border-top-left-radius: 4px;
    /* kommt aus anderem style oder? */
    /* ausgleich für das Profilbild der Textnachrichten 68px */
    /* margin-left: -68px; */
    margin-bottom: -20px;
}

.chat-bubble-right #audio-player-container {
    /* background: var(--forced-blau); */
    border-top-left-radius: inherit;
    /* kommt aus anderem style oder? */
    border-top-right-radius: 4px;
    /* kommt aus anderem style oder? */
}

div.audio-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

table.audio-wrapper {
    width: 100%;
    padding: 0 0 10px 0;
    margin-bottom: 24px;
}

td.play-wrapper {
    width: calc(44px + 6px);
    vertical-align: middle;
    padding: 24px 0 0 4px !important;
    text-align: center;
}

.play-wrapper svg {
    cursor: pointer;
}

.pause-icon {
    display: none;
}

td.range-time-wrapper {
    transform: translateY(12px);
    padding: 0 12px 0 12px !important;
}

.range-time-wrapper .time-container {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.time-container {
    margin-top: 2px;
}

.chat-bubble-right .time-container,
.chat-bubble-right .chat-inner-box-zeit {
    color: var(--forced-white-80);
}


input[type="range"] {
    width: 100%;
    margin: 0;
    padding: 0;
    height: 22px;
    /* Deaktiviert die standardmäßige Darstellung des Elements */
    -webkit-appearance: none;
    /* Entfernt den Tap-Highlight-Effekt */
    -webkit-tap-highlight-color: transparent;
    /* Entfernt Outline und evtl. Box-Schatten */
    outline: none;
    box-shadow: none;
    background: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    /* Transition für den Fortschritt */
}

/* Optional: Auch im Fokuszustand sicherstellen, dass keine Outline/Schatten erscheinen */
input[type="range"]:focus {
    outline: none;
    box-shadow: none;
}

input[type="range"]::-webkit-slider-runnable-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    transition: all 0.2s ease;
    /* Transition für den Fortschritt */
}

input[type="range"]::before {
    position: absolute;
    content: "";
    top: 8px;
    left: 0;
    width: var(--seek-before-width);
    height: 8px;
    background-color: #007db5;
    cursor: pointer;
    transition: all 0.2s ease;
    /* Transition für den Fortschritt */

    /* * Safari Chrome Änderung */
    top: 16px;
    left: 12px;
    width: calc(--seek-before-width);
    border-radius: 8px;
}

input[type="range"]::-webkit-slider-thumb {
    position: relative;
    -webkit-appearance: none;
    box-sizing: content-box;
    -webkit-appearance: none;
    outline: none;
    box-shadow: none;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    cursor: pointer;
    margin: -7px 0 0 0;
    background: var(--audio-hellgrau);
    transition: transform 0.2s ease;
    /* Transition für den Fortschritt */
}

input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.8);
    transition: transform 0.2s ease;
    /* Transition für den Fortschritt */
}

input[type="range"]::-moz-range-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    transition: background 0.2s ease;
    /* Transition für den Fortschritt */
}

input[type="range"]::-moz-range-progress {
    background-color: var(--audio-hellblau);
    height: 8px;
    border-radius: 8px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    transition: background 0.2s ease;
    /* Transition für den Fortschritt */
}

input[type="range"]::-moz-focus-outer {
    border: 0;
}

input[type="range"]::-moz-range-thumb {
    box-sizing: content-box;
    border: none;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: transform .2s ease;
}

input[type="range"]:active::-moz-range-thumb {
    transform: scale(1.8);
    transition: transform 0.2s ease;
    /* Transition für den Fortschritt */
}

input[type="range"]::-ms-track {
    width: 100%;
    height: 8px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
    transition: background 0.2s ease;
    /* Transition für den Fortschritt */
}

input[type="range"]::-ms-fill-lower {
    background-color: rgba(0, 0, 0, 0.4);
}

input[type="range"]::-ms-fill-upper {
    background: rgba(0, 0, 0, 0.4);
}

input[type="range"]::-ms-thumb {
    box-sizing: content-box;
    border: none;
    height: 15px;
    width: 15px;
    border-radius: 50%;
    background-color: none;
    cursor: pointer;
}

input[type="range"]:active::-ms-thumb {
    transform: scale(1.2);
}

/* ===== BEGIN: CSS-Overrides für einheitliche Darstellung in Safari/Chrome/Firefox ===== */

/* Slider-Track für Chrome & Safari (WebKit) */
input[type="range"]::-webkit-slider-runnable-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    /* optional für smooth animation */
}

/* Thumb für Chrome & Safari (WebKit) */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    /* unverzichtbar, um Browserdefaults zu deaktivieren */
    height: 15px;
    width: 15px;
    border-radius: 50%;
    border: none;
    background: var(--audio-hellgrau);
    /* ggf. anpassen */
    cursor: pointer;
    /* Da Track 8px hoch ist, hier -3.5px, um den Thumb mittig zu setzen */
    margin-top: -3.5px;
    transition: transform 0.2s ease;
}

/* (optional) größerer Thumb bei Drag */
input[type="range"]:active::-webkit-slider-thumb {
    transform: scale(1.8);
}

/* Slider-Track für Firefox */
input[type="range"]::-moz-range-track {
    height: 8px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Thumb für Firefox */
input[type="range"]::-moz-range-thumb {
    height: 15px;
    width: 15px;
    border-radius: 50%;
    border: none;
    background: var(--audio-hellgrau);
    cursor: pointer;
    transition: transform 0.2s ease;
}

/* (optional) größerer Thumb bei Drag (Firefox) */
input[type="range"]:active::-moz-range-thumb {
    transform: scale(1.8);
}

/* Slider-Track für Edge/IE (falls noch unterstützt) */
input[type="range"]::-ms-track {
    height: 8px;
    background: transparent;
    border-color: transparent;
    color: transparent;
    cursor: pointer;
}

/* Thumb für Edge/IE */
input[type="range"]::-ms-thumb {
    height: 15px;
    width: 15px;
    border-radius: 50%;
    border: none;
    background: var(--audio-hellgrau);
    cursor: pointer;
}

/* ===== OPTIONALE Anpassung: Falls du "fortschrittliche" Farbfüllung von links brauchst:
   z.B. per Linear-Gradient, anstatt ::before. Du musst dann per JavaScript
   (var Wert = $(...).val(); ...) dynamisch 'var(--seek-before-width)' setzen.
   Oder direkt background-size = 'Wert% 100%' bei WebKit-Browsern. ===== */

/*
input[type="range"] {
    background: linear-gradient(
        to right,
        #007db5 var(--seek-before-width),
        rgba(0, 0, 0, 0.5) var(--seek-before-width)
    );
    /* position: relative; evtl. hinzufügen 
}
*/

/* ===== END: CSS-Overrides für einheitliche Darstellung in Safari/Chrome/Firefox ===== */


.range-time-wrapper .time {
    width: 50%;
    font-size: 14px;
    color: #eee;
}

.chat-bubble-left .chat-inner-box-zeit {
    /* display: none; */
    margin: -10px 0 3px;
    padding-bottom: 12px;
}

.time-left {
    text-align: left;
    color: var(--audio-grau) !important;
}

.time-right {
    text-align: right;
}

td.audio-profil-img-wrapper {
    vertical-align: top;
    padding-top: 12px;
    width: calc(44px + 12px + 12px);
    margin: 0 12px;
    text-align: center;
}

td.audio-profil-img-wrapper.audio-profil-left {
    padding-bottom: 18px !important;
}

.audio-profil-img-wrapper .chat-inner-box-zeit {
    position: absolute;
    transform: translate(-6px, 45px);
}

.chat-bubble-left .audio-profil-img-wrapper.audio-profil-right {
    display: none;
}

.chat-bubble-right .audio-profil-img-wrapper.audio-profil-left {
    display: none;
}

.audio-profil-img {
    height: 44px;
    width: 44px;
    margin: auto;
    line-height: 50px;
    text-align: center;
    font-size: 20px;
    border-radius: 50%;
    color: #fff;
}

.chat-sprachnachrichten-spacer {
    margin-top: -7px;
}

.chat-conversation-left .chat-sprachnachrichten-spacer {
    display: none;
}

.nachrichten-text {
    font-size: 1em;
}

.grp_nutzer_avatar {
    position: absolute;
    margin: -4px 0 0;
    z-index: 1;
}

.grp_nutzer_avatar_spacer {
    margin: -12px 0 6px -52px;
}

.gruppen-chat-nutzer {
    font-size: calc(11px + .5vw);
    font-weight: 500;
    color: var(--forced-gelb);
    margin: 14px 0 6px 52px;
}

[data-theme="dark"] .gruppen-chat-nutzer {
    color: var(--hellblau);
}

/* @media screen and (max-width: 600px) {
    .nachrichten-text {
        font-size: .9em;
    }
} */

/* 
 * ####################################################################
 * 
 * Lösch BTN
 * 
 * ####################################################################
 */
.chat-btn-delete-message {
    /* display: inline-block;
    position: absolute;
    padding: 12px;
    margin-left: -40px;
    opacity: .7; */

    display: inline-block;
    position: relative;
    padding: 12px;
    opacity: .7;
    z-index: 1;
    font-size: 20px;
    transform: translate(9px, 3px);
    color: var(--white);
}

[data-theme="dark"] .chat-btn-delete-message {
    display: inline-block;
    position: relative;
    padding: 12px;
    opacity: .7;
    z-index: 1;
    font-size: 20px;
    transform: translate(9px, 3px);
    color: var(--bs-danger);
}

.chat-conversation-right .audio-player-initialized .chat-btn-delete-message {
    transform: translateY(-12px);
    margin-bottom: -12px;
}

.chat-btn-delete-message:hover {
    opacity: 1;
    cursor: pointer;
}

/* 
 * ####################################################################
 * 
 * MARK: Sprach- und Dateiupload
 * 
 * ####################################################################
 */

#chat-eingabe {
    position: fixed;
    width: calc(100% - 10px - 15px);
    max-height: 120px;
    right: 10px;
    bottom: 14px;
    left: 12px;
    /* position: fixed;
    width: calc(100% - 10px - 10px);
    max-height: 120px;
    right: 10px;
    bottom: 10px;
    left: 10px; */
    z-index: 100;
    margin: 0;
    padding: 0;

    border-radius: 22px;
    backdrop-filter: blur(0.45rem);
    -webkit-backdrop-filter: blur(0.45rem);
    font-size: 16px;
    transition: border-radius transform .1s linear;
    transition: transform .3s ease-in-out;
    transition-delay: .15s;
    transform: translateY(0vh);
}

@media screen and (max-width: 990px) {
    #chat-eingabe {
        position: fixed;
        width: calc(100% - 10px - 10px);
        min-height: 50px;
        right: 10px;
        bottom: 10px;
        left: 10px;
        z-index: 100;
        margin: 0;

        border-radius: 22px;
        backdrop-filter: blur(0.45rem);
        -webkit-backdrop-filter: blur(0.45rem);
        transition: border-radius transform .1s linear;
        transition: transform .3s ease-in-out;
        transition-delay: .15s;
        transform: translateY(50vh);
    }
}

@media screen and (min-width: 990px) {

    /* iPad-spezifische CSS-Regeln */
    body.ipad-device #chat-eingabe {

        width: calc(66.666666667% - 10px - 10px - 12px - 4px);
        /* width: calc(100% - 10px - 10px - 12px - -6px); */
        right: 22px;
        bottom: 19px;
        /* margin-top: -58px; */
        left: initial;
        margin-bottom: 6px;
    }

    /* iPad-spezifische CSS-Regeln */
    body.ipad-device #chat-eingabe #chat-eingabe-input {
        border-radius: 22px;
    }
}


#chat-eingabe-input {
    width: calc(100% - 60px);
    height: 50px;
    min-height: 50px;
    padding: 12px 18px 2px;
    border-radius: 22px;
    background: var(--very-dark-bg);
    border: 0px var(--white-80) solid;
    backdrop-filter: blur(0.5rem) !important;
    -webkit-backdrop-filter: blur(0.5rem) !important;
}

[data-theme="dark"] #chat-eingabe-input {
    background: var(--forced-white);
}

#chat-eingabe-textarea {
    background: none;
    border: none;
    box-shadow: none !important;
    width: calc(100% - 46px);
    width: calc(100% - 54px);
    min-height: 26px;
    max-height: 110px;

    padding: 0 0px 0 0;

    overflow: auto;
    scrollbar-width: thin;
    box-sizing: border-box;
    resize: none;
    font-weight: 300;
    margin-bottom: 8px;
    transition: height .1s linear;
    /* Verhindert, dass der Benutzer die Größe manuell ändert */
}



#send-rec-btn {
    position: absolute;
    right: 0;
    bottom: 0;
    height: 50px;
    width: 50px;
    text-align: center;
    border-radius: 32px;
    background: var(--forced-hellblau);
    transition: all .2s ease-in-out;
    user-select: none;
    /* Standard */
    -webkit-user-select: none;
    /* Für Safari/Chrome */
    -ms-user-select: none;
    /* Für ältere Versionen von Edge */
    -moz-user-select: none;
    /* Für Firefox */
    touch-action: manipulation;
    /* Verhindert Standard-Gesten wie Doppeltippen */
}

#send-rec-btn .chat-btn-send {
    color: var(--forced-white-80);
    position: relative;
    right: 0;
    top: 0;
    width: 50px;
    height: 50px;
    line-height: 50px;
    font-size: 26px;
    transform: translate(0, 0);
    display: inline-block;
    margin-bottom: 100vh;
}

#send-rec-btn .rotate-chat-btn-send {
    transform: translate(-2px, 0) rotate(42deg) !important;
}

#send-rec-btn.rec-active {
    background: green !important;
    transition: background .2s ease-in-out;
}

/*@media screen and (max-width: 900px) {

    .chat-btn-send {
        position: absolute;
        right: 21px;
        color: var(--white-40);
        background: none;
        border-radius: 36px;
        height: 37px;
        width: 37px;
        text-align: center;
        line-height: initial;
        transform: translate(0, 2px) rotate(42deg);
        top: 15px;
    }
}*/

/* 
 * ####################################################################
 * 
 * MARK: Dateianhänge
 * 
 * ####################################################################
 */

#attach-btn {
    position: absolute;
    z-index: 100;
    right: 68px !important;
    bottom: 2px !important;
    width: auto;
    height: 50px;
    line-height: 50px;
    text-align: right;
    transform: translate(0, 0);
    cursor: pointer;
}


#cam-clip {
    height: 56px;
    width: 56px;
    transform: translate(0, -2px);
}

#cam-clip .stroked-path {
    stroke: var(--white-80) !important;
    stroke-width: 2.5 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

#chat-medien-input-bubble-wrapper {
    position: absolute;
    /* transform: translateY(-100px); */
    bottom: 123px;
}

.chat-medien-input-bubble {
    background: var(--very-dark-bg);
    border-radius: 16px;
    padding: 2px 9px 2px 20px;
    display: block;
    margin: 0 0 9px -26px;
    width: max-content;
}

.chat-medien-input-bubble i {
    color: var(--forced-gelb);
}

/* Standardmäßig Hintergrund und Box verstecken */
#cam-or-file-bg,
#cam-or-file {
    display: none;
    opacity: 0;
}

/* @media (max-width: 990px) { */

/* Hintergrund für die Einblendung */
#cam-or-file-bg {
    position: fixed;
    display: none;
    opacity: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1;
    background-color: var(--2st-level-bg);
    backdrop-filter: blur(0.15rem) !important;
    -webkit-backdrop-filter: blur(0.15rem) !important;
}

.cam-or-file-bg-blendin {

    /* Animation */
    animation: fadeInBg 0.15s linear 0s forwards;
}

/* Einblendung Box */
#cam-or-file {
    position: fixed;
    display: none;
    bottom: 120px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 100px;
    padding: 6px 0 0 6px;
    border-radius: 32px;
    z-index: 1000;
}

.cam-or-file-blendin {
    /* Animation */
    animation: fadeInBox 0.15s ease-in-out 0.2s forwards;
}

/* Schaltflächen in der Einblendung */
#cam-or-file .cam,
#cam-or-file .file,
#cam-or-file .close {
    display: inline-block;
    width: 88px;
    height: 88px;
    margin: 0 6px 6px 0;
    background: var(--forced-gelb);
    color: #26221E;
    border-radius: 26px;
    text-align: center;
    line-height: 88px;
    font-size: 2em;
    transition: all 0.3s ease-in-out;
}

/* } */

/* Animationen definieren */
@keyframes fadeInBg {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeInBox {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* * ENDE Dateianhänge ================================================ */

/* * MARK: send-animation */

#send-animation {
    display: none;
    transform: rotate(0deg);
    animation: sendLoader 0.6s linear infinite;
    /* Name der Animation korrigiert */
    transform-origin: center;
    position: fixed;
    right: 11px;
    bottom: 10px;
    padding: 5px;
    background: var(--bs-success);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    z-index: 101;
}

#send-animation i {
    font-size: 2.5em !important;
}

/* Animationen definieren */
@keyframes sendLoader {

    /* Name der Keyframe-Animation korrigiert */
    0% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }

    35% {
        transform: scale(1) rotate(160deg);
        opacity: .95;
    }

    50% {
        transform: scale(1) rotate(180deg);
        opacity: .9;
    }

    65% {
        transform: scale(1) rotate(200deg);
        opacity: .95;
    }

    100% {
        transform: scale(1) rotate(360deg);
        opacity: 1;
    }
}

/* Aufnahme overlay ------------------- */
#aufnahme-laeuft {
    position: absolute;
    z-index: 100;
    left: 20px;
    bottom: -3px;
    width: calc(100% - 94px);
    height: 50px;
    transform: translate(0, 0);
}

#aufnahme-laeuft .record-icon {
    width: 28px;
    height: 28px;
    display: inline-block;
    border: 2px var(--white-40) solid;
    border-radius: 32px;
    transform: translate(-8px, 8px);
    animation: rec-color-change 1s linear infinite alternate;
}

#aufnahme-laeuft .record-icon div {
    margin: 5px;
    width: 14px;
    height: 14px;
    display: inline-block;
    background: red;
    border-radius: 32px;
    transform: translate(0, 0);
}

#aufnahme-laeuft span {
    display: inline-block;
    color: var(--white-40);
    animation: rec-text-color-change 1s linear infinite alternate;
    transform: translateY(2px);
}

@keyframes rec-color-change {
    20% {
        border-color: var(--white-40);
    }

    90% {
        border-color: var(--white-80);
    }

    100% {
        border-color: var(--white-80);
    }
}

@keyframes rec-text-color-change {
    20% {
        color: var(--white-40);
    }

    90% {
        color: var(--white-80);
    }

    100% {
        color: var(--white-80);
    }
}

#rec-loeschen {
    display: inline-block;
    margin-left: 12px;
    border-radius: 32px;
    cursor: pointer;
}

#chat-eingabe-sprachnachricht {
    position: fixed;
    display: none;
    width: calc(100vw - 31px);
    width: calc(100vw - 21px);
    left: 0px;
    bottom: 0px;
    right: 10px;
    padding: 20px;
    border-radius: 20px;
    background: rgba(30, 26, 28, .8);
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 101;
}

@media only screen and (min-width : 992px) {

    #chat-eingabe-sprachnachricht {
        /* width: calc(100vw - 21px - 386px - 28px) !important; */
        width: calc(100% - 1px) !important;
    }
}

[data-theme="dark"] #chat-eingabe-sprachnachricht {
    background: rgba(255, 255, 255, .8);
    backdrop-filter: blur(0.2rem) !important;
    -webkit-backdrop-filter: blur(0.2rem) !important;
    backdrop-filter: blur(0.2rem) !important;
    /* color: ; */
}

#chat-eingabe-sprachnachricht #audio-container audio {
    width: 100%;
}

.trigger-chat-send-btn {
    display: block;
    float: right;
    background: green;
    color: var(--forced-white-80);
    border-radius: 36px;
    padding: 10px 18px;
    font-size: 18px;

}

.trigger-chat-delete {
    display: inline-block;
    background: red;
    color: var(--forced-white-80);
    border-radius: 36px;
    width: 47px;
    height: 47px;
    line-height: 50px;
    text-align: center;
    font-size: 20px;
}

/* [data-theme="dark"] #chat-eingabe-sprachnachricht hr {
    background: rgba(255, 255, 255, .4);
} */

/* 
 * ####################################################################
 * 
 * MARK: chat Links
 * 
 * ####################################################################
 */

.picked-links {
    padding: 0 45px 0 10px;
    margin: 5px 0;
    position: fixed;
    bottom: 132px;
    left: 10px;
    right: 10px;
    border-radius: 12px;
    background: var(--very-dark-bg);
    width: calc(100% - 20px);
}

.picked-links .close-it {
    position: absolute;
    top: 0;
    right: 0;
    width: 48px;
    height: 48px;
    z-index: 11111;
    text-align: center;
    padding: 7px;
    font-size: 1.2em;
    cursor: pointer;
}

.picked-links td {
    max-width: calc(100vw - 90px);
}

.picked-links .link-beschreibung {
    max-width: calc(100% - 40px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--white-60);
}

@media only screen and (min-width : 992px) {

    .picked-links .link-beschreibung {
        max-width: calc(100vw - 520px) !important;
    }
}


.chat-bubble-right .chat-embeded-links td,
.chat-bubble-right .chat-datei-wrapper .chat-datei-container td {
    color: var(--forced-white-80) !important;
}

.chat-bubble-right .nachrichten-text a {
    color: var(--forced-gelb) !important;
}

[data-theme="dark"] .chat-embeded-links {
    background: linear-gradient(rgba(255, 255, 255, .45), rgba(255, 255, 255, .55), rgba(255, 255, 255, .75));
}

[data-theme="dark"] .chat-bubble-right .chat-embeded-links,
[data-theme="dark"] .chat-bubble-right .chat-datei-wrapper .chat-datei-container {
    background: linear-gradient(rgba(55, 155, 255, .35), rgba(55, 155, 255, .45), rgba(55, 155, 255, .65));
}

/* 
 * ####################################################################
 * 
 * MARK: Bildanhänge in Chats
 * 
 * ####################################################################
 */

.chat-bilder-wrapper,
.chat-datei-wrapper {
    width: calc(85vw - 26px - 30px - 6px);
    margin: -6px -9px 3px -10px;
}

@media screen and (min-width: 600px) {

    .chat-bilder-wrapper,
    .chat-datei-wrapper {
        width: calc(85vw - 26px - 30px - 10px);
        margin: -6px -9px 3px -10px;
        max-width: 400px;
    }
}

@media screen and (min-width: 900px) {

    .chat-bilder-wrapper,
    .chat-datei-wrapper {
        width: calc(85vw - 26px - 30px - 12px - 22vw);
        margin: -6px -9px 3px -10px;
    }
}

@media screen and (min-width: 1800px) {

    .chat-bilder-wrapper,
    .chat-datei-wrapper {
        width: 1091px;
        margin: -6px -9px 3px -10px;
    }
}

.chat-bild-container {
    width: 100%;
    display: inline-block;
    border-radius: 12px;
    /* background: linear-gradient(rgba(60, 40, 20, .25), rgba(60, 40, 20, .3), rgba(60, 40, 20, .55)); */
}

.chat-bild-container img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}


.chat-bild-container.more-than-one {
    width: calc(50% - 5.1px);
    aspect-ratio: 1/1;

}

.chat-bild-container.more-than-six {
    width: calc(33.3% - 2.7px);
    aspect-ratio: 1/1;

}

.chat-bild-container.more-than-one:nth-child(odd) {
    margin-right: 3px;
}

.chat-bild-container.more-than-six:nth-child(3) {
    /* margin-right: 3px; */
}

.chat-bild-container.more-than-one.plus-x {
    color: #fff;
    font-size: 7vw;
    font-weight: 300;
    text-align: center;
    aspect-ratio: 1;
    display: table;
    float: right;

}

.chat-bild-container.more-than-one.plus-x div {
    display: table-cell;
    vertical-align: middle;
}

/* 
 * ####################################################################
 * MARK: Dateianhänge in Chats
 * ####################################################################
 */

.chat-embeded-links {
    padding: 0px 12px 2px 10px;
    min-width: calc(100% + 20px);
    max-width: calc(100% + 20px);
    margin: 16px -10px 6px -10px;
    display: block;
    border-radius: 12px;
    background: linear-gradient(rgba(60, 40, 20, .35), rgba(60, 40, 20, .45), rgba(60, 40, 20, .65));
    max-width: calc(100% + 20px);
}

.chat-embeded-links td.copy-link {
    background: var(--white-10);
    transform: translate(8px, 4px);
    border-radius: 9px;
    text-align: center;
    padding: 12px !important;
    font-size: 1.2em;
    color: var(--white-80);
    transition: all .25s ease-in-out;
}

.chat-embeded-links td.copy-link i {
    transition: all .25s ease-in-out;
}

.chat-embeded-links td.copy-link:hover {
    background: var(--white-20);
    color: var(--white);
    cursor: pointer;
}

.chat-datei-wrapper .chat-datei-container {
    width: 100%;
    margin: 2px 0 1px;
    display: inline-block;
    border-radius: 12px;
    background: linear-gradient(rgba(60, 40, 20, .35), rgba(60, 40, 20, .45), rgba(60, 40, 20, .65));

}

.chat-conversation-left .chat-bubble-left .chat-datei-wrapper .chat-datei-container {

    background: linear-gradient(rgba(30, 20, 10, .5), rgba(30, 20, 10, .6), rgba(30, 20, 10, .8));

}

.chat-datei-wrapper .chat-datei-container table {
    width: calc(100%);
}

.chat-datei-wrapper .chat-datei-container table tr td:first-child {
    width: 60px;
    min-height: 60px;
    text-align: center;
}

.chat-datei-wrapper .chat-datei-container table tr td:nth-child(2) {
    transform: translateX(-9px);
    width: calc(100% - 60px);
}

@media screen and (max-width: 600px) {

    .chat-datei-wrapper .chat-datei-container table tr td:nth-child(2) {
        font-size: .8em;
        color: var(--forced-white-80);
    }
}


.chat-datei-wrapper .chat-datei-container table tr td .m-type {
    position: absolute;
    width: 60px;
    height: 60px;
    line-height: 70px;
    text-align: center;
    color: #fff;
    font-size: 11px;
    letter-spacing: .8px;
    font-weight: 500;
    text-transform: uppercase;
}

.icon-file path.icon-file-blattzipfel {
    fill: rgb(190, 190, 170);
}

.icon-file path.icon-file-blatt {
    fill: rgba(190, 190, 170, .7);
}

.icon-file.file-type-doc path.icon-file-blattzipfel {
    fill: rgb(0, 150, 250) !important;
}

.icon-file.file-type-doc path.icon-file-blatt {
    fill: rgba(0, 150, 250, .7);
}

.icon-file.file-type-pdf path.icon-file-blattzipfel {
    fill: rgb(250, 0, 0) !important;
}

.icon-file.file-type-pdf path.icon-file-blatt {
    fill: rgba(250, 0, 0, .7);
}

.icon-file.file-type-xls path.icon-file-blattzipfel {
    fill: rgb(0, 220, 40) !important;
}

.icon-file.file-type-xls path.icon-file-blatt {
    fill: rgba(0, 220, 40, .7);
}

.icon-file.file-type-zip path.icon-file-blattzipfel {
    fill: rgb(250, 210, 50) !important;
}

.icon-file.file-type-zip path.icon-file-blatt {
    fill: rgba(250, 210, 50, .7);
}

/* 
* MARK: ChatBG 
*/

.mess-box-bg {
    display: none;
    opacity: 0;
    user-select: none;
    /* Standard */
    -webkit-user-select: none;
    /* Für Safari/Chrome */
    -ms-user-select: none;
    /* Für ältere Versionen von Edge */
    -moz-user-select: none;
    /* Für Firefox */
    touch-action: manipulation;
    /* Verhindert Standard-Gesten wie Doppeltippen */
}

@media screen and (max-width: 990px) {


    /* Media Query für Mobilansicht */
    @media screen and (max-width: 990px) {
        .mess-box-bg {
            display: block;
            opacity: 0;
            animation: fadeIn-mess-box-bg 0.2s ease-in 0.4s forwards;
            background-image: url(../_img/chat_bg_1.png);
            background-size: auto 4%;
            background-repeat: inherit;
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            z-index: 0;
            height: 100%;
            user-select: none;
            touch-action: manipulation;
        }
    }

    /* Media Query für Mobilansicht */
    @media screen and (max-width: 500px) {
        .mess-box-bg {
            background-image: url(../_img/chat_bg_1.png);
            background-size: auto 3%;
        }
    }

    /* Keyframes für das Einblenden */
    @keyframes fadeIn-mess-box-bg {
        0% {
            opacity: 0;
        }

        100% {
            opacity: .08;
            /* Oder 1, falls das Element ganz sichtbar sein soll */
        }
    }

    [data-theme="dark"] .mess-box-bg {
        opacity: .12;
    }

    #chat-inner-box {
        background: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        margin-left: -18px;
        width: calc(100% + 18px + 18px);
    }


    .mess-box-wrapper.chat-mobile-bg {
        background: none !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;

    }

    .chat-conversation-left .chat-bubble-left {
        background-color: #231c006b;
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        /* backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important; */
    }

    .chat-conversation-right .chat-bubble-right {
        backdrop-filter: blur(4px) !important;
        -webkit-backdrop-filter: blur(4px) !important;
        /* backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important; */
    }

    [data-theme="dark"] .chat-conversation-left .chat-bubble-left {
        background-color: #ffffff90;
    }

}

@media screen and (min-width: 991px) {

    .chat-bild-container a {
        aspect-ratio: initial !important;
    }

}

.chatgruppe-is-set {
    max-height: calc(100vh - 310px);
    overflow: hidden;
    overflow-y: auto;
}