.fr {
    float: right;
}
.fl {
    float: left;
}


.is_speaking {
    -webkit-animation: ripple 0.7s linear infinite;
    animation: ripple 0.7s linear infinite;
}

@-webkit-keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 200, 45, 0), 0 0 0 1px rgba(0, 200, 45, 0.3), 0 0 0 2px rgba(0, 200, 45, 0.3), 0 0 0 3px rgba(0, 200, 45, 0.3);
    }
    to {
        box-shadow: 0 0 0 1px rgba(0, 200, 45, 0.3), 0 0 0 4px rgba(0, 200, 45, 0.3), 0 0 0 5px rgba(0, 200, 45, 0.3), 0 0 0 6px rgba(0, 200, 45, 0);
    }
}
@keyframes ripple {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 200, 45, 0), 0 0 0 1px rgba(0, 200, 45, 0.3), 0 0 0 2px rgba(0, 200, 45, 0.3), 0 0 0 3px rgba(0, 200, 45, 0.3);
    }
    to {
        box-shadow: 0 0 0 1px rgba(0, 200, 45, 0.3), 0 0 0 4px rgba(0, 200, 45, 0.3), 0 0 0 5px rgba(0, 200, 45, 0.3), 0 0 0 6px rgba(0, 200, 45, 0);
    }
}

.msg {
    background-color: #f0f0f5;
    border: 1px solid grey;
    margin-top: -1px;
    padding: 2px;
    margin-right: 3px;
    margin-left: 3px;
}
.nobreak {
    display: inline;
    white-space: nowrap;
    word-wrap: nowrap; /* IE 5+ */
    word-break: keep-all;
}
.fa-heart:before {
    content: "\f004";
    margin-right: 0.2rem;
}
.tbox {
    overflow: scroll;
    border: 1px solid lightgrey;
    padding: 0px;
    max-height: 32px;
    min-height: 32px;
    height: 32px;
    font-weight: bold;
    overflow: hidden;
    resize: none;
}
.fa-plus:before {
    content: "\f067";
    margin-right: 0.5rem;
}
.emoii {
    width: 22px;
    max-width: 22px;
    height: 22px;
    margin: 0px;
    padding: 5px;
}
.hid {
    display: none;
}
.noflow {
    overflow: hidden;
}
div {
    line-height: 20px;
}

.popover {
    height: 250px;
    overflow-y: auto;
    white-space: pre-wrap;
}



.item3 {
    font-size: 16px !important;
    color: #000;
}

.item5 {
    color: gray;
}

.pallboll {
    position: fixed;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 9999;
}

.pallboll > iframe {
    display: block; /* iframes are inline by default */
    background: #000;
    border: none; /* Reset default border */
    height: 97vh; /* Viewport-relative units */
    width: 100vw;
}
.grid-container {
    background: aliceblue;
    text-align: right;
    margin-left: 50px;
    padding: 8px;
    border-left: 6px solid cornflowerblue;
}

.loginItms {
    z-index: 99999 !important;
    position: absolute;
    display: none;
    border: 2px solid #af020b;
    background-color: #f93634;
    border-radius: 25px 0 0 25px;
    background-image: url(imgs/banner.png);
    background-repeat: no-repeat;
    background-size: contain;
    right: 0px;
    top: 30px;
    width: 250px;
}

.loginImg {
    float: right;
    width: 36px;
    height: 36px;
    border: 1px solid #ed5555;
    margin: 1px;
    background-size: contain;
    background-repeat: no-repeat;
    border-radius: 10px;
}

.loginLogo {
    float: right;
    margin: 1px;
    margin-top: -20px;
}

.loginIco {
    float: right;
    margin: 0px 1px 1px;
    max-height: 18px;
    background-color: white;
    padding: 1px;
    border-radius: 2px;
}
.loginFlog {
    float: left;
    margin: 2px 0 5px 5px;
    max-height: 15px;
}
.loginUserName {
    font-size: 15px !important;
    float: right;
    font-family: arial;
    font-weight: 9000;
    max-width: 170px;
    min-width: 100px;
    text-align: right;
    text-shadow: -1px 1px 2px #fff;
    color: #842c2a;
    white-space: nowrap;
    overflow: hidden !important;
    text-overflow: ellipsis;
}

