/* Font base */
body {
    margin: 0;
	font-family: "Roboto", sans-serif;
	font-optical-sizing: auto;
	font-weight: 400;
	font-style: normal;
	font-variation-settings:"wdth" 100;
    background: #e5ddd5;
}

/* Contenitore chat */
.chat-container {
    width: 100%;
    max-width: 480px;
    height: 100vh;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
}


/* Header stile WhatsApp */
.header {
    background: #075E54;
    color: #fff;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* <-- aggiunto */
}

.user-info {
    display: flex;
    align-items: center;
}

.avatar {
    width: 40px;
    height: 40px;
    background: #ccc;
    border-radius: 50%;
    margin-right: 10px;
}

.details h2 {
    font-size: 18px;
    margin: 0;
}

.details p {
    margin: 0;
    font-size: 12px;
    opacity: 0.8;
}

/* Area messaggi */

.new-msg-btn {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: #25D366;
    color: #fff;
    padding: 10px 20px;
    border-radius: 20px;
    border: none;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    font-weight: bold;
}


.messages {
    padding: 10px;
    flex-grow: 1;
    overflow-y: auto;
	background-image: url("img/bg.png");
	background-repeat: repeat;
	position: relative;
}


.time {
    display: block;
    font-size: 10px;
    opacity: 0.6;
    margin-top: 4px;
    text-align: right;
}





.message {
    max-width: 85%;
    margin-bottom: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    position: relative;
    font-size: 15px;
}
.message p { margin:0px;
}
.message.sent {
    background: #dcf8c6;
    align-self: flex-end;
    border-radius: 10px 10px 0 10px;
	float: right;
	clear: both;
}

.message.received {
    background: #fff;
    align-self: flex-start;
    border-radius: 10px 10px 10px 0;
	float: left;
	clear: both;
}


/* ADMIN PAGE */
.admin-container {
    max-width: 600px;
    margin: 40px auto;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

textarea {
    width: 100%;
    height: 80px;
    margin-bottom: 15px;
}

button {
    padding: 10px 15px;
    margin-top: 10px;
    cursor: pointer;
}

button.danger {
    background: #c62828;
    color: #fff;
}

.date-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
    z-index: 1;
	clear: both;
}

.date-divider span {
    background: #e0e0e0;
    color: #555;
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 12px;
}

#floating-date {
    position: absolute;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 12px;
    background: rgba(32,32,32,0.65);
    color: white;
    border-radius: 6px;
    font-size: 11px;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 50;
    pointer-events: none;
}


.msg-image {
    max-width: 60%;
    max-height: 300px;
    border-radius: 10px;
    display: block;
    margin-top: 6px;
}
.emoji-wrapper {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.emoji-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.emoji-btn {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    padding: 4px 6px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.emoji-btn:hover {
    background: #f0f0f0;
}
