/**
 * Nút liên hệ nổi — 7 mẫu (Giao diện → Liên hệ nổi).
 * Mobile ≤ 767px: thanh liên hệ dưới đáy (.fpc-bar) hoặc giống máy tính.
 * Khối .fpc-preview[data-dev] dùng trong trang quản trị để xem trước.
 */
.fpc {
	--fpc-bottom: 82px;
	--fpc-side: 18px;
	position: fixed;
	bottom: var(--fpc-bottom);
	z-index: 880;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	font-family: var(--fp-font, inherit);
}
.fpc--right { right: var(--fpc-side); }
.fpc--left { left: var(--fpc-side); align-items: flex-start; }
.fpc-list { display: flex; flex-direction: column; align-items: inherit; gap: 9px; }
.fpc-item { position: relative; display: inline-flex; align-items: center; color: #fff; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.fpc-item:hover, .fpc-item:focus { color: #fff; }
.fpc-ic { display: grid; place-items: center; flex: none; }
.fpc-ic .fp-icon { width: 20px; height: 20px; }
.fpc-item--zalo .fpc-ic .fp-icon { width: 26px; height: 26px; }
.fpc-tx { white-space: nowrap; }

/* 1. Pill — viên có nhãn */
.fpc--pill .fpc-item { gap: 9px; padding: 6px 15px 6px 6px; border-radius: 999px; background: var(--fpc-c); font-size: 12.5px; font-weight: 700; box-shadow: 0 8px 22px rgba(12, 15, 22, .22); transition: transform .16s ease; }
.fpc--pill .fpc-ic { width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .18); }
.fpc--pill .fpc-ic .fp-icon { width: 17px; height: 17px; }
.fpc--pill .fpc-item--zalo .fpc-ic .fp-icon { width: 24px; height: 24px; }
.fpc--pill.fpc--right .fpc-item:hover { transform: translateX(-3px); }
.fpc--pill.fpc--left .fpc-item:hover { transform: translateX(3px); }

/* 2–3. Round / pulse — tròn, nhãn hiện khi rê chuột */
.fpc--round .fpc-item, .fpc--pulse .fpc-item, .fpc--tile .fpc-item { width: 52px; height: 52px; justify-content: center; border-radius: 50%; background: var(--fpc-c); box-shadow: 0 8px 22px rgba(12, 15, 22, .22); transition: transform .16s ease; }
.fpc--round .fpc-item:hover, .fpc--pulse .fpc-item:hover, .fpc--tile .fpc-item:hover { transform: scale(1.07); }
.fpc--round .fpc-tx, .fpc--pulse .fpc-tx, .fpc--tile .fpc-tx {
	position: absolute; top: 50%; padding: 6px 10px; border-radius: 6px; background: #12161f; color: #fff;
	font-size: 12.5px; font-weight: 600; line-height: 1.2; pointer-events: none; opacity: 0; transition: opacity .15s ease, transform .15s ease;
}
.fpc--right.fpc--round .fpc-tx, .fpc--right.fpc--pulse .fpc-tx, .fpc--right.fpc--tile .fpc-tx { right: calc(100% + 10px); transform: translate(6px, -50%); }
.fpc--left.fpc--round .fpc-tx, .fpc--left.fpc--pulse .fpc-tx, .fpc--left.fpc--tile .fpc-tx { left: calc(100% + 10px); transform: translate(-6px, -50%); }
.fpc--round .fpc-item:hover .fpc-tx, .fpc--pulse .fpc-item:hover .fpc-tx, .fpc--tile .fpc-item:hover .fpc-tx,
.fpc--round .fpc-item:focus-visible .fpc-tx, .fpc--pulse .fpc-item:focus-visible .fpc-tx, .fpc--tile .fpc-item:focus-visible .fpc-tx { opacity: 1; transform: translate(0, -50%); }
.fpc--pulse .fpc-item:first-child::before, .fpc--pulse .fpc-item:first-child::after,
.fpc--pulse .fpc-item.is-primary::before, .fpc--pulse .fpc-item.is-primary::after {
	content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: var(--fpc-c); animation: fpc-wave 2.2s ease-out infinite;
}
.fpc--pulse .fpc-item:first-child::after, .fpc--pulse .fpc-item.is-primary::after { animation-delay: 1.1s; }
.fpc--pulse .fpc-item:first-child .fpc-ic, .fpc--pulse .fpc-item.is-primary .fpc-ic { animation: fpc-ring 2.2s ease-in-out infinite; }
@keyframes fpc-wave { 0% { transform: scale(1); opacity: .45; } 100% { transform: scale(1.75); opacity: 0; } }
@keyframes fpc-ring { 0%, 50%, 100% { transform: rotate(0); } 10%, 30% { transform: rotate(-12deg); } 20%, 40% { transform: rotate(12deg); } }

