:root {
	--ip-surface: #ffffff;
	--ip-surface-dark: #101828;
	--ip-text: #111827;
	--ip-text-dark: #f8fafc;
	--ip-accent: #0f766e;
	--ip-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
}

.ip-popup[hidden] {
	display: none !important;
}

.ip-popup {
	position: fixed;
	inset: 0;
	z-index: 9999;
}

.ip-popup__overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.48);
}

.ip-popup__dialog {
	position: relative;
	margin: 0 auto;
	background: var(--ip-surface);
	color: var(--ip-text);
	max-width: 480px;
	width: min(calc(100vw - 32px), 480px);
	box-shadow: var(--ip-shadow);
	border-radius: 18px;
	padding: 24px;
	top: 50%;
	transform: translateY(-50%);
	animation: ip-popup-enter 180ms ease-out;
}

.ip-popup--slidein .ip-popup__dialog {
	margin: 24px 24px 0 auto;
	top: auto;
	bottom: 0;
	transform: none;
}

.ip-popup--banner .ip-popup__dialog {
	top: 24px;
	transform: none;
	border-radius: 16px;
}

.ip-popup--pos-bottom-right .ip-popup__dialog {
	margin: auto 24px 24px auto;
	top: auto;
	bottom: 0;
	transform: none;
}

.ip-popup--pos-top .ip-popup__dialog {
	top: 24px;
	transform: none;
}

.ip-popup--pos-bottom .ip-popup__dialog {
	top: auto;
	bottom: 24px;
	transform: none;
}

.ip-popup--theme-dark .ip-popup__dialog {
	background: var(--ip-surface-dark);
	color: var(--ip-text-dark);
}

.ip-popup--theme-accent .ip-popup__dialog {
	background: linear-gradient(135deg, #115e59 0%, #1d4ed8 100%);
	color: #fff;
}

.ip-popup__close {
	position: absolute;
	top: 12px;
	right: 12px;
	border: 0;
	background: rgba(15, 23, 42, 0.08);
	width: 36px;
	height: 36px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
}

.ip-popup--theme-dark .ip-popup__close,
.ip-popup--theme-accent .ip-popup__close {
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
}

.ip-popup__title {
	margin: 0 32px 12px 0;
	font-size: 1.4rem;
	line-height: 1.2;
}

.ip-popup__content {
	font-size: 1rem;
	line-height: 1.6;
}

.ip-popup__content > :first-child {
	margin-top: 0;
}

.ip-popup__content > :last-child {
	margin-bottom: 0;
}

.ip-popup__actions {
	display: grid;
	gap: 12px;
	margin-top: 18px;
}

.ip-popup__lead-form {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.ip-popup__lead-form input[type="email"] {
	flex: 1 1 180px;
	border: 1px solid rgba(15, 23, 42, 0.16);
	border-radius: 999px;
	padding: 11px 14px;
	font: inherit;
}

.ip-popup__lead-form button,
.ip-popup__whatsapp {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: #0f766e;
	color: #fff;
	padding: 11px 16px;
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
}

.ip-popup__lead-message {
	flex-basis: 100%;
	font-size: 0.9em;
}

.ip-popup-trigger-button {
	border: 0;
	border-radius: 999px;
	background: #1d4ed8;
	color: #fff;
	padding: 12px 18px;
	font-weight: 600;
	cursor: pointer;
}

.ip-word-info {
	position: relative;
	display: inline-flex;
	align-items: baseline;
	vertical-align: baseline;
}

.ip-word-info__toggle {
	border: 0;
	background: rgba(15, 118, 110, 0.12);
	color: #0f766e;
	border-radius: 999px;
	padding: 0.1em 0.5em;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	line-height: 1.5;
}

.ip-word-info__panel {
	position: absolute;
	left: 50%;
	top: calc(100% + 10px);
	transform: translateX(-50%);
	width: min(90vw, var(--ip-word-width, 280px));
	background: #fff;
	color: #0f172a;
	border: 1px solid rgba(15, 23, 42, 0.08);
	border-radius: 14px;
	box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
	padding: 14px 16px;
	opacity: 0;
	pointer-events: none;
	visibility: hidden;
	transition: opacity 160ms ease, transform 160ms ease;
	z-index: 50;
}

.ip-word-info__panel-title {
	display: block;
	font-weight: 700;
	margin: 0 28px 8px 0;
}

.ip-word-info__excerpt {
	font-size: 0.92em;
	color: #475569;
	margin-bottom: 8px;
}

.ip-word-info__content {
	font-size: 0.93em;
	line-height: 1.55;
}

.ip-word-info__content p {
	margin: 0 0 0.6em;
}

.ip-word-info__content p:last-child {
	margin-bottom: 0;
}

.ip-word-info__dismiss {
	position: absolute;
	top: 8px;
	right: 8px;
	border: 0;
	background: rgba(15, 23, 42, 0.08);
	width: 28px;
	height: 28px;
	border-radius: 999px;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
}

.ip-word-info:hover .ip-word-info__panel,
.ip-word-info:focus-within .ip-word-info__panel,
.ip-word-info.is-open .ip-word-info__panel {
	opacity: 1;
	pointer-events: auto;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}

.ip-word-info--card .ip-word-info__panel {
	padding: 16px 18px;
}

.ip-word-info--tab .ip-word-info__toggle {
	border-radius: 10px 10px 0 0;
	padding: 0.15em 0.65em;
}

.ip-word-info--tab .ip-word-info__panel {
	border-radius: 0 14px 14px 14px;
	left: 0;
	transform: translateX(0);
}

.ip-word-info--tab:hover .ip-word-info__panel,
.ip-word-info--tab:focus-within .ip-word-info__panel,
.ip-word-info--tab.is-open .ip-word-info__panel {
	transform: translateX(0);
}

.ip-word-info--theme-dark .ip-word-info__toggle {
	background: rgba(15, 23, 42, 0.9);
	color: #f8fafc;
}

.ip-word-info--theme-dark .ip-word-info__panel {
	background: #0f172a;
	color: #f8fafc;
}

.ip-word-info--theme-dark .ip-word-info__excerpt {
	color: #cbd5e1;
}

.ip-word-info--theme-dark .ip-word-info__dismiss {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.ip-word-info--theme-accent .ip-word-info__toggle {
	background: linear-gradient(135deg, #0f766e 0%, #1d4ed8 100%);
	color: #fff;
}

.ip-word-info--theme-accent .ip-word-info__panel {
	background: linear-gradient(160deg, #115e59 0%, #1d4ed8 100%);
	color: #fff;
}

.ip-word-info--theme-accent .ip-word-info__excerpt {
	color: rgba(255, 255, 255, 0.82);
}

.ip-word-info--theme-accent .ip-word-info__dismiss {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
}

@keyframes ip-popup-enter {
	from {
		opacity: 0;
		transform: translateY(calc(-50% + 12px));
	}

	to {
		opacity: 1;
		transform: translateY(-50%);
	}
}

@media (max-width: 640px) {
	.ip-popup__dialog {
		padding: 20px;
	}

	.ip-popup--slidein .ip-popup__dialog,
	.ip-popup--pos-bottom-right .ip-popup__dialog {
		margin: auto 16px 16px;
		width: calc(100vw - 32px);
	}

	.ip-word-info__panel {
		left: 0;
		transform: translateX(0);
	}

	.ip-word-info:hover .ip-word-info__panel,
	.ip-word-info:focus-within .ip-word-info__panel,
	.ip-word-info.is-open .ip-word-info__panel {
		transform: translateX(0);
	}
}
