.thdmf-is-open {
	overflow: hidden;
}

.thdmf-modal[hidden] {
	display: none !important;
}

.thdmf-modal {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 24px;
	position: fixed;
	z-index: 999999;
}

.thdmf-modal__overlay {
	background: rgba(0, 0, 0, 0.68);
	inset: 0;
	position: absolute;
}

.thdmf-modal__dialog {
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 20px 70px rgba(0, 0, 0, 0.32);
	box-sizing: border-box;
	color: #111827;
	max-height: min(90vh, 760px);
	max-width: 560px;
	overflow-y: auto;
	padding: clamp(24px, 4vw, 34px);
	position: relative;
	width: min(100%, 560px);
}

.thdmf-modal__dialog:focus {
	outline: 3px solid rgba(17, 24, 39, 0.28);
	outline-offset: 4px;
}

.thdmf-modal__close {
	align-items: center;
	appearance: none;
	background: #f3f4f6;
	border: 0;
	border-radius: 999px;
	color: #111827;
	cursor: pointer;
	display: inline-flex;
	font-size: 30px;
	height: 42px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	position: absolute;
	right: 14px;
	top: 14px;
	width: 42px;
}

.thdmf-modal__close:hover,
.thdmf-modal__close:focus {
	background: #e5e7eb;
	outline: none;
}

.thdmf-modal__title {
	font-size: clamp(24px, 3vw, 32px);
	line-height: 1.15;
	margin: 0 48px 12px 0;
}

.thdmf-modal__description {
	color: #4b5563;
	font-size: 16px;
	line-height: 1.55;
	margin: 0 0 24px;
}

.thdmf-form {
	display: grid;
	gap: 18px;
	margin: 0;
}

.thdmf-field {
	display: grid;
	gap: 8px;
	margin: 0;
}

.thdmf-label,
.thdmf-field legend {
	font-weight: 700;
	line-height: 1.35;
	margin: 0;
}

.thdmf-required {
	color: #b91c1c;
}

.thdmf-field input[type="text"],
.thdmf-field input[type="email"],
.thdmf-field select,
.thdmf-field textarea {
	background: #ffffff;
	border: 1px solid #cfd6df;
	border-radius: 10px;
	box-sizing: border-box;
	color: #111827;
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	padding: 12px 14px;
	width: 100%;
}

.thdmf-field textarea {
	resize: vertical;
}

.thdmf-field input:focus,
.thdmf-field textarea:focus,
.thdmf-field select:focus,
.thdmf-choice input:focus {
	border-color: #111827;
	box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.14);
	outline: none;
}

.thdmf-field.has-error input,
.thdmf-field.has-error textarea,
.thdmf-field.has-error select {
	border-color: #b91c1c;
}

.thdmf-field__error {
	color: #b91c1c;
	font-size: 14px;
	line-height: 1.35;
	min-height: 0;
}

.thdmf-field--choice {
	border: 0;
	padding: 0;
}

.thdmf-choice-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 2px;
}

.thdmf-choice {
	align-items: center;
	background: #f9fafb;
	border: 1px solid #d1d5db;
	border-radius: 999px;
	cursor: pointer;
	display: inline-flex;
	gap: 8px;
	padding: 10px 14px;
}

.thdmf-choice input {
	margin: 0;
}

.thdmf-form__status {
	border-radius: 10px;
	display: none;
	font-size: 15px;
	line-height: 1.45;
	padding: 12px 14px;
}

.thdmf-form__status.is-visible {
	display: block;
}

.thdmf-form__status.is-success {
	background: #ecfdf5;
	color: #065f46;
}

.thdmf-form__status.is-error {
	background: #fef2f2;
	color: #991b1b;
}

.thdmf-trigger-button,
.thdmf-form__submit,
.thdmf-floating-feedback {
	align-items: center;
	appearance: none;
	background: #111827;
	border: 0;
	border-radius: 999px;
	color: #ffffff;
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-weight: 700;
	justify-content: center;
	line-height: 1.2;
	padding: 13px 22px;
	text-decoration: none;
}

.thdmf-trigger-button:hover,
.thdmf-trigger-button:focus,
.thdmf-form__submit:hover,
.thdmf-form__submit:focus,
.thdmf-floating-feedback:hover,
.thdmf-floating-feedback:focus {
	background: #0f172a;
	color: #ffffff;
	text-decoration: none;
}

.thdmf-form__submit {
	width: 100%;
}

.thdmf-form__submit[disabled] {
	cursor: wait;
	opacity: 0.68;
}

.thdmf-floating-feedback {
	bottom: 22px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24);
	position: fixed;
	right: 22px;
	z-index: 999998;
}

.thdmf-honeypot {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px !important;
	overflow: hidden !important;
	position: absolute !important;
	white-space: nowrap;
	width: 1px !important;
}

@media (max-width: 600px) {
	.thdmf-modal {
		align-items: flex-end;
		padding: 14px;
	}

	.thdmf-modal__dialog {
		border-radius: 16px 16px 0 0;
		max-height: calc(100vh - 28px);
		width: 100%;
	}

	.thdmf-choice-list {
		align-items: stretch;
		flex-direction: column;
	}

	.thdmf-floating-feedback {
		bottom: 14px;
		left: 14px;
		right: 14px;
		width: calc(100% - 28px);
	}
}

@media (max-width: 767px) {
	.thdmf-floating-feedback--hide-mobile {
		display: none !important;
	}
}

@media print {
	.thdmf-modal,
	.thdmf-floating-feedback {
		display: none !important;
	}
}
