/* ===== Floating Action Button: แสดงข้อมูลติดต่อตลอด ไม่ต้องกด toggle ===== */

.fab-contact {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 1040;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font-family: 'Prompt', sans-serif;
}

.fab-item {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 230px;
	padding: 8px 22px 8px 8px;
	border-radius: 999px;
	color: #FFF !important;
	text-decoration: none !important;
	box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.fab-item:hover,
.fab-item:focus-visible {
	transform: translateY(-3px);
	filter: brightness(1.05);
	box-shadow: 0 18px 32px -12px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.fab-item:focus-visible {
	outline: 3px solid #FFD700;
	outline-offset: 3px;
}

.fab-call {
	background: linear-gradient(135deg, #ff9f1c 0%, #ff5a00 100%);
}

.fab-line {
	background: linear-gradient(135deg, #22d16f 0%, #06c755 100%);
}

.fab-icon {
	position: relative;
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
	font-size: 20px;
}

.fab-line .fab-icon {
	font-size: 26px;
}

/* วงคลื่นรอบปุ่มโทร ดึงสายตา */
.fab-call .fab-icon::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	animation: fab-pulse 2s ease-out infinite;
}

@keyframes fab-pulse {
	0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65); }
	70% { box-shadow: 0 0 0 14px rgba(255, 255, 255, 0); }
	100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}

.fab-text {
	display: flex;
	flex-direction: column;
	line-height: 1.25;
	text-align: left;
}

.fab-text small {
	font-size: 12.5px;
	opacity: 0.92;
}

.fab-text strong {
	font-size: 18px;
	font-weight: 600;
	letter-spacing: 0.3px;
	white-space: nowrap;
}

/* ปุ่มเลื่อนขึ้นบนของธีม ย้ายไปซ้าย จะได้ไม่ทับปุ่มติดต่อ */
html .scroll-to-top {
	right: auto;
	left: 10px;
}

/* มือถือ: แถบปุ่มติดต่อเต็มความกว้างด้านล่างจอ */
@media (max-width: 767px) {
	body {
		padding-bottom: calc(72px + env(safe-area-inset-bottom));
	}

	.fab-contact {
		left: 0;
		right: 0;
		bottom: 0;
		flex-direction: row;
		align-items: stretch;
		gap: 8px;
		padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, 0.96);
		box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.12);
		-webkit-backdrop-filter: blur(8px);
		backdrop-filter: blur(8px);
	}

	.fab-item {
		flex: 1 1 0;
		min-width: 0;
		justify-content: center;
		gap: 8px;
		padding: 6px 10px;
		border-radius: 14px;
	}

	.fab-icon {
		width: 36px;
		height: 36px;
		font-size: 16px;
	}

	.fab-line .fab-icon {
		font-size: 21px;
	}

	.fab-text small {
		font-size: 11px;
	}

	.fab-text strong {
		font-size: 15px;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	html .scroll-to-top {
		bottom: calc(80px + env(safe-area-inset-bottom));
	}
}

@media (prefers-reduced-motion: reduce) {
	.fab-call .fab-icon::after {
		animation: none;
	}

	.fab-item {
		transition: none;
	}
}