*{font-family:Verdana,Geneva,Tahoma,sans-serif;font-weight:700!important;text-shadow:none!important;font-size:13.8px!important}
.ae {
    padding-top: 6px;
    padding-bottom: 3px;
    padding-left: 2px;
    border: 1px solid black;
    border-radius: 2px;
    margin: 1px;
    float: left;
    padding: 6px 8px;
}
.pmsgc {
    background-color: rgba(0, 77, 255, 0.08) !important;
}
.ppmsgc {
    background-color: #f1f1ff !important;
}
.hmsg {
    background-color: linen !important;
}

.heart {
    position: absolute;
    top: -50%;
    -webkit-transform: rotate(-45deg);
    -moz-transform: rotate(-45deg);
    -m-transform: rotate(-45deg);
    transform: rotate(-45deg);
}

.heart:before {
    position: absolute;
    top: -50%;
    left: 0;
    display: block;
    content: "";
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 100%;
}

.heart:after {
    position: absolute;
    top: 0;
    right: -50%;
    display: block;
    content: "";
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 100%;
}

@-webkit-keyframes love {
    0% {
        top: 110%;
    }
}
@-moz-keyframes love {
    0% {
        top: 110%;
    }
}
@-ms-keyframes love {
    0% {
        top: 110%;
    }
}
@keyframes love {
    0% {
        top: 110%;
    }
}

.typingIndicatorBubbleDot {
    width: 4px;
    height: 4px;
    margin-right: 4px;
    background-color: #57585a;
    border-radius: 50%;
    animation-name: bounce;
    animation-duration: 1.3s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.typingIndicatorBubbleDot:first-of-type {
    margin: 0px 4px;
}

.typingIndicatorBubbleDot:nth-of-type(2) {
    animation-delay: 0.15s;
}

.typingIndicatorBubbleDot:nth-of-type(3) {
    animation-delay: 0.3s;
}
@keyframes bounce {
    0%,
    60%,
    100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-4px);
    }
}

.hid {
    display: none;
}

.hand {
    cursor: hand;
}
img {
    vertical-align: middle;
}
.break {
    overflow: auto;
    word-wrap: break-word; /* IE 5+ */
    overflow-x: hidden;
    overflow-wrap: break-word;
}
.ui-icon-adjust:after {
    background-image: url("<url removed for brevity>");
    background-repeat: no-repeat;
    background-position: 4px 3px;
    float: left;
}
[data-role="icon"]:after {
    background-image: url("<url removed for brevity>");
    background-repeat: no-repeat;
    background-position: 4px 3px;
    float: left;
}

.u-ico {
    padding-right: 2px;
    margin-top: 2px;
    max-height: 16px;
}
html,
body {
    height: 100%;
}
.ui-tabs-nav {
    padding: 0px;
}
.ui-tabs-panel {
    padding: 0px;
}
.darker {
    background-color: #33333a;
}
.emoi {
    width: 18px;
    max-width: 18px;
    height: auto;
    max-height: 18px;
}
.unread {
    background-color: #ffc89d !important;
}
div {
    line-height: 20px;
}
.b {
    border: 1px solid grey;
}
.bb {
    border: 2px solid grey;
}
table,
th,
td {
    border: 0;
}

th,
td {
    padding: 0px;
}
table {
    border-spacing: 0;
    border-collapse: collapse;
}
.ui-popup-container {
    margin: 0px;
    padding: 0px;
}

.animating {
    animation: animate 1s cubic-bezier(0, 1, 1, 0);
}

