/* Wrapper / alignment */
.elementor-widget-kk_popup_button { --kkpb-align: left; }
.kkpb-wrap {
	display: flex;
	width: 100%;
}
.elementor-widget-kk_popup_button .kkpb-wrap { justify-content: flex-start; }
.elementor-widget-kk_popup_button[data-align="center"] .kkpb-wrap,
.kkpb-wrap { justify-content: var(--kkpb-justify, flex-start); }

/* Map control values (left/center/right/stretch) → flex */
.elementor-widget-kk_popup_button { --kkpb-justify: flex-start; }
[style*="--kkpb-align: center"]  { --kkpb-justify: center; }
[style*="--kkpb-align: right"]   { --kkpb-justify: flex-end; }
[style*="--kkpb-align: stretch"] { --kkpb-justify: stretch; }
[style*="--kkpb-align: stretch"] .kkpb-button { width: 100%; }

/* Button */
.kkpb-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.2;
	transition: background-color .2s ease, color .2s ease, transform .1s ease;
	font: inherit;
}
.kkpb-button:active { transform: translateY(1px); }
.kkpb-button__icon { display: inline-flex; }
.kkpb-button__icon svg { width: 1em; height: 1em; fill: currentColor; }

/* Modal */
.kkpb-modal {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, .6);
	display: none;
	align-items: flex-start;
	justify-content: center;
	z-index: 99999;
	overflow-y: auto;
	padding: 40px 16px;
	opacity: 0;
	transition: opacity .2s ease;
}
.kkpb-modal.is-open {
	display: flex;
	opacity: 1;
}
.kkpb-modal__dialog {
	position: relative;
	background: #fff;
	width: 100%;
	max-width: 600px;
	margin: auto;
	padding: 32px;
	border-radius: 8px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
	transform: translateY(-10px);
	transition: transform .2s ease;
}
.kkpb-modal.is-open .kkpb-modal__dialog {
	transform: translateY(0);
}
.kkpb-modal__close {
	position: absolute;
	top: 8px;
	right: 12px;
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	color: #333;
}
.kkpb-modal__close:hover { opacity: .7; }
.kkpb-modal__title {
	margin: 0 0 16px;
	font-size: 1.4em;
}
.kkpb-modal__content > *:last-child { margin-bottom: 0; }

/* Body lock when popup open */
body.kkpb-no-scroll { overflow: hidden; }
