/*!
 * NovaSmile Contact Chat — Creado por Creovationstudio.com
 */
#nsc-root {
	--nsc-primary: #13235b;
	--nsc-accent: #0a5cb8;
	--nsc-highlight: #22b8f0;
	--nsc-sparkle: #e84aa8;
	--nsc-glass: rgba(255, 255, 255, .62);
	--nsc-glass-strong: rgba(255, 255, 255, .78);
	--nsc-border: rgba(255, 255, 255, .7);
	--nsc-text: #1c2541;
	--nsc-muted: #5b6587;
	--nsc-radius: 26px;
	--nsc-font: "Outfit", "Urbanist", "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--nsc-serif: "Instrument Serif", "Playfair Display", Georgia, serif;
	position: fixed;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	z-index: 999990;
	font-family: var(--nsc-font);
	color: var(--nsc-text);
	line-height: 1.4;
	-webkit-font-smoothing: antialiased;
}
#nsc-root[data-pos="bottom"] { top: auto; bottom: 110px; transform: none; }
#nsc-root *, #nsc-root *::before, #nsc-root *::after { box-sizing: border-box; }
#nsc-root button { font-family: inherit; }
#nsc-root em {
	font-family: var(--nsc-serif);
	font-style: italic;
	font-weight: 400;
	letter-spacing: .01em;
	font-size: 1.12em;
}

/* ============================ Botón lateral ============================ */
#nsc-root .nsc-tab {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
	width: 58px;
	padding: 14px 0 16px;
	margin: 0;
	border: 1px solid rgba(255, 255, 255, .35);
	border-left: 0;
	border-radius: 0 22px 22px 0;
	background:
		linear-gradient(160deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 55%),
		linear-gradient(165deg, var(--nsc-accent), var(--nsc-primary));
	color: #fff;
	cursor: pointer;
	box-shadow:
		0 14px 34px -10px rgba(19, 35, 91, .55),
		inset 0 1px 0 rgba(255, 255, 255, .35);
	-webkit-backdrop-filter: blur(14px) saturate(160%);
	backdrop-filter: blur(14px) saturate(160%);
	transition: width .35s cubic-bezier(.2, .8, .2, 1), box-shadow .35s, transform .35s;
	overflow: visible;
	-webkit-tap-highlight-color: transparent;
}
#nsc-root .nsc-tab:hover { width: 64px; box-shadow: 0 18px 40px -10px rgba(19, 35, 91, .7), inset 0 1px 0 rgba(255, 255, 255, .4); }
#nsc-root .nsc-tab:focus-visible { outline: 3px solid var(--nsc-highlight); outline-offset: 3px; }

#nsc-root .nsc-tab__glow {
	position: absolute;
	inset: -1px;
	border-radius: inherit;
	background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
	background-size: 250% 100%;
	animation: nsc-shine 4.5s ease-in-out infinite;
	pointer-events: none;
	mix-blend-mode: overlay;
}

#nsc-root .nsc-tab__icon {
	position: relative;
	width: 34px;
	height: 34px;
	display: grid;
	place-items: center;
}
#nsc-root .nsc-ico { width: 32px; height: 32px; overflow: visible; animation: nsc-float 3.2s ease-in-out infinite; transition: transform .35s, opacity .25s; }
#nsc-root .nsc-ico__bubble { fill: #fff; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .18)); }
#nsc-root .nsc-ico__dot { fill: var(--nsc-accent); animation: nsc-dots 1.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
#nsc-root .nsc-ico__dot:nth-child(3) { animation-delay: .18s; }
#nsc-root .nsc-ico__dot:nth-child(4) { animation-delay: .36s; }

#nsc-root .nsc-tab__x {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	opacity: 0;
	transform: rotate(-90deg) scale(.5);
	transition: transform .35s cubic-bezier(.2, .8, .2, 1), opacity .25s;
}
#nsc-root .nsc-tab__x svg { width: 24px; height: 24px; }

#nsc-root .nsc-spark {
	position: absolute;
	font-size: 10px;
	line-height: 1;
	pointer-events: none;
	animation: nsc-twinkle 2.6s ease-in-out infinite;
}
#nsc-root .nsc-spark--a { top: -6px; right: -7px; color: var(--nsc-highlight); }
#nsc-root .nsc-spark--b { bottom: -2px; left: -6px; color: var(--nsc-sparkle); font-size: 8px; animation-delay: 1.3s; }

