/* ==========================================
   ADMIN CLIENT LIST
========================================== */

.admin-client-list {
    width: 250px;
    padding: 15px;
    background: #ffffff;
    border-radius: 10px;
    margin-bottom: 20px;
}

.admin-client-list h3 {
    margin-bottom: 15px;
}


.fa-eye{
    cursor: pointer;
}


/* ==========================================
   CLIENT BUTTON
========================================== */

.client-item {
    width: 100%;
    display: block;
    border: none;
    background: #f1f1f1;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 8px;
    text-align: left;
    cursor: pointer;
}

.client-item:hover {
    background: #e0e0e0;
}

#close-icon {
    
    margin-right: 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: hsl(212, 100%, 50%);
    
}

#close-icon:hover {
    color: hsl(212, 100%, 40%);
}

.chat-box {
    width: 350px;
    height: 500px;
    padding: 10px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: .5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: fixed;
    bottom: 20px;
    right: 20px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    z-index: 1300;
}

.chat-box.hidden {
    transform: scale(0);
    opacity: 0;
    pointer-events: none;
}



/* Toggle button */

.chat{
    position: fixed;
    margin-top: 37rem;
    font-size: .8rem;
    color: rgb(3, 88, 247);
    right: 60px;
    font-size: 1rem;
    font-weight: 600;
   
    z-index: 1100;

}
.chat-toggle-icon {
    position: fixed;
    bottom: 20px;
    right: 50px;
    width: 55px;
    height: 55px;

    background-color: #0078ff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    z-index: 1001;
    color: #fff;
    font-size: 1.7rem;
    transition: background-color 0.3s ease;
}

.chat-toggle-icon:hover {
    background-color: #005ec2;
}

.chat-toggle-icon.hidden {
    display: none;
}

.chat-header {
    display: flex;
    
    color: #a8a8a8;
    padding: 10px 2px;
    border-radius: .5rem;
    font-size: 16px;
    font-weight: bold;
    justify-content: space-between;
    text-align: center;
    border-bottom: 1px solid #ccc;
}
.chat-header span{
    margin-left: 1rem;
    color: #0078ff;
}

.chat-messages {
    flex: 1;
    flex-direction: column;
    padding: 10px;
    overflow-y: auto;
    background-color: #f9f9f9;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: .5rem;
    gap: 8px;
}

.chat-messages div {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    word-wrap: break-word;
}

.chat-messages div:nth-child(odd) {
    background-color: #e4e6eb;
    align-self: flex-start;
    color: #000;
}

.chat-messages div:nth-child(even) {
    background-color: #0078ff;
    color: #fff;
    align-self: flex-end;
}

.chat-input {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
    background-color: #fff;
}

.chat-input input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 14px;
    margin-right: 8px;
    outline: none;
}

.chat-input input:focus {
    border-color: #0078ff;
}

.chat-input button {
    padding: 10px 20px;
    background-color: #0078ff;
    color: #fff;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    outline: none;
}

.chat-input button:hover {
    background-color: #005ec2;
}


.chat-messages div {
    max-width: 80%;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 14px;
    word-wrap: break-word;
    position: relative;
}

.chat-messages div .sender-name {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
}

.chat-messages .sender {
    background-color: #0078ff;
    color: #fff;
    align-self: flex-end;
    text-align: left;
    border-radius: 20px 20px 0 20px;
}

.chat-messages .recipient {
    background-color: #e4e6eb;
    color: #000;
    align-self: flex-start;
    text-align: left;
    border-radius: 20px 20px 20px 0;
}



/* Responsive Styles */
@media (max-width: 768px) {
    .chat-box {
        width: 90%; /* Take up most of the screen width */
        height: 400px; /* Slightly smaller height */
        bottom: 10px;
        right: 10px;
    }

    .chat-input input {
        font-size: 12px; /* Slightly smaller font size */
    }

    .chat-input button {
        font-size: 12px;
    }

    #close-icon {
        font-size: 16px;
    }

    
}

@media (max-width: 480px) {
    .chat-box {
        width: 100%; /* Full screen width */
        height: 300px; /* Smaller height */
        bottom: 0;
        right: 0;
        border-radius: 0; /* No rounded corners */
    }

    .chat-input input {
        font-size: 12px;
        padding: 8px;
    }

    .chat-input button {
        font-size: 12px;
        padding: 8px 16px;
    }

    #close-icon {
        font-size: 14px;
        margin: 5px;
    }
}