/**
 * SB Chat popup responsive overrides (loads after sb_chat sb-style.css).
 */

body.sbchat-open {
	overflow: hidden;
}

body .sbchat-modal {
	z-index: 999999;
	padding: 24px 16px;
	box-sizing: border-box;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

body .sbchat-modal-content {
	width: 100%;
	max-width: 640px;
	margin: 0 auto;
	box-sizing: border-box;
	max-height: calc(100vh - 48px);
	max-height: calc(100dvh - 48px);
	overflow-y: auto;
}

@media (max-width: 767px) {
	body .sbchat-modal-content {
		padding: 20px 16px;
		width: 100%;
		max-width: none;
		margin: 0 auto;
	}

	body .sb-message-box textarea.form-control {
		height: 140px;
	}
}

@media (max-height: 520px) {
	body .sbchat-modal {
		padding: 12px 16px;
	}

	body .sb-message-box textarea.form-control {
		height: 100px;
	}
}

/* Google sets inline z-index on the badge; !important is required to stay below the dialog. */
.grecaptcha-badge {
	z-index: 99 !important;
}
