/* ========================================
   NS AI Infolinka – Phone Mockup Wrapper
   ======================================== */

.ns-ai-phone-wrap {
	width: min(595px, 42vw, calc((100dvh - 24px) * 595 / 928));
	max-width: 100%;
	max-height: calc(100dvh - 24px);
	aspect-ratio: 595 / 928;
	height: auto;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	position: relative;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ns-ai-phone-wrap .ns-ai-infolinka-widget {
	width: 305px;
	height: 660px;
	background: transparent;
	border-radius: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: none;
	position: relative;
	margin: 0;
	font-family: 'Segoe UI', sans-serif;
}

/* ========================================
   NS AI Infolinka – Widget Styles
   ======================================== */

.ns-ai-infolinka-widget {
	width: 400px;
	max-width: 95vw;
	height: 700px;
	max-height: 90vh;
	background: #3b82f6;
	border-radius: 28px;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(59, 130, 246, 0.35);
	position: relative;
	margin: 0 auto;
	font-family: 'Segoe UI', sans-serif;
}

/* --- Header --- */
.ns-ai-header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px 24px 16px;
	background: #3b82f6;
	flex-shrink: 0;
}
.ns-ai-avatar {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: linear-gradient(135deg, #f97316, #fb923c);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	color: #fff;
	flex-shrink: 0;
	box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.ns-ai-header-info {
	flex: 1;
}
.ns-ai-name {
	color: #fff;
	font-size: 18px;
	font-weight: 700;
}
.ns-ai-status {
	color: rgba(255,255,255,0.8);
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 6px;
}
.ns-ai-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #4ade80;
	display: inline-block;
	animation: ns-ai-pulse-dot 2s ease-in-out infinite;
}
@keyframes ns-ai-pulse-dot {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.4; }
}

/* --- Content --- */
.ns-ai-content {
	flex: 1;
	background: #fff5ed;
	margin: 0 8px;
	border-radius: 20px 20px 0 0;
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
}

.ns-ai-canvas-zone {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}
.ns-ai-canvas-zone canvas {
	display: block;
	width: 100%;
	height: 100%;
}

/* --- Call label --- */
.ns-ai-call-label {
	position: absolute;
	top: 110px;
	left: 50%;
	transform: translateX(-50%);
	color: #2b17f5;
	font-size: 13px;
	font-weight: 600;
	opacity: 0;
	transition: opacity 0.5s;
	z-index: 4;
	white-space: nowrap;
}
.ns-ai-call-label.visible {
	opacity: 1;
}
.ns-ai-timer {
	font-variant-numeric: tabular-nums;
}

/* --- Bubbles --- */
.ns-ai-bubbles {
	position: absolute;
	bottom: 12px;
	left: 12px;
	right: 12px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	pointer-events: none;
	z-index: 5;
}
.ns-ai-agent-bubble {
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(10px);
	border-radius: 14px;
	padding: 10px 16px;
	font-size: 13px;
	color: #1e3a5f;
	display: flex;
	align-items: center;
	gap: 10px;
	box-shadow: 0 2px 12px rgba(0,0,0,0.08);
	animation: ns-ai-bubble-in 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
	opacity: 0;
	transform: translateY(20px);
}
.ns-ai-agent-bubble.fade-out {
	animation: ns-ai-bubble-out 0.3s ease-in forwards;
}
@keyframes ns-ai-bubble-in {
	to { opacity: 1; transform: translateY(0); }
}
@keyframes ns-ai-bubble-out {
	from { opacity: 1; transform: translateY(0); }
	to { opacity: 0; transform: translateY(-10px); }
}
.ns-ai-bubble-icon {
	width: 28px;
	height: 28px;
	border-radius: 8px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	flex-shrink: 0;
}
.ns-ai-bubble-icon.blue   { background: rgba(59, 130, 246, 0.12); }
.ns-ai-bubble-icon.orange { background: rgba(249, 115, 22, 0.12); }
.ns-ai-bubble-icon.green  { background: rgba(34, 197, 94, 0.12); }
.ns-ai-bubble-icon.purple { background: rgba(168, 85, 247, 0.12); }
.ns-ai-bubble-text {
	flex: 1;
	line-height: 1.3;
}
.ns-ai-bubble-spinner {
	width: 16px;
	height: 16px;
	border: 2px solid rgba(59,130,246,0.2);
	border-top-color: #3b82f6;
	border-radius: 50%;
	animation: ns-ai-spin 0.8s linear infinite;
	flex-shrink: 0;
}
@keyframes ns-ai-spin {
	to { transform: rotate(360deg); }
}

/* --- Bottom bar --- */
.ns-ai-bottom {
	background: #fff8ec;
	margin: 0 8px 8px;
	padding: 12px 0 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	border-radius: 0 0 20px 20px;
}