#nsc-root .nsc-tab__label {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .24em;
	text-transform: uppercase;
	white-space: nowrap;
}

#nsc-root .nsc-tab__ping {
	position: absolute;
	top: 10px;
	right: 8px;
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--nsc-sparkle);
	box-shadow: 0 0 0 2px rgba(255, 255, 255, .85);
}
#nsc-root .nsc-tab__ping::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--nsc-sparkle);
	animation: nsc-ping 1.8s cubic-bezier(0, 0, .2, 1) infinite;
}

/* estado abierto del botón */
#nsc-root.is-open .nsc-ico { opacity: 0; transform: rotate(90deg) scale(.5); }
#nsc-root.is-open .nsc-tab__x { opacity: 1; transform: none; }
#nsc-root.is-open .nsc-tab__ping, #nsc-root.is-open .nsc-spark { opacity: 0; }

/* ============================== Panel ============================== */
#nsc-root .nsc-panel {
	position: absolute;
	left: 74px;
	top: 50%;
	width: 370px;
	max-width: calc(100vw - 92px);
	max-height: min(620px, calc(100vh - 40px));
	display: flex;
	flex-direction: column;
	border-radius: var(--nsc-radius);
	background:
		radial-gradient(120% 70% at 0% 0%, rgba(34, 184, 240, .16), transparent 60%),
		radial-gradient(90% 60% at 100% 100%, rgba(232, 74, 168, .10), transparent 60%),
		var(--nsc-glass);
	border: 1px solid var(--nsc-border);
	-webkit-backdrop-filter: blur(22px) saturate(170%);
	backdrop-filter: blur(22px) saturate(170%);
	box-shadow:
		0 30px 70px -20px rgba(19, 35, 91, .45),
		0 8px 24px -8px rgba(19, 35, 91, .2),
		inset 0 1px 0 rgba(255, 255, 255, .9);
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translate(-18px, -50%) scale(.94);
	transform-origin: left center;
	transition: opacity .3s ease, transform .45s cubic-bezier(.2, .9, .25, 1.15), visibility 0s .45s;
}
#nsc-root[data-pos="bottom"] .nsc-panel { top: auto; bottom: 0; transform: translate(-18px, 0) scale(.94); transform-origin: left bottom; }
#nsc-root.is-open .nsc-panel { opacity: 1; visibility: visible; transform: translate(0, -50%) scale(1); transition-delay: 0s; }
#nsc-root.is-open[data-pos="bottom"] .nsc-panel { transform: none; }

#nsc-root .nsc-panel__blob {
	position: absolute;
	border-radius: 50%;
	filter: blur(30px);
	pointer-events: none;
	opacity: .55;
	animation: nsc-drift 12s ease-in-out infinite alternate;
}
#nsc-root .nsc-panel__blob--1 { width: 170px; height: 170px; top: -60px; right: -50px; background: var(--nsc-highlight); opacity: .28; }
#nsc-root .nsc-panel__blob--2 { width: 140px; height: 140px; bottom: 40px; left: -60px; background: var(--nsc-sparkle); opacity: .16; animation-delay: -6s; }

/* -------- header -------- */
#nsc-root .nsc-head {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 16px 16px 18px;
	background: linear-gradient(135deg, rgba(19, 35, 91, .96), rgba(10, 92, 184, .9));
	color: #fff;
	box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .12);
}
#nsc-root .nsc-head::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--nsc-highlight), var(--nsc-sparkle), var(--nsc-highlight));
	background-size: 200% 100%;
	animation: nsc-shine 6s linear infinite;
	opacity: .8;
}
#nsc-root .nsc-avatar {
	position: relative;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .95);
	box-shadow: 0 0 0 3px rgba(255, 255, 255, .22);
	display: grid;
	place-items: center;
}
#nsc-root .nsc-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
#nsc-root .nsc-avatar__fallback { width: 24px; height: 24px; color: var(--nsc-accent); display: grid; }
#nsc-root .nsc-avatar__fallback svg { width: 100%; height: 100%; }
#nsc-root .nsc-avatar__dot {
	position: absolute;
	right: 0;
	bottom: 1px;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #2fd28a;
	box-shadow: 0 0 0 2px var(--nsc-primary);
}
#nsc-root .nsc-head__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
#nsc-root .nsc-head__txt strong { font-size: 15.5px; font-weight: 600; letter-spacing: .01em; line-height: 1.2; }
#nsc-root .nsc-head__txt small { font-size: 12px; opacity: .78; }

