body{background:white; overflow:hidden;}
body>.container-fluid{padding:0;}

.btn-sm {
    font-size: 12px;
    padding: .375rem 0.75rem;
    min-width: 42px;
}
@media (max-width: 1650px) {
    .custom-name {
        min-height: 33px;
        min-width: 33px;
    }
}

.custom-name {
    min-height: 42px;
    min-width: 42px;
}



#logo img {height: 60px;}

#logo {margin: -10px 0 10px;}


#login{background-image: url(/assets/css/images/login_bg.jpg); background-size: cover;}
#login .login-card{background:transparent !important;}

#login .logo-inside-container {display:block; text-align: center; margin:-10px 0 0 0; padding-bottom:20px;}
#login .logo-inside-container img{height:60px;}
#login .logo-outside-container{display:none;}
#login .bg-size {background: transparent url(/assets/images/pulse-login-bg.jpg) left center / cover no-repeat;}
#login .show-hide {position: absolute; right: 20px; top: 9px; transform:none;}
#login button i {margin-right: 10px; display: none;}
#login button.disabled i{display:inline-block;}

@media (min-width: 1200px){
    .logo-outside-container {display:block; text-align: center; padding-bottom:20px;}
    .logo-outside-container img{height:80px;}
    .logo-inside-container{display:none;}
    #login .bg-size {clip-path: polygon(0 0, 95% 0, 100% 100%, 0 100%);}
}

#app .card{margin-bottom:0px;}
#app .msger-inputarea{border-radius:0 0 0 0;}

@media (max-width: 991.98px) {
    #app .msger-inputarea{padding: 0px 10px;}
    #app .left-sidebar-wrapper .advance-options .chats-user li>div.col-3 {width: 25%;}
}
@media (max-width: 991px) {
}

/* Flex layouts */
.right-sidebar-chat, .right-sidebar-call {
    height: 100dvh;
    display: flex;
    flex-direction: column;
    min-height: 0; /* important */
}

.right-sidebar-title {flex: 0 0 auto; /* natural height */}

.right-sidebar-Chats, .right-sidebar-transcript {
    flex: 1 1 auto; /* fill remaining space */
    display: flex;
    min-height: 0; /* important for scrolling children */
}

.msger {
    flex: 1 1 auto;        /* fill .right-sidebar-Chats */
    display: flex;
    flex-direction: column; /* stack messages + input */
    min-height: 0;          /* important */
}

.msger-chat {
    flex: 1 1 auto;   /* take remaining space above input */
    min-height: 0;    /* important */
    overflow: auto;   /* scroll messages */
}

.msger-inputarea {
    flex: 0 0 auto;   /* stick to bottom */
}
.msger-inputarea-wrap{flex:1; position:relative;}

.left-sidebar-chat .input-group{
    border-bottom: 2px solid transparent;
    border-radius: 0 0 7px 7px;
    transition: all 300ms;
}
.left-sidebar-chat .input-group:has(:focus) {
    border-bottom: 2px solid var(--theme-default);
}



.left-sidebar-wrapper{display:flex; flex-direction:column; height:100vh !important; min-height:0;}
.left-sidebar-wrapper #logo{flex:0 0 auto;}
.left-sidebar-wrapper .left-sidebar-chat{flex:0 0 auto;}
.left-sidebar-wrapper .advance-options{flex:1; display:flex; flex-direction:column; min-height:0;}
.left-sidebar-wrapper #chat-options-tab{flex:0 0 auto;}
.left-sidebar-wrapper .tab-content{flex:1 1 auto; display:flex; flex-direction:column; min-height:0;}
.left-sidebar-wrapper .tab-content>.active{display:flex; flex-direction:column; min-height:0; height:100%;}
.left-sidebar-wrapper .advance-options .chats-user{flex:1 1 auto; min-height:0; height:unset !important;}
.left-sidebar-wrapper .advance-options .chats-user li{gap:0;}
.left-sidebar-wrapper .advance-options .chats-user li span.css-tooltip-button:first-child {margin-bottom: 5px;}
    /*
    .left-sidebar-wrapper .advance-options .chats-user{
        height:calc(100vh - 180px);
    }*/
