/**************************************
Table of Content

01. MATERIAL OVERRIDES
02. OPEN SEARCH
03. CHATBOT MODAL
04. CHATBOT HEADER
05. CHATBOT BODY
06. CHATBOT FOOTER
**************************************/

:root {
	--primary-color: #295D92;
	--chat-message-side: 5rem;
}



/**************************************
MATERIAL OVERRIDES
**************************************/
.mdc-chatbot-ai input:not([type]):focus:not([readonly]),
.mdc-chatbot-ai input[type="text"]:focus:not([readonly]) {
	border-bottom-color: var(--primary-color);
	box-shadow: var(--primary-color) 0px 1px 0px 0px
}


.right-content {
	padding-top: 0 !important;
}


button#send-btn:disabled, button#send-btn[disabled] {
	background-color: transparent !important;
} 



:is(button#send-btn:disabled, button#send-btn[disabled]) svg {
	fill: #9e9e9e;
}


:is(button#send-btn:disabled, button#send-btn[disabled]):is(:hover, :focus) {
	cursor: not-allowed;
}


/**************************************
OPEN SEARCH
**************************************/

mdc-tabs .toggle {
	width: 100% !important;
}

mdc-tabs .toggle label {
	height: auto !important;
}


/**************************************
CHATBOT MODAL
**************************************/

.mdc-chatbot-ai .card .card-body {
	display: grid;
	place-items: center;

	padding: 2.5rem;
}

.mdc-chatbot-ai .card .card-body h2 {
	margin-top: 1rem;
}

.mdc-chatbot-ai .card .card-body .text-center {
	text-align: center;
}

.mdc-chatbot-ai .card .card-body .text-center p:last-child {
	margin-bottom: 0;
}

/**************************************
CHATBOT HEADER
**************************************/

.mdc-chatbot {
	margin-top: 0;
}

.mdc-chatbot__header {
	background-color: var(--primary-color);
	padding: 1rem;

	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}


.mdc-chatbot__header__svg {
	background-color: #fff;
	aspect-ratio: 1/1;
	width: 35px;
	border-radius: 50%;

	display: grid;
	place-items: center;
}

.mdc-chatbot__header__svg svg {
	--svg-size: 16px;

	fill: var(--primary-color);
	width: var(--svg-size);
	height: var(--svg-size);
}

.mdc-chatbot__header__title {
	font-size: 1.6rem;
	color: #fff;
	margin-top: 0;
	line-height: 1;
}


/**************************************
CHATBOT BODY
**************************************/

.mdc-chatbot__welcome {
	margin-top: 15px;
	font-weight: 500;
}

.mdc-chatbot-ai .chatbot-body {
	padding-inline: 1rem;
}

.mdc-chatbot-ai .chatbot-body .chat-message {
	padding: 1em;
	border-radius: 15px;
	width: fit-content;
}

.mdc-chatbot-ai .chatbot-body .mdc-chatbot__list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.mdc-chatbot-ai .chatbot-body .mdc-chatbot__list > * {
	flex: 0 0 auto; /* This makes each item take only the height it needs */
}


.mdc-chatbot-ai .chatbot-body .chat-message:not(.user-message) {
	background-color: #ebebeb;
	margin-right: var(--chat-message-side);

	align-self: flex-start;
}

.mdc-chatbot-ai .chatbot-body .user-message {
	background-color: var(--primary-color);
	color: #fff;
	margin-left: var(--chat-message-side);

	align-self: flex-end;
}


.mdc-chatbot__list:not(:empty) {
	height: 400px;
	overflow-y: auto;
}

/**************************************
CHATBOT MESSAGE
**************************************/

.mdc-chatbot__clear {
	margin-left: auto;
	color: var(--primary-color);
}

.chat-message .chat__image-container {
	--min-column-size: 16rem;
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(min(var(--min-column-size),100%),1fr));
    grid-gap: 1.5rem;

    margin-block: 1rem;
}


.chat__image-picture {
    aspect-ratio: 1/1;
}

.chat__image-picture img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


.chat__image-title,
.ref-item span {
	text-transform: capitalize;
}

.chat__image-title span{
	font-weight: bold;
}

.chat__adobt-text {
	margin-bottom: 1rem;
    font-weight: 500;
}


.modal-content pre {
	font-family: "Roboto", sans-serif;
}


