@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap');
::selection{
    color: #fff;
    background: #e74c3c;
}

::-webkit-scrollbar{
    width: 3px;
    border-radius: 25px;
}
::-webkit-scrollbar-track{
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb{
    background: #ddd;
}
::-webkit-scrollbar-thumb:hover{
    background: #ccc;
}
.chatbot{
	position:fixed;
	z-index:999;
	width: 100%;
	max-width:355px;
	bottom:0;
	right:4px;
	display:none;
    font-family: Poppins;
}
.chatbot-minimized {
	transition: all .5s ease-in-out, left 0s;
	transform: translateY(461px);
}
.chatbot-maximized {
	transition: all .5s ease-in-out, left 0s;
}
.flatchat{
	position:relative;
	z-index:999;
	width: 100%;
}	
.wrapper{
    width: 355px;
    background: #f7f4f4;
    border-radius: 5px;
    border-top: 0px;
}
.wrapper .title{
    width: 355px;
    height: 44px;
	background: #e74c3c;
    color: #fff;
    font-size: 20px;
    font-weight: 500;
    line-height: 24px;
    text-align: left;
    border-bottom: 1px solid #898989;
    border-radius: 5px 5px 0 0;
	overflow: hidden;
	}
.wrapper .title-logo{
	width: 12%;
	float: left;
}
.wrapper .title-logo img{
	width: 100%;
	border-radius: 50%;
	padding: 2px;
}
.wrapper .title-operadora{
	float: left;
	width: 76%;
}
.wrapper .title-operadora-h1{
	font-size: 16px;
	padding-left: 15px;
	display:block;
}
.wrapper .title-operadora-h2{
	font-size: 12px;
	padding-left: 15px;
	display:block;
}
.wrapper .title-ctrl{
	float: left;
	width: 12%;
	padding: 12px 12px 5px 12px;
}
.wrapper .title-ctrl a{
	color: white;
}
.wrapper .form{
    width: 100%;
	padding: 20px 15px;
    min-height: 400px;
    max-height: 400px;
    overflow-y: auto;
}
.wrapper .form .inbox{
    width: 100%;
    display: flex;
    align-items: baseline;
}
.wrapper .form .user-inbox{
    justify-content: flex-end;
    margin: 13px 0;
}
.wrapper .form .inbox .icon{
    height: 40px;
    width: 40px;
    color: #fff;
    text-align: center;
    line-height: 40px;
    border-radius: 50%;
    font-size: 18px;
	background-image: url(img/sinagente.png?1);
	background-size: cover;
}
.wrapper .form .inbox .msg-header{
    max-width: 75%;
    margin-left: 10px;
}
.form .inbox .msg-header p{
    color: #fff;
    background: #e74c3c;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 12px;
}
.form .user-inbox .msg-header p{
    color: white;
    background: #333;
}
.wrapper .typing-field{
    display: flex;
    height: 60px;
    width: 100%;
    align-items: center;
    justify-content: space-evenly;
    background: #efefef;
    border-top: 1px solid #d9d9d9;
    border-radius: 0 0 5px 5px;
}
.wrapper .typing-field .input-data{
    height: 40px;
    width: 335px;
    position: relative;
}
.wrapper .typing-field .input-data input{
    height: 100%;
    width: 100%;
	max-height: 30px;
    outline: none;
    border: 1px solid transparent;
    padding: 0 80px 0 15px;
    border-radius: 3px;
    font-size: 15px;
    background: #fff;
    transition: all 0.3s ease;
}
.typing-field .input-data input:focus{
    border-color: rgba(0,123,255,0.8);
}
.input-data input::placeholder{
    color: #999999;
    transition: all 0.3s ease;
}
.input-data input:focus::placeholder{
    color: #bfbfbf;
}
.wrapper .typing-field .input-data button{
    position: absolute;
    right: 5px;
    top: 40%;
    height: 25px;
    width: 65px;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    outline: none;
    opacity: 0;
    pointer-events: none;
    border-radius: 3px;
    background: #e74c3c;
    border: 1px solid #e74c3c;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}
.wrapper .typing-field .input-data input:valid ~ button{
    opacity: 1;
    pointer-events: auto;
}
.typing-field .input-data button:hover{
    background: #e74c3c;
}
.chat-body{
  position: relative; /* clave para overlay absoluto */
}

.chat-overlay{
  position: absolute;
  left: 0;
  right: 0;
  top: 0;      /* empieza debajo del header porque está dentro del body */
  bottom: 0;
  background: rgba(0,0,0,0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;           /* arriba del contenido */
  pointer-events: auto;  /* captura clicks */
  color: #e74c3c;
}

/* Bloquea clics en el contenido del body cuando overlay está activo */
.chat-body.overlay-active > *:not(.chat-overlay){
  pointer-events: none;
  user-select: none;
  filter: blur(0.3px);   /* opcional suave */
}

/* Card del overlay */
.chat-overlay-card{
  width: 85%;
  max-width: 320px;
  background: rgba(255,255,255,0.95);
  border-radius: 14px;
  padding: 16px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
}

.chat-overlay-icon{
  width: 56px;
  height: 56px;
  margin: 0 auto 10px auto;
  border-radius: 50%;
  background: #111;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
}

.chat-overlay-title{
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.chat-overlay-text{
  font-size: 14px;
  opacity: 0.85;
  margin-bottom: 12px;
}

.chat-overlay-btn{
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.opciones {
    padding-top: 7px;
    padding-bottom: 7px;
    margin-top: 8px;
    border: 1px solid #e74c3c73;
    color: #E74C3C;
    background-color: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
    transition: border-color 150ms;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 8px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    font-weight: 600;
    line-height: 20px;
	float: right;
	width: 80%;
}
.opciones:hover {
    border-color: #E74C3C;
	cursor: pointer;
}

#escribiendo {
	margin: 8px 0;
	color: #898989 !important;
}
#escribiendo span {
	display: inline-block;
	width: 6px;
	height: 6px;
	margin-right: 3px;
	background: #999;
	border-radius: 50%;
	animation: typing 1s infinite;
	opacity: .3;
}
#escribiendo span:nth-child(2) { animation-delay: 0.2s; }
#escribiendo span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
	0%   { transform: translateY(0);   opacity: .3; }
	50%  { transform: translateY(-4px); opacity: 1; }
	100% { transform: translateY(0);   opacity: .3; }
}

@media handheld, only screen and (max-width: 600px) {
	.chatbot-minimized {
		transform: translateY(411px);
	}
	.wrapper .form {
		min-height: 350px;
		max-height: 350px;
	}
}