/* Never put transition: all on * */
.tab-pane, .nav-link { transition: none; }
/*
.msg:last-child[data-aiupdate]{position:relative;}
.msg:last-child[data-aiupdate]:after {
    content: attr(data-aiupdate);
    display: block;
    bottom:-30px;
    left:10px;
    position:absolute;
    color:#777;
    font-style:italic;
}*/

.loader-wrapper:after {
    content: attr(data-label);
    position: fixed;
    color: #aaa;
    margin-top: 100px;
    font-size: 20px;
    font-family: 'Roboto';
}
#chat-messages .msg-bubble{
    max-width:none !important;
    width:calc(100% - 100px);
}

.msger-chat .msg:last-child {
    margin-bottom: 40px;
    position: relative;
}
.msger-chat .msg-text {white-space: pre-line;}

.msger-chat .msg[data-aiupdate]:last-child:after {
    content: attr(data-aiupdate);
    position: absolute;
    left: 0;
    bottom: -30px;
    opacity: 0.6;
}
#chat-messages .msg-bubble code {
    display: block;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 4px;
    padding: 10px;
    border: 1px solid #dedbff;
    white-space:pre;
    overflow-x:scroll;
}
#chat-messages .msg-bubble code code {
    padding: 0 0 0 0;
    border: 0px solid white;
    background: transparent;
    display: inline;
    overflow-x: auto;
}

.debug>.msg-bubble {border: 1px solid #dddaf9;background: #f1efff;}

#chat-messages .msg-bubble ul{
    color:inherit;
    cont-size:inherit;
    padding:5px 0 5px 15px;
}
#chat-messages .msg-bubble li {
    color: inherit;
    font-size: inherit;
    margin:0 0 5px 0;
    list-style:disc;
}

body.show-logs {padding-right: 600px;}
body #socket-logs{display:none;}
body.show-logs #socket-logs{
    display:block;
    position:fixed;
    right:0;
    width:600px;
    top:0;
    bottom:0;
    border-left:1px solid #ddd;
    padding-top:80px;
    background:#eee;
}
#socket-logs-title{position:absolute;
    top:0; left:0; right:0;
    height:75px; background:#ddd;
    padding:30px 0 0 30px;}
#socket-logs-content{
    padding:10px; overflow-y:scroll; position:absolute; top:76px; left:0; right:0; bottom:0;
}

.chat-log {
    display: block;
    padding: 5px;
    font-size:12px;
}
.chat-log ul{padding:10px; color:inherit;}
.chat-log li{list-style-type:disc; margin:0 0 2px 10px; color:inherit;}

