/*--------------------
Body
--------------------*/
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  height: 100%;  
}

body {
  background: url("background.jpg") no-repeat 0 0;
  background-size: cover;
  
  margin: 0;
  padding: 0;

  font-family: 'Open Sans', sans-serif;
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
}

.bg {
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  
  background: url("pontilhado.png") no-repeat 0 0;
}

.bg .personagem {
	height: 100%;
	transition: opacity 0.5s ease-in-out;
}

.bg > .logo {
	position: absolute;
	top: 0;
	right: 0;
	height: 64px;
	transition: opacity 0.5s ease-in-out;
}

/*--------------------
Chat
--------------------*/
.chat {
  position: absolute;
  top: 0;
  left: 0;
  -webkit-transform: none;
          transform: none;
  width: 100%;
  height: 100%;
  z-index: 2;
  overflow: hidden;
  box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
  background: rgba(130, 32, 35, 0);
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-pack: justify;
      -ms-flex-pack: justify;
          justify-content: space-between;
  -webkit-box-orient: vertical;
  -webkit-box-direction: normal;
      -ms-flex-direction: column;
          flex-direction: column;
		  
  transition: background 0.5s ease-in-out, top 0.5s ease-in-out, left 0.5s ease-in-out, width 0.5s ease-in-out, height 0.5s ease-in-out, transform 0.5s ease-in-out, border-radius 0.5s ease-in-out;
}

/*--------------------
Chat Title
--------------------*/
.chat-title {
  -webkit-box-flex: 0;
      -ms-flex: 0 1 45px;
          flex: 0 1 45px;
  position: relative;
  z-index: 2;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  text-transform: uppercase;
  text-align: left;
  padding: 10px 10px 10px 50px;
}
.chat-title h1, .chat-title h2 {
  font-weight: normal;
  font-size: 10px;
  margin: 0;
  padding: 0;
}
.chat-title h2 {
  color: rgba(255, 255, 255, 0.5);
  font-size: 8px;
  letter-spacing: 1px;
}
.chat-title .avatar {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 9px;
  border-radius: 30px;
  width: 30px;
  height: 30px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.24);
}
.chat-title .avatar img {
  width: 100%;
  height: auto;
}

/*--------------------
Messages
--------------------*/
.messages {
  -webkit-box-flex: 1;
      -ms-flex: 1 1 auto;
          flex: 1 1 auto;
  color: #606060;
  overflow: hidden;
  position: relative;
  width: 100%;
}
.messages .messages-content {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
}
.messages .message {
  clear: both;
  float: left;
  padding: 6px 10px 7px;
  border-radius: 10px 10px 10px 0;
  background: #E6E6E6;
  margin: 8px 0;
  font-size: 14px;
  line-height: 1.4;
  margin-left: 35px;
  position: relative;
}
.messages .message .timestamp {
  position: absolute;
  bottom: -15px;
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
}
.messages .message::before {
  content: '';
  position: absolute;
  bottom: -6px;
  border-top: 6px solid #E6E6E6;
  left: 0;
  border-right: 7px solid transparent;
}
.messages .message .avatar,
.dialogo-confirmacao .avatar {
  position: absolute;
  z-index: 1;
  bottom: -15px;
  left: -35px;
  border-radius: 30px;
  width: 30px;
  height: 30px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.24);
}
.messages .message .avatar img,
.dialogo-confirmacao .avatar img {
  width: 100%;
  height: auto;
}
.messages .message.message-personal {
  float: right;
  color: #fff;
  text-align: right;
  background: #1E3580;
  border-radius: 10px 10px 0 10px;
}
.messages .message.message-personal::before {
  left: auto;
  right: 0;
  border-right: none;
  border-left: 5px solid transparent;
  border-top: 4px solid #1E3580;
  bottom: -4px;
}
.messages .message:last-child {
  margin-bottom: 30px;
}
.messages .message.new,
.dialogo-confirmacao.new {
  -webkit-transform: scale(0);
          transform: scale(0);
  -webkit-transform-origin: 0 0;
          transform-origin: 0 0;
  -webkit-animation: bounce 100ms linear both;
          animation: bounce 100ms linear both;
}
.messages .message.loading::before {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  content: '';
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #606060;
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
          animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  border: none;
  -webkit-animation-delay: .15s;
          animation-delay: .15s;
}
.messages .message.loading span {
  display: block;
  font-size: 0;
  width: 20px;
  height: 10px;
  position: relative;
}
.messages .message.loading span::before {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  content: '';
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #606060;
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
          animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  margin-left: -7px;
}
.messages .message.loading span::after {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  content: '';
  display: block;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #606060;
  z-index: 2;
  margin-top: 4px;
  -webkit-animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
          animation: ball 0.45s cubic-bezier(0, 0, 0.15, 1) alternate infinite;
  margin-left: 7px;
  -webkit-animation-delay: .3s;
          animation-delay: .3s;
}

