/* Reset básico */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: Arial, sans-serif;
}
/* Variables de color */
:root {
--black-rgb: 0, 0, 0;
}
/* Scroll personalizado (Firefox) */
body {
scrollbar-color: rgba(var(--black-rgb), .2) transparent;
}
/* Scroll personalizado (Webkit: Chrome, Safari, Edge) */
body::-webkit-scrollbar {
width: 8px;
}
body::-webkit-scrollbar-thumb {
background-color: rgba(var(--black-rgb), .2);
border-radius: 4px;
}
body::-webkit-scrollbar-track {
background-color: transparent;
}
/* Layout principal */
.container {
display: flex;
height: 100vh;
}
/* Barra lateral */
.sidebar {
width: 30%;
border-right: 1px solid #ddd;
display: flex;
flex-direction: column;
}
.menu {
padding: 10px;
border-bottom: 1px solid #ddd;
}
.search {
padding: 10px;
}
.search input {
width: 100%;
padding: 8px;
border: 1px solid #ddd;
border-radius: 5px;
}
/* Lista de chats */
.chats {
flex-grow: 1;
overflow-y: auto;
list-style: none;
padding: 0;
}
.chat-item {
display: flex;
flex-direction: column;
padding: 10px;
border-bottom: 1px solid #ddd;
cursor: pointer;
}
.chat-item:hover {
background: #f0f0f0;
}
.chat-item .name {
font-weight: bold;
}
.chat-item .last-message {
color: gray;
font-size: 12px;
}
.chat-item .time {
align-self: flex-end;
font-size: 12px;
color: gray;
}
/* Sección de chat */
.chat-window {
flex-grow: 1;
display: flex;
flex-direction: column;
/* Fondo con degradado y patrón SVG */
background: linear-gradient(135deg, #cfd9df, #7c98b3);
background-image: url('https://anesstore.neocities.org/Huma/pattern.svg'),
linear-gradient(135deg, #cfd9df, #7c98b3);
background-repeat: repeat;
background-size: 350px, cover;
background-blend-mode: soft-light;
}
/* Mensajes */
.messages {
flex-grow: 1;
padding: 10px;
display: flex;
flex-direction: column;
overflow-y: auto;
}
/* Burbuja de mensaje */
.message {
padding: 10px 14px;
margin: 5px 0;
border-radius: 15px;
max-width: 60%;
position: relative;
}
/* Mensaje recibido */
.received {
align-self: flex-start;
background: #ffffff;
border-radius: 15px 15px 15px 5px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Mensaje enviado */
.sent {
align-self: flex-end;
background: #d3f8d3;
border-radius: 15px 15px 5px 15px;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* Cola decorativa en los mensajes */
.message::after {
content: "";
position: absolute;
width: 11px;
height: 20px;
bottom: -2px;
background-size: contain;
background-repeat: no-repeat;
}
/* Posicionamiento de la cola en mensajes recibidos */
.received::after {
left: -6px;
background-image: url('data:image/svg+xml;utf8,');
}
/* Posicionamiento de la cola en mensajes enviados */
.sent::after {
right: -6px;
background-image: url('data:image/svg+xml;utf8,');
transform: scaleX(-1);
}
/* Input de mensajes */
.message-input {
display: flex;
padding: 10px;
background: #f9f9f9;
border-top: 1px solid #ddd;
}
.message-input input {
background-color: #fff;
border-radius: 25px;
padding: 12px 16px;
border: 1px solid #ccc;
width: 100%;
max-width: 60rem;
outline: none;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
font-size: 14px;
}
/* Botón de enviar */
#send-button {
background-color: #3390ec;
color: white;
border: none;
border-radius: 50%;
padding: 12px;
font-size: 18px;
cursor: pointer;
width: 44px;
height: 44px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 1px 8px 1px rgba(0, 0, 0, 0.1);
margin-left: 10px;
transition: background 0.3s ease-in-out;
}
#send-button:hover {
background-color: #2086ea;
}
#send-button:focus {
outline: none;
}
#send-button svg {
width: 20px;
height: 20px;
}