/**
 * Parangsae Skin — Floating Action Button (FAB / 빠른 메뉴)
 *
 * 콘솔 "네비게이션" 에서 설정한 플로팅 버튼을 모든 프론트 페이지 우측에 표시.
 * 세란 스니펫을 파랑새 팔레트(올리브 --brand-primary)로 이식하고, 헤더 메뉴의
 * .nav-item / .nav-list 와 충돌하지 않도록 전부 .pfab- 로 네임스페이스했다.
 *
 * z-index 999 — 예약 팝업(.cr-popup / .cr-popup-overlay)보다 낮게.
 */

.pfab {
	position: fixed;
	z-index: 999;
}

/* 예약 팝업이 항상 FAB 위로. */
.cr-popup-overlay { z-index: 9998 !important; }
.cr-popup         { z-index: 9999 !important; }

/* ---------------------------------------------------------------- 토글 버튼 */
.pfab-toggle {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 62px;
	height: 62px;
	padding: 0;
	border: none;
	border-radius: 50%;
	color: #fff;
	background: linear-gradient(135deg,
		var(--brand-primary, #444C38),
		color-mix(in srgb, var(--brand-primary, #444C38) 62%, var(--brand-secondary, #f0e9d5)));
	box-shadow: 0 6px 16px rgba(30, 34, 24, 0.28);
	cursor: pointer;
	transition: transform .3s ease, box-shadow .3s ease;
}
.pfab-toggle:hover { transform: scale(1.05); box-shadow: 0 8px 22px rgba(30, 34, 24, 0.34); }

/* + / × 아이콘 */
.pfab-plus { position: relative; width: 28px; height: 28px; }
.pfab-plus::before,
.pfab-plus::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	height: 3.5px;
	margin-top: -1.75px;
	background: #fff;
	border-radius: 2px;
	transition: transform .3s ease;
}
.pfab-plus::after { transform: rotate(90deg); }
.pfab-open .pfab-plus::before { transform: rotate(45deg); }
.pfab-open .pfab-plus::after  { transform: rotate(-45deg); }

/* ---------------------------------------------------------------- 항목 리스트 */
.pfab-list {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.pfab-item {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: #fff;
	color: var(--brand-primary, #444C38);
	box-shadow: 0 4px 14px rgba(30, 34, 24, 0.20);
	text-decoration: none;
	transition: transform .25s ease, box-shadow .25s ease, background .25s ease, color .25s ease;
}
.pfab-item:hover {
	transform: scale(1.08);
	background: var(--brand-primary, #444C38);
	color: #fff;
	box-shadow: 0 6px 18px rgba(30, 34, 24, 0.30);
}

.pfab-icon { display: flex; align-items: center; justify-content: center; }
.pfab-svg  { width: 26px; height: 26px; display: block; }
/* 업로드한 PNG 아이콘도 SVG 처럼 원형 흰 버튼(테두리) 안에 담긴다 — 원형 테두리 유지. */
.pfab-img  {
	width: 30px; height: 30px;
	object-fit: contain;
	display: block;
}
/* 이미지 아이콘은 색 반전이 어색하므로 hover 시에도 흰 배경 유지(원형 테두리 유지). */
.pfab-item:has(.pfab-img):hover { background: #fff; color: var(--brand-primary, #444C38); }

/* 라벨 — 데스크톱 hover 시 왼쪽 툴팁으로. */
.pfab-item-label {
	position: absolute;
	right: calc(100% + 12px);
	top: 50%;
	transform: translateY(-50%) translateX(6px);
	white-space: nowrap;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	padding: 7px 11px;
	border-radius: 6px;
	color: #fff;
	background: rgba(30, 34, 24, 0.88);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}
.pfab-item:hover .pfab-item-label { opacity: 1; transform: translateY(-50%) translateX(0); }

/* ---------------------------------------------------------------- 데스크톱 */
@media (min-width: 768px) {
	.pfab {
		top: 50%;
		right: 34px;
		transform: translateY(-50%);
	}
	/* 데스크톱은 토글 없이 항상 세로 스택 노출. */
	.pfab-toggle { display: none; }
	.pfab-list   { display: flex !important; }
}

/* ---------------------------------------------------------------- 모바일 */
@media (max-width: 767px) {
	.pfab {
		bottom: 26px;
		right: 20px;
		display: flex;
		flex-direction: column-reverse;
		align-items: center;
		gap: 14px;
	}
	.pfab-list {
		gap: 12px;
		transition: opacity .25s ease, transform .25s ease;
	}
	/* 닫힘 상태: 항목 숨김, 토글만. */
	.pfab-list.is-hidden {
		opacity: 0;
		transform: translateY(10px) scale(.9);
		pointer-events: none;
		visibility: hidden;
	}
	.pfab-item { width: 50px; height: 50px; }
	.pfab-svg  { width: 23px; height: 23px; }
	.pfab-img  { width: 26px; height: 26px; }
	/* 모바일에선 라벨 툴팁 숨김(공간/터치). */
	.pfab-item-label { display: none; }
}
