/**
 * Absolute Contact Widget - frontend styles
 */

.acw-widget {
	position: fixed;
	bottom: var(--acw-offset-bottom, 25px);
	z-index: 99999;
	font-family: inherit;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
}

.acw-widget.acw-pos-right { right: var(--acw-offset-x, 25px); }
.acw-widget.acw-pos-left  { left: var(--acw-offset-x, 25px); }

.acw-widget *,
.acw-widget *::before,
.acw-widget *::after { box-sizing: border-box; }

/* ---------------------------------------------------------- Channel stack */

.acw-channels {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--acw-icon-gap, 8px);
	margin-bottom: var(--acw-icon-gap, 8px);
	pointer-events: none;
}

.acw-channel {
	position: relative;
	display: flex;
	align-items: center;
	opacity: 0;
	transform: translateY(12px) scale(0.6);
	visibility: hidden;
	transition: opacity .2s ease, transform .25s cubic-bezier(.17,.67,.32,1.4), visibility .2s;
	transition-delay: 0s;
}

.acw-widget.acw-open .acw-channels { pointer-events: auto; }

.acw-widget.acw-open .acw-channel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
	transition-delay: var(--acw-delay, 0s);
}

.acw-channel-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--acw-icon-size, 45px);
	height: var(--acw-icon-size, 45px);
	padding: 0;
	margin: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	text-decoration: none;
	box-shadow: 0 16px 24px 0 rgba(73, 104, 126, .16);
	transition: transform .2s ease, box-shadow .2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.acw-channel-btn:hover,
.acw-channel-btn:focus-visible {
	transform: scale(1.08);
	box-shadow: 0 18px 28px 0 rgba(73, 104, 126, .24);
	outline: none;
}

.acw-channel-btn .acw-icon {
	width: 58%;
	height: 58%;
	display: block;
	color: inherit;
}

/* ------------------------------------------------------------- Tooltips */

.acw-tooltip {
	position: absolute;
	top: 50%;
	transform: translateY(-50%) scale(.85);
	background: var(--acw-tooltip-bg, #fff);
	color: var(--acw-tooltip-color, #333);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	padding: 9px 14px;
	border-radius: 20px;
	white-space: nowrap;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .12);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.acw-pos-right .acw-tooltip { right: calc(100% + 10px); }
.acw-pos-left  .acw-tooltip { left: calc(100% + 10px); }

.acw-channel:hover .acw-tooltip,
.acw-channel-btn:focus-visible + .acw-tooltip,
.acw-channel:focus-within .acw-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) scale(1);
}

.acw-tooltip:empty { display: none; }

/* --------------------------------------------------------- Toggle button */

.acw-toggle-wrap {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.acw-pos-left .acw-toggle-wrap { justify-content: flex-start; }

.acw-toggle-wrap:hover .acw-toggle-tooltip,
.acw-toggle:focus-visible ~ .acw-toggle-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateY(-50%) scale(1);
}