/* 6. Tile — ô trắng tối giản */
.fpc--tile .fpc-item { border-radius: 14px; background: #fff; color: var(--fpc-c); border: 1px solid var(--fp-line, #e2dfd7); box-shadow: 0 6px 18px rgba(12, 15, 22, .1); }
.fpc--tile .fpc-item:hover { color: var(--fpc-c); border-color: var(--fpc-c); }

/* 4. Dial — gom vào 1 nút */
.fpc-main {
	display: inline-flex; align-items: center; gap: 9px; padding: 7px 18px 7px 7px; border: 0; border-radius: 999px;
	background: var(--fp-ink, #12161f); color: #fff; font: inherit; font-size: 13.5px; font-weight: 700; cursor: pointer;
	box-shadow: 0 10px 26px rgba(12, 15, 22, .28);
}
.fpc-main .fpc-ic { width: 40px; height: 40px; border-radius: 50%; background: var(--fp-accent, #e5481f); }
.fpc-main .fpc-ic--close { display: none; }
.fpc.is-open .fpc-main .fpc-ic--open { display: none; }
.fpc.is-open .fpc-main .fpc-ic--close { display: grid; }
.fpc--dial .fpc-list { opacity: 0; visibility: hidden; transform: translateY(10px); transition: opacity .18s ease, transform .18s ease, visibility .18s; }
.fpc--dial.is-open .fpc-list { opacity: 1; visibility: visible; transform: none; }
.fpc--dial .fpc-item { gap: 10px; padding: 5px 16px 5px 5px; border-radius: 999px; background: #fff; color: var(--fp-ink, #12161f); font-size: 13.5px; font-weight: 700; box-shadow: 0 6px 18px rgba(12, 15, 22, .14); }
.fpc--dial .fpc-item:hover { color: var(--fp-ink, #12161f); background: var(--fp-paper, #f7f5f0); }
.fpc--dial .fpc-ic { width: 36px; height: 36px; border-radius: 50%; background: var(--fpc-c); color: #fff; }
.fpc--dial .fpc-ic .fp-icon { width: 18px; height: 18px; }

/* 5. Dock — dính sát cạnh */
.fpc--dock { --fpc-side: 0px; gap: 0; }
.fpc--dock .fpc-list { gap: 0; }
.fpc--dock .fpc-item { height: 50px; padding: 0 13px; background: var(--fpc-c); font-size: 13px; font-weight: 700; box-shadow: 0 8px 22px rgba(12, 15, 22, .16); }
.fpc--dock.fpc--right .fpc-item { border-radius: 10px 0 0 10px; }
.fpc--dock.fpc--left .fpc-item { border-radius: 0 10px 10px 0; }
.fpc--dock .fpc-list .fpc-item + .fpc-item { margin-top: 2px; }
.fpc--dock .fpc-ic { width: 24px; }
.fpc--dock .fpc-tx { max-width: 0; overflow: hidden; opacity: 0; transition: max-width .25s ease, opacity .2s ease, margin .25s ease; }
.fpc--dock .fpc-item:hover .fpc-tx, .fpc--dock .fpc-item:focus-visible .fpc-tx { max-width: 180px; margin-left: 10px; opacity: 1; }
.fpc--dock.fpc--right .fpc-list { align-items: flex-end; }

/* 7. Bar — thanh ngang giữa đáy màn hình */
.fpc--bar { left: 50% !important; right: auto !important; bottom: 18px; transform: translateX(-50%); align-items: center; }
.fpc--bar .fpc-list { flex-direction: row; gap: 4px; padding: 6px; border: 1px solid var(--fp-line, #e2dfd7); border-radius: 999px; background: rgba(255, 255, 255, .96); box-shadow: 0 14px 40px rgba(12, 15, 22, .16); backdrop-filter: blur(10px); }
.fpc--bar .fpc-item { gap: 8px; padding: 9px 16px 9px 10px; border-radius: 999px; color: var(--fp-ink, #12161f); font-size: 13.5px; font-weight: 700; }
.fpc--bar .fpc-item:hover { background: var(--fp-paper, #f7f5f0); color: var(--fp-ink, #12161f); }
.fpc--bar .fpc-ic { color: var(--fpc-c); }
.fpc--bar .fpc-ic .fp-icon { width: 18px; height: 18px; }
.fpc--bar .fpc-item--zalo .fpc-ic .fp-icon, .fpc--tile .fpc-item--zalo .fpc-ic .fp-icon { width: 30px; height: 24px; }
.fpc--bar .fpc-item.is-primary { background: var(--fpc-c); color: #fff; }
.fpc--bar .fpc-item.is-primary .fpc-ic { color: #fff; }
body.fpc-has-dbar .fp-to-top { bottom: 90px; }

/* Lời chào */
.fpc-greet {
	position: relative; max-width: 240px; padding: 10px 30px 10px 13px; border-radius: 12px; background: #fff; color: var(--fp-ink, #12161f);
	font-size: 13px; font-weight: 600; line-height: 1.45; box-shadow: 0 10px 28px rgba(12, 15, 22, .16); border: 1px solid var(--fp-line, #e2dfd7);
	animation: fpc-in .4s ease .8s both;
}
.fpc-greet[hidden] { display: none; }
.fpc--bar .fpc-greet { display: none; }
.fpc-greet-x { position: absolute; top: 4px; right: 6px; width: 22px; height: 22px; padding: 0; border: 0; background: none; color: var(--fp-subtle, #858d9d); font-size: 17px; line-height: 1; cursor: pointer; }
@keyframes fpc-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Thanh dưới đáy trên điện thoại */
.fpc-bar { display: none; }
.fpc-bar .fpc-item { flex-direction: column; justify-content: center; gap: 3px; min-height: 58px; padding: 7px 4px; color: var(--fp-ink, #12161f); font-size: 11.5px; font-weight: 700; text-align: center; }
.fpc-bar .fpc-item + .fpc-item { border-left: 1px solid var(--fp-line, #e2dfd7); }
.fpc-bar .fpc-ic { color: var(--fpc-c); }
.fpc-bar .fpc-ic .fp-icon { width: 21px; height: 21px; }
.fpc-bar .fpc-item--zalo .fpc-ic .fp-icon { width: 28px; height: 22px; }
.fpc-bar .fpc-tx { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.fpc-bar .fpc-item.is-primary { background: var(--fpc-c); color: #fff; border-left-color: transparent; }
.fpc-bar .fpc-item.is-primary .fpc-ic { color: #fff; }

.fp-float-contact, .fp-mobile-bar { display: none !important; }
.fpb-canvas .fpc, .fpb-canvas .fpc-bar { display: none !important; }

@media (min-width: 768px) {
	.fpc .fpc-d-off { display: none; }
}
@media (max-width: 767px) {
	.fpc { --fpc-side: 14px; --fpc-bottom: 20px; }
	.fpc--m-bar, .fpc--m-hide { display: none; }
	.fpc .fpc-m-off { display: none; }
	.fpc--bar { bottom: 12px; }
	.fpc-greet { max-width: 200px; font-size: 12.5px; }
	.fpc-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 950; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); padding-bottom: env(safe-area-inset-bottom, 0px); background: #fff; border-top: 1px solid var(--fp-line, #e2dfd7); box-shadow: 0 -6px 20px rgba(18, 22, 31, .08); }
	body.fp-theme.fpc-has-bar { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }
	body.fp-theme:not(.fpc-has-bar) { padding-bottom: 0; }
	body.fpc-has-bar .fp-to-top { bottom: 72px; }
	body.fpc-has-dbar:not(.fpc-has-bar) .fp-to-top { bottom: 84px; }
}
@media (prefers-reduced-motion: reduce) {
	.fpc *, .fpc *::before, .fpc *::after { animation: none !important; transition: none !important; }
}

/* ---------- Xem trước trong trang quản trị ---------- */
.fpc-preview { position: relative; height: 560px; overflow: hidden; border: 1px solid #dcdcde; border-radius: 10px; background: #f7f5f0; transition: width .2s ease; margin-inline: auto; }
.fpc-preview[data-dev="m"] { width: 375px; }
.fpc-preview .fpc, .fpc-preview .fpc-bar { position: absolute; }
.fpc-preview-page { padding: 22px; }
.fpc-preview-page i { display: block; height: 14px; margin-bottom: 14px; border-radius: 4px; background: #e9e5dc; }
.fpc-preview-page i:first-child { width: 55%; height: 26px; background: #12161f; }
.fpc-preview-page i:nth-child(3) { width: 80%; }
.fpc-preview-page i:nth-child(5) { width: 40%; }
.fpc-preview[data-dev="d"] .fpc-bar, .fpc-preview[data-dev="d"] .fpc .fpc-d-off { display: none; }
.fpc-preview[data-dev="m"] .fpc { --fpc-side: 14px; --fpc-bottom: 20px; }
.fpc-preview[data-dev="m"] .fpc--m-bar, .fpc-preview[data-dev="m"] .fpc--m-hide, .fpc-preview[data-dev="m"] .fpc .fpc-m-off { display: none; }
.fpc-preview[data-dev="m"] .fpc--bar { bottom: 12px; }
.fpc-preview[data-dev="m"] .fpc-bar { left: 0; right: 0; bottom: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: #fff; border-top: 1px solid #e2dfd7; }

/* ---------- Trang quản trị ---------- */
.fpc-admin-grid { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 24px; align-items: start; max-width: 1400px; }
.fpc-admin-side { position: sticky; top: 46px; }
.fpc-card { max-width: none; padding: 6px 20px 16px; }
.fpc-card h2 { font-size: 16px; }
.fpc-preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.fpc-dev .button.is-active { background: #1d2327; border-color: #1d2327; color: #fff; }
.fpc-items { display: grid; gap: 8px; margin: 12px 0; }
.fpc-row { display: grid; grid-template-columns: 16px 40px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px; border: 1px solid #dcdcde; border-radius: 8px; background: #fff; }
.fpc-row.is-drag { opacity: .4; }
.fpc-row-drag { cursor: grab; color: #a7aaad; letter-spacing: -2px; padding-top: 24px; user-select: none; }
.fpc-row-ic { display: grid; place-items: center; width: 40px; height: 40px; margin-top: 16px; border-radius: 50%; background: var(--fpc-c); color: #fff; }
.fpc-row-ic .fp-icon { width: 20px; height: 20px; }
.fpc-row-fields { display: grid; grid-template-columns: 150px 160px minmax(0, 1fr) 54px; gap: 8px 10px; align-items: end; }
.fpc-row-fields label > span { display: block; margin-bottom: 3px; font-size: 12px; font-weight: 600; color: #50575e; }
.fpc-row-fields select, .fpc-row-fields input[type=text] { width: 100%; }
.fpc-row-fields input[type=color] { width: 54px; height: 30px; padding: 2px; }
.fpc-row-flags { grid-column: 1 / -1; display: flex; gap: 16px; font-size: 13px; }
.fpc-row-act { display: flex; gap: 6px; padding-top: 22px; }
.fpc-row-act .button-link { font-size: 16px; text-decoration: none; }
.fpc-add { display: flex; gap: 8px; }
.fpc-switch-row { display: block; margin: 8px 0 14px; font-weight: 600; }
.fpc-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.fpc-style { position: relative; display: flex; flex-direction: column; gap: 3px; padding: 10px; border: 1.5px solid #dcdcde; border-radius: 8px; background: #fff; cursor: pointer; }
.fpc-style input { position: absolute; opacity: 0; }
.fpc-style:has(input:checked) { border-color: #e5481f; box-shadow: 0 0 0 1px #e5481f; }
.fpc-style small { color: #646970; line-height: 1.4; }
.fpc-style-mini { position: relative; display: block; height: 150px; margin-bottom: 6px; overflow: hidden; border-radius: 6px; background: #f7f5f0; pointer-events: none; }
.fpc-style-mini .fpc { position: absolute; transform-origin: bottom right; scale: .78; }
.fpc-style-mini .fpc--bar { transform-origin: bottom center; scale: .6; }
@media (max-width: 1280px) { .fpc-admin-grid { grid-template-columns: 1fr; } .fpc-admin-side { position: static; } .fpc-row-fields { grid-template-columns: 1fr 1fr; } }
.fpc--dock .fpc-greet { margin-inline: 10px; }