#nsc-root .nsc-lang {
	display: inline-flex;
	padding: 3px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .14);
	border: 1px solid rgba(255, 255, 255, .22);
}
#nsc-root .nsc-lang button {
	appearance: none;
	border: 0;
	margin: 0;
	padding: 4px 8px;
	border-radius: 999px;
	background: transparent;
	color: rgba(255, 255, 255, .8);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .08em;
	cursor: pointer;
	line-height: 1.2;
	transition: background .2s, color .2s;
}
#nsc-root .nsc-lang button.is-active { background: #fff; color: var(--nsc-primary); }
#nsc-root .nsc-close {
	appearance: none;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	color: #fff;
	cursor: pointer;
	transition: background .2s, transform .25s;
}
#nsc-root .nsc-close:hover { background: rgba(255, 255, 255, .26); transform: rotate(90deg); }
#nsc-root .nsc-close svg { width: 15px; height: 15px; }
#nsc-root .nsc-lang button:focus-visible, #nsc-root .nsc-close:focus-visible { outline: 2px solid var(--nsc-highlight); outline-offset: 2px; }

/* -------- body / mensajes -------- */
#nsc-root .nsc-body {
	position: relative;
	flex: 1 1 auto;
	min-height: 120px;
	overflow-y: auto;
	padding: 18px 16px 8px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	scroll-behavior: smooth;
}
#nsc-root .nsc-msg {
	max-width: 88%;
	padding: 11px 14px;
	font-size: 14px;
	line-height: 1.5;
	border-radius: 18px;
	animation: nsc-pop .4s cubic-bezier(.2, .9, .3, 1.2) both;
	word-wrap: break-word;
}
#nsc-root .nsc-msg--bot {
	align-self: flex-start;
	background: var(--nsc-glass-strong);
	border: 1px solid rgba(255, 255, 255, .9);
	border-bottom-left-radius: 6px;
	box-shadow: 0 6px 18px -10px rgba(19, 35, 91, .35);
	color: var(--nsc-text);
}
#nsc-root .nsc-msg--bot em { color: var(--nsc-primary); }
#nsc-root .nsc-msg--user {
	align-self: flex-end;
	background: linear-gradient(135deg, var(--nsc-accent), var(--nsc-primary));
	color: #fff;
	border-bottom-right-radius: 6px;
	box-shadow: 0 8px 18px -10px rgba(10, 92, 184, .7);
}
#nsc-root .nsc-msg--typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
#nsc-root .nsc-msg--typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--nsc-accent);
	opacity: .5;
	animation: nsc-dots 1.1s ease-in-out infinite;
}
#nsc-root .nsc-msg--typing span:nth-child(2) { animation-delay: .15s; }
#nsc-root .nsc-msg--typing span:nth-child(3) { animation-delay: .3s; }

/* -------- opciones -------- */
#nsc-root .nsc-options {
	position: relative;
	display: grid;
	gap: 8px;
	padding: 4px 16px 14px;
}
#nsc-root .nsc-options:empty { display: none; }
#nsc-root .nsc-opt {
	--c: var(--nsc-accent);
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 12px;
	border-radius: 16px;
	background: rgba(255, 255, 255, .55);
	border: 1px solid rgba(255, 255, 255, .85);
	box-shadow: 0 6px 16px -12px rgba(19, 35, 91, .45);
	color: var(--nsc-text) !important;
	text-decoration: none !important;
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	opacity: 0;
	transform: translateY(10px);
	transition: background .25s, transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s, border-color .25s, opacity .4s;
	transition-delay: calc(var(--i, 0) * 70ms);
}
#nsc-root .nsc-options.is-in .nsc-opt { opacity: 1; transform: none; }
#nsc-root .nsc-opt:hover, #nsc-root .nsc-opt:focus-visible {
	background: rgba(255, 255, 255, .88);
	border-color: color-mix(in srgb, var(--c) 35%, white);
	box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--c) 70%, transparent);
	transform: translateX(4px);
	transition-delay: 0s;
	outline: none;
}
#nsc-root .nsc-opt--call { --c: var(--nsc-accent); }
#nsc-root .nsc-opt--sms { --c: var(--nsc-highlight); }
#nsc-root .nsc-opt--wa { --c: #1fb855; }
#nsc-root .nsc-opt--consult { --c: var(--nsc-sparkle); }