.chat-log .time{font-size:10px;}
.chat-log .type{font-size:11px; font-weight:500;}
.chat-log.info {color:#777;}
.chat-log code {
    display: block;
    white-space: pre-wrap;
}
.chat-log .scroll-x {
    overflow-x: scroll;
    white-space: nowrap;
    padding-bottom:3px;
}
.chat-log .scroll-x th{
    padding:3px 5px;
    border-bottom:2px solid #ddd;
    border-left:1px solid #ddd;
}
.chat-log .scroll-x td{
    padding:3px 5px;
    border:1px solid #ddd;
}
.chat-log .scroll-x td small{display:block; white-space:normal;}

.right-sidebar-title .common-space{flex-wrap:wrap;}
.caller-panel{flex-basis:100%; width:100%; text-align:center;}
.audio-level{
    position: relative;
    width: 112px;
    height: 112px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: #736afb;
    color: white;
    display: grid;
    place-items: center;
    outline: none;
    cursor: pointer;
    box-shadow:
            inset 0 -6px 12px rgba(0,0,0,.25),
            0 8px 24px rgba(0,0,0,.35);
    isolation: isolate;
    transform: translateZ(0) scale(calc(1 + 0.25*var(--amp))); /* bigger scale change */
    transition: transform 45ms linear;
}
.audio-level::before{
    content: "";
    position: absolute; inset: -22px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgba(25,118,255,0.8), rgba(25,118,255,0));
    filter: blur(14px);
    opacity: calc(0.25 + 0.75*var(--amp)); /* stronger glow */
    transform: scale(calc(1 + 0.55*var(--amp))); /* more noticeable growth */
    will-change: transform, opacity;
    transition: transform 45ms linear, opacity 45ms linear;
    z-index: -1;
}
.audio-level::after{
    content: "";
    position: absolute; inset: -10px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,.35); /* thicker ripple */
    animation: ripple 1.8s ease-out infinite;
    pointer-events: none;
    mix-blend-mode: screen;
}
.audio-level i{font-size:22px;}
@keyframes ripple {
    from { transform: scale(0.9); opacity: .6; }
    to   { transform: scale(1.35); opacity: 0; }
}
.mic-icon{ width: 40%; height: 40%; display: block; }

ul.chats-user{align-content:flex-start !important;}
ul.chats-user .chat-time{align-items: flex-start;}

.left-sidebar-wrapper .advance-options .chats-user li.search-result-item p {
    width: 100%;
}
.left-sidebar-wrapper .advance-options .chats-user li.search-result-item small.text-muted{font-style:italic;}
.left-sidebar-wrapper .advance-options .chats-user li.search-result-item .highlight {
    background:#dbe2f8; display:inline-block; padding:0 5px; border-radius:3px;
}

/* tooltips */
.css-tooltip {
    position: relative;
    cursor: help;
    overflow: visible !important;
}
.css-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    background: rgba(255, 255, 255, 0.95);
    color: #5a5a5a;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 12px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    white-space: pre-line;
    max-width: 300px;
    width: max-content;
    min-width: 100px;
    z-index: 1001;
    box-shadow:1px 1px 4px rgba(0,0,0,0.2);
}
.css-tooltip:hover::after {
    opacity: 1;
}
.css-tooltip::before {
    content: "";
    position: absolute;
    width: 0;
    height: 0;
    border-style: solid;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1000;
}
.css-tooltip:hover::before {
    opacity: 1;
}
.css-tooltip-top::after {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-8px);
}
.css-tooltip-top::before {
    bottom: 100%;
    left: 50%;
    border-width: 6px 6px 0 6px;
    border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
    transform: translateX(-50%) translateY(0);
}
.css-tooltip-bottom::after {
    top: calc(100% - 6px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
}
.css-tooltip-bottom::before,
.css-tooltip-bottom-right::before{
    top: calc(100% - 4px);
    left: 50%;
    border-width: 0 6px 6px 6px;
    border-color: transparent transparent rgba(255, 255, 255, 0.95) transparent;
    transform: translateX(-50%) translateY(0);
}
.css-tooltip-bottom-right::after {
    top: calc(100% - 6px);
    left: auto; right:0;
    transform: translateX(0%) translateY(8px);
}
.css-tooltip-left::after {
    right: 100%;
    top: 50%;
    transform: translateX(-8px) translateY(-50%);
}
.css-tooltip-left::before {
    right: 100%;
    top: 50%;
    border-width: 6px 0 6px 6px;
    border-color: transparent transparent transparent rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) translateX(0);
}
.css-tooltip-right::after {
    left: 100%;
    top: 50%;
    transform: translateX(8px) translateY(-50%);
}
.css-tooltip-right::before {
    left: 100%;
    top: 50%;
    border-width: 6px 6px 6px 0;
    border-color: transparent rgba(255, 255, 255, 0.95) transparent transparent;
    transform: translateY(-50%) translateX(0);
}









:root {
    --handle-w: 30px;
}

