
.bubble{
	border-radius: 5px;
	box-shadow: 0 0 6px #B2B2B2;
	display: inline-block;
	padding: 10px 18px;
	position: relative;
	vertical-align: top;
	min-width: 55%;
	
}

.bubble::before {
	content: "\00a0";
	display: block;
	height: 16px;
	position: absolute;
	top: 11px;
	transform:             rotate( 29deg ) skew( -35deg );
	-moz-transform:    rotate( 29deg ) skew( -35deg );
	-ms-transform:     rotate( 29deg ) skew( -35deg );
	-o-transform:      rotate( 29deg ) skew( -35deg );
	-webkit-transform: rotate( 29deg ) skew( -35deg );
	width:  20px;
}

.me {
	background-color: #F2F2F2;
	float: left;   
	margin: 5px 45px 5px 20px;         
}

.me::before {
	background-color: #F2F2F2;
	box-shadow: -2px 2px 2px 0 rgba( 178, 178, 178, .4 );
	left: -9px;           
}

.you {
	background-color: #CCCCCC;
	float: right;    
	margin: 5px 20px 5px 45px; 
	text-align: right;
}

.you::before {
	background-color: #CCCCCC;
	box-shadow: 2px -2px 2px 0 rgba( 178, 178, 178, .4 );
	right: -9px;    
}

.vivi-info-fixed {
	position: fixed;
	bottom: 10px;
	right: 10px;
	width: 10%;
	padding: 0px;
	border: none;
	z-index: 99;
	-webkit-transform: translate3d(0,0,0);
	-webkit-transition: all .25s ease;
	-moz-transition: all .25s ease;
	-ms-transition: all .25s ease;
	-o-transition: all .25s ease;
	transition: all .25s ease;
	text-align: center;
}

.vivi-creditos-icon {
	width: 18px;
	height: 18px;
	object-fit: contain;
	vertical-align: middle;
	background: transparent;
}

.vivi-chat-fullscreen {
	background: #f4f6f8;
	color: #1d2730;
	display: flex;
	height: 100vh;
	left: 0;
	position: fixed;
	top: 0;
	width: 100vw;
	z-index: 9999;
}

.vivi-chat-history {
	background: #253241;
	color: #fff;
	display: flex;
	flex: 0 0 300px;
	flex-direction: column;
	overflow: hidden;
	transition: flex-basis .2s ease, width .2s ease;
	width: 300px;
}

.vivi-chat-history.is-closed {
	flex-basis: 0;
	width: 0;
}

.vivi-history-header,
.vivi-chat-topbar {
	align-items: center;
	display: flex;
	justify-content: space-between;
	min-height: 64px;
	padding: 12px 16px;
}

.vivi-icon-button {
	min-height: 38px;
	min-width: 38px;
	padding: 8px !important;
}

.vivi-new-chat {
	margin: 0 14px 12px;
	text-align: left;
}

.vivi-start-modal-backdrop {
	align-items: center;
	background: rgba(15, 21, 29, .48);
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 20px;
	position: fixed;
	z-index: 10002;
}

.vivi-start-modal {
	background: #fff;
	border-radius: 6px;
	box-shadow: 0 18px 44px rgba(15, 21, 29, .28);
	color: #1d2730;
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 40px);
	max-width: 720px;
	width: min(720px, 100%);
}

.vivi-start-modal-head,
.vivi-start-modal-actions {
	align-items: center;
	display: flex;
	justify-content: space-between;
	padding: 14px 16px;
}

.vivi-start-modal-head {
	border-bottom: 1px solid #d8dee6;
}

.vivi-start-modal-body {
	display: grid;
	gap: 8px;
	overflow-y: auto;
	padding: 16px;
}

.vivi-start-modal-body label {
	color: #607080;
	font-size: 12px;
	font-weight: bold;
}

.vivi-start-modal-body textarea {
	min-height: 220px;
	resize: vertical;
}

.vivi-start-modal-actions {
	border-top: 1px solid #d8dee6;
	gap: 8px;
	justify-content: flex-end;
}

.vivi-history-loading {
	color: rgba(255, 255, 255, .72);
	font-size: 12px;
	padding: 0 18px 10px;
}

.vivi-history-list {
	flex: 1;
	overflow-y: auto;
	padding: 0 10px 14px;
}

.vivi-history-item {
	align-items: stretch;
	border-radius: 6px;
	display: flex;
	margin-bottom: 6px;
	overflow: hidden;
}

.vivi-history-item.is-active {
	background: rgba(255, 255, 255, .14);
}