.mini {
    font-size: 90% !important;
}
.corner {
}
.minix {
    font-size: 80% !important;
}
@keyframes animate {
    from {
        transform: scale(1);
    }
    to {
        transform: scale(1.5);
    }
}
.nosel,
.u-ico,
.u-pic,
.tago {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    cursor: default;
}
.ui-dialog-contain {
    width: 92.5%;
    max-width: 500px;
    margin: 0% auto 15px auto;
    padding: 0;
    position: relative;
    top: 2px;
}
.center {
    margin: 0 auto;
}
.dots {
    display: inline-block;
    /* white-space: nowrap; */
    overflow: hidden !important;
    text-overflow: ellipsis;
    max-width: 100%;
}
.ui-tabs .ui-tabs-panel {
    padding: 0px;
    margin: 0px;
}

.ui-widget-overlay {
    background-color: black;
    background-image: none;
    opacity: 0.12;
    z-index: 1040;
}
.ui-dialog .ui-dialog-content {
    padding: 0px;
}
.ui-tabs-anchor {
    padding: 0px;
}
.hgreen {
    background-color: darkseagreen;
}
.hred {
    background-color: indianred;
}
.borderg {
    border: 1px solid lavender;
}
.border {
    border: 1px solid black;
}
nopadding {
    padding: 0px;
    margin: 0px;
}
.fitimg {
    background-size: contain;
    background-repeat: no-repeat;
    background-position: 50% 50%;
}
.ui-dialog .ui-dialog-titlebar {
    padding: 5px;
}
.bord {
    border: 1px solid dodgerblue !important;
}
.uzr {
    margin-left: 2px !important;
    border-radius: 5px;
}
html {
    height: 100vh;
    width: 100vw;
}
.ui-state-default .ui-tabs-anchor {
    padding: 5px !important;
}
.mw {
    width: 380px;
    max-width: 380px;
    min-width: 380px;
}
.mww {
    width: 260px;
    max-width: 260px;
    min-width: 260px;
}

.pn2 {
    width: 100%;
    max-width: 320px;
    height: 80%;
    left: 5px;
    float: right;
    z-index: 2;
    margin: 0px;
    position: absolute;
}

.panel-heading {
    padding: 6px;
}

.fa {
    text-align: left;
}

.modal-header {
    padding: 5px;
}

.badge {
    padding: 0px 3px;
}

.bx {
    margin-top: -8px;
}

.panel-body {
    padding: 2px;
    height: auto;
}

button.btn {
    padding: 5px 5px;
}

.tab-pane {
    padding: 0px;
}

.d2 {
    padding-bottom: 2px;
}
.popover-content {
    padding: 1px;
}

/* ===== SPACING FIXES: Icons & text gaps ===== */

/* General: add spacing after every .fa icon next to text */
.fa + span,
.fa + div,
.fa + label,
span + .fa,
label + .fa {
    margin-right: 4px;
    margin-left: 4px;
}

/* Notification join/leave messages: icon-to-text spacing */
.notification .fa {
    margin-left: 5px;
    margin-right: 5px;
}

/* Username/label inside notification rows */
.notification .u-topic,
.notification .dots {
    padding: 0 5px;
}

/* User icon in user list and messages */
.u-ico {
    margin-right: 4px !important;
    margin-left: 4px !important;
}

/* Button icons: space between icon and text */
.btn .fa {
    margin-right: 4px;
}
.btn.fa {
    padding: 4px 8px;
}

/* Label tags with icons: ensure spacing */
.label .fa,
.label.fa {
    margin-right: 3px;
    margin-left: 3px;
}

/* Panel heading icons */
.panel-heading .fa {
    margin-right: 5px;
}

/* Tab nav icons */
.nav .fa {
    margin-right: 4px;
}

/* Message row: avatar and name spacing */
.msg .u-pic,
.msg img {
    margin-left: 4px;
    margin-right: 4px;
}

/* Grid container (topic/info blocks) */
.grid-container {
    padding: 8px 10px;
    line-height: 1.6;
}

/* ===== RESPONSIVE: Full screen on mobile ===== */