/*--------------------
Message Box
--------------------*/
.message-box {
  -webkit-box-flex: 0;
      -ms-flex: 0 1 40px;
          flex: 0 1 40px;
  width: 100%;
  background: rgba(76, 18, 23, 0.3);
  padding: 10px;
  position: relative;
}
.message-box .message-input {
  background: none;
  border: none;
  outline: none !important;
  resize: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  height: 17px;
  margin: 0;
  padding-right: 20px;
  width: calc(100% - 26px);
}
.message-box textarea:focus:-webkit-placeholder {
  color: transparent;
}
.message-box .message-submit {
  position: absolute;
  z-index: 1;
  top: 9px;
  right: 10px;
  color: #fff;
  border: none;
  background: #1EC48D;
  font-size: 10px;
  text-transform: uppercase;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 10px;
  outline: none !important;
  -webkit-transition: background .2s ease;
  transition: background .2s ease;
}
.message-box .message-submit:hover {
  background: #58A3C4;
}

/*--------------------
Messages with images
--------------------*/

.message >  img,
.message > div img,
.search-result > fieldset > div img {
	display: block;
	max-width: 100%;
}

/*--------------------
Messages with buttons
--------------------*/

.message button {
	color: #fff;
	font-size: 14px;
	background: #1EC48D;
	border: none;
	border-radius: 2px;	
	text-align: left;
	cursor: pointer;
	
	margin-top: 2px;
	padding: 0.3em;
}

.message > button,
.message > p > button {
	display: block;
	width: 100%;	
	text-align: center;
}

.message button:hover {
  background: #58A3C4;
}

/*----------------------------------------------
Disabling the message box when buttons are shown
Or when the chat is finalized.
----------------------------------------------*/

.chat.loading .message-box,
.chat.showing-modal .message-box,
.chat.search-processing .message-box,
.chat.conversation-processing .message-box,
.chat.finalized .message-box {
	display: none;
}

/*--------------------
Login form
--------------------*/

.chat > .login {
	background: rgba(76, 18, 23, 0.3);
	padding: 2em;
	display: none;

	transition: opacity 0.2s ease-in-out;
}

.chat > .login label {
	color: white;
}

.chat > .login input {
	color: rgba(255, 255, 255, 0.7);
	background: none;
	border: none;
}

.chat > .login button {
	color: #fff;
	font-size: 14px;
	background: #1EC48D;
	border: none;
	border-radius: 2px;	
	cursor: pointer;
	
	margin-top: 2px;
	padding: 0.3em;
}

.chat > .login button:hover {
  background: #58A3C4;
}


.chat > .login > label,
.chat > .login > label > input {
	display: block;
}

.chat > .login > .erros {
	color: #fff;	
	background: #B43338;
	border-radius: 2px;	
	padding: 0.3em;
	list-style-type: none;
	display: none;
}

.chat > .login > .erros.tem-erro {
	display: block;
}

.chat.login-pendente > .login {
	display: block;
}

.chat.login-pendente > .chat-title,
.chat.login-pendente > .messages,
.chat.login-pendente > .message-box {
	display: none;
}

.chat.login-pendente > .login > .indicador-processamento {
	color: white;
	text-align: center;
	
	height: 0;
	opacity: 0;
	transform: rotate3d(1, 0, 0, 90deg);
	overflow: hidden;
	
	transition: opacity 0.5s ease-in-out, height 0.3s ease-in-out, transform 0.7s ease-in-out;
}

.chat.login-pendente > .login > .indicador-processamento i {
	font-size: 32px;
}

.chat.login-em-progresso > .login > .indicador-processamento {
	height: auto;
	opacity: 1;
	transform: none;
}

.chat.login-direto > .login > label,
.chat.login-direto > .login > button {
	display: none;
}