.vivi-history-select {
	background: transparent;
	border: none;
	color: inherit;
	cursor: pointer;
	flex: 1;
	min-width: 0;
	padding: 10px;
	text-align: left;
}

.vivi-history-title {
	display: block;
	font-weight: bold;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vivi-history-select small {
	color: rgba(255, 255, 255, .68);
	display: block;
	margin-top: 3px;
}

.vivi-history-remove {
	background: transparent !important;
	color: rgba(255, 255, 255, .78) !important;
	flex: 0 0 42px;
	padding: 8px !important;
}

.vivi-chat-main {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.vivi-chat-topbar {
	background: #fff;
	border-bottom: 1px solid #d8dee6;
	flex: 0 0 auto;
}

.vivi-chat-title {
	align-items: center;
	display: flex;
	gap: 12px;
	min-width: 0;
}

.vivi-chat-title img {
	height: 42px;
	object-fit: contain;
	width: 42px;
}

.vivi-chat-title b,
.vivi-chat-title span {
	display: block;
	line-height: 1.2;
}

.vivi-chat-title span {
	color: #607080;
	font-size: 12px;
}

.vivi-chat-actions {
	display: flex;
	gap: 8px;
	position: relative;
}

.vivi-token-panel {
	position: relative;
}

.vivi-voice-button {
	min-height: 38px;
	min-width: 42px;
	padding: 8px 10px !important;
}

.vivi-token-button {
	align-items: center;
	display: flex !important;
	gap: 6px;
	min-height: 38px;
}

.vivi-token-details {
	background: #fff;
	border: 1px solid #d8dee6;
	border-radius: 6px;
	box-shadow: 0 10px 28px rgba(25, 33, 43, .18);
	color: #1d2730;
	min-width: 280px;
	padding: 8px;
	position: absolute;
	right: 0;
	top: 46px;
	z-index: 10001;
}

.vivi-token-row {
	border-bottom: 1px solid #edf1f5;
	display: grid;
	gap: 4px 10px;
	grid-template-columns: minmax(0, 1fr) auto;
	padding: 8px;
}

.vivi-token-row:last-child {
	border-bottom: 0;
}

.vivi-token-row b {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vivi-token-row span {
	font-weight: bold;
}

.vivi-token-row small {
	color: #607080;
	grid-column: 1 / -1;
}

.vivi-token-empty {
	color: #607080;
	padding: 10px;
}

.vivi-chat-content {
	display: grid;
	flex: 1;
	grid-template-columns: minmax(0, 1fr);
	min-height: 0;
}

.vivi-chat-content.has-details {
	grid-template-columns: minmax(0, 1fr) minmax(320px, 38vw);
}

.vivi-chat-column {
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.vivi-chat-messages {
	align-content: flex-start !important;
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 2px;
	justify-content: flex-start !important;
	min-height: 0;
	overflow-y: auto;
	padding: 2px 4px;
	row-gap: 2px !important;
}

.vivi-message {
	border: 1px solid rgba(120, 132, 145, .35) !important;
	border-radius: 4px;
	box-shadow: none !important;
	display: block !important;
	flex: 0 0 auto !important;
	height: auto !important;
	line-height: 1.2 !important;
	margin-bottom: 2px !important;
	max-width: min(90ch, 70%);
	min-height: 0 !important;
	overflow-wrap: anywhere;
	padding: 1mm !important;
	white-space: normal !important;
	width: fit-content;
}

.vivi-message.is-vivi {
	align-self: flex-start;
	background: #dfe8f1;
	margin: 0;
	text-align: left;
}

.vivi-message.is-user {
	align-self: flex-end;
	background: #2f4358;
	color: #fff;
	margin: 0;
	text-align: left;
}

.vivi-chat-messages .center-text {
	align-self: center;
	text-align: center;
}

.vivi-message-line {
	align-items: flex-start;
	display: inline-flex;
	gap: 3px;
}

.vivi-message-avatar {
	flex: 0 0 14px;
	height: 14px;
	margin-top: -1px;
	object-fit: contain;
	width: 14px;
}

.vivi-message-text {
	display: block;
	min-width: 0;
	white-space: pre-wrap;
}

.vivi-message-tokens {
	color: #7b8794;
	display: block;
	font-size: 10px;
	line-height: 1.2;
	margin-top: 1px;
	text-align: right;
}

.vivi-chat-messages::after {
	clear: both;
	content: "";
	display: block;
}

.vivi-orcamento-panel {
	background: #fff;
	border: 1px solid #d8dee6;
	border-radius: 6px;
	clear: both;
	margin: 16px auto;
	max-width: 980px;
	padding: 14px;
}

.vivi-orcamento-head,
.vivi-orcamento-cliente,
.vivi-orcamento-item-title {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: space-between;
}

.vivi-orcamento-head {
	border-bottom: 1px solid #edf1f5;
	margin-bottom: 10px;
	padding-bottom: 10px;
}

.vivi-orcamento-head span,
.vivi-orcamento-item-title span,
.vivi-orcamento-detalhe small,
.vivi-orcamento-resolvido small {
	color: #607080;
	font-size: 12px;
}

.vivi-orcamento-cliente {
	background: #eef2f6;
	border-radius: 6px;
	margin-bottom: 10px;
	padding: 10px;
}

.vivi-orcamento-item {
	border-top: 1px solid #edf1f5;
	padding: 10px 0;
}

.vivi-orcamento-item-title b {
	overflow-wrap: anywhere;
}

.vivi-orcamento-resolvido {
	color: #1f6f43;
	margin-top: 6px;
}

.vivi-orcamento-candidatos {
	display: grid;
	gap: 6px;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	margin-top: 8px;
}

.vivi-orcamento-candidatos button {
	text-align: left;
}

.vivi-orcamento-candidatos small {
	color: #607080;
	display: block;
}

.vivi-orcamento-detalhe {
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(0, 1fr) auto;
	margin-top: 8px;
}

.vivi-orcamento-detalhe small {
	grid-column: 1 / -1;
}

.vivi-chat-composer {
	align-items: flex-end;
	background: #fff;
	border-top: 1px solid #d8dee6;
	display: grid;
	gap: 4px;
	grid-template-columns: minmax(0, 1fr) auto;
	padding: 4px;
}

.vivi-chat-composer textarea {
	max-height: 160px;
	min-height: 58px;
	resize: vertical;
	width: 100%;
}

.vivi-composer-actions {
	align-items: stretch;
	display: grid;
	gap: 4px;
	grid-template-columns: 40px minmax(104px, 1fr);
	grid-template-rows: auto auto auto;
	min-width: 136px;
}

.vivi-chat-type-label {
	color: #607080;
	font-size: 12px;
	font-weight: bold;
	line-height: 1;
	text-align: right;
	white-space: nowrap;
	grid-column: 1 / -1;
}

.vivi-model-menu {
	grid-column: 1 / -1;
	position: relative;
}

.vivi-model-button {
	align-items: center;
	display: flex !important;
	gap: 4px;
	justify-content: center;
	max-width: none;
	min-height: 34px;
	padding: 6px !important;
	width: 100%;
}

.vivi-model-button span {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.vivi-model-options {
	background: #fff;
	border: 1px solid #d8dee6;
	border-radius: 6px;
	bottom: 48px;
	box-shadow: 0 10px 28px rgba(25, 33, 43, .18);
	display: grid;
	gap: 4px;
	max-height: 260px;
	min-width: min(520px, 70vw);
	overflow-y: auto;
	padding: 8px;
	position: absolute;
	right: 0;
	z-index: 10001;
}

.vivi-model-options button {
	background: #fff;
	border: 1px solid #edf1f5;
	color: #1d2730;
	text-align: left;
	white-space: normal;
}

.vivi-model-options button.is-active {
	background: #eef2f6 !important;
	border-color: #9fb1c2;
	font-weight: bold;
}

.vivi-chat-details {
	background: #19212b;
	border-left: 1px solid #303c49;
	min-height: 0;
	padding: 12px;
}

.vivi-chat-details textarea {
	background: #0f151d;
	border: 1px solid #3b4754;
	color: #e8eef5;
	height: 100%;
	resize: none;
	width: 100%;
}

@media (max-width: 860px) {
	.vivi-chat-history {
		bottom: 0;
		box-shadow: 0 0 24px rgba(0, 0, 0, .25);
		left: 0;
		position: fixed;
		top: 0;
		z-index: 10000;
	}

	.vivi-chat-content.has-details {
		grid-template-columns: 1fr;
	}

	.vivi-chat-details {
		border-left: 0;
		border-top: 1px solid #303c49;
		height: 38vh;
	}

	.vivi-message {
		max-width: 88%;
	}

	.vivi-chat-composer {
		grid-template-columns: 1fr;
	}

	.vivi-composer-actions,
	.vivi-chat-actions {
		justify-content: flex-end;
	}

	.vivi-chat-actions {
		flex-wrap: wrap;
	}

	.vivi-token-details {
		left: auto;
		max-width: calc(100vw - 24px);
		min-width: 240px;
		right: 0;
	}

	.vivi-model-options {
		min-width: calc(100vw - 32px);
	}
}
