/**
 * Maithu Sticky Contacts — thanh liên hệ nổi.
 * Spec giao diện (theo mt-contact-bar v1.1.7): mobile (<768px) = bar ngang dính đáy;
 * desktop (>=768px) = bar dọc giữa-phải màn hình.
 * Mọi selector scope dưới #mtsc-bar / .mtsc-* — không style global (DEVELOPMENT_RULES §4).
 */

#mtsc-bar {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	line-height: 1.5;
	z-index: 9999;
	box-sizing: border-box;
}

#mtsc-bar *,
#mtsc-bar *::before,
#mtsc-bar *::after {
	box-sizing: inherit;
}

.mtsc-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

.mtsc-item img {
	width: 35px;
	height: 35px;
	margin-bottom: 5px;
	flex-shrink: 0;
	object-fit: contain;
}

.mtsc-text {
	font-weight: 600;
	white-space: nowrap;
}

/* Màu đặc trưng từng kênh. */
.mtsc-item--phone     { color: #28a745; }
.mtsc-item--zalo      { color: #007a7e; }
.mtsc-item--messenger { color: #0084ff; }
.mtsc-item--map       { color: #ea4335; }

/* ---------- Mobile (mặc định, <768px): bar ngang dính đáy ---------- */
#mtsc-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	/* Theme tràn ngang trên mobile làm width:100% bám theo bề rộng tràn → nút cuối văng
	   khỏi màn hình. Chốt trần bằng viewport để bar luôn hiển thị đủ nút. */
	max-width: 100vw;
	display: flex;
	align-items: center;
	justify-content: space-around;
	padding: 8px 0;
	/* Chừa vùng home-indicator trên iPhone tai thỏ. */
	padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
	background-color: #ffffff;
	box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

#mtsc-bar .mtsc-item {
	flex: 1 1 0;
	padding: 5px 0;
	/* Vùng bấm >=44px cho ngón tay: 35px icon + text + padding là đủ cao. */
	min-height: 44px;
}

#mtsc-bar .mtsc-text {
	font-size: 11px;
}

/* ---------- Desktop (>=768px): bar dọc giữa-phải ---------- */
@media (min-width: 768px) {
	#mtsc-bar {
		bottom: auto;
		left: auto;
		top: 50%;
		right: 0;
		width: auto;
		transform: translateY(-50%);
		flex-direction: column;
		align-items: flex-end;
		padding: 0;
		background-color: transparent;
		box-shadow: none;
	}

	#mtsc-bar .mtsc-item {
		flex: 0 0 auto;
		width: 100px;
		height: 100px;
		padding: 10px;
		margin-bottom: 8px;
		border-radius: 8px 0 0 8px;
		background-color: #f8f9fa;
		box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.1);
	}

	#mtsc-bar .mtsc-item:hover {
		transform: translateX(-8px);
		box-shadow: -4px 4px 15px rgba(0, 0, 0, 0.15);
	}

	#mtsc-bar .mtsc-text {
		font-size: 12px;
	}
}