.acw-toggle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--acw-toggle-size, 52px);
	height: var(--acw-toggle-size, 52px);
	padding: 0;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	background-color: var(--acw-toggle-bg, #ed1c24);
	color: var(--acw-toggle-color, #fff);
	box-shadow: 0 16px 24px 0 rgba(73, 104, 126, .22);
	transition: transform .25s ease, box-shadow .2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.acw-toggle:hover { transform: scale(1.06); }
.acw-toggle:focus-visible { outline: 2px solid var(--acw-toggle-bg, #ed1c24); outline-offset: 3px; }

.acw-toggle-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .2s ease, transform .3s ease;
}

.acw-toggle-icon .acw-icon {
	width: 52%;
	height: 52%;
	display: block;
	color: inherit;
}

.acw-toggle-close { opacity: 0; transform: rotate(-90deg) scale(.6); }

.acw-widget.acw-open .acw-toggle-open  { opacity: 0; transform: rotate(90deg) scale(.6); }
.acw-widget.acw-open .acw-toggle-close { opacity: 1; transform: rotate(0) scale(1); }

/* ------------------------------------------------------------ Form panel */

.acw-form-panel {
	position: absolute;
	bottom: calc(100% + 12px);
	width: var(--acw-form-width, 320px);
	max-width: calc(100vw - 30px);
	background: var(--acw-body-bg, #fff);
	border-radius: 8px;
	box-shadow: 0 5px 40px 0 rgba(0, 0, 0, .16);
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px) scale(.96);
	transform-origin: bottom right;
	transition: opacity .22s ease, transform .22s ease, visibility .22s;
	overflow: hidden;
}

.acw-pos-right .acw-form-panel { right: 0; }
.acw-pos-left  .acw-form-panel { left: 0; transform-origin: bottom left; }

.acw-widget.acw-form-open .acw-form-panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.acw-form-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 15px;
	min-height: 46px;
	background: var(--acw-head-bg, #ed1c24);
	color: var(--acw-head-color, #fff);
	border-radius: 8px 8px 0 0;
}

.acw-form-title {
	font-size: 18px;
	font-weight: 500;
	line-height: 26px;
	color: inherit;
}

.acw-form-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	border-radius: 50%;
	transition: background .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.acw-form-close:hover { background: rgba(255, 255, 255, .18); }
.acw-form-close .acw-icon { width: 22px; height: 22px; color: inherit; }

.acw-form-body {
	padding: 15px;
	max-height: min(70vh, 520px);
	overflow-y: auto;
	background: var(--acw-body-bg, #fff);
	border-radius: 0 0 8px 8px;
}

/* ------------------------------------- Contact Form 7 restyle (scoped) */

.acw-form-body .wpcf7 { margin: 0; padding: 0; }
.acw-form-body .wpcf7 form { margin: 0; }

.acw-form-body .wpcf7 p {
	margin: 0 0 12px;
	padding: 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--acw-label-color, #28303d);
}

.acw-form-body .wpcf7 p:last-of-type { margin-bottom: 0; }

.acw-form-body .wpcf7 label {
	display: block;
	width: 100%;
	margin: 0 0 6px;
	font-size: 14px;
	font-weight: 500;
	line-height: 24px;
	color: var(--acw-label-color, #28303d);
}

.acw-form-body .wpcf7 .wpcf7-form-control-wrap { display: block; width: 100%; }

.acw-form-body .wpcf7 input[type="text"],
.acw-form-body .wpcf7 input[type="email"],
.acw-form-body .wpcf7 input[type="tel"],
.acw-form-body .wpcf7 input[type="url"],
.acw-form-body .wpcf7 input[type="number"],
.acw-form-body .wpcf7 input[type="date"],
.acw-form-body .wpcf7 select,
.acw-form-body .wpcf7 textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	height: 36px;
	margin: 0;
	padding: 0 10px;
	font-size: 16px;
	font-family: inherit;
	line-height: 34px;
	color: var(--acw-input-color, #28303d);
	background: var(--acw-input-bg, #fff);
	border: 0.8px solid var(--acw-input-border, #ccc);
	border-radius: var(--acw-input-radius, 4px);
	box-shadow: none;
	transition: border-color .18s ease, box-shadow .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.acw-form-body .wpcf7 select {
	padding-right: 28px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23666' d='M7.4 9.3 12 13.9l4.6-4.6L18 10.7l-6 6-6-6z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 6px center;
	background-size: 18px 18px;
}

.acw-form-body .wpcf7 textarea {
	height: 100px;
	min-height: 100px;
	padding: 10px;
	line-height: 20px;
	resize: vertical;
}

.acw-form-body .wpcf7 input:focus,
.acw-form-body .wpcf7 select:focus,
.acw-form-body .wpcf7 textarea:focus {
	outline: none;
	border-color: var(--acw-btn-bg, #ed1c24);
	box-shadow: 0 0 0 2px rgba(0, 0, 0, .04);
}

.acw-form-body .wpcf7 input::placeholder,
.acw-form-body .wpcf7 textarea::placeholder { color: #9aa1ab; opacity: 1; }

/* Required marker */
.acw-form-body .wpcf7 label .acw-req,
.acw-form-body .wpcf7 .required { color: var(--acw-required-color, #ed1c24); }

/* Submit button */
.acw-form-body .wpcf7 input[type="submit"],
.acw-form-body .wpcf7 button[type="submit"],
.acw-form-body .wpcf7 .wpcf7-submit {
	display: block;
	width: 100%;
	height: 40px;
	margin: 4px 0 0;
	padding: 0 12px;
	font-size: 18px;
	font-weight: 500;
	font-family: inherit;
	line-height: 40px;
	text-transform: var(--acw-btn-transform, uppercase);
	letter-spacing: normal;
	color: var(--acw-btn-color, #fff);
	background: var(--acw-btn-bg, #ed1c24);
	border: 0;
	border-radius: var(--acw-btn-radius, 4px);
	cursor: pointer;
	transition: background .18s ease, opacity .18s ease;
	-webkit-appearance: none;
	appearance: none;
}

.acw-form-body .wpcf7 input[type="submit"]:hover,
.acw-form-body .wpcf7 .wpcf7-submit:hover { background: var(--acw-btn-hover-bg, #c9141b); }

.acw-form-body .wpcf7 .wpcf7-spinner { margin: 8px auto 0; display: block; }

/* CF7 response messages */
.acw-form-body .wpcf7 .wpcf7-response-output {
	margin: 12px 0 0;
	padding: 8px 10px;
	font-size: 13px;
	line-height: 1.4;
	border-width: 1px;
	border-radius: var(--acw-input-radius, 4px);
}

.acw-form-body .wpcf7 .wpcf7-not-valid-tip {
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.3;
	color: var(--acw-required-color, #ed1c24);
}

.acw-form-body .wpcf7 .wpcf7-not-valid { border-color: var(--acw-required-color, #ed1c24); }

.acw-form-body .wpcf7 .wpcf7-list-item { margin: 0 12px 0 0; }

/* ------------------------------------------------------------- Responsive */

@media (max-width: 480px) {
	.acw-form-panel { width: calc(100vw - 30px); }
	.acw-pos-right .acw-form-panel { right: 0; }
	.acw-pos-left  .acw-form-panel { left: 0; }
}

@media (prefers-reduced-motion: reduce) {
	.acw-widget *,
	.acw-widget *::before,
	.acw-widget *::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
	}
}
