/****************************************************************************/
/* STILE DEI MESSAGGI PRIVATI */

/* HELP: Da qui è possibile modificare:
- I font ed i colori dei messaggi privati
- Le dimensioni e la posizione delle finestre dei messaggi privati
- Lo sfondo dei messaggi privati */

/****************************************************************************/

div.pagina_messages_center {
}

.panels_box_new {
	overflow: auto;
	height: 98vh;
}

/*Testo delle colonne*/
div.pagina_messages_center div.elementi_elenco {
    height: 40px;
}

/*************************/
/*Visualizzazione del messaggio singolo*/
div.read_message_box {
	margin-top:5px;
    margin-left: auto;
    margin-right: auto;
}

div.read_message_box div.infos {
    clear: both;
    text-align: left;
	color: #c5bea5;
}

div.read_message_box div.infos span.title {
    font-style: italic;
}

div.read_message_box div.infos span.body {
    font-weight: bold;
}

div.read_message_box_text {
    clear: both;
    background: url(imgs/grunge_wall3.png);
    padding: 10px;
    margin: 20px 5px 5px 5px;
    border-image: url(imgs/frame_wood.png) 51 / 15px / 3px stretch;
}



div.read_message_box_forms {
    clear: both;
    margin-bottom: 40px;
}

div.read_message_box_form {
    float: right;
}

div.read_message_box_form input {
    height: 20px;
    width: 20px;
} 

a.link_mex {
	font-family: 'KingC';
    color: #D7CEB2;
    font-size: 12px;
    cursor: pointer;
}