.chat.login-direto > .login > .indicador-processamento {
	padding-top: 2em;
}

.chat.initial-loading > .login {
	opacity: 0;
}

/*--------------------
Botões no topo da página
--------------------*/

.chat-title > .botoes-topo {
	position: absolute;
	top: 10px;
	right: 10px;
}

.chat-title > .botoes-topo > button {
	color: #fff;
	font-size: 14px;
	text-transform: none;
	background: #A42328;
	border: none;
	border-radius: 2px;	
	cursor: pointer;
	padding: 0.3em;
	
}

.chat-title > .botoes-topo > button:hover {
	background: #B43338;
}

.chat-title > .botoes-topo > button > .estreito {
	display: none;
}

.chat-title > .botoes-topo > .logoff {
	padding-left: 1em;
	padding-right: 1em;
}

.cliente-web .chat-title .top-10-assuntos {
	display: none;
}

/*--------------------
Reiniciar conversa
--------------------*/

.message > button.reiniciar-conversa {
	background: #A42328;
}

.message > button.reiniciar-conversa:hover {
	background: #B43338;
}

/*--------------------
Search results
--------------------*/

.search-results {
	list-style-type: none;
	padding: 0;
}

.search-result > h3 {
	color: #fff;
	text-decoration: underline;
	background: rgb(30, 196, 141);
	padding: 0.3em;
	padding-left: 1em;
	border-radius: 2px;
	margin-bottom: 0;
	cursor: pointer;
}

.search-result > h3:hover {
	background: #58A3C4;
}

.search-result > h3 > i {
	float: right;
}

.search-result > fieldset {
	border: none;
	background: rgba(0, 0, 0, 0.05);
	border-radius: 4px;
	padding-top: 1em;
	margin-top: 0;
}

.search-result > fieldset > legend {
	position: relative;
	top: 1em;
	font-weight: bold;
	color: #606060;
}

.search-result > fieldset > div a {
	/* Faz a quebra de linha funcionar para links longos https://stackoverflow.com/a/18484181/679240 */
	white-space: -moz-pre-wrap; /* Mozilla */
	white-space: -hp-pre-wrap; /* HP printers */
	white-space: -o-pre-wrap; /* Opera 7 */
	white-space: -pre-wrap; /* Opera 4-6 */
	white-space: pre-wrap; /* CSS 2.1 */
	white-space: pre-line; /* CSS 3 (and 2.1 as well, actually) */
	word-wrap: break-word; /* IE */
	word-break: break-all;
}

.search-result.collapsed > h3 > i:before {
	/* Turns fa-arrow-up into fa-arrow-down */
	content: "\f107";
}

.search-result.collapsed > fieldset {
	display: none;
}


/*--------------------
Error message
--------------------*/

.error-message {
	color: #F44;
}

/*--------------------
Visualizador Imagens
--------------------*/

.image-viewer {
	position: absolute;
	top: 0;
	left: 0;
	bottom: 0;
	right: 0;

	background: rgba(130, 32, 35, 0.4);
	color: white;
	display: none;
	
	perspective: 600px;
	transform: scale3d(0.1, 0.2, 0.2) rotate3d(1, 0.1, 0, 180deg);
	opacity: 0;
	
	transition: opacity 0.3s ease-in-out, transform 0.5s ease-in-out;
}

.image-viewer > h1 {
	margin: 8px;
	height: 32px;
	text-align: right;
}

.image-viewer > div {
	position: absolute;
	top: 48px;
	left: 0;
	bottom: 0;
	right: 0;
	overflow: auto;
}

.image-viewer.visivel {
	display: block;
	z-index: 1000;
}

.image-viewer.pronto {
	transform: none;
	opacity: 1;
}

/*--------------------
Custom Srollbar
--------------------*/
.mCSB_scrollTools {
  margin: 1mm -1.4mm 1mm 0;
  opacity: 0.6;
}

.mCSB_inside > .mCSB_container {
  margin-right: 0px;
  padding: 0 1.6mm;
}

.mCSB_scrollTools .mCSB_dragger .mCSB_dragger_bar {
  background-color: #E6E6E6 !important;
  width: 1mm;
}

/*--------------------
Diálogo de confirmação
--------------------*/

.dialogo-confirmacao {
	display: none;
	
	position: absolute;
	top: 60px;
	left: 0;
	right: 0;
	
	padding: 1em;
	margin-left: 41px;
	margin-right: 6px;
	
	border-radius: 10px 10px 10px 0;
	background: #E6E6E6;
}

