/* Smart App Banner — thanh mỏng cố định đáy màn hình.
   position:fixed => CLS = 0. display:none mặc định => JS bật trên mobile. */
.sab {
	position: fixed;
	left: 10px; right: 10px; bottom: 10px;
	bottom: calc(10px + env(safe-area-inset-bottom));
	z-index: 2147483000;
	display: none;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	background: #ffffff;
	border-radius: 16px;
	box-shadow: 0 8px 30px rgba(0,0,0,.18);
	transform: translateY(160%);
	transition: transform .45s cubic-bezier(.22,1,.36,1);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
	cursor: pointer;                 /* cả banner bấm được */
	touch-action: manipulation;      /* bỏ độ trễ chạm */
	-webkit-tap-highlight-color: transparent;
}
.sab.is-mobile { display: flex; }
.sab.is-visible { transform: translateY(0); }

.sab__close {
	flex: 0 0 auto;
	width: 22px; height: 22px;
	border: none; background: #eef0f3; color: #555;
	border-radius: 50%; font-size: 14px; line-height: 22px;
	cursor: pointer; padding: 0;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}
.sab__icon {
	flex: 0 0 auto;
	width: 50px; height: 50px; border-radius: 12px;
	background: linear-gradient(135deg, #ffd86f, #d4af37);
	display: flex; align-items: center; justify-content: center;
	box-shadow: inset 0 0 0 1px rgba(0,0,0,.05);
	overflow: hidden;
}
.sab__icon-img { width: 100%; height: 100%; object-fit: cover; }

.sab__body { flex: 1 1 auto; min-width: 0; }

/* Hàng trên: tên app + đánh giá cùng dòng */
.sab__top {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}
.sab__title {
	font-weight: 700; font-size: 15px; color: #1a1a1a;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
	min-width: 0;            /* cho tên co lại để đánh giá không bị đẩy */
}
.sab__rating {
	flex: 0 0 auto;
	display: inline-flex; align-items: center; gap: 3px;
	font-size: 12px; color: #6b7280; white-space: nowrap;
}
.sab__stars { color: #f5a623; font-size: 12px; }

/* Hàng dưới: mô tả chiếm trọn chiều rộng, hiện tối đa 2 dòng */
.sab__desc {
	font-size: 12px; color: #6b7280; margin-top: 2px;
	line-height: 1.35;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
}

.sab__btn {
	flex: 0 0 auto;
	text-decoration: none;
	background: linear-gradient(135deg, #ffd86f, #e0a82e);
	color: #4a3500;
	font-weight: 800; font-size: 13px;
	padding: 11px 20px; border-radius: 999px;
	white-space: nowrap;
	box-shadow: 0 2px 6px rgba(212,175,55,.4);
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: transform .08s ease;
}
.sab__btn:active { transform: scale(.94); }

/* Màn hình hẹp: thu gọn icon/nút/khoảng cách để chừa chỗ cho chữ */
@media (max-width: 400px) {
	.sab { gap: 9px; padding: 9px 10px; }
	.sab__icon { width: 44px; height: 44px; }
	.sab__title { font-size: 14px; }
	.sab__btn { padding: 8px 13px; font-size: 12px; }
}
