.form__input-wrapper:has(> .form__input-container > .captcha-select-group),
.form__input-container:has(> .captcha-select-group),
.captcha-select-group,
.input_group.captcha-select-group {
	width: 100%;
	max-width: 400px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	height: auto;
	padding: 0;
	overflow: visible;
	box-sizing: border-box;
	border: none;
}

.input_group.captcha-select-group select#select_captcha,
select.form__input#select_captcha {
	width: 100%;
	max-width: 100%;
	height: 40px;
	padding: 0 36px 0 14px;
	box-sizing: border-box;
	border: 1px solid #e6eaee;
	border-radius: 10px;
	background-color: #fff;
	color: #111827;
	font-size: 14px;
	font-weight: 600;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	cursor: pointer;
}

.input_group.captcha-select-group select#select_captcha::-ms-expand,
select.form__input#select_captcha::-ms-expand {
	display: none;
}

.dark_mode .input_group.captcha-select-group select#select_captcha,
.dark_mode select.form__input#select_captcha {
	background-color: #15181f;
	border-color: #32363e;
	color: #f3f4f6;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%239ca3af' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

#captcha_container {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	max-width: 400px;
	margin: 6px auto 0;
	text-align: center;
	box-sizing: border-box;
}

#iconCaptchaBox,
#captcha_container .iconcaptcha-widget {
	display: block;
	width: 100%;
	max-width: 400px;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box;
	background: #FFF;
    border-radius: 5px;
}

#dynamicCaptchaBox,
#pCaptchaBox {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	max-width: 400px;
	min-height: 0;
	margin-left: auto;
	margin-right: auto;
	background: transparent;
	box-sizing: border-box;
}

#dynamicCaptchaBox:empty {
	display: none;
}

#dynamicCaptchaBox .p-captcha-mount,
#dynamicCaptchaBox .g-recaptcha,
#dynamicCaptchaBox .h-captcha,
#dynamicCaptchaBox iframe,
#pCaptchaBox .captcha-container,
#pCaptchaBox .p-captcha-mount {
	margin-left: auto !important;
	margin-right: auto !important;
	background: transparent;
}

#dynamicCaptchaBox .p-captcha-mount,
#dynamicCaptchaBox .g-recaptcha,
#dynamicCaptchaBox .h-captcha {
	width: auto !important;
	max-width: 100% !important;
	display: flex !important;
	justify-content: center !important;
	align-items: center !important;
}

#dynamicCaptchaBox .js-turnstile-mount {
	width: 300px;
	max-width: 100%;
	min-height: 65px;
	margin-left: auto;
	margin-right: auto;
	display: block;
}

#dynamicCaptchaBox .js-turnstile-mount iframe {
	width: 300px !important;
	height: 65px !important;
	display: block !important;
}

#iconCaptchaBox {
	display: none;
}

#pCaptchaBox {
	display: none;
	margin-top: 0;
}

#captcha_container + .form__input-wrapper.form__submit .btn {
	width: 100% !important;
	max-width: 400px;
	margin-left: auto;
	margin-right: auto;
	display: block;
}

/* IconCaptcha always keeps light theme, even when site is dark */
.dark_mode .iconcaptcha-widget,
.dark_mode .iconcaptcha-widget.iconcaptcha-theme-light,
.dark_mode .iconcaptcha-widget.iconcaptcha-theme-dark {
	background: #fafafa !important;
	border: 1px solid #d8d8d8 !important;
	color: #464646 !important;
}

.dark_mode .iconcaptcha-widget.iconcaptcha-init:hover {
	background: #f1f1f1 !important;
}

.dark_mode .iconcaptcha-widget .iconcaptcha-modal__header {
	border-bottom: 2px solid #d8d8d8 !important;
}

.dark_mode .iconcaptcha-widget .iconcaptcha-modal__header span {
	color: #1d1d1d !important;
}

.dark_mode .iconcaptcha-widget.iconcaptcha-init .iconcaptcha-modal__body-title,
.dark_mode .iconcaptcha-widget.iconcaptcha-success .iconcaptcha-modal__body-title {
	color: #464646 !important;
}

.dark_mode .iconcaptcha-widget .iconcaptcha-modal__body-subtitle {
	color: #9e9e9e !important;
}

.dark_mode .iconcaptcha-widget .iconcaptcha-modal__body-info a {
	color: #afafaf !important;
}

.dark_mode .iconcaptcha-widget .iconcaptcha-modal__footer {
	color: #a7a7a7 !important;
	border-top: 2px solid #d8d8d8 !important;
}

.dark_mode .iconcaptcha-widget .iconcaptcha-modal__footer > span a {
	color: #448aff !important;
}

.dark_mode .iconcaptcha-widget .iconcaptcha-modal__footer > span a:hover {
	color: #74a8ff !important;
}

.dark_mode .iconcaptcha-widget.iconcaptcha-init .iconcaptcha-modal__body-circle,
.dark_mode .iconcaptcha-widget .iconcaptcha-modal__body .captcha-loader {
	border-color: #52b3d9 !important;
}

.dark_mode .iconcaptcha-widget .iconcaptcha-modal__body-selection > i {
	background: #52b3d9 !important;
}

.dark_mode .iconcaptcha-widget.iconcaptcha-success .iconcaptcha-modal__body-title {
	color: #5bd25b !important;
}

.dark_mode .iconcaptcha-widget.iconcaptcha-success .iconcaptcha-modal__body-checkmark svg {
	stroke: #5bd25b !important;
}

.dark_mode .iconcaptcha-widget.iconcaptcha-error .iconcaptcha-modal__body-title {
	color: #ef5858 !important;
}
