/**
 * RapidUtils Contact Form frontend styles.
 */

.rapid-utils-contact-form-wrap {
	max-width: 720px;
}

.rapid-utils-contact-form-field {
	margin: 0 0 1rem;
}

.rapid-utils-contact-required {
	color: #c62828;
	font-weight: 700;
}

.rapid-utils-contact-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.rapid-utils-contact-phone {
	display: block;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

.rapid-utils-contact-phone [hidden] {
	display: none !important;
}

.rapid-utils-contact-phone-entry {
	display: flex;
	align-items: stretch;
	width: 100%;
	max-width: 100%;
}

.rapid-utils-contact-phone-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.3rem;
	box-sizing: border-box;
	flex: 0 0 auto;
	min-width: 3.5rem;
	max-width: 7rem;
	margin: 0;
	padding: 0.5rem;
	border: 1px solid #8c8f94;
	border-radius: 4px 0 0 4px;
	background: #fff;
	color: inherit;
	font: inherit;
	line-height: 1;
	cursor: pointer;
}

.rapid-utils-contact-phone-toggle:focus-visible,
.rapid-utils-contact-phone-option:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.rapid-utils-contact-phone-globe {
	width: 1.15rem;
	height: 1.15rem;
	flex: 0 0 auto;
}

.rapid-utils-contact-phone-selected {
	white-space: nowrap;
}

.rapid-utils-contact-phone-chevron {
	width: 0.35rem;
	height: 0.35rem;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: rotate(45deg) translateY(-0.1rem);
}

.rapid-utils-contact-plus {
	display: inline-block;
	position: relative;
	top: var(--rapid-utils-phone-symbol-offset, 0px);
	width: var(--rapid-utils-phone-symbol-size, 0.65em);
	height: var(--rapid-utils-phone-symbol-size, 0.65em);
	margin-right: 0.05em;
	vertical-align: 0;
}

.rapid-utils-contact-plus::before,
.rapid-utils-contact-plus::after {
	content: '';
	position: absolute;
	background: currentColor;
	border-radius: 1px;
}

.rapid-utils-contact-plus::before {
	left: 0;
	top: 50%;
	width: 100%;
	height: var(--rapid-utils-phone-symbol-stroke, 0.11em);
	transform: translateY(-50%);
}

.rapid-utils-contact-plus::after {
	left: 50%;
	top: 0;
	width: var(--rapid-utils-phone-symbol-stroke, 0.11em);
	height: 100%;
	transform: translateX(-50%);
}

.rapid-utils-contact-phone input[type="tel"] {
	flex: 1 1 0;
	min-width: 0;
	width: 1%;
	max-width: 100%;
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
}

.rapid-utils-contact-phone-menu {
	display: block;
	position: absolute;
	z-index: 100;
	top: calc(100% + 0.25rem);
	left: 0;
	box-sizing: border-box;
	width: min(19rem, 100%);
	max-height: min(20rem, 50vh);
	padding: 0.5rem;
	overflow-y: auto;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	background: #fff;
	color: #1d2327;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.rapid-utils-contact-phone-search {
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 0.35rem;
	padding: 0.4rem 0.6rem;
	font: inherit;
}

.rapid-utils-contact-phone-options {
	display: block;
}

.rapid-utils-contact-phone-option {
	display: block;
	box-sizing: border-box;
	width: 100%;
	padding: 0.45rem 0.65rem;
	border: 0;
	border-radius: 3px;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
}

.rapid-utils-contact-phone-option:hover,
.rapid-utils-contact-phone-option[aria-current="true"] {
	background: #e9edf3;
}

.rapid-utils-contact-phone-empty {
	display: block;
	padding: 0.5rem;
}

.rapid-utils-contact-phone-hint {
	display: block;
	margin-top: 0.3rem;
}

.rapid-utils-contact-form input[type="text"],
.rapid-utils-contact-form input[type="email"],
.rapid-utils-contact-form input[type="tel"],
.rapid-utils-contact-form input[type="number"],
.rapid-utils-contact-form textarea {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
}

.rapid-utils-contact-form textarea {
	resize: vertical;
}

.rapid-utils-contact-form-message {
	margin: 0 0 1rem;
	padding: 0.75rem 1rem;
	border: 1px solid currentColor;
}

.rapid-utils-contact-form-toast {
	position: fixed;
	top: 1rem;
	right: 1rem;
	z-index: 99999;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	box-sizing: border-box;
	max-width: min(26rem, calc(100vw - 2rem));
	padding: 0.8rem 1rem;
	background: #fff;
	color: #1d2327;
	border: 1px solid #46b450;
	border-radius: 6px;
	box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
}

.rapid-utils-contact-form-toast-top-left {
	right: auto;
	left: 1rem;
}

.rapid-utils-contact-form-toast-bottom-left,
.rapid-utils-contact-form-toast-bottom-right {
	top: auto;
	bottom: 1rem;
}

.rapid-utils-contact-form-toast-bottom-left {
	right: auto;
	left: 1rem;
}

.rapid-utils-contact-form-toast-center {
	top: 50%;
	left: 50%;
	right: auto;
	transform: translate(-50%, -50%);
}

.rapid-utils-contact-form-toast-close {
	flex: 0 0 auto;
	margin: 0 0 0 auto;
	padding: 0;
	min-width: 1.5rem;
	min-height: 1.5rem;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 600px) {
	.rapid-utils-contact-form-toast {
		max-width: calc(100vw - 1.5rem);
	}

	.rapid-utils-contact-form-toast-top-left,
	.rapid-utils-contact-form-toast-bottom-left {
		left: 0.75rem;
	}

	.rapid-utils-contact-form-toast:not(.rapid-utils-contact-form-toast-center):not(.rapid-utils-contact-form-toast-top-left):not(.rapid-utils-contact-form-toast-bottom-left) {
		right: 0.75rem;
	}

	.rapid-utils-contact-form-toast:not(.rapid-utils-contact-form-toast-center):not(.rapid-utils-contact-form-toast-bottom-left):not(.rapid-utils-contact-form-toast-bottom-right) {
		top: 0.75rem;
	}

	.rapid-utils-contact-form-toast-bottom-left,
	.rapid-utils-contact-form-toast-bottom-right {
		bottom: 0.75rem;
	}
}