/* desktop (lg+) normal grid layout */
@media (min-width: 992px) {
    #sidebar { position: static; height: auto; z-index: auto; }
    #sidebar .sidebar-inner { width: auto; height: auto; }
    #sidebar .sidebar-handle { display: none; }
    #sidebar .sidebar-content { display: block; }
    #conversation-container { padding-left: 0; }

    #sidebar .sidebar-backdrop { display: none !important; }
}

/* mobile/tablet (<lg): handle + overlay drawer */
@media (max-width: 991.98px) {
    /* fixed full-height container on left */
    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        z-index: 1050; /* above app */
        width: auto;
        pointer-events: none; /* don't block main when collapsed */
    }

    #sidebar .sidebar-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.35);
        z-index: 1040;
        pointer-events: auto;
    }
    #sidebar.is-open .sidebar-backdrop {
        display: block;
    }

    #sidebar .close-sidebar{font-weight:bold; cursor:pointer;}

    /* inner is the actual interactive drawer/handle */
    #sidebar .sidebar-inner {
        pointer-events: auto;
        height: 100vh;
        width: var(--handle-w); /* collapsed width */
        background: #fff;
        color: #555;
        overflow: hidden;
        transition: width 200ms ease;
        box-shadow: 0 0 0 rgba(0,0,0,0);
        z-index: 1050; /* above backdrop */

        position: fixed;
        top: 0;
        left: 0;
    }

    /* open: responsive overlay width */
    #sidebar.is-open .sidebar-inner {
        width: 100vw;               /* default: full width */
        max-width: 420px;           /* partial width on bigger devices */
        overflow: hidden;
        box-shadow: 0 0 24px rgba(0,0,0,0.35);
    }

    /* tweak overlay width by screen size */
    @media (min-width: 576px) {   /* sm+ */
        #sidebar.is-open .sidebar-inner { width: 85vw; }
    }
    @media (min-width: 768px) {   /* md+ */
        #sidebar.is-open .sidebar-inner { width: 420px; }
    }


    /* keep main content visible next to the 30px handle */
    .conversation-container {
        padding-left: var(--handle-w);
    }

    /* handle button layout */
    #sidebar .sidebar-handle {
        width: var(--handle-w);
        height: 100%;
        border: 0;
        padding: 0;
        background: transparent;
        color: inherit;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        cursor: pointer;
        border-right: 1px solid #e9e9e9;
    }

    /* only show the handle UI when closed */
    #sidebar.is-open .sidebar-handle { display: none; }

    /* show content only when open (optional; remove if you want it always in DOM) */
    #sidebar .sidebar-content { display: none; }
    #sidebar.is-open .sidebar-content { display: block; }

    /* vertical logo */
    #sidebar .sidebar-logo {
        transform: rotate(-90deg) translateX(50px);
        font-weight: 700;
        letter-spacing: 0.12em;
        font-size: 12px;
        opacity: 0.9;
        user-select: none;
        margin-bottom: 100px;
    }

    /* hamburger bars */
    #sidebar .sidebar-bars {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding-top: 10px;
    }
    #sidebar .sidebar-bars span {
        display: block;
        width: 16px;
        height: 2px;
        background: currentColor;
        border-radius: 2px;
        opacity: 0.9;
    }
}
/* FORCE desktop behaviour at lg and above *
@media (min-width: 992px) {
    #sidebar {
        position: static !important;
        height: auto !important;
        z-index: auto !important;
        width: auto !important;
        pointer-events: auto !important;
    }

    #sidebar .sidebar-inner {
        width: auto !important;
        height: auto !important;
        overflow: visible !important;
        box-shadow: none !important;
        transition: none;
    }

    #sidebar::after {
        content: none !important;
    }

    #sidebar .sidebar-handle {
        display: none !important;
    }

    #sidebar .sidebar-content {
        display: block !important;
    }

    #conversation-container {
        padding-left: 0 !important;
    }
}
*/