#nsc-root .nsc-opt__ico {
	flex: 0 0 auto;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	display: grid;
	place-items: center;
	color: #fff;
	background: linear-gradient(135deg, color-mix(in srgb, var(--c) 80%, white), var(--c));
	box-shadow: 0 8px 16px -8px var(--c), inset 0 1px 0 rgba(255, 255, 255, .4);
	transition: transform .3s cubic-bezier(.2, .8, .2, 1.4);
}
#nsc-root .nsc-opt:hover .nsc-opt__ico { transform: scale(1.08) rotate(-6deg); }
#nsc-root .nsc-opt__ico svg { width: 20px; height: 20px; }
#nsc-root .nsc-opt__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
#nsc-root .nsc-opt__txt strong { font-size: 14px; font-weight: 600; color: var(--nsc-primary); }
#nsc-root .nsc-opt__txt small { font-size: 12px; color: var(--nsc-muted); }
#nsc-root .nsc-opt__arrow { width: 18px; height: 18px; color: var(--nsc-muted); transition: transform .3s, color .3s; }
#nsc-root .nsc-opt__arrow svg { width: 100%; height: 100%; }
#nsc-root .nsc-opt:hover .nsc-opt__arrow { color: var(--c); transform: translate(2px, -2px); }

/* -------- footer -------- */
#nsc-root .nsc-foot {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	flex-wrap: wrap;
	padding: 10px 16px 12px;
	border-top: 1px solid rgba(19, 35, 91, .08);
	background: rgba(255, 255, 255, .35);
	font-size: 11px;
	color: var(--nsc-muted);
}
#nsc-root .nsc-hours { display: inline-flex; align-items: center; gap: 5px; letter-spacing: .02em; }
#nsc-root .nsc-hours svg { width: 13px; height: 13px; }
#nsc-root .nsc-credit {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 3px 9px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .6);
	border: 1px solid rgba(19, 35, 91, .08);
	color: var(--nsc-muted) !important;
	text-decoration: none !important;
	font-size: 10.5px;
	letter-spacing: .02em;
	transition: background .25s, box-shadow .25s;
}
#nsc-root .nsc-credit b {
	font-weight: 700;
	background: linear-gradient(90deg, var(--nsc-accent), var(--nsc-sparkle));
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}
#nsc-root .nsc-credit:hover { background: #fff; box-shadow: 0 4px 12px -6px rgba(19, 35, 91, .35); }

/* ============================ Animaciones ============================ */
@keyframes nsc-float { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-4deg); } }
@keyframes nsc-dots { 0%, 100% { transform: translateY(0); opacity: .55; } 40% { transform: translateY(-3px); opacity: 1; } }
@keyframes nsc-twinkle { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0); } 50% { opacity: 1; transform: scale(1.1) rotate(90deg); } }
@keyframes nsc-ping { 75%, 100% { transform: scale(2.4); opacity: 0; } }
@keyframes nsc-shine { 0% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
@keyframes nsc-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes nsc-drift { from { transform: translate(0, 0); } to { transform: translate(20px, 30px); } }

/* ============================= Responsive ============================= */
@media (max-width: 600px) {
	#nsc-root .nsc-tab { width: 48px; padding: 12px 0 14px; gap: 8px; border-radius: 0 18px 18px 0; }
	#nsc-root .nsc-tab:hover { width: 50px; }
	#nsc-root .nsc-tab__icon { width: 28px; height: 28px; }
	#nsc-root .nsc-ico { width: 26px; height: 26px; }
	#nsc-root .nsc-tab__label { font-size: 11px; }
	#nsc-root .nsc-panel { left: 58px; width: calc(100vw - 70px); max-height: calc(100vh - 30px); }
	#nsc-root .nsc-head { padding: 14px 12px 14px 14px; gap: 10px; }
	#nsc-root .nsc-avatar { width: 38px; height: 38px; }
	#nsc-root .nsc-head__txt strong { font-size: 14.5px; }
	#nsc-root .nsc-lang button { padding: 4px 6px; }
	#nsc-root .nsc-panel { width: calc(100vw - 64px); left: 54px; }
	#nsc-root.nsc--hide-mobile { display: none !important; }
}

/* Navegadores sin backdrop-filter: más opaco */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
	#nsc-root .nsc-panel { background: rgba(250, 252, 255, .97); }
}

@media (prefers-reduced-motion: reduce) {
	#nsc-root *, #nsc-root *::before, #nsc-root *::after { animation: none !important; transition-duration: .01ms !important; }
}
