/* ===== Desktop FAB (nút tròn góc phải dưới) ===== */
.cptb-desktop-wrap {
	position: fixed;
	right: var(--cptb-offset-side, 20px);
	bottom: var(--cptb-offset-bottom, 20px);
	z-index: var(--cptb-zindex, 99999);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}

.cptb-btn {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	text-decoration: none;
	max-width: var(--cptb-btn-size, 52px);
	height: var(--cptb-btn-size, 52px);
	overflow: hidden;
	border-radius: 999px;
	background: var(--cptb-btn-color, #e53935);
	box-shadow: 0 4px 14px rgba(0,0,0,.25);
	transition: max-width .35s ease, box-shadow .2s ease;
	cursor: pointer;
}

.cptb-btn.cptb-no-bg {
	background: transparent;
	box-shadow: none;
}

.cptb-btn:hover,
.cptb-btn:focus {
	max-width: 320px;
	box-shadow: 0 6px 18px rgba(0,0,0,.3);
}

.cptb-btn.cptb-no-bg:hover,
.cptb-btn.cptb-no-bg:focus {
	box-shadow: none;
}

.cptb-btn-icon {
	flex: 0 0 var(--cptb-btn-size, 52px);
	width: var(--cptb-btn-size, 52px);
	height: var(--cptb-btn-size, 52px);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
}

.cptb-btn-icon .dashicons {
	color: #fff;
	font-size: calc(var(--cptb-btn-size, 52px) * 0.45);
	width: auto;
	height: auto;
}

.cptb-btn.cptb-no-bg .cptb-btn-icon .dashicons {
	color: #333;
}

.cptb-btn-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.cptb-btn-label {
	white-space: nowrap;
	color: #fff;
	font-weight: 700;
	font-size: 14px;
	opacity: 0;
	padding-left: 0;
	transition: opacity .25s ease .05s;
}

.cptb-btn.cptb-no-bg .cptb-btn-label {
	color: #333;
}

.cptb-btn:hover .cptb-btn-label,
.cptb-btn:focus .cptb-btn-label {
	opacity: 1;
	padding-left: 14px;
	padding-right: 6px;
}

/* ===== Mobile bottom bar (thanh cố định dưới cùng) =====
   Icon tròn "nhô" lên khỏi nền trắng: chỉ phân nửa dưới của icon nằm trong
   nền trắng, phân nửa trên nổi lên phía trên thanh (giống card nổi bật). */
.cptb-mobile-wrap {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: var(--cptb-zindex, 99999);
	overflow: visible;
}

.cptb-mobile-bar {
	position: relative;
	display: flex;
	align-items: flex-start;
	justify-content: space-around;
	background: var(--cptb-mobile-bg, #ffffff);
	box-shadow: 0 -2px 10px rgba(0,0,0,.12);
	padding: 0 4px 10px;
	overflow: visible;
}

.cptb-mobile-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	flex: 1 1 0;
	min-width: 0;
	padding: 0 2px;
}

.cptb-mobile-icon {
	width: var(--cptb-mobile-icon-size, 40px);
	height: var(--cptb-mobile-icon-size, 40px);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 6px rgba(0,0,0,.25);
	margin-top: calc(var(--cptb-mobile-icon-size, 40px) / -2);
	margin-bottom: 4px;
	flex-shrink: 0;
}

.cptb-mobile-icon.cptb-no-bg {
	background: #ffffff;
	box-shadow: 0 2px 6px rgba(0,0,0,.15);
	border: 1px solid rgba(0,0,0,.08);
}

.cptb-mobile-icon .dashicons {
	color: #fff;
	font-size: calc(var(--cptb-mobile-icon-size, 40px) * 0.48);
	width: auto;
	height: auto;
}

.cptb-mobile-icon.cptb-no-bg .dashicons {
	color: #333;
}

.cptb-mobile-icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	border-radius: 50%;
}

.cptb-mobile-text {
	font-size: 11px;
	font-weight: 700;
	color: #e53935;
	text-align: center;
	line-height: 1.2;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cptb-scrolltop {
	position: absolute;
	right: 14px;
	top: -46px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #ffffff;
	border: 1px solid #e2e2e2;
	box-shadow: 0 2px 8px rgba(0,0,0,.2);
	display: none;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
}

.cptb-scrolltop.cptb-visible {
	display: flex;
}

.cptb-scrolltop .dashicons {
	color: #333;
	font-size: 18px;
}

/* Ẩn mobile bar theo mặc định trên màn hình rộng, sẽ được ghi đè bằng inline CSS theo breakpoint cấu hình */
@media (min-width: 769px) {
	.cptb-mobile-wrap {
		display: none;
	}
}

@media (max-width: 768px) {
	.cptb-desktop-wrap {
		display: none;
	}
}