/* On small screens (<=480px), remove the max-width cap */
@media screen and (max-width: 480px) {
    .main-app-container {
        max-width: 100% !important;
        width: 100% !important;
    }
    #tlogins {
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
    }
    .mw {
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
    }
    .mww {
        width: 100% !important;
        max-width: 100% !important;
        min-width: unset !important;
    }
    .pn2 {
        width: 98% !important;
        max-width: 100% !important;
    }
}

/* On tablets and medium screens (481-768px), also expand */
@media screen and (max-width: 768px) and (min-width: 481px) {
    .main-app-container {
        max-width: 100% !important;
    }
    #tlogins {
        max-width: 100% !important;
    }
}




/* ===== FIX: Scrollbar only for online users list ===== */
#tlogins {
    overflow: hidden !important; /* Remove scroll from main container */
    display: flex;
    flex-direction: column;
}
#tlogins > * {
    flex-shrink: 0; /* Prevent top elements from squishing */
}
#tlogins > .lonline {
    flex: 1 1 auto; /* Take up remaining height */
    overflow-y: auto !important; /* Scroll only inside the users list */
    overflow-x: hidden !important;
}
/* Ensure the active tab pane doesn't squish */
#tlogins > .tab-pane {
    flex-shrink: 0;
}





/* ========================================================= */
/* ===== EXACT SIDE-BY-SIDE CHAT LAYOUT AS PER IMAGES ===== */
/* ========================================================= */

/* Ensure main app container fills available space on desktop */
.main-app-container {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    position: relative !important;
    overflow: hidden !important;
}

/* While on login screen, ensure chat room is hidden and tlogins is centered */
#tlogins {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    margin: 0 auto !important;
    max-width: 370px !important;
    width: 100% !important;
    height: 100% !important;
    z-index: 1000 !important;
}

#tlogins:not([style*="display: none"]):not([style*="display:none"]) ~ #room,
#tlogins:not([style*="display: none"]):not([style*="display:none"]) ~ .pallboll {
    display: none !important;
}

/* #room as flexible horizontal row */
#room {
    display: flex !important;
    flex-direction: row !important;
    direction: ltr !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
    position: relative !important;
}

/* 1. Side Panel (#dpnl) on far left */
#dpnl {
    width: 315px !important;
    min-width: 315px !important;
    max-width: 315px !important;
    height: 100% !important;
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    right: auto !important;
    bottom: auto !important;
    flex-shrink: 0 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
    direction: rtl !important;
    z-index: 20 !important;
    padding: 0 !important;
}

#dpnl .pnhead {
    font-size: 15px !important;
    font-weight: bold !important;
    color: #ffffff !important;
    text-shadow: none !important;
}

#dpnl #usearch {
    background-color: rgba(184, 183, 183, 0.18) !important;
    color: #ffffff !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    height: 32px !important;
    padding: 4px 8px !important;
    width: 100% !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
}

#dpnl #usearch::-webkit-input-placeholder {
    color: #fff !important;
}

#dpnl #users {
    overflow-y: auto !important;
    overflow-x: hidden !important;
}

/* 2. Vertical Buttons Menu (#d0) */
#d0 {
    width: 60px !important;
    min-width: 60px !important;
    max-width: 60px !important;
    height: 100% !important;
    display: flex;
    flex-direction: column !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    border-right: 1px solid rgba(0, 0, 0, 0.15) !important;
    border-left: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-sizing: border-box !important;
    z-index: 10 !important;
    direction: ltr !important;
}

#d0 .d0-btn {
    width: 100% !important;
    min-height: 54px !important;
    margin: 1px !important;
    padding: 8px 2px !important;
    border-radius: 0 !important;
    display: flex;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18) !important;
    box-shadow: none !important;
    color: #ffffff !important;
    font-size: 19px !important;
    cursor: pointer !important;
    position: relative !important;
    box-sizing: border-box !important;
    border: solid 1px #000000 !important;
}

#d0 .d0-btn text {
    display: block !important;
    font-size: 12px !important;
    font-weight: bold !important;
    margin-top: 4px !important;
    color: #ffffff !important;
    font-family: inherit !important;
    line-height: 1 !important;
}

