/* Floating Form Styles */

.simple_form_container.bottom-right,
.simple_form_container.bottom-left {
	position: fixed;
	bottom: 20px;
	z-index: 99999;
	display: block;
}

.simple_form_container.bottom-right {
	right: 20px;
	left: auto;
}

.simple_form_container.bottom-left {
	left: 20px;
	right: auto;
}

/* Toggle Button */
.simple_form_toggle {
	cursor: pointer;
	background-color: #4a6cf7;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	transition: all 0.3s ease;
	margin-left: unset;
	overflow: hidden;
	position: relative;
	z-index: 99999;
}

.simple_form_toggle.has-custom-icon {
	background: transparent;
	background-color: transparent;
	padding: 0;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}

.simple_form_toggle_icon {
	color: white;
	display: flex;
	align-items: center;
	justify-content: center;
}

.simple_form_toggle.has-custom-icon .simple_form_toggle_icon {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	overflow: hidden;
	display: flex;
}

.simple_form_toggle.has-custom-icon .simple_form_custom_toggle_icon {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.simple_form_toggle:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
}

.simple_form_header {
	background: linear-gradient(135deg, #4a6cf7, #3c57d0);
	color: white;
	padding: 15px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.simple_form_header .header-left {
	display: flex;
	align-items: center;
}

.simple_form_header .header-info {
	display: flex;
	flex-direction: column;
}

.simple_form_header .header-info h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: white;
}

.simple_form_header .header_actions {
	display: flex;
	gap: 8px;
}

.simple_form_header .action-btn {
	background: none;
	border: none;
	color: white;
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-left: 5px;
	transition: background-color 0.2s;
}

.simple_form_header .action-btn:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.simple_form_close,
.simple_form_expand_btn {
	background: none;
	border: none;
	cursor: pointer;
	color: #667085;
	padding: 4px;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.simple_form_close:hover,
.simple_form_expand_btn:hover {
	background-color: #ffffff38;
	color: #111827;
}

/* Floating Container Scoped to Floating Form */
.simple_form_container.bottom-right .simple_form_floating_container,
.simple_form_container.bottom-left .simple_form_floating_container {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
	width: 350px;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 0.3s ease, transform 0.3s ease, width 0.3s ease, height 0.3s ease;
}

.simple_form_container.bottom-right .simple_form_floating_container.visible,
.simple_form_container.bottom-left .simple_form_floating_container.visible {
	opacity: 1;
	transform: translateY(0);
}

/* Expanded state */
.simple_form_container.bottom-right .simple_form_floating_container.expanded,
.simple_form_container.bottom-left .simple_form_floating_container.expanded {
	width: 450px;
	height: 600px;
	transition: width 0.3s ease, height 0.3s ease;
}

/* Form Content inside floating panel */
.simple_form.floating-form {
	max-height: 54vh;
	overflow-y: auto;
	padding: 10px;
}

/* Footer */
.simple_form_footer {
	padding: 10px 15px;
	text-align: center;
	font-size: 12px;
	color: #667085;
	background-color: #f5f7fb;
	border-top: 1px solid #eaecf0;
}

/* CTA Tooltip / Badge */
.simple_form_cta_badge {
	position: absolute;
	bottom: 72px;
	background: #ffffff;
	color: #1f2937;
	padding: 8px 14px;
	border-radius: 20px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.15);
	border: 1px solid rgba(0, 0, 0, 0.06);
	font-size: 13px;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
	cursor: pointer;
	z-index: 100000;
	animation: ctaFloat 3s ease-in-out infinite;
	transition: opacity 0.25s ease, transform 0.25s ease;
}

.simple_form_cta_badge.bottom-right {
	right: 0;
}

.simple_form_cta_badge.bottom-left {
	left: 0;
}

.simple_form_cta_badge.bottom-right::after {
	content: "";
	position: absolute;
	bottom: -6px;
	right: 22px;
	width: 12px;
	height: 12px;
	background: #ffffff;
	transform: rotate(45deg);
	border-right: 1px solid rgba(0, 0, 0, 0.06);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.simple_form_cta_badge.bottom-left::after {
	content: "";
	position: absolute;
	bottom: -6px;
	left: 22px;
	width: 12px;
	height: 12px;
	background: #ffffff;
	transform: rotate(45deg);
	border-right: 1px solid rgba(0, 0, 0, 0.06);
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.simple_form_cta_close {
	background: none;
	border: none;
	font-size: 16px;
	line-height: 1;
	color: #9ca3af;
	cursor: pointer;
	padding: 0 0 0 4px;
	display: flex;
	align-items: center;
}

.simple_form_cta_close:hover {
	color: #ef4444;
}

.simple_form_custom_toggle_icon {
	max-width: 40px;
	max-height: 40px;
	object-fit: contain;
	display: block;
	pointer-events: none;
}

/* Avoid overlapping when both global and shortcode floating forms exist on the same page */
.simple_form_container.bottom-right~.simple_form_global_floating.bottom-right,
.simple_form_global_floating.bottom-right~.simple_form_container.bottom-right {
	bottom: 92px;
}

.simple_form_container.bottom-left~.simple_form_global_floating.bottom-left,
.simple_form_global_floating.bottom-left~.simple_form_container.bottom-left {
	bottom: 92px;
}

/* Full width submit button inside floating form */
.simple_form_floating_container button.sf-form-submit,
.simple_form_container[data-full-width-btn="true"] button.sf-form-submit {
	width: 100%;
	display: block;
}

/* Animations */
@keyframes attention {
	0% {
		transform: scale(1);
		box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	}

	10% {
		transform: scale(1.1);
	}

	20% {
		transform: scale(1);
	}

	30% {
		transform: scale(1.1);
		box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
	}

	40% {
		transform: scale(1);
	}

	50% {
		transform: scale(1.1);
		box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
	}

	60% {
		transform: scale(1);
	}

	70% {
		transform: scale(1.05);
	}

	100% {
		transform: scale(1);
		box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	}
}

.simple_form_attention {
	animation: attention 1.8s ease forwards;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(720deg);
	}
}

.simple_form_spin {
	animation: spin 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes ctaFloat {

	0%,
	100% {
		transform: translateY(0);
	}

	50% {
		transform: translateY(-4px);
	}
}

/* Responsive Styles */
@media (max-width: 767px) {

	.simple_form_container.bottom-right .simple_form_floating_container,
	.simple_form_container.bottom-left .simple_form_floating_container {
		width: calc(100vw - 40px);
		max-width: 350px;
		max-height: 75vh;
	}

	.simple_form.floating-form {
		max-height: 50vh;
		padding: 8px;
	}

	.simple_form_header {
		padding: 12px 10px;
	}

	.simple_form_header .header-info h3 {
		font-size: 14px;
	}

	.simple_form_container.bottom-right,
	.simple_form_container.bottom-left {
		bottom: 15px;
	}
}

@media (max-width: 480px) {

	.simple_form_container.bottom-right .simple_form_floating_container,
	.simple_form_container.bottom-left .simple_form_floating_container {
		width: calc(100vw - 20px);
		max-width: 320px;
		max-height: 70vh;
	}

	.simple_form_container.bottom-right .simple_form_toggle,
	.simple_form_container.bottom-left .simple_form_toggle,
	.simple_form_toggle {
		width: 50px;
		height: 50px;
	}

	.simple_form_container.bottom-right {
		right: 10px;
	}

	.simple_form_container.bottom-left {
		left: 10px;
	}

	.action-btn {
		width: 25px;
		height: 25px;
	}

	.simple_form_container.bottom-right .simple_form_floating_container.expanded,
	.simple_form_container.bottom-left .simple_form_floating_container.expanded {
		width: 100%;
		max-width: none;
		height: 85vh;
		left: 0;
		right: 0;
		bottom: 0;
		top: auto;
		border-radius: 12px 12px 0 0;
		position: fixed;
	}
}