/* Estilos Generales */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    background-color: #F5F5F5;
}

#chat-app {
    display: flex;
    height: 100vh;
    background-color: #EDEDED;
}

/* Barra Lateral (Lista de Contactos) */
.sidebar {
    width: 30%;
    background-color: #F8F9FA;
    color: #333;
    display: flex;
    flex-direction: column;
}

.sidebar .header {
    padding: 10px;
    background-color: #FFF;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid #D1D1D1;
}

.search-bar {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #D1D1D1;
    border-radius: 20px;
    font-size: 1em;
    background-color: #FFF;
}

/* Pestañas con Colores Mejorados */
.tabs {
    display: flex;
    background-color: #E1E1E1;
}

.tab-button {
    flex: 1;
    padding: 10px;
    background-color: #D3D3D3;
    color: #555;
    border: none;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s, color 0.3s;
    border-bottom: 2px solid transparent;
}

.tab-button.active {
    background-color: #FFFFFF;
    color: #333;
    font-weight: bold;
    border-bottom: 2px solid #1EBEA5;
}

/* Contenido de las Pestañas */
.tab-content {
    display: none; /* Oculto por defecto */
}

.tab-content.active {
    display: block; /* Solo la pestaña activa se muestra */
}

/* Lista de Usuarios en Línea */

#online-users .contact-list {
    padding: 0;
    margin: 0;
    list-style-type: none;
}

#online-users .contact {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #D1D1D1;
    cursor: pointer;
    background-color: #FFFFFF;
    transition: background-color 0.3s;
}


#online-users .contact:hover {
    background-color: #E0F7FA;
}

.avatar {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 10px;
}

/* Lista de Chats Activos */
#active-chats .contact-list {
    padding: 0;
    margin: 0;
    list-style-type: none;
}

#active-chats .contact {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #D1D1D1;
    cursor: pointer;
    background-color: #FFFFFF;
    transition: background-color 0.3s;
}

#active-chats .contact.selected {
    background-color: #E0F4F1;
}

/* Ventana del Chat */
.chat-window {
    width: 70%;
    display: flex;
    flex-direction: column;
    background-color: #FAFAFA;
}

.chat-header {
    padding: 15px;
    background-color: #F1F1F1;
    color: #333;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #D1D1D1;
}

.chat-avatar img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
    margin-right: 15px;
}

.chat-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #FFFFFF;
    border-left: 1px solid #D1D1D1;
}

.message {
    margin-bottom: 15px;
}

.message .bubble {
    padding: 10px;
    border-radius: 10px;
    max-width: 60%;
    position: relative;
    font-size: 0.9em;
}

.message.received .bubble {
    background-color: #E1F0F8;
    color: #333;
    border: 1px solid #D1D1D1;
    border-top-left-radius: 0;
}

.message.sent .bubble {
    background-color: #DCF8C6;
    color: #333;
    margin-left: auto;
    border-top-right-radius: 0;
}

.timestamp {
    font-size: 0.7em;
    color: #777;
    margin-left: 10px;
    display: inline-block;
    vertical-align: bottom;
}

/* Barra de Entrada */
.chat-input {
    display: flex;
    padding: 10px;
    background-color: #F5F5F5;
    border-top: 1px solid #D1D1D1;
}

#message-input {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid #D1D1D1;
    border-radius: 20px;
    margin-right: 10px;
    background-color: #FFF;
}

button {
    background-color: #1EBEA5;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #17A589;
}


/* CACHO ADDONS  */
.contact-info h3{
  margin: 5px 0px 5px 0px;
}

.contact-info p{
  margin: 5px 0px 5px 0px;
}