.dialogo-confirmacao::before {
  content: '';
  position: absolute;
  bottom: -6px;
  border-top: 6px solid #E6E6E6;
  left: 0;
  border-right: 7px solid transparent;
}

.dialogo-confirmacao label {
	font-size: 18px;
	color: #606060;
	display: block;
}

.dialogo-confirmacao button {
	display: block;	
	
	width: 100%;
	
	color: #fff;
	font-size: 14px;
	background: #1EC48D;
	border: none;
	border-radius: 2px;	
	text-align: center;
	cursor: pointer;
	
	margin-top: 2px;
	padding: 0.3em;
}

.pedindo-confirmacao .dialogo-confirmacao {
	display: block;
}

.pedindo-confirmacao .messages {
	display: none;
}

/*--------------------
Bounce
--------------------*/
@-webkit-keyframes bounce {
  0% {
    -webkit-transform: matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  4.7% {
    -webkit-transform: matrix3d(0.45, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(0.45, 0, 0, 0, 0, 0.45, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  9.41% {
    -webkit-transform: matrix3d(0.883, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(0.883, 0, 0, 0, 0, 0.883, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  14.11% {
	  
    -webkit-transform: matrix3d(1.141, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(1.141, 0, 0, 0, 0, 1.141, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  18.72% {
    -webkit-transform: matrix3d(1.212, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(1.212, 0, 0, 0, 0, 1.212, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  24.32% {
    -webkit-transform: matrix3d(1.151, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(1.151, 0, 0, 0, 0, 1.151, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  29.93% {
    -webkit-transform: matrix3d(1.048, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(1.048, 0, 0, 0, 0, 1.048, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  35.54% {
    -webkit-transform: matrix3d(0.979, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(0.979, 0, 0, 0, 0, 0.979, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  41.04% {
    -webkit-transform: matrix3d(0.961, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(0.961, 0, 0, 0, 0, 0.961, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  52.15% {
    -webkit-transform: matrix3d(0.991, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(0.991, 0, 0, 0, 0, 0.991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  63.26% {
    -webkit-transform: matrix3d(1.007, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(1.007, 0, 0, 0, 0, 1.007, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  85.49% {
    -webkit-transform: matrix3d(0.999, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(0.999, 0, 0, 0, 0, 0.999, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  100% {
    -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
}
@keyframes bounce {
  0% {
    -webkit-transform: matrix3d(0.0, 0, 0, 0, 0, 0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(0.0, 0, 0, 0, 0, 0.0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  20% {
    -webkit-transform: matrix3d(1.05, 0, 0, 0, 0, 1.05, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(1.05, 0, 0, 0, 0, 1.05, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
  100% {
    -webkit-transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
            transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);
  }
}
@-webkit-keyframes ball {
  from {
    -webkit-transform: translateY(0) scaleY(0.8);
            transform: translateY(0) scaleY(0.8);
  }
  to {
    -webkit-transform: translateY(-10px);
            transform: translateY(-10px);
  }
}
@keyframes ball {
  from {
    -webkit-transform: translateY(0) scaleY(0.8);
            transform: translateY(0) scaleY(0.8);
  }
  to {
    -webkit-transform: translateY(-10px);
            transform: translateY(-10px);
  }
}

@media (min-width: 50em) and (min-aspect-ratio: 13/9) {
	.chat {
	  top: 50%;
	  left: 50%;
	  -webkit-transform: translate(-50%, -50%);
			  transform: translate(-50%, -50%);
	  width: 50em;
	  background: rgba(130, 32, 35, 0.4);
	}
}

/* Telas estreitas */

@media (max-width: 521px) {
	
	.chat-title > .botoes-topo > button > .normal {
		display: none;
	}
	
	.chat-title > .botoes-topo > button > .estreito {
		display: inline-block;
	}

	.bg .personagem,
	.bg > .logo {
		opacity: 0;
	}
}

/* Ajustes específicos para dispositivo móvel */

body.mobile {
	font-size: 18px;
}

.mobile .chat-title h1, 
.mobile .chat-title h2 {
	font-size: 12px;
}

.mobile .messages .message,
.mobile .message-box .message-input,
.mobile .message button,
.mobile .dialogo-confirmacao button {
	font-size: 18px;
}