.pager {
    color: #D7CEB2;
    text-align: center;
    background: linear-gradient(90deg, rgba(76, 74, 69, 0) 0%, #2e6f79 40%, #2e6f79 60%, rgba(76, 74, 69, 0) 100%);
    font-size: 12px;	
}

.cont_mexs {
    background: url(imgs/pattern_dark.jpg) repeat;
	border: 3px solid transparent;
    border-image-slice: 9 9 9 9;
    border-image-width: 10px 10px 10px 10px;
    border-image-outset: 0px 0px 0px 0px;
    border-image-repeat: repeat repeat;
    border-image-source: url(imgs/border2.png);
    box-shadow: inset 0px 0px 6px black;
	color: #c5bea6;
	width: 250px;
    float: left;
	padding: 5px;
	text-align:center;
	max-height: 93vh;
	overflow: auto;
	margin: 10px;
}

div.head_mex{
	text-align: center;
    padding-top: 15px;
    margin: auto;
    height: 25px;
    font-family: 'KingC';
    font-size: 13px;
    background: url(imgs/newbut.png) center / contain no-repeat;
	margin-top: 3px;
	color: #e3dace;
	
}

div.head_mex a {
	color: #e3dace;
}

div.head_mex a:hover {
	color: white;
}

div.elementi_elenco_mex {
    box-shadow: 0px 1px 3px black;
    color: #c5bea5;
    background: #6b6a66b0;
    margin: 5px;
	padding: 5px;
	padding-bottom: 0px;
    border-radius: 5px;
	margin-bottom: 0px;
	display: flex;
	align-items: center;
	flex-flow: column;
}

div.controllo_elenco_mex, div.controlli_elenco_mex {
	display: flex;
}

div.controlli_elenco_mex {
	margin-top:5px;
}

a.mittente_mex {
	color: #c5bea5;
    font-family: 'LongaIberica';
    font-size: 30px;
}

input.message_check {
	position: absolute;
    margin-left: 14px;
    margin-top: 14px;
}

/** NUOVI MESSAGGI **/

div.msggroup_container {
    margin: 0 auto;
    margin-left: 10px;
    overflow: auto;
	margin-top:10px;
	background: #b3ab94;
	border-style: solid;
    border-width: 7px;
    -moz-border-image: url(imgs/ui_border.png) 8 repeat;
    -webkit-border-image: url(imgs/ui_border.png) 8 repeat;
    -o-border-image: url(imgs/ui_border.png) 8 repeat;
    border-image: url(imgs/ui_border.png) 8 fill repeat;
	}
	
	div.msggroup_container {
		text-align: center;
	}
	.dsgroup{
		
	}
	
	#load_box {
		max-height: 84vh;
    overflow: auto;
	}
	
	summary.gest_conv {
		text-transform: lowercase;
		text-align: left;
		cursor: pointer;
		border-top: 3px double #857e6e;
	}
	
	fieldset.edit_conv {
		background: url(imgs/pattern_news.jpg) bottom right repeat;
		border: 3px solid #181818;
		box-shadow: inset 0px 0px 1px black;
	}
	
	legend.title_edit {
	width: 138px;
    height: 10px;
    font-family: 'Atteron';
    color: rgb(215, 206, 178);
    letter-spacing: 2px;
    background: url(imgs/top_frame.png) 0% 0% / contain no-repeat;
    padding: 3px;
    background-color: transparent;
    font-size: 10px;
    text-align: center;
	}
	
	summary.reply_msg {
		text-align: center;
		cursor: pointer;
		font-family: 'KingC';
		font-size: 15px;
		padding: 3px;
		transition: all ease-in-out 0.5s;
	}
	
	details[open] summary.reply_msg{
    background-color: #413d34ab;
    border: 3px solid #181818;
	color: #c5bea5;
	}
	summary.reply_msg:hover{
	background-color: #413d34ab;
    border: 3px solid #181818;
	color: #c5bea5;
	}
	
	textarea.reply_msg { 
		width: 93.5vw;
		height: 60px;
		margin-bottom: 0px;
	}
	
	details.reply_msg {
		background: #7b776b;
		border: 1px solid #4c453b;
		clear: both;
	}
	
	.message_title {
	font-family: 'KingC';
    font-size: 15px;
	margin-top: 5px;
	background: linear-gradient(90deg, rgba(76, 74, 69, 0) 0%, #2e6f79b8 40%, #2e6f79b8 60%, rgba(76, 74, 69, 0) 100%);
	}
	div.msggroup_container .alredyRead {
		font-weight: bold;
		color: #333;
		box-shadow: none;
		border-top: 0px;
		padding: 0px;
		border-left: 0px;
		border-right: 0px;
		border-style: solid;
		border-color: #355353;
		margin-top: 10px;
		background: linear-gradient(90deg, rgba(76, 74, 69, 0) 0%, #2e6f79b8 40%, #2e6f79b8 60%, rgba(76, 74, 69, 0) 100%);
	}
	div.msg_container {
		width: auto;
		min-width: 250px;
		max-width: 90%;
		clear: both;
		padding: 5px;
		margin: 0 auto;
		margin-top: 4px;
		margin-bottom: 4px;
		box-shadow: 0px 1px 3px black;
		color: #D7CEB2;
		background: #6b6a66b0;
		-moz-border-radius: 5px;
		-webkit-border-radius: 5px;
		-khtml-border-radius: 5px;
		border-radius: 5px;
	}
	div.msg_author {
		font-family: 'KingC';
		font-size: 14px;
	}
	div.msg_container.me {
		float: right;
		text-align: right;	
		word-break: break-all;
	}
	div.msg_author.me {
		background: linear-gradient(90deg, #4c4a4500 0%, #55504673 40%, #555046cf 60%, #555046 100%);
		border-radius: 0px 5px 5px 0px;
		padding-right: 5px;
	}
	div.msg_container.other, div.msg_container.fromsystem {
		float: left;
		text-align: left;	
	}
	div.msg_author.other, div.msg_author.fromsystem {
		background: linear-gradient(90deg, #555046 0%, #555046cf 40%, #55504673 60%, #4c4a4500 100%);
		border-radius: 5px 0px 0px 5px;
		padding-left: 5px;
	}
	div.msg_container.system {
		font-style: italic;
		color: #444;
		padding: 15px 5px;
		margin: auto;
		background-color: #5f5f5f5c;
		border: transparent;
		margin-top: 10px;
	}

.pin_conv {
	width:15px;
}

.container_name_mex {
	display:flex;
	justify-content: center;
	align-items: center;
}

.conv_title {
	margin-left: 10px;
    margin-right: 10px;
    font-family: 'Balgruf';
    font-size: 14px;
}

a.a_throw {
    font-size: 16px;
    margin-left: 7px;
    color: #bbae85;
    border: 0;
    width: 25px;
    padding: 0;
    padding-top: 3px;
    height: 25px;
	text-align: center;
    background: url(imgs/main_icon_button.png) no-repeat;
    cursor: pointer;
}

button.but_throw {
	margin-bottom: 5px;
}


form.form_messaggi {
	text-align: center;
    background: #b3ab94;
	border-style: solid;
    border-width: 7px;
    -moz-border-image: url(imgs/ui_border.png) 8 repeat;
    -webkit-border-image: url(imgs/ui_border.png) 8 repeat;
    -o-border-image: url(imgs/ui_border.png) 8 repeat;
    border-image: url(imgs/ui_border.png) 8 fill repeat;
	margin-left: 10px;
	margin-top: 10px;
}

a.missive_icon {
	font-size: 16px;
    margin-left: 5px;
    margin-right: 5px;
}

.closed_envelope {
	width: 250px;
	height: 180px;
	background: url(imgs/envelope_trans.png);
	background-size: cover;
}

.open_envelope {
	width: 250px;
	height: 180px;
	background: url(imgs/open_trans.png);
	background-size: cover;
}

span.heading_author {
	font-family: 'KingC';
    font-size: 14px;
	margin-left: 28px;
    position: absolute;
}
span.heading_date {
margin-left: 115px;
    position: absolute;
    margin-top: 5px;
    font-family: 'Balgruf';
    font-size: 13px;
    text-align: right;
    line-height: 14px;
}

.oggetto_mex {
	margin-top: 150px;
    position: absolute;
    text-align: center;
    width: 250px;
    font-size: 13px;
    font-family: 'KingC';	
}
.open_closed {
	position: absolute;
    margin-top: 80px;
    margin-left: 115px;
    font-size: 25px;
}

.elenco_missive {
	background: #b3ab94;
    border-style: solid;
    border-width: 7px;
    -moz-border-image: url(imgs/ui_border.png) 8 repeat;
    -webkit-border-image: url(imgs/ui_border.png) 8 repeat;
    -o-border-image: url(imgs/ui_border.png) 8 repeat;
    border-image: url(imgs/ui_border.png) 8 fill repeat;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	margin: auto;
	width: 97%;
}

.base_mail {
	margin:20px;
}

.top_msg_on {
	display: flex;
	justify-content:center;
}

.content_mex {
	margin: 10px;
    margin-top: 70px;
    position: absolute;
    width: 225px;
    text-align: center;
    height: 60px;
}

.read_on_top {
	background: url(imgs/paper-top.png);
	width: 700px;
	height: 306px;
	margin: auto;
	margin-top: -50px;
    z-index: 9990;
    position: absolute;
}

.read_on_bottom {
	width: 700px;
	height: 276px;
	margin: auto;
    margin-top: -200px;
    z-index: 9990;
    position: absolute;
	background-image: url(imgs/paper-bottom.png);
}

.text_on_box {
	min-height: 230px;
	margin-bottom: 30px;
	font-family: 'Balgruf';
    font-size: 14px;
}

.mex_on_title {
    font-family: Balgruf;
    font-size: 22px;
    margin-left: 50px;
	font-style: italic;
}

.read_on_text {
    position: relative;
	width: 620px;
    z-index: 9999;
    margin-left: 45px;
	margin-top: 30px;
	margin-bottom:10px;
	padding-top: 10px;
}

.bg_read_on {
	background: url(imgs/paper-center.png);
    background-position: bottom;
	width: 700px;
    margin-top: 50px;
    position: absolute;
	
}

.date_on{
	margin-top: 45px;
    margin-left: 420px;
    font-family: 'Balgruf';
    font-size: 16px;
}

.signature {
	bottom: 30px;
    position: absolute;
    font-family: Mrs Saint Delafield;
    font-size: 52px;
    margin-left: 100px;
}

.on_message_box {
	display: flex;
    justify-content: center;	
}

button.reply_mex_on {
	background: transparent;
    border: 0px;
    padding: 0px;
    margin: 0px;
    font-size: 30px;
	cursor: pointer;
	color: #2d3338;
}

.reply_mex_on {
	position: absolute;
    bottom: 25px;
    right: 50px;
}

.back_mex_on {
	position: absolute;
    top: 40px;
    font-size: 20px;
    left: 120px;
}

button.icon_tool {
	background: none;
    border: 0;
    padding: 0;
    font-size: 20px;
    cursor: pointer;
    color: #2d3338;
}

span.mex_on_tools {
	right: 15px;
    position: absolute;
    display: flex;
    bottom: -7px;
}

.mex_copied {
	    background: #8080803d;
    padding: 5px;
    border-radius: 10px;
    font-style: italic;
    border-top: 2px solid #2d3338;
    border-bottom: 3px solid #2d3338;
}

.copied_sign {
	
}

span.read_mex_off {
	float: right;
font-size: 10px;
}

.msg {
	text-align:justify;
}

/* niente scroll sul contenitore esterno: evita doppio scroll */
div.msggroup_container{
    overflow: hidden;
	 box-sizing: border-box;
}

/* WRAPPER flex: decide l'altezza totale della chat (messaggi + reply) */
.chat_wrap{
    display: flex;
    flex-direction: column;
    height: 81vh;      /* qui regoli l’altezza totale: 70vh, 65vh, ecc */
    min-height: 0;
}

/* scroll SOLO sui messaggi: si accorcia quando la reply si apre */
#load_box{
    flex: 1 1 auto;
    overflow-y: auto;
    min-height: 0;
    max-height: none;  /* IMPORTANTISSIMO: disattiva il vecchio max-height */
}

/* textarea dentro la reply: MAI vw */
textarea.reply_msg{
    width: 100%;
    height: 110px;        /* oppure min-height:110px */
    box-sizing: border-box;
}

/* la reply non deve scrollare insieme ai messaggi */
.reply_box{
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
}
