/*
 * Mobile chat pill — Phase 6.1 (revised in 6.4 per Richard's feedback).
 *
 * Single-piece pill: just an input + send arrow. The chat bubble button
 * was removed because "why would I need a chat button next to a chat
 * bar". Pill is itself the chat. Tapping anywhere on it opens Intercom
 * (or no-ops silently if Intercom isn't wired yet — no surprise
 * navigation).
 *
 * Sits above the .mvrc-mobile-bar in the mobile dock stack.
 *
 * @package MedvinciStorefront
 */

/* Default: hide on desktop */
.mvst-chat-pill {
	display: none;
}

/* Mobile only */
@media (max-width: 720px) {
	.mvst-chat-pill {
		position: fixed;
		bottom: 80px; /* clears mvrc-mobile-bar (~64-72px tall + 8px gap) */
		left: 10px;
		right: 10px;
		z-index: 9997;
		display: flex;
		align-items: center;
		gap: 4px;
		padding: 5px;
		background: #ffffff;
		border: 1px solid rgba(0, 0, 0, 0.06);
		border-radius: 999px;
		box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.08);
	}
}

/* Input fills the pill */
.mvst-chat-pill__input {
	flex: 1 1 auto;
	height: 40px;
	margin: 0;
	padding: 0 18px;
	background: transparent;
	border: 0;
	color: #0a1520;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 500;
	cursor: pointer;
	min-width: 0;
}

.mvst-chat-pill__input::placeholder {
	color: rgba(10, 21, 32, 0.46);
	font-weight: 500;
}

.mvst-chat-pill__input:focus {
	outline: none;
}

/* Send arrow — soft gray default, brand cyan on hover */
.mvst-chat-pill__send {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	background: #e5e7eb;
	border: 0;
	border-radius: 50%;
	color: #6b7280;
	cursor: pointer;
	transition: background 0.18s, color 0.18s, transform 0.18s;
}

.mvst-chat-pill__send:hover,
.mvst-chat-pill__send:focus-visible {
	background: #0691fa;
	color: #ffffff;
	transform: scale(1.06);
	outline: none;
}

/* iOS safe-area inset (home indicator) */
@supports (padding: env(safe-area-inset-bottom)) {
	@media (max-width: 720px) {
		.mvst-chat-pill {
			bottom: calc(80px + env(safe-area-inset-bottom));
		}
	}
}

/* Tighten on very narrow viewports */
@media (max-width: 380px) {
	.mvst-chat-pill {
		gap: 4px;
		padding: 4px;
	}
	.mvst-chat-pill__input {
		height: 38px;
		font-size: 13.5px;
		padding: 0 14px;
	}
	.mvst-chat-pill__send {
		width: 34px;
		height: 34px;
	}
}
