* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: Rubik, sans-serif !important;
}

.container {
    display: flex;
    height: 100vh;
}

.contacts-section {
    width: 20%;
    border-right: 1px solid #ccc;
    overflow-y: scroll;
}

.chat-section {
    width: 80%;
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 10px;
    background-color: #f1f1f1;
	border-bottom: 1px solid #ccc;
	height: 66px;
}

.chat-window {
    flex-grow: 1;
    padding: 10px;
    overflow-y: scroll;
    background-color: #f9f9f9;
	display: flex;
	flex-direction: column;
	background-image: url('/assets/images/background.png');
	background-size: contain;
	background-position: center;
	background-blend-mode: lighten;
	background-color: rgba(255, 255, 255, 0.9);
}

.chat-input {
    display: flex;
    align-items: center;
    padding: 10px;
    border-top: 1px solid #ccc;
    background-color: #f9f9f9;
}

#messageInput {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
}

#sendButton {
    padding: 8px 12px;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    margin-left: 10px;
    cursor: pointer;
}

.attach-button {
    margin-left: 10px;
    cursor: pointer;
    font-size: 20px; /* Tamaño del icono */
}

.attach-button:hover {
    color: #007bff;
}


.contact-item {
    padding: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
	border-bottom: 1px solid #ccc;
	height: 66px;
}

.contact-item:hover {
    background-color: #f1f1f1;
}

.contact-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    width: 70%;
}

.contact-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.last-message {
    font-size: 12px;
    color: #555;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-time {
    font-size: 12px;
    color: #999;
}

.status-ticks {
    margin-right: 5px;
}

.contact-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.contact-name {
    font-size: 16px;
    font-weight: bold;
}

.my-message {
    text-align: right;
    background-color: #dcf8c6;
    padding: 5px;
    border-radius: 5px;
    margin: 5px;
	max-width: 45%;
	align-self: end;
	box-shadow: 0 1px .5px rgba(11,20,26, .13);
}

.their-message {
    text-align: left;
    background-color: #fff;
    padding: 5px;
    border-radius: 5px;
    margin: 5px;
	max-width: 45%;
	align-self: start;
	box-shadow: 0 1px .5px rgba(11,20,26, .13);
}

.message-text{
	margin-right: 55px;
}

.message-timestamp{
	font-size: 0.7rem;
	color: #777;
}

.their-message .message-timestamp{
	text-align: right;
}


#contacts {
    padding: 10px;
}

#chatMessages {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

/* Estilo para limitar el tamaño del contenedor de la imagen */
.message-image {
    height: 300px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.message-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Para que la imagen se ajuste sin distorsionarse */
}

.message-tick {
    font-size: 12px;
    margin-left: 5px;
    color: #aaa; /* Gris claro por defecto */
    vertical-align: middle;
}

.their-message .message-tick{
	display: none;
}

.sent::before {
    content: '✔'; /* Un tick gris */
}

.delivered::before {
    content: '✔✔'; /* Dos ticks grises */
}

.read::before {
    content: '✔✔';
    color: #0f9cff; /* Azul para ticks leídos */
}

/* Modal para la vista ampliada de la imagen */
#imageModal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

#imageModalContent {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
}

#imageModal .close {
    position: absolute;
    top: 10px;
    right: 25px;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
}

.hamburger-menu {
    font-size: 1.5em;
    cursor: pointer;
    background: none;
    border: none;
}

.contacts-section.hide,
.hamburger-menu{
    display: none;
}

h2#chat-title{
	display: flex;
	justify-content: space-between;
}

#logoutButton{
	align-self: end;
	font-size: 0.9rem;
}

.container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
	padding: 0;
}

@media (min-width: 1400px) {
	.container, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
		max-width: 100%;
	}
}

/* Para ocultar el menú en dispositivos móviles */
@media (max-width: 768px) {
	.my-message {
		width: 45%;
	}

	.their-message {
		width: 45%;
	}
	
	.hamburger-menu{
		display: block;
	}

	.chat-section {
		width: 100%;
		display: flex;
		flex-direction: column;
	}
	
    .contacts-section {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #fff;
        z-index: 1000;
        display: none;
        border-right: 1px solid #ddd;
    }

    .contacts-section.show {
        display: block;
    }

    #chat-window {
        margin-left: 0;
    }
}
