/*
 * Talk to Sales modal.
 *
 * The z-index has to clear two things: the sticky site header, which renders
 * above the --z-modal token scale and sat on top of the original 99999, and
 * Calendly's own overlay at 9999.
 */

.cgpt-tts {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: var(--sp6, 32px) var(--sp4, 16px);
	overflow-y: auto;
	background: rgba(47, 43, 61, 0.55);
	-webkit-overflow-scrolling: touch;
}

/* Must outrank the display:flex above. */
.cgpt-tts[hidden] {
	display: none;
}

.cgpt-tts__dialog {
	position: relative;
	width: 100%;
	max-width: 720px;
	min-height: 640px;
	padding: var(--sp6, 32px);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 24px 64px rgba(47, 43, 61, 0.24);
	font-family: var(--font, "Public Sans", "Inter", system-ui, sans-serif);
	color: var(--color-text, #2f2b3d);
}

/* Focused programmatically when the modal opens. */
.cgpt-tts__dialog:focus {
	outline: none;
}

.cgpt-tts__close {
	position: absolute;
	top: 12px;
	right: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: none;
	color: var(--color-text-body, #6d6b77);
	cursor: pointer;
	transition: background var(--trans-fast, 0.15s ease), color var(--trans-fast, 0.15s ease);
}

.cgpt-tts__close:hover,
.cgpt-tts__close:focus-visible {
	background: var(--color-bg-neutral, #f3f2f5);
	color: var(--color-text, #2f2b3d);
}

.cgpt-tts__close:focus-visible {
	outline: 2px solid var(--color-primary, #7367f0);
	outline-offset: 2px;
}

/* Shown until HubSpot's onFormReady fires, since the form now loads on demand. */
.cgpt-tts__loading {
	margin: 0;
	padding: var(--sp6, 32px) 0;
	color: var(--color-text-muted, #a8aaae);
	font-size: var(--body-14-size, 14px);
	text-align: center;
}

.cgpt-tts.is-form-ready .cgpt-tts__loading {
	display: none;
}

/*
 * Light touch only: HubSpot ships its own stylesheet for the embed and fighting
 * it wholesale causes more breakage than it fixes.
 */
.cgpt-tts__form {
	padding-top: var(--sp3, 12px);
}

.cgpt-tts__form,
.cgpt-tts__form input,
.cgpt-tts__form select,
.cgpt-tts__form textarea,
.cgpt-tts__form button {
	font-family: inherit;
}

.cgpt-tts__form input[type="text"],
.cgpt-tts__form input[type="email"],
.cgpt-tts__form input[type="tel"],
.cgpt-tts__form select,
.cgpt-tts__form textarea {
	box-sizing: border-box;
	width: 100%;
}

@media (max-width: 640px) {
	.cgpt-tts {
		padding: 0;
	}

	.cgpt-tts__dialog {
		min-height: 100vh;
		padding: 56px var(--sp4, 16px) var(--sp6, 32px);
		border-radius: 0;
	}
}