/* Top button: Users count */
#d0 .d0-btn[data-target="#users"] {
    flex-direction: row !important;
    gap: 4px !important;
    font-size: 15px !important;
    min-height: 46px !important;
}

#d0 .d0-btn[data-target="#users"] .busers {
    font-size: 14px !important;
    font-weight: bold !important;
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Wall unread badge */
#d0 .bwall {
    position: absolute !important;
    top: 4px !important;
    right: 5px !important;
    background-color: #f0ad4e !important;
    color: #ffffff !important;
    font-size: 11px !important;
    font-weight: bold !important;
    padding: 1px 5px !important;
    border-radius: 8px !important;
    border: none !important;
    line-height: 1.2 !important;
}

/* Logout button (red) */
#d0 .d0-btn.label-danger,
#d0 .d0-btn[title="خروج"] {
    background-color: #d9534f !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.15) !important;
}

#d0 .d0-btn.label-danger:hover,
#d0 .d0-btn[title="خروج"]:hover {
    background-color: #c9302c !important;
}

/* 3. Chat Main Area */
#room-content {
    flex: 1 1 auto !important;
    display: flex;
    flex-direction: column !important;
    height: 100% !important;
    min-width: 0 !important;
    position: relative !important;
    direction: ltr !important;
    overflow: hidden !important;
}

#room-content #d2 {
    flex: 1 1 auto !important;
    height: auto !important;
    overflow-y: auto !important;
    padding: 0 !important;
}

/* Fix chat messages & join message appearance */
/* Important: only the TOP-LEVEL chat row is flex. This avoids
   applying the same width/flex rules recursively to nested .uzr elements. */
#d2 > .uzr {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    border-radius: 4px !important;
}

/* Avatar */
#d2 > .uzr > .u-pic {
    float: none !important;
    flex: 0 0 auto !important;
    margin: 0 8px 0 0 !important;
    padding: 0 !important;
    align-self: center !important;
}

/* Content area beside avatar */
#d2 > .uzr > div.uzr {
    float: none !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    flex: 1 1 0 !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    gap: 6px 8px !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Username / role */
#d2 > .uzr .u-topic,
#d2 > .uzr .dots {
    float: none !important;
    display: inline-block !important;
    flex: 0 0 auto !important;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    vertical-align: middle !important;
}

#d2 > .uzr .u-topic {
    font-weight: bold !important;
}

/* Normal chat text can wrap normally */
#d2 > .uzr .u-msg {
    float: none !important;
    display: block !important;
    flex: 1 1 180px !important;
    min-width: 120px !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 14px !important;
    line-height: 20px !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: break-word !important;
}

/* Join / leave notifications must NEVER collapse to one-character width */
#d2 .notification,
#d2 .notification .u-msg,
#d2 .u-msg.notification {
    min-width: max-content !important;
    width: auto !important;
    max-width: none !important;
    white-space: nowrap !important;
    word-break: keep-all !important;
    overflow-wrap: normal !important;
}

#d2 .notification .u-msg,
#d2 .u-msg.notification {
    display: inline-block !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
}

/* Room button */
#d2 > .uzr .roomh {
    float: none !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
    width: auto !important;
    min-width: max-content !important;
    margin: 0 4px !important;
    padding: 3px 8px !important;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    vertical-align: middle !important;
}

#d2 > .uzr .fa-sign-in {
    float: none !important;
    display: inline-block !important;
    flex: 0 0 auto !important;
    margin: 0 4px !important;
    padding: 0 !important;
    vertical-align: middle !important;
}

/* Time */
#d2 > .uzr .tago {
    float: none !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    padding-right: 4px !important;
    white-space: nowrap !important;
}

#room-content .footer {
    display: flex;
    align-items: center !important;
    direction: ltr !important;
    padding: 4px 6px !important;
    box-sizing: border-box !important;
    flex-shrink: 0 !important;
    border-radius: 0 !important;
}

