/* CONTENEUR GLOBALE DU CHATBOT */
div#chatbot-container {
	position: fixed;
	bottom: 80px;
	right: 20px;
	z-index: 100;
	width: 500px;
    display: block;
    margin: auto;   
    padding: 15px;
    border-radius: 10px; 
    font-size: 0.8em;
}

/* BOUTON DE LA BULLE */
#chatbot-toggle {
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 1000;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	font-size: 24px;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	transition: background 0.7s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chatbot-toggle-icon {
	transition: opacity 0.5s ease-out;
}

.chatbot-toggle-icon.fade-out {
	opacity: 0;
}

#chatbot-container img#chatbot-toggle-icon {
    width: 40px !important;
    margin: 0 !important;
    padding: 0 !important;
}


/* MESSAGE */
#chatbot-tooltip {
	position: fixed;
	bottom: 30px;
	right: 90px;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 14px;
	white-space: nowrap;
	box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.25);
	z-index: 1001;
	opacity: 0;
	transition: opacity 0.3s ease;
	pointer-events: none;
    backdrop-filter: blur(10px);
}

#chatbot-tooltip.show {
	display: block;
	opacity: 1;
}

/* ZONE GLOBALE DE L'UTILISATION DU CHATBOT */
#chatbot {
	display: none;
    backdrop-filter: blur(10px);
	padding: 25px;
    border-radius: 10px;
	box-shadow: 0px 0px 30px 0px rgba(0, 0, 0, 0.25);
}

#chatbot-messages, #chatbot-input, #chatbot-response {
	color: black;
}

/* ZONE DE GENERATION */
#chatbot-messages{
	display: block;
    margin: 0 auto 40px;
	height: 450px;
	overflow-y: scroll;
	padding: 0 20px;
}

.question-user{
    text-align: right;
	font-size: 1em!important;
	line-height: 1.5em;
}
		
.response-ok{
	text-align: left;
	font-size: 1em!important;
	line-height: 1.5em;
}

.response-error{
	color: red;
    text-align: center;
    font-weight: bold;
	font-size: 1em!important;
	line-height: 1.5em;
}

.url_chatbot:hover{
	transition: 0.3s;
}

/* Réflexion du ChatBOT */
div#chatbot-loading {
    position: absolute;
    bottom: 80px;
}

.chatbot-thinking {
	font-style: italic;
    padding: 0 20px;
    font-size: 1em!important;
}
		
@keyframes blink {
	0%   { opacity: 0.2; }
	20%  { opacity: 1; }
	100% { opacity: 0.2; }
}

.dots::after {
	content: '...';
	animation: blink 1.4s infinite;
}

/* DIV DU BAS */
#chatbot-form {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 15px;
}

/* BARRE DE PROMPT */
#chatbot-input {
    margin: auto;
    display: block;
    width: -webkit-fill-available;
	flex: 1;
	padding: 8px 12px;
	border-radius: 10px;
	border: none;
	font-size: 14px!important;
}

#chatbot-input::placeholder{
  font-size: 1em;
}

/* BOUTON RESET ET ENVOI */
#chatbot-form button#chatbot-send {
    -webkit-mask-image: url(/wp-content/plugins/chatbot-atd/img/svg/paper-plane-solid-full.svg);
    mask-image: url(/wp-content/plugins/chatbot-atd/img/svg/paper-plane-solid-full.svg);
}

#chatbot-form button#chatbot-reset {
    -webkit-mask-image: url(/wp-content/plugins/chatbot-atd/img/svg/arrow-rotate-right-solid-full.svg);
    mask-image: url(/wp-content/plugins/chatbot-atd/img/svg/arrow-rotate-right-solid-full.svg);
}

/* Style commun + couleur */
#chatbot-form button#chatbot-send,
#chatbot-form button#chatbot-reset {
    display: flex;
    padding: 5px;
    background-color: #ffffff; /* couleur des icônes */
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 16px;
    height: 40px;
    width: 35px;

    background-repeat: no-repeat;
    background-position: center;
    background-size: 75%;

    /* Propriétés du masque */
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;

    -webkit-mask-position: center;
    mask-position: center;

    -webkit-mask-size: 75%;
    mask-size: 75%;
}

#chatbot-form button#chatbot-reset:hover {
    transition: 0.5s;
    transform: rotate(360deg);
}

/* RESPONSIVE */
@media only screen and (max-width: 600px) {

	div#chatbot-container {
		width: 100%!important;
		right: 0!important;
		bottom: -1.2%!important;
		border-radius: 0;
		padding: 10px 0!important;
    	z-index: 999!important;
	}
	
	#chatbot{
		border-radius: 0!important;
	}

	button#chatbot-send, button#chatbot-reset{
		margin: 15px auto;
		display: block;
		width: 75%;
	}

	#chatbot-input {
		width: 70% !important;
	}
	
	#chatbot-messages {
    	height: 350px;
	}
	
	#chatbot-form {
    	margin-bottom: 50px!important;
	}
	
	/* Réflexion du ChatBOT */
	div#chatbot-loading {
		position: absolute;
		bottom: 120px;
	}
	
	#chatbot-form button#chatbot-send, #chatbot-form button#chatbot-reset {
		width: 9%;
	}
	
}