/* Hint bubble */
.ns-ai-hint {
	background: rgba(59, 130, 246, 0.08);
	color: #2633fa;
	font-size: 13px;
	font-weight: 600;
	padding: 8px 18px;
	border-radius: 20px;
	animation: ns-ai-hint-bounce 2s ease-in-out infinite;
	text-align: center;
    position: absolute;
    bottom: 110px;
}
@keyframes ns-ai-hint-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-4px); }
}

.ns-ai-call-btn {
	width: 76px;
	height: 76px;
    padding: 0;
	border-radius: 50%;
	border: none;
	background: #20cb5f;
	color: #fff;
	font-size: 28px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 20px rgba(34, 197, 94, 0.4);
	transition: transform 0.2s, box-shadow 0.2s;
}
.ns-ai-call-btn-icon {
	width: 30px;
	height: 30px;
	display: block;
	object-fit: contain;
	pointer-events: none;
}
.ns-ai-call-btn-end-icon {
	width: 36px;
	height: 36px;
}
.ns-ai-call-btn-stop {
	line-height: 1;
	pointer-events: none;
}
.ns-ai-call-btn:hover {
	transform: scale(1.08);
	transition: .3s all;
    background: linear-gradient(135deg, #20cb5f, #14b251);
}
.ns-ai-call-btn.active {
	background: #e4000b;
	box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
}

/* --- Editor preview adjustments --- */
.ns-ai-preview .ns-ai-agent-bubble {
	opacity: 1;
	transform: none;
	animation: none;
}

/* ========================================
   NS AI Infolinka – Showcase Layout
   ======================================== */

.ns-ai-showcase {
	padding: 40px 0;
}

.ns-ai-showcase-buttons {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-start;
}

.ns-ai-showcase-button {
	display: inline-block;
	padding: 30px;
	transform: translateX(-30px);
	transition: transform 0.3s, background 0.3s, color 0.3s, box-shadow 0.3s;
	color: #282828;
	text-decoration: none;
	cursor: pointer;
	border-radius: 20px;
}
.ns-ai-showcase-button:hover {
	transform: translateX(0);
}
.ns-ai-showcase-button.active {
	border-radius: 20px;
	background: #2044FF;
	color: #fff;
	box-shadow: 0px 16px 40px 0px rgba(40, 40, 40, 0.10);
	transform: translateX(0);
}
.ns-ai-showcase-button .title {
	margin: 0 0 4px;
	font-size: 18px;
	font-weight: 700;
}
.ns-ai-showcase-button .desc {
	margin: 0;
	font-size: 15px;
	opacity: 0.85;
	line-height: 1.5;
}

.ns-ai-showcase-widget-col {
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Showcase slides (one per tab, only active visible) */
.ns-ai-showcase-slide {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ns-ai-showcase-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: none;
}

.ns-ai-showcase-lightbox.is-open {
	display: block;
}

.ns-ai-showcase-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(14, 20, 34, 0.72);
	backdrop-filter: blur(6px);
}

.ns-ai-showcase-lightbox__dialog {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 24px 16px;
}

.ns-ai-showcase-lightbox__content {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.ns-ai-showcase-lightbox__content .ns-ai-showcase-slide {
	display: flex !important;
}

.ns-ai-showcase-lightbox__close {
	position: absolute;
	top: 18px;
	right: 18px;
	z-index: 2;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	box-shadow: none;
}
.ns-ai-showcase-lightbox__close:hover {
	background: transparent;
	box-shadow: none;
}

body.ns-ai-showcase-lightbox-open {
	overflow: hidden;
}

/* Responsive: widget hidden on mobile, only buttons shown */
@media (max-width: 991px) {
	.ns-ai-showcase-widget-col {
		display: none;
	}

	.ns-ai-showcase-lightbox__dialog {
		padding: 16px 10px;
	}

	.ns-ai-showcase-lightbox__close {
		top: 10px;
		right: 10px;
	}
}

/* Editor preview overrides */
.ns-ai-showcase-preview .ns-ai-showcase-button {
	transform: none;
}

/* ========================================
   Avatar image inside .ns-ai-avatar
   ======================================== */
.ns-ai-avatar {
	position: relative;
}
.ns-ai-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}
/* Green online dot – overlaid on avatar */
.ns-ai-avatar .ns-ai-status-dot {
	position: absolute;
	bottom: 1px;
	right: 1px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #4ade80;
	border: 2px solid #fff;
	display: block;
	animation: ns-ai-pulse-dot 2s ease-in-out infinite;
}
/* Blue header context – dot border matches blue bg */
.ns-ai-header .ns-ai-avatar .ns-ai-status-dot {
	border-color: #3b82f6;
}

/* ========================================
   Minimal style variant
   ======================================== */
.ns-ai-infolinka-widget.ns-ai-style-minimal {
    width: 480px;
    max-width: 95vw;
    height: 620px;
    max-height: 80vh;
    background: #2633fa;
    border-radius: 28px;
    margin: 0;
    padding: 2em 3em 0em 3em;
}

 .ns-ai-style-minimal .ns-ai-call-label{
    top: 120px;
 }

.ns-ai-style-minimal .ns-ai-header {
	display: none;
}
.ns-ai-style-minimal .ns-ai-content {
	margin: 0;
	    border-radius: 20px 20px 0 0;
    background: #fff;
}
.ns-ai-style-minimal .ns-ai-bottom {
	margin: 0;
	border-radius: 0;
}

/* ========================================
   Mobile style variant (inside phone mockup)
   ======================================== */
.ns-ai-phone-wrap .ns-ai-infolinka-widget.ns-ai-style-mobile {
	width: 49.92%;
	height: 68.21%;
	position: absolute;
	top: 22.7%;
	left: 23.87%;
	background: transparent;
	border-radius: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: none;
	margin: 0;
	font-family: 'Segoe UI', sans-serif;
}

.ns-ai-style-mobile .ns-ai-header {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 20px 24px 16px;
	background: transparent;
	flex-shrink: 0;
	border-bottom: 1px solid rgba(0,0,0,0.05);
}

.ns-ai-style-mobile .ns-ai-content {
	flex: 1;
	background: #fff5ed;
	margin: 0;
	border-radius: 0;
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
}

.ns-ai-style-mobile .ns-ai-bottom {
	background: #fff8ec;
	margin: 0;
	padding: 12px 0 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	border-radius: 0 0 40px 40px;
}

@media (max-width: 1024px) {
	.ns-ai-phone-wrap {
		width: min(560px, 56vw, calc((100dvh - 24px) * 595 / 928));
	}

	.ns-ai-style-mobile .ns-ai-hint {
		max-width: calc(100% - 28px);
		padding-inline: 14px;
	}
}

@media (max-width: 767px) {
	.ns-ai-phone-wrap {
		width: min(460px, 92vw, calc((100dvh - 24px) * 595 / 928));
	}

	.ns-ai-style-mobile .ns-ai-inner-header {
		gap: 10px;
		padding: 16px 18px 8px;
	}

	.ns-ai-style-mobile .ns-ai-inner-header .ns-ai-avatar {
		width: 48px;
		height: 48px;
	}

	.ns-ai-style-mobile .ns-ai-inner-header .ns-ai-name {
		font-size: 15px;
	}

	.ns-ai-style-mobile .ns-ai-inner-header .ns-ai-status {
		font-size: 12px;
	}

	.ns-ai-style-mobile .ns-ai-call-label {
		top: 16px;
		font-size: 12px;
	}

	.ns-ai-style-mobile .ns-ai-agent-bubble {
		padding: 9px 12px;
		font-size: 12px;
		gap: 8px;
	}

	.ns-ai-style-mobile .ns-ai-bubble-icon {
		width: 24px;
		height: 24px;
		font-size: 12px;
	}

	.ns-ai-style-mobile .ns-ai-hint {
		bottom: 92px;
		font-size: 12px;
		padding: 8px 12px;
		max-width: calc(100% - 20px);
	}

	.ns-ai-style-mobile .ns-ai-bottom {
		padding: 10px 0 14px;
		border-radius: 0 0 28px 28px;
	}

	.ns-ai-style-mobile .ns-ai-call-btn {
		width: 64px;
		height: 64px;
	}

	.ns-ai-style-mobile .ns-ai-call-btn-icon {
		width: 26px;
		height: 26px;
	}
}

@media (max-width: 480px) {
	.ns-ai-phone-wrap {
		width: min(400px, 94vw, calc((100dvh - 16px) * 595 / 928));
		max-height: calc(100dvh - 16px);
	}

	.ns-ai-style-mobile .ns-ai-inner-header {
		padding: 14px 16px 8px;
	}

	.ns-ai-style-mobile .ns-ai-bubbles {
		left: 8px;
		right: 8px;
		bottom: 8px;
	}

	.ns-ai-style-mobile .ns-ai-hint {
		bottom: 84px;
		font-size: 11px;
	}

	.ns-ai-style-mobile .ns-ai-call-btn {
		width: 58px;
		height: 58px;
	}

	.ns-ai-style-mobile .ns-ai-call-btn-icon {
		width: 24px;
		height: 24px;
	}
}


/* Inner header – avatar + name inside content area (minimal style) */
.ns-ai-inner-header {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 14px;
	padding: 20px 24px 10px;
	flex-shrink: 0;
}
.ns-ai-inner-header .ns-ai-avatar {
	width: 56px;
	height: 56px;
	font-size: 26px;
	flex-shrink: 0;
}
.ns-ai-inner-header .ns-ai-avatar .ns-ai-status-dot {
	border-color: #fff;
}
.ns-ai-inner-header-info {
	flex: 1;
}
.ns-ai-inner-header .ns-ai-name {
	color: #1e293b;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
}
.ns-ai-inner-header .ns-ai-status {
	color: #64748b;
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 6px;
}
