/** Console-managed quick menu — borderless SVG icons. */
.pfab {
	--pfab-ink: #0d246f;
	position: fixed;
	z-index: 999;
	color: var(--pfab-ink);
}
.pfab *, .pfab *::before, .pfab *::after { box-sizing: border-box; }
.cr-popup-overlay { z-index: 9998 !important; }
.cr-popup { z-index: 9999 !important; }

.pfab-toggle {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 18px;
	background: var(--pfab-ink);
	color: #fff;
	box-shadow: 0 6px 20px rgba(13, 36, 111, .15);
	cursor: pointer;
	transition: background .2s ease;
}
.pfab-toggle:hover { background: #203b82; }
.pfab-plus { position: relative; width: 22px; height: 22px; }
.pfab-plus::before, .pfab-plus::after {
	content: '';
	position: absolute;
	top: 10px;
	left: 0;
	width: 22px;
	height: 2px;
	border-radius: 2px;
	background: currentColor;
	transition: transform .2s 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: 2px;
	padding: 8px;
	border: 0;
	border-radius: 20px;
	background: rgba(255, 255, 255, .97);
	box-shadow: 0 8px 30px rgba(13, 36, 70, .09);
}
.pfab-item {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 60px;
	min-height: 62px;
	padding: 9px 4px;
	border: 0;
	border-radius: 12px;
	background: transparent;
	color: var(--pfab-ink);
	box-shadow: none;
	font: inherit;
	text-decoration: none;
	cursor: pointer;
	transition: background .2s ease, color .2s ease;
}
.pfab-item:hover { background: #f0f4fa; color: #244e9a; }
.pfab-icon { display: flex; align-items: center; justify-content: center; width: 25px; height: 25px; flex: 0 0 25px; }
.pfab-svg { display: block; width: 25px; height: 25px; }
.pfab-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pfab-item-label {
	position: static;
	color: inherit;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
	overflow-wrap: anywhere;
}
@media (min-width: 768px) {
	.pfab { top: 50%; right: 24px; transform: translateY(-50%); }
	.pfab-toggle { display: none; }
	.pfab-list { display: flex; max-height: calc(100dvh - 48px); overflow-y: auto; }
}
@media (max-width: 767px) {
	.pfab {
		bottom: calc(20px + env(safe-area-inset-bottom));
		right: 20px;
		display: flex;
		flex-direction: column-reverse;
		align-items: flex-end;
		gap: 10px;
		/* 닫힌 목록이 차지하는 투명 영역으로 본문 링크를 가리지 않는다. */
		pointer-events: none;
	}
	.pfab-toggle, .pfab-list { pointer-events: auto; }
	.pfab-list {
		width: 148px;
		max-height: calc(100dvh - 190px);
		overflow-y: auto;
		overscroll-behavior: contain;
		transition: opacity .2s ease, transform .2s ease;
	}
	.pfab:not(.pfab-open) .pfab-list, .pfab-list.is-hidden {
		opacity: 0;
		transform: translateY(8px);
		pointer-events: none;
		visibility: hidden;
	}
	.pfab-item { flex-direction: row; justify-content: flex-start; gap: 12px; width: 100%; min-height: 48px; padding: 10px; flex-shrink: 0; }
	.pfab-icon, .pfab-svg { width: 23px; height: 23px; }
	.pfab-icon { flex-basis: 23px; }
	.pfab-item-label { font-size: 13px; text-align: left; }
}

/* ============================================================
   이미지 모달 (type=modal) — 위챗 QR 등 안내 이미지를 띄운다
============================================================ */
.pfab-modal {
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.pfab-modal[hidden] { display: none; }
.pfab-modal__inner {
	position: relative;
	max-width: min(92vw, 420px);
	max-height: 88vh;
	display: flex;
}
/* 세로로 긴 안내 이미지(QR 배너)도 잘리거나 여백 없이 딱 맞게 */
.pfab-modal__inner img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 88vh;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
}
.pfab-modal__close {
	position: absolute;
	top: -14px;
	right: -14px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	border: 0;
	background: #fff;
	color: #2b2b2b;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}
@media (max-width: 480px) {
	.pfab-modal__close { top: 6px; right: 6px; }
}
/* 모달 트리거 버튼도 링크 항목과 같은 모양으로 */
.pfab-item--modal { background: none; border: 0; padding: 0; font: inherit; cursor: pointer; }

.pfab-item:focus-visible, .pfab-toggle:focus-visible { outline: 3px solid var(--brand-primary, #16166b); outline-offset: 4px; }
@media (prefers-reduced-motion: reduce) {
	.pfab *, .pfab *::before, .pfab *::after { transition: none; }
}
