/*TMP*/
#chatbase-bubble-button {
	display: none;
} 

.aiBarOpened {
	overflow: hidden !important;
	height: 100dvh !important;
	padding-top: 0 !important;
	border: 1px solid red;
}

#modMnAiCanvas {
	position: fixed;
	bottom: 0;
	right: 0;
	width: 400px;  
	height: 400px;
	z-index: 0;
	display: block;
	z-index: 10;
	pointer-events: none;
	background-color: transparent;
	opacity: 0;
	background-color: transparent;
}

#modMnAiCanvas.canvas-ready {
	opacity: 1;
}

#modMnAiWidget {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 66px;
	height: 66px;
	aspect-ratio: 1/1;
	display: flex;
	border-radius: 16px;
	background: linear-gradient(41deg, #4C1D95 5.19%, #0E7490 49.18%, #15803D 95.78%);
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.10), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	z-index: 10;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.modMnAiWidgetIcon {
	width: 100%;
	height: 100%;
	border-radius: 16px;
	background-image: url('../images/eagle.png');
	background-repeat: no-repeat;
	background-size: 90px auto; 
	background-position: center -5px;
	position: relative;
	z-index: 1;
}

#modMnAiWidget::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 16px;
	box-shadow: inset 0 2px 4px 1px #FFF;
	mix-blend-mode: overlay;
	pointer-events: none;
	transition: box-shadow 0.2s ease;
	z-index: 2;
}

@media (hover : hover) {
	#modMnAiWidget:hover {
		transform: scale(1.05);
		box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	}
}

@media (hover : hover) {
	#modMnAiWidget:hover::after {
		box-shadow: inset 0 2px 4px 2px #FFF;
	}
}

#modMnAiBubbles {
	position: fixed;
	bottom: 100px; 
	right: 24px;
	width: 300px;
	display: flex;      
	flex-direction: column;
	align-items: flex-end;
	gap: 0;             
	z-index: 10;
	pointer-events: none;
}

#bubbles-close {
	display: none;
	padding: 4px;
	margin-bottom: 0; 
	justify-content: center;
	align-items: center;
	border-radius: 67px;
	border: 1px solid rgba(255, 255, 255, 0.80);
	background: rgba(255, 255, 255, 0.70);
	box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.20);
	backdrop-filter: blur(7px);
	cursor: pointer;
	pointer-events: auto;
	transition: transform 0.2s, background 0.2s;
	z-index: 5;
}

@media (hover : hover) {
	#bubbles-close:hover {
		background: rgba(255, 255, 255, 0.90);
		transform: scale(1.1);
	}
}

.bubbles-message {
	padding: 12px 16px;
	border-radius: 12px;
	border: 1px solid rgba(255, 255, 255, 0.80);
	background: rgba(255, 255, 255, 0.60);
	box-shadow: 0 3px 5px 0 rgba(0, 0, 0, 0.20);
	backdrop-filter: blur(7.5px);
	
	color: #3F3F46;
	font-family: 'Inter', sans-serif;
	font-size: 17px;
	font-weight: 400;
	line-height: 130%;
	letter-spacing: -0.17px;
	
	pointer-events: auto;
	max-width: 260px;

	/* animacja */
	opacity: 0;
	transform: translateY(20px) scale(0.95);
	transform-origin: bottom right;
	margin-top: -20px;
	animation: bubbleEnter 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Styl kontenera (DIV) - początkowo ukryty poza ekranem */
.ai-widget-container {
	position: fixed;
	top: 0;
	right: 0;
	min-width: 400px;
	width: 20vw;        /* 30% szerokości ekranu */
	height: 100dvh;      /* 100% wysokości ekranu */
	background: var(--colors-zinc-100, #F4F4F5);
	box-shadow: -69px -82px 30px 0 rgba(0, 0, 0, 0.00), -44px -52px 27px 0 rgba(0, 0, 0, 0.01), -25px -29px 23px 0 rgba(0, 0, 0, 0.05), -11px -13px 17px 0 rgba(0, 0, 0, 0.09), -3px -3px 9px 0 rgba(0, 0, 0, 0.10);
	z-index: 9999;
	/* Animacja wjazdu */
	transform: translateX(100%); /* Przesunięcie o 100% w prawo (poza ekran) */
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1); /* Płynne wejście */
	display: flex;
	flex-direction: column;
}

.mobileBody .ai-widget-container {
	bottom: 0;
	right: 0;	
	transform: translateY(100%);
	transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.darkMode .ai-widget-container {
	background: #18181B;
}

/* Klasa dodawana przez JS, aby wsunąć widget */
.ai-widget-container.active {
	transform: translateX(0);
}

.mobileBody .ai-widget-container.active {
	transform: translateY(0) !important;
}

.mobileBody .ai-widget-container {
	min-width: 100%;
}


/* Styl samego iframe */
.ai-widget-iframe {
	width: 100%;
	height: 100%;
	border: none;
	flex-grow: 1;
	position: relative;
	z-index: 3;
}

#ai-generated-panel-loader {
	width: 60px;
	aspect-ratio: 1 / 1;
	position: absolute;
	top: 50%;
	left: 50%;
	margin-left: -30px;
	margin-top: -30px;
	z-index: 1;

	border: 5px solid #0f8075;
	border-bottom-color: transparent;
	border-radius: 50%;
	display: inline-block;
	box-sizing: border-box;
	animation: aiRotation 1s linear infinite;
}

@keyframes aiRotation {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
} 

.ai-close-btn {
	position: absolute;
	z-index: 4;
	top: 10px;
	right: 15px;
	cursor: pointer;
	padding: 4px;
	line-height: 100%;
	display: flex;
	align-items: center;
	gap: 8px;
	align-self: stretch;
	text-decoration: none;
	color: var(--colors-zinc-700, #3F3F46);
	font-size: 15px;
	font-weight: 500;
	line-height: 120%;
	border-radius: 190px;
	transition: background 0.2s ease;
}

@media (hover: hover) {
	.ai-close-btn:hover {
		background: var(--colors-zinc-200, #ECECEE);
	}
}

.ai-close-btn::before {
	content: '';
	display: block;
	width: 30px;
	height: 30px;
	aspect-ratio: 1 / 1;
	background-repeat: no-repeat no-repeat;
	background-position: center center;
	background-size: contain;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30' fill='none'%3E%3Cpath d='M22.5 7.5L7.5 22.5M7.5 7.5L22.5 22.5' stroke='%233F3F46' stroke-width='2.14286' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.darkMode .ai-close-btn::before {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30' fill='none'%3E%3Cpath d='M22.5 7.5L7.5 22.5M7.5 7.5L22.5 22.5' stroke='%23D4D4D8' stroke-width='2.14286' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.ai-resizer-btn {
	width: 8px;
	cursor: col-resize;
	position: absolute;
	left: 0;
	top: 0;
	bottom: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	z-index: 4;
}

.mobileBody .ai-resizer-btn {
	display: none;
}


.ai-resizer-btn::before {
	content: '';
	display: block;
	width: 3px;
	height: 50px;
	background: #A1A1AA;
	border-radius: 10px;
}

.darkMode .ai-resizer-btn::before {
	background: #71717A;
}

@keyframes bubbleEnter {
	0% {
		opacity: 0;
		transform: translateY(10px) scale(0.9);
		margin-top: -30px;
	}
	100% {
		opacity: 1;
		transform: translateY(0) scale(1);
		margin-top: 8px;
	}
}
