/**
 * Take Effect — floating contact widget (front end).
 */

.tet-floating-contact {
	position: fixed;
	right: max(1rem, env(safe-area-inset-right, 0px));
	bottom: max(1rem, env(safe-area-inset-bottom, 0px));
	z-index: 100000;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: flex-end;
	gap: 0.75rem;
	font-family: "Open Sans", Arial, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
	box-sizing: border-box;
	/* Panel is absolutely positioned so it does not affect FAB layout/stacking. */
	min-height: 3.5rem;
}

.tet-floating-contact *,
.tet-floating-contact *::before,
.tet-floating-contact *::after {
	box-sizing: inherit;
}

/* Panel */
.tet-floating-contact__panel {
	position: absolute;
	right: 0;
	bottom: calc(3.5rem + 0.75rem);
	z-index: 1;
	width: min(100vw - 2rem, 22rem);
	max-height: min(70vh, 28rem);
	display: flex;
	flex-direction: column;
	background: #fff;
	color: #1a1a1a;
	border-radius: 0.75rem;
	box-shadow:
		0 0.25rem 1.25rem rgba(0, 0, 0, 0.12),
		0 0.5rem 2rem rgba(0, 0, 0, 0.08);
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(0.5rem) scale(0.98);
	transform-origin: bottom right;
	pointer-events: none;
	transition:
		opacity 0.2s ease,
		visibility 0.2s ease,
		transform 0.2s ease;
}

.tet-floating-contact.is-open .tet-floating-contact__panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.tet-floating-contact__header {
	position: relative;
	flex-shrink: 0;
	padding: 0.875rem 2.75rem 0.625rem 1rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.tet-floating-contact__title {
	margin: 0;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
}

.tet-floating-contact__close {
	position: absolute;
	top: 0.375rem;
	right: 0.375rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	margin: 0;
	border: none;
	border-radius: 0.375rem;
	background: transparent;
	color: #333;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.tet-floating-contact__close:hover {
	background: rgba(0, 0, 0, 0.06);
	color: #000;
}

.tet-floating-contact__close:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.tet-floating-contact__close-icon {
	display: flex;
	line-height: 0;
}

.tet-floating-contact__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 1rem;
	-webkit-overflow-scrolling: touch;
}

/* CF7: stack fields in narrow panel */
.tet-floating-contact__body .wpcf7-form label {
	display: block;
	width: 100%;
	margin-bottom: 0.5rem;
	font-size: 0.875rem;
}

.tet-floating-contact__body .wpcf7-form-control-wrap {
	display: block;
	width: 100%;
	margin-bottom: 0.75rem;
}

.tet-floating-contact__body .wpcf7-form-control:not(.wpcf7-submit) {
	width: 100%;
	max-width: 100%;
	padding: 0.5rem 0.625rem;
	font-size: 1rem;
}

.tet-floating-contact__body .wpcf7-submit {
	width: 100%;
	margin-top: 0.25rem;
	cursor: pointer;
}

/* FAB */
.tet-floating-contact__fab {
	position: relative;
	z-index: 2;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background-color: var(--wp--preset--color--custom-tet-green, #2d6a4f);
	color: #fff;
	cursor: pointer;
	box-shadow:
		0 0.125rem 0.5rem rgba(0, 0, 0, 0.15),
		0 0.25rem 1rem rgba(0, 0, 0, 0.1);
	transition:
		transform 0.15s ease,
		box-shadow 0.15s ease,
		filter 0.15s ease;
}

.tet-floating-contact__fab:hover {
	filter: brightness(1.05);
	box-shadow:
		0 0.2rem 0.65rem rgba(0, 0, 0, 0.18),
		0 0.35rem 1.1rem rgba(0, 0, 0, 0.12);
}

.tet-floating-contact__fab:active {
	transform: scale(0.96);
}

.tet-floating-contact__fab:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.tet-floating-contact__fab-icon {
	display: flex;
	line-height: 0;
}
.tet-floating-contact__form-wrapper .wpcf7-list-item {
	margin: 0
}
.tet-floating-contact__form-wrapper .wpcf7-list-item-label,
.tet-floating-contact__form-wrapper .wpcf7-list-item-label a {
	font-size: 0.875rem
}
.tet-floating-contact__form-wrapper .te-consent,
.tet-floating-contact__form-wrapper .te-marketing,
.tet-floating-contact__form-wrapper .te-consent .wpcf7-form-control-wrap,
.tet-floating-contact__form-wrapper .te-marketing .wpcf7-form-control-wrap {
	margin-bottom: 0;
}
.tet-floating-contact__form-wrapper .checkboxes {
	display: flex;
    gap: 0;
    flex-direction: column;
    height: auto;
}
.tet-floating-contact__form-wrapper .checkboxes p {
	margin: 0
}