.chat-message-markdown {

	display: grid;
	gap: 1rem;
	white-space: pre-wrap;

	& > p {
		margin-bottom: 0;
	}

	& ol, & ul, & li {
		display: grid;
	}

	& li:has(> :is(a, strong)) {
		display: inline;
	}


	& ol, & ul {
	  list-style-position: outside;
	  padding-left: 2rem;
	  margin: 1rem 0;

	  gap: 1rem;
	}


	& ol {
	  list-style-type: decimal;
	  margin-block: 0;
	}

	& ul {
	  list-style-type: disc;
	  padding-left: 1.5rem;
	  margin-block: 0;
	}

	& ol li, & ul li {
	  margin-bottom: 0;
	  padding-bottom: 0;
	}

	& ol li ul, & ul li ul {
	  list-style-type: disc;
	  padding-left: 1.5rem;
	  margin-top: 0.5rem;
	  margin-bottom: 0.5rem;
	}

	& ol li p, & ul li p {
	  margin: 0;
	  display: inline; /*optional: helps avoid block spacing issues if markdown wraps text in <p>*/
	}

	& ul li {
	  margin-bottom: 0; /* if you want tighter sub-list spacing */
	}
}



/**************************************
CHATBOT LOADING
**************************************/
.loadingContainer {
    position:relative;
    width:110px;
}
.loadingContainer div {
    height:10px;
    width:10px;
    border-radius:50%;
    background: black;
    float:left;
    margin:0 3px;
    background:#6859a3;
}
.loadingContainer .ball1 {
    z-index:1;
    -moz-animation: bounce 3s infinite ease-in-out;
    -webkit-animation: bounce 3s infinite ease-in-out;
}
.loadingContainer .ball2 {
    -moz-animation: bounce 3s infinite ease-in-out;
    -webkit-animation: bounce 3s infinite ease-in-out;
    -webkit-animation-delay: 0.5s;
    animation-delay: 0.5s;
}
.loadingContainer .ball3 {
    -moz-animation: bounce 3s infinite ease-in-out;
    -webkit-animation: bounce 3s infinite ease-in-out;
    -webkit-animation-delay: 1s;
    animation-delay: 1s;
}
.loadingContainer .ball4 {
    -moz-animation: bounce 3s infinite ease-in-out;
    -webkit-animation: bounce 3s infinite ease-in-out;
    -webkit-animation-delay: 1.5s;
    animation-delay: 1.5s;
}

@-moz-keyframes bounce {
    0%,15% {-moz-transform: translate(0,0);}
    50% {-moz-transform: translate(0,-10px);background:var(--primary-color);}
    85%, 100% {-moz-transform: translate(0,0);}
}
@-webkit-keyframes bounce {
    0%,20% {-webkit-transform: translate(0,0);}
    50% {-webkit-transform: translate(0,-10px);background:var(--primary-color);}
    80%, 100% {-webkit-transform: translate(0,0);}
}

/**************************************
CHATBOT MODAL
**************************************/

.chatbot-modal {
	top: 150px;
	z-index: 2;
}


.modal-content {
	display: grid;
}

.modal-close {
	margin-left: auto;
}


/**************************************
CHATBOT FOOTER
**************************************/


.mdc-chatbot-ai .chatbot-footer {
	padding-inline: 1rem;
	padding-bottom: 1rem;

	display: grid;
	grid-template-areas: "input";
	align-items: center;
}

.mdc-chatbot-ai .chatbot-footer > * {
	grid-area: input;
}


.mdc-chatbot-ai .chatbot-footer .btn {
	background-color: transparent;
	border: none;
	box-shadow: none;
	padding-inline: 15px;
	justify-self: flex-end;
}

.mdc-chatbot-ai .chatbot-footer svg {
	fill: var(--primary-color);
}


.mdc-chatbot-ai .chatbot-footer input {
	border: 1px solid #bbb;
    box-shadow: 0 2px 2px #00000029, 0 0 0 1px #00000014;
    padding-inline: 0.5rem 3.5rem;
    margin: 0;
    width: auto;
}




.mdc-chatbot-ai__disclaimer-container {
	padding: 2rem;
}

.mdc-chatbot-ai__disclaimer-title {
	margin-top: 0;
}

.mdc-chatbot-ai__disclaimer-list {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}



.mdc-chatbot-ai__disclaimer-hidden {
    display: none;
}

.mdc-chatbot-ai__disclaimer-visible {
    display: block;
}