#room-content .footer button {
    margin: 0 4px 0 0 !important;
    border-radius: 4px !important;
}

#room-content .footer textarea#tbox {
    flex: 1 1 auto !important;
    height: 36px !important;
    resize: none !important;
    direction: rtl !important;
    text-align: right !important;
    padding: 6px 10px !important;
    margin: 0 !important;
    border-radius: 4px !important;
    box-sizing: border-box !important;
}

/* Responsive for mobile screens */
@media screen and (max-width: 480px) {
    #dpnl {
        position: absolute !important;
        left: 58px !important;
        top: 0 !important;
        width: calc(100% - 58px) !important;
        max-width: calc(100% - 58px) !important;
        z-index: 50 !important;
    }
}


/* ===== SIDE PANEL HEADER & CLOSE BUTTON (MATCHING REFERENCE) ===== */
.dpnl-header {
    height: 38px !important;
    min-height: 38px !important;
    max-height: 38px !important;
    display: flex;
    flex-direction: row !important;
    direction: ltr !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 3px 0 3px !important;
    box-sizing: border-box !important;
    width: 100% !important;
    flex-shrink: 0 !important;
}

.dpnl-header .pnhead {
    font-size: 15px !important;
    font-weight: bold !important;
    color: #ffffff !important;
    text-shadow: none !important;
    user-select: none !important;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 38px !important;
    background: transparent !important;
    width: auto !important;
    height: auto !important;
}

.dpnl-close-btn {
    width: 46px !important;
    height: 32px !important;
    min-width: 46px !important;
    max-width: 46px !important;
    background-color: #d9534f !important;
    border: 2px solid #000000 !important;
    border-radius: 4px !important;
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: bold !important;
    cursor: pointer !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    outline: none !important;
    padding: 0 !important;
    line-height: 1 !important;
    margin: 0 !important;
    transition: background-color 0.15s ease-in-out !important;
}

.dpnl-close-btn:hover {
    background-color: #c9302c !important;
}

.dpnl-close-btn:active {
    background-color: #ac2925 !important;
}

.dpnl-close-btn i,
.dpnl-close-btn .fa {
    color: #ffffff !important;
    font-size: 16px !important;
    line-height: 1 !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* ===== WALL TAB (#wall) FLEX LAYOUT & SEND FIELD ===== */
#dpnl #wall {
    height: calc(100% - 38px) !important;
    max-height: calc(100% - 38px) !important;
    width: 100% !important;
    display: none;
    flex-direction: column !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    position: relative !important;
    background-color: #ffffff !important;
    border: none !important;
}

#dpnl #wall.active {
    display: flex;
}

/* General rule for all tab-panes in #dpnl */
#dpnl .tab-pane {
    height: calc(100% - 38px) !important;
    max-height: calc(100% - 38px) !important;
    box-sizing: border-box !important;
}

#dpnl #users {
}

/* 1. YouTube Search section at top of wall */
#dpnl #wall .youtubeSearch {
    flex-shrink: 0 !important;
    width: 100% !important;
    position: relative !important;
    top: 0 !important;
    float: none !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid #d0d7de !important;
    box-sizing: border-box !important;
    z-index: 5 !important;
}

#dpnl #wall .youtubeSearch input.youtubeVal {
    height: 32px !important;
    border-radius: 4px !important;
    font-size: 13px !important;
}

/* 2. Wall posts container (#d2bc) in middle */
#dpnl #wall #d2bc {
    flex: 1 1 auto !important;
    height: auto !important;
    min-height: 0 !important;
    width: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
    direction: rtl !important;
    background-color: #f7f9fa !important;
    float: none !important;
}

/* Wall posts styling inside #d2bc */
#dpnl #wall #d2bc .uzr {

}

/* 3. Wall send box (.wall-footer) fixed at bottom */
#dpnl #wall .wall-footer {
    flex-shrink: 0 !important;
    width: 100% !important;
    min-height: 46px !important;
    max-height: 46px !important;
    display: flex;
    flex-direction: row !important;
    align-items: center !important;
    direction: ltr !important;
    padding: 5px 6px !important;
    box-sizing: border-box !important;
    background-color: #f6f8fa !important;
    border-top: 1px solid #d0d7de !important;
    gap: 4px !important;
    float: none !important;
    z-index: 10 !important;
}

#dpnl #wall .wall-footer .sndfilebc {
    width: 34px !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 15px !important;
    background: #<%= colors.btcolor %>;
    border: 1px solid #<%= colors.btcolor %>;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    float: none !important;
    margin: 0 !important;
}

#dpnl #wall .wall-footer .sndfilebc:hover {
    background-color: #<%= colors.btcolor %>;
}

#dpnl #wall .wall-footer .emobc {
    width: 30px !important;
    height: 30px !important;
    padding: 2px !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
    float: none !important;
    margin: 0 !important;
}

#dpnl #wall .wall-footer textarea.tboxbc {
    flex: 1 1 auto !important;
    width: auto !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    resize: none !important;
    direction: rtl !important;
    text-align: right !important;
    padding: 6px 8px !important;
    margin: 0 !important;
    border-radius: 4px !important;
    border: 1px solid #ccc !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    font-size: 13px !important;
    line-height: 20px !important;
    box-sizing: border-box !important;
    outline: none !important;
    float: none !important;
}

#dpnl #wall .wall-footer textarea.tboxbc:focus {
    border-color: #66afe9 !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(102,175,233,.6) !important;
}

#dpnl #wall .wall-footer .sndbc {
    height: 34px !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 13px !important;
    font-weight: bold !important;
    background: #<%= colors.btcolor %>;
    border: 1px solid #<%= colors.btcolor %>;
    color: #ffffff !important;
    flex-shrink: 0 !important;
    white-space: nowrap !important;
    float: none !important;
    margin: 0 !important;
}

#dpnl #wall .wall-footer .sndbc:hover {
    background-color: #<%= colors.btcolor rgba(0,0,0,0.12)%> !important;
}

/* 10. Floating Windows, Popups and Popovers Stacking */
.bgg,
div[class*=" w"],
div[class^="w"],
#cw > div,
#pop > div {
    z-index: 3000 !important;
}

@media (max-width: 767px) {
    .bgg,
    div[class*=" w"],
    div[class^="w"],
    #cw > div,
    #pop > div {
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
}

#upro {
    z-index: 3500 !important;
}

.popover {
    z-index: 99999 !important;
    max-width: 370px !important;
}

.popover-content {
    padding: 6px 8px !important;
}

/* ============================================================
   11. Private Chat Window - Square Design v2
   ============================================================ */

.pm-window {
    display: flex;
    flex-direction: column !important;
    width: 340px !important;
    height: 420px !important;
    min-width: 260px !important;
    min-height: 300px !important;
    
    overflow: hidden !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.35) !important;
    transition: width 0.2s ease, height 0.2s ease !important;
}

.pm-window.pm-expanded {
    width: 480px !important;
    height: 580px !important;
}

.pm-window .pm-header {
    height: 46px !important;
    min-height: 46px !important;
    flex-shrink: 0 !important;
    display: flex;
    flex-direction: row !important;
    align-items: center !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    border-bottom: 1px solid rgba(0,0,0,0.15) !important;
    gap: 4px !important;
}

.pm-window .pm-header button {
    width: 30px !important;
    height: 28px !important;
    padding: 0 !important;
    font-size: 13px !important;
    border-radius: 6px !important;
    flex-shrink: 0 !important;
    border: none !important;
    cursor: pointer !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
}

.pm-window .pm-typing-bar {
    height: 22px !important;
    min-height: 22px !important;
    flex-shrink: 0 !important;
    display: flex;
    align-items: center !important;
    padding: 0 10px !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    box-sizing: border-box !important;
}

.pm-window .typ {
    display: none;
    flex-direction: row;
    align-items: center;
    gap: 6px;
}

