@media screen and (max-width: 768px) {
    /*.live-card {
        height: 30vh !important;
    }*/
}

.chatbox-main {
    position: relative;
    height: 100%; /* Limit height to fit the parent */
    border: 2px solid #f1f1f1;
    border-radius: 12px;
    background: linear-gradient(to bottom, #45484d 0%,#000000 100%);
    padding: 10px;
    overflow: hidden; /* Prevent children from affecting layout */
    box-sizing: border-box; /* Include padding and borders in the height */
}

.chatbox {
    overflow-y: auto; /* Always show the scrollbar to avoid layout shifts */
    height: calc(100% - 100px); /* Adjust height to account for header, input, or padding */
    padding: 15px;
    display: flex;
    flex-direction: column-reverse;
    background-color: #fafafa;
    border-radius: 12px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.chatbox-main .overlay,
.chatbox-main .offline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none; /* Prevent these layers from affecting height */
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(3px);
    border-radius: 12px;
    z-index: 10;
}

.chatbox-main .overlay .text,
.chatbox-main .offline .text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    font-weight: bold;
    text-align: center;
    color: #fff;
}

.chat-input {
    margin-top: 10px;
}

.chatbox::-webkit-scrollbar {
    width: 5px;
}

.chatbox::-webkit-scrollbar-thumb {
    background-color: #777;
    border-radius: 5px;
}

.chatbox::-webkit-scrollbar-track {
    background-color: #f1f1f1;
    border-radius: 5px;
}