.cwk-popup-buttons {
	--cwk-primary: #1f3a52;
	--cwk-secondary: #f2f4f6;
	display: flex;
	flex-wrap: wrap;
	gap: 0.95rem;
	align-items: center;
	justify-content: center;
	margin: 1.5rem auto;
	max-width: 46rem;
}

.cwk-popup-button,
.cwk-form__submit {
	appearance: none;
	border: 1px solid transparent;
	border-radius: 0.85rem;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.2;
	min-height: 3.15rem;
	padding: 0.85rem 1.35rem;
	text-decoration: none;
	transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease;
}

.cwk-popup-button:hover,
.cwk-form__submit:hover {
	transform: translateY(-2px);
}

.cwk-popup-button:focus-visible,
.cwk-form__submit:focus-visible,
.cwk-modal__close:focus-visible,
.cwk-form input:focus-visible,
.cwk-form select:focus-visible,
.cwk-form textarea:focus-visible {
	outline: 3px solid rgba(31, 58, 82, 0.28);
	outline-offset: 3px;
}

.cwk-button--primary,
.cwk-form__submit {
	background: var(--cwk-primary, #1f3a52);
	border-color: var(--cwk-primary, #1f3a52);
	box-shadow: 0 12px 24px rgba(31, 58, 82, 0.18);
	color: #fff;
}

.cwk-button--primary:hover,
.cwk-form__submit:hover {
	background: #172d40;
	border-color: #172d40;
	box-shadow: 0 16px 28px rgba(31, 58, 82, 0.24);
	color: #fff;
}

.cwk-button--secondary {
	background: #f7f7f5;
	border-color: #d8e0e7;
	box-shadow: 0 10px 20px rgba(31, 58, 82, 0.08);
	color: var(--cwk-primary, #1f3a52);
}

.cwk-button--secondary:hover {
	background: var(--cwk-secondary, #f2f4f6);
	border-color: #bfccd7;
	box-shadow: 0 14px 24px rgba(31, 58, 82, 0.12);
	color: var(--cwk-primary, #1f3a52);
}

.cwk-modal[hidden] {
	display: none;
}

.cwk-modal {
	--cwk-primary: #1f3a52;
	--cwk-secondary: #f2f4f6;
	font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	inset: 0;
	position: fixed;
	z-index: 99999;
}

.cwk-modal__overlay {
	background: rgba(19, 34, 47, 0.58);
	backdrop-filter: blur(2px);
	inset: 0;
	position: absolute;
}

.cwk-modal__dialog {
	background: #f7f7f5;
	border: 1px solid rgba(216, 224, 231, 0.95);
	border-radius: 1.15rem;
	box-shadow: 0 26px 70px rgba(15, 30, 42, 0.26);
	color: #182835;
	left: 50%;
	max-height: min(88vh, 52rem);
	max-width: 42rem;
	overflow-y: auto;
	padding: clamp(1.35rem, 4vw, 2.25rem);
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: min(calc(100vw - 2rem), 42rem);
}

.cwk-modal__close {
	appearance: none;
	background: #fff;
	border: 1px solid #d8e0e7;
	border-radius: 999px;
	color: var(--cwk-primary, #1f3a52);
	cursor: pointer;
	font-size: 1.75rem;
	height: 2.5rem;
	line-height: 1;
	position: absolute;
	right: 1rem;
	top: 1rem;
	width: 2.5rem;
	box-shadow: 0 6px 16px rgba(31, 58, 82, 0.1);
}

.cwk-modal__title {
	color: var(--cwk-primary, #1f3a52);
	font-size: clamp(1.55rem, 3vw, 2.1rem);
	font-weight: 800;
	line-height: 1.15;
	margin: 0 3rem 1.4rem 0;
}

.cwk-form {
	display: grid;
	gap: 1.05rem;
}

.cwk-form[hidden] {
	display: none;
}

.cwk-form__field {
	display: grid;
	gap: 0.4rem;
}

.cwk-form label {
	color: #24384a;
	font-size: 0.96rem;
	font-weight: 700;
}

.cwk-form__required {
	color: #9f2f2f;
}

.cwk-form input,
.cwk-form select,
.cwk-form textarea {
	background: #fff;
	border: 1px solid #d8e0e7;
	border-radius: 0.8rem;
	box-sizing: border-box;
	color: #182835;
	font: inherit;
	min-height: 2.95rem;
	padding: 0.72rem 0.9rem;
	transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
	width: 100%;
}

.cwk-form input:hover,
.cwk-form select:hover,
.cwk-form textarea:hover {
	border-color: #bfccd7;
}

.cwk-form input:focus,
.cwk-form select:focus,
.cwk-form textarea:focus {
	background: #fff;
	border-color: var(--cwk-primary, #1f3a52);
	box-shadow: 0 0 0 4px rgba(31, 58, 82, 0.12);
}

.cwk-form textarea {
	min-height: 7rem;
	resize: vertical;
}

.cwk-form__actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: flex-start;
	padding-top: 0.25rem;
}

.cwk-form__error {
	color: #9f2f2f;
	font-size: 0.92rem;
	font-weight: 700;
	margin: 0;
}

.cwk-form__success {
	background: #fff;
	border: 1px solid #d8e0e7;
	border-left: 5px solid var(--cwk-primary, #1f3a52);
	border-radius: 0.95rem;
	box-shadow: 0 14px 30px rgba(31, 58, 82, 0.1);
	color: var(--cwk-primary, #1f3a52);
	font-size: 1.08rem;
	font-weight: 800;
	line-height: 1.45;
	padding: 1.15rem 1.2rem;
}

.cwk-honeypot {
	height: 0;
	left: -9999px;
	overflow: hidden;
	position: absolute;
	width: 0;
}

.cwk-form__submit:disabled {
	cursor: wait;
	opacity: 0.7;
	transform: none;
}

body.cwk-modal-open {
	overflow: hidden;
}

@media (max-width: 540px) {
	.cwk-popup-buttons,
	.cwk-popup-button,
	.cwk-form__submit {
		width: 100%;
	}

	.cwk-popup-buttons {
		gap: 0.75rem;
		margin: 1.1rem auto;
	}

	.cwk-modal__dialog {
		border-radius: 0.95rem;
		max-height: calc(100vh - 1rem);
		width: calc(100vw - 1rem);
	}

	.cwk-modal__title {
		font-size: 1.35rem;
	}
}