.pm-window .d2 {
    flex: 1 1 auto !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    padding: 8px !important;
    box-sizing: border-box !important;
    direction: rtl !important;
}

.pm-window .d2::-webkit-scrollbar {
    width: 4px !important;
}
.pm-window .d2::-webkit-scrollbar-thumb {
    border-radius: 4px !important;
    background: rgba(0,0,0,0.2) !important;
}

.pm-window .pm-footer {
    flex-shrink: 0 !important;
    display: flex;
    flex-direction: row !important;
    align-items: center !important;
    padding: 6px 8px !important;
    gap: 6px !important;
    border-top: 1px solid rgba(0,0,0,0.12) !important;
    box-sizing: border-box !important;
}

.pm-window .pm-footer button {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    font-size: 14px !important;
    border-radius: 8px !important;
    flex-shrink: 0 !important;
    display: flex;
    align-items: center !important;
    justify-content: center !important;
}

.pm-window .pm-tbox {
    flex: 1 1 auto !important;
    height: 34px !important;
    min-height: 34px !important;
    max-height: 80px !important;
    resize: none !important;
    direction: rtl !important;
    padding: 6px 10px !important;
    box-sizing: border-box !important;
    font-size: 13px !important;
    border: 1px solid rgba(0,0,0,0.2) !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,0.9) !important;
    outline: none !important;
}

.pm-window .pm-tbox:focus {
    border-color: rgba(0,0,0,0.4) !important;
    background: #fff !important;
}

.pm-window .pm-footer img.emo {
    width: 30px !important;
    height: 30px !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    flex-shrink: 0 !important;
}

.pm-window .uh {
    display: flex;
    align-items: center !important;
    flex: 1 !important;
    overflow: hidden !important;
}

/* Call pulse animation */
@keyframes pm-ring-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(33,150,243,0.6); }
    50% { box-shadow: 0 0 0 14px rgba(33,150,243,0); }
}

#pm-call-modal,
#pm-calling-modal {
    z-index: 99998 !important;
}

@media (max-width: 600px) {
    .pm-window {
        width: calc(100vw - 70px) !important;
        height: 380px !important;
        left: 62px !important;
    }
}

.roomh, [data-rid] { cursor: pointer !important; }
.roomh:hover, [data-rid]:hover { opacity: 0.9; filter: brightness(1.15); }

/* Room Welcome Message Styling */
#d2 > .uzr.welcome-msg,
#d2 .welcome-msg,
.welcome-msg {
    background-color: #f1f6fb !important;
    background: linear-gradient(135deg, #f5f9fd 0%, #ebf3fa 100%) !important;
    border: 1px solid #d0e2f2 !important;



    margin-bottom: 4px !important;
    position: relative !important;
}

#d2 > .uzr.welcome-msg .u-topic,
.welcome-msg .u-topic {
    font-weight: bold !important;
    font-size: 13.5px !important;
}

#d2 > .uzr.welcome-msg .u-msg,
.welcome-msg .u-msg {
    color: #243342 !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
}


/* Flat style: remove border-radius and box-shadow for buttons and media */
#d2bc > .wall-post > .uzr {
    z-index: 1 !important;
}

#d2bc > .wall-post > .wall-like,
#d2bc > .wall-post > .wall-remove,
.wall-like,
.wall-remove {
    z-index: 50 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    pointer-events: auto !important;
}

#d2bc > .wall-post .u-msg img,
#d2bc > .wall-post .u-msg video,
#d2bc > .wall-post .u-msg audio,
#d2bc > .wall-post .u-msg iframe,
.wall-media-container,
.wall-media-thumb-wrap,
.wall-media-thumb,
.wall-media-play-btn,
.wall-media-duration-badge,
.wall-image-hover-badge,
.wall-video-placeholder,
#chat-media-preview-img,
.chat-media-preview-view-btn,
.chat-media-preview-close {
    border-radius: 0 !important;
    box-shadow: none !important;
}
