﻿.ajaxloader {
    border: 10px solid #ffffff;
    border-radius: 50%;
    border-top: 10px solid #AD0B30;
    width: 50px;
    height: 50px;
    -webkit-animation: spin 2s linear infinite; /* Safari */
    animation: spin 2s linear infinite;
}

/* Safari */
@-webkit-keyframes spin {
    0% {
        -webkit-transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}


/*width*/
::-webkit-scrollbar {
    width: 5px;
}

/*Track*/
::-webkit-scrollbar-track {
    box-shadow: inset 0 0 5px #0B51B7;
}

/*Handle*/
::-webkit-scrollbar-thumb {
    background: #AD105A;
}

    /*Handle on hover*/
    ::-webkit-scrollbar-thumb:hover {
        background: #ff9f43;
    }

*, ::after, ::before {
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
}


.ajaxtooltip {
    position: absolute; /*leave this alone*/
    display: none; /*leave this alone*/
    width: 400px;
    left: 0; /*leave this alone*/
    top: 0; /*leave this alone*/
    background: #ffffff;
    border: 2px solid #AD0B30;
    z-index: 1001;
}

    .ajaxtooltip table td {
        padding: 5px;
        font-size: 11px;
    }

    .ajaxtooltip table th {
        padding: 5px;
        background: #f2f2f2;
        color: #d60000;
        font-weight: bold;
        font-size: 12px;
    }


/* Chat Box Layout */
.chat-box-left, .chat-box-right {
    overflow: hidden;
}

.chat-box-left {
    width: 30%;
    float: left;
    border-right: 1px solid #ddd;
}

.chat-box-right {
    width: 70%;
    float: right;
}

/* Chat Header */
.chat-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.chat-box-left {
    width: 30%;
    background: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
}

/* Chat Search */
.chat-search {
    padding: 15px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.chat-body-left {
    padding: 15px;
}

.chat-box-right {
    width: 70%;
    background: #fff;
    display: flex;
    flex-direction: column;
}

/* Chat Header */
.chat-header {
    padding: 15px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Chat Body */
.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    background: #e9ecef;
    display: flex;
    flex-direction: column;
}

.chat-detail {
    display: flex;
    flex-direction: column;
}

    /* Chat Messages */
    .chat-detail div {
        padding: 10px;
        border-radius: 5px;
    }

    .chat-detail .user-message {
        align-self: flex-end;
        background: #007bff;
        color: #fff;
    }

    .chat-detail .admin-message {
        align-self: flex-start;
        background: #6c757d;
        color: #fff;
    }

/* Chat Footer */
.chat-footer {
    padding: 10px;
    border-top: 1px solid #dee2e6;
    background: #f8f9fa;
}

    .chat-footer .input-group {
        margin-bottom: 0px !important;
    }

        .chat-footer .input-group a {
            padding: 15px 10px;
            color: #007bff;
            font-size: 24px;
            cursor: pointer;
        }

/* Left Side Text Styling */
.media {
    display: flex;
    text-decoration: none;
    color: #000;
    
}
.new-message {
    border-bottom: 1px solid #ddd;
}

.media img {
    width: 40px;
}

.media-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

    .media-body h6 {
        font-size: 14px;
        font-weight: bold;
    }

    .media-body p {
        font-size: 12px;
        color: #6c757d;
        margin-bottom: 0;
    }

    .media-body span {
        font-size: 12px;
        color: #6c757d;
        align-self: flex-end;
    }

    .media-body .chat-msg {
        display: inline-block;
        max-width: 100%; /* Ensures it does not exceed the container */
        width: auto; /* Adjusts width based on content */
        background: #f1f1f1;
        padding: 10px;
        border-radius: 8px;
        word-wrap: break-word;
        white-space: normal;
    }

        .media-body .chat-msg p {
            margin: 0;
            font-size: 14px;
            color: #333;
            overflow: visible;
            width: 100%;
            white-space: normal;
            word-break: break-word;
        }

        .media-body .chat-msg a img {
            width: 20px;
            height: 20px;
            vertical-align: middle;
        }

/* Responsive Design */
@media (max-width: 768px) {
    .chat-container {
        flex-direction: column;
    }

    .chat-box-left, .chat-box-right {
        width: 100%;
        height: 50vh;
    }
    .chat-msg {
        max-width: 80%;
    }
}