/* ==========================================================
   Site extras: floating contact buttons, admin nav, PDPA cookie banner
   ========================================================== */
:root {
	--brand: #27A7E0;
	--brand-2: #50C3F7;
	--ink: #1f2937;
	--muted: #6b7280;
	--card: #ffffff;
	--pdpa-offset: 0px; /* set by js/pdpa-consent.js while the banner is open */
}

/* ---------- Floating contact buttons (always open) ---------- */
.fab-contact {
	position: fixed;
	right: 16px;
	bottom: calc(16px + var(--pdpa-offset));
	z-index: 9990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	transition: bottom .25s ease;
}
.fab-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 6px 16px 6px 6px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .92);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: 0 6px 20px rgba(15, 23, 42, .18);
	color: var(--ink) !important;
	text-decoration: none !important;
	font-family: 'Prompt', sans-serif;
	line-height: 1.15;
	transition: transform .18s ease, box-shadow .18s ease;
	animation: fab-in .4s ease both;
}
.fab-item:nth-child(2) { animation-delay: .06s; }
.fab-item:nth-child(3) { animation-delay: .12s; }
.fab-item:nth-child(4) { animation-delay: .18s; }
.fab-item:hover,
.fab-item:focus-visible {
	transform: translateX(-4px);
	box-shadow: 0 10px 26px rgba(15, 23, 42, .26);
}
.fab-item__icon {
	flex: 0 0 auto;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	color: #fff;
	font-size: 18px;
}
.fab-item--phone .fab-item__icon { background: linear-gradient(135deg, #ff9a2f, #ff6a00); }
.fab-item--messenger .fab-item__icon { background: linear-gradient(135deg, #00b2ff, #a033ff 60%, #ff5c87); }
.fab-item__label small {
	display: block;
	font-size: 11px;
	color: var(--muted);
}
.fab-item__label strong {
	display: block;
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}
@keyframes fab-in {
	from { opacity: 0; transform: translateX(24px); }
	to   { opacity: 1; transform: none; }
}
@media (max-width: 575px) {
	.fab-contact { right: 10px; gap: 8px; }
	.fab-item { padding: 4px 12px 4px 4px; gap: 8px; }
	.fab-item__icon { width: 36px; height: 36px; font-size: 15px; }
	.fab-item__label small { display: none; }
	.fab-item__label strong { font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
	.fab-item { animation: none; transition: none; }
}

/* ---------- Admin bar (top of nav, admin mode only) ---------- */
.admin-bar { background: #0f172a; color: #e2e8f0; font-size: 14px; }
.admin-bar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 18px;
	padding-top: 7px;
	padding-bottom: 7px;
}
.admin-bar a { color: #e2e8f0 !important; text-decoration: none !important; white-space: nowrap; }
.admin-bar a:hover, .admin-bar a:focus-visible { color: #fff !important; text-decoration: underline !important; }
.admin-bar a i { margin-right: 4px; color: #7dd3fc; }
.admin-bar__brand { font-weight: 600; padding: 2px 12px; border-radius: 999px; background: linear-gradient(120deg, #ef4444, #f97316); }
.admin-bar__brand i { color: #fff !important; }
.admin-bar__logout { margin-left: auto; }
.admin-bar__logout i { color: #fca5a5 !important; }
@media (max-width: 575px) { .admin-bar__logout { margin-left: 0; } }

/* ---------- Footer policy links ---------- */
.footer-policy-links a {
	color: inherit;
	margin-left: 14px;
	text-decoration: underline;
	white-space: nowrap;
}

/* ---------- PDPA cookie banner ---------- */
.pdpa-banner {
	position: fixed;
	left: 16px;
	right: 16px;
	bottom: 16px;
	z-index: 9995;
	max-width: 960px;
	margin: 0 auto;
	background: var(--card);
	color: var(--ink);
	border-radius: 16px;
	box-shadow: 0 16px 48px rgba(15, 23, 42, .28);
	padding: 20px 22px;
	font-family: 'Prompt', sans-serif;
	font-size: 14px;
	line-height: 1.6;
	display: none;
}
.pdpa-banner.is-open { display: block; animation: fab-in .3s ease both; }
.pdpa-banner h4 {
	margin: 0 0 6px;
	font-size: 17px;
	font-weight: 600;
	color: var(--ink);
}
.pdpa-banner p { margin: 0 0 12px; color: #374151; }
.pdpa-banner a { color: var(--brand); text-decoration: underline; }
.pdpa-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}
.pdpa-btn {
	border: 0;
	border-radius: 999px;
	padding: 9px 18px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}
.pdpa-btn--primary { background: linear-gradient(120deg, var(--brand), var(--brand-2)); color: #fff; }
.pdpa-btn--ghost { background: #eef2f7; color: var(--ink); }
.pdpa-btn--link { background: none; color: var(--brand); text-decoration: underline; padding-left: 6px; padding-right: 6px; }

.pdpa-prefs { display: none; margin: 4px 0 14px; border-top: 1px solid #e5e7eb; }
.pdpa-banner.show-prefs .pdpa-prefs { display: block; }
.pdpa-cat {
	display: flex;
	gap: 14px;
	align-items: flex-start;
	justify-content: space-between;
	padding: 12px 0;
	border-bottom: 1px solid #e5e7eb;
}
.pdpa-cat strong { display: block; }
.pdpa-cat span { color: var(--muted); font-size: 13px; }
.pdpa-switch { position: relative; flex: 0 0 auto; width: 44px; height: 24px; margin-top: 2px; }
.pdpa-switch input { opacity: 0; width: 0; height: 0; }
.pdpa-switch i {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #cbd5e1;
	transition: background .2s;
	cursor: pointer;
}
.pdpa-switch i::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #fff;
	transition: transform .2s;
}
.pdpa-switch input:checked + i { background: var(--brand); }
.pdpa-switch input:checked + i::after { transform: translateX(20px); }
.pdpa-switch input:disabled + i { opacity: .6; cursor: not-allowed; }
.pdpa-switch input:focus-visible + i { outline: 2px solid var(--brand); outline-offset: 2px; }

@media (max-width: 575px) {
	.pdpa-banner { left: 10px; right: 10px; bottom: 10px; padding: 16px; }
	.pdpa-actions { justify-content: stretch; }
	.pdpa-actions .pdpa-btn { flex: 1 1 auto; }
}

/* Placeholder shown instead of a third-party embed until consent is given */
.pdpa-blocked {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	border-radius: 10px;
	background: #f1f5f9;
	color: var(--muted);
	font-size: 13px;
}
.pdpa-blocked button { border: 0; background: none; color: var(--brand); text-decoration: underline; cursor: pointer; padding: 0; font: inherit; }

/* ---------- Policy pages ---------- */
.policy-content { max-width: 860px; margin: 0 auto; font-size: 16px; line-height: 1.8; color: #333; }
.policy-content h2 { font-size: 22px; margin: 28px 0 10px; color: var(--ink); }
.policy-content h3 { font-size: 18px; margin: 20px 0 8px; color: var(--ink); }
.policy-content ul { padding-left: 22px; }
.policy-content table { width: 100%; border-collapse: collapse; margin: 10px 0 18px; font-size: 14px; }
.policy-content th, .policy-content td { border: 1px solid #e5e7eb; padding: 8px 10px; vertical-align: top; text-align: left; }
.policy-content th { background: #f8fafc; }
.policy-meta { color: var(--muted); font-size: 14px; }
