/* PhantaFriends Consent */
#pfc-root, .pfc-ph {
	--pfc-surface: #ffffff;
	--pfc-surface-2: #f1f3f6;
	--pfc-inset: #f6f7f9;
	--pfc-border: #d9dde3;
	--pfc-text: #2b2f36;
	--pfc-text-strong: #14171c;
	--pfc-text-soft: #5b6470;
	--pfc-link: #46576c;
	--pfc-btn: #5f6e82;
	--pfc-btn-hover: #4f5d70;
	--pfc-btn-text: #ffffff;
	--pfc-ghost-border: #b9c0c9;
	--pfc-switch-off: #b5bcc5;
	--pfc-switch-on: #5f6e82;
	--pfc-shadow: 0 18px 48px rgba(15, 20, 30, .18);
	--pfc-font: var(--i-font-family, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif);
}
[data-ips-scheme="dark"] #pfc-root, [data-ips-scheme="dark"] .pfc-ph {
	--pfc-surface: #25282e;
	--pfc-surface-2: #2e3239;
	--pfc-inset: #1f2227;
	--pfc-border: #3a3f47;
	--pfc-text: #d0d4da;
	--pfc-text-strong: #eef1f4;
	--pfc-text-soft: #aab2bc;
	--pfc-link: #a9b8ca;
	--pfc-btn: #5f6e82;
	--pfc-btn-hover: #6c7c91;
	--pfc-ghost-border: #4a515b;
	--pfc-switch-off: #454b54;
	--pfc-switch-on: #7f93ad;
	--pfc-shadow: 0 18px 48px rgba(0, 0, 0, .45);
}

#pfc-root { font-family: var(--pfc-font); color: var(--pfc-text); }
#pfc-root *, .pfc-ph * { box-sizing: border-box; }
#pfc-root a, .pfc-ph a { color: var(--pfc-link); text-decoration: underline; }
#pfc-root a:hover { color: var(--pfc-text-strong); }

/* buttons */
.pfc-btn {
	min-height: 44px; padding: 0 18px; border-radius: 8px;
	font: 600 14px/1 var(--pfc-font, system-ui, sans-serif); cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center; text-align: center;
}
.pfc-btn--solid { border: 0; background: var(--pfc-btn); color: var(--pfc-btn-text); }
.pfc-btn--solid:hover { background: var(--pfc-btn-hover); }
.pfc-btn--ghost { border: 1px solid var(--pfc-ghost-border); background: transparent; color: var(--pfc-text); }
.pfc-btn--ghost:hover { background: var(--pfc-surface-2); }
.pfc-btn:focus-visible, .pfc-switch:focus-visible, .pfc-link:focus-visible, .pfc-icon-btn:focus-visible, .pfc-reopen:focus-visible {
	outline: 2px solid var(--pfc-link); outline-offset: 2px;
}

/* banner */
.pfc-banner {
	position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 100000;
	width: min(760px, calc(100% - 32px));
	background: var(--pfc-surface); border: 1px solid var(--pfc-border); border-radius: 12px; box-shadow: var(--pfc-shadow);
	padding: 22px 24px; display: flex; flex-direction: column; gap: 16px;
	animation: pfc-in .25s ease-out;
}
.pfc-banner__body { display: flex; gap: 14px; align-items: flex-start; }
.pfc-banner__icon {
	flex: none; width: 40px; height: 40px; border-radius: 10px; background: var(--pfc-surface-2);
	display: flex; align-items: center; justify-content: center; color: var(--pfc-link);
}
.pfc-banner__copy { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pfc-banner__title { margin: 0; font-size: 17px; font-weight: 700; color: var(--pfc-text-strong); }
.pfc-banner__text { margin: 0; font-size: 14px; line-height: 1.5; color: var(--pfc-text-soft); white-space: pre-line; }
.pfc-banner__actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.pfc-banner__actions .pfc-btn--solid { min-width: 190px; }
.pfc-spacer { flex: 1; }

@media (max-width: 640px) {
	.pfc-banner {
		left: 0; right: 0; bottom: 0; transform: none; width: 100%;
		border-radius: 16px 16px 0 0; border-width: 1px 0 0; padding: 18px 20px 24px;
		max-height: 85vh; overflow-y: auto; animation-name: pfc-up;
	}
	.pfc-banner__icon { display: none; }
	.pfc-banner__actions { flex-direction: column-reverse; align-items: stretch; }
	.pfc-banner__actions .pfc-btn { width: 100%; min-height: 48px; }
	.pfc-banner__settings { border: 0 !important; }
	.pfc-spacer { display: none; }
}

/* reopen */
.pfc-reopen {
	position: fixed; left: 20px; bottom: 20px; z-index: 99990;
	width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--pfc-border);
	background: var(--pfc-surface); color: var(--pfc-link); cursor: pointer;
	display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.2);
}
.pfc-reopen:hover { background: var(--pfc-surface-2); }
@media (max-width: 980px) {
	.pfc-reopen { left: 12px; width: 40px; height: 40px; opacity: .85; }
	.pfc-reopen--nomobile { display: none; }
}

/* dialog */
.pfc-noscroll { overflow: hidden; }
.pfc-overlay {
	position: fixed; inset: 0; z-index: 100001; background: rgba(10, 12, 16, .6);
	display: flex; align-items: center; justify-content: center; padding: 16px;
}
.pfc-modal {
	width: min(580px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column;
	background: var(--pfc-surface); border: 1px solid var(--pfc-border); border-radius: 12px; box-shadow: var(--pfc-shadow);
	animation: pfc-in .2s ease-out;
}
.pfc-modal__head { padding: 16px 16px 12px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--pfc-border); }
.pfc-modal__title { margin: 0; font-size: 18px; font-weight: 700; color: var(--pfc-text-strong); }
.pfc-modal__body { padding: 4px 24px 8px; overflow-y: auto; }
.pfc-modal__meta { margin: 12px 0 4px; font-size: 12px; color: var(--pfc-text-soft); }
.pfc-modal__foot { padding: 16px 24px 20px; display: flex; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--pfc-border); }
.pfc-modal__foot .pfc-btn { flex: 1 1 150px; }
.pfc-icon-btn { width: 44px; height: 44px; border: 0; border-radius: 8px; background: transparent; color: var(--pfc-text-soft); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pfc-icon-btn:hover { background: var(--pfc-surface-2); }

.pfc-cat { padding: 14px 0; border-bottom: 1px solid var(--pfc-border); display: flex; flex-direction: column; gap: 6px; }
.pfc-cat__head { display: flex; align-items: center; gap: 12px; }
.pfc-cat__copy { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.pfc-cat__title { font-size: 15px; font-weight: 650; color: var(--pfc-text-strong); }
.pfc-cat__text { font-size: 13px; line-height: 1.45; color: var(--pfc-text-soft); }
.pfc-pill { font-size: 12px; font-weight: 600; color: var(--pfc-text-soft); padding: 4px 10px; border-radius: 999px; background: var(--pfc-surface-2); white-space: nowrap; }
.pfc-link { align-self: flex-start; border: 0; background: transparent; padding: 6px 0; color: var(--pfc-link); font: 600 13px var(--pfc-font); cursor: pointer; }
.pfc-services { display: flex; flex-direction: column; gap: 6px; background: var(--pfc-inset); border-radius: 8px; padding: 10px 12px; }
.pfc-services[hidden] { display: none; }
.pfc-service { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.pfc-service__name { color: var(--pfc-text-strong); font-weight: 600; }
.pfc-service__purpose { color: var(--pfc-text-soft); text-align: right; }

.pfc-switch { flex: none; position: relative; width: 52px; height: 30px; border-radius: 999px; border: 0; padding: 0; cursor: pointer; background: var(--pfc-switch-off); transition: background .15s; }
.pfc-switch[aria-checked="true"] { background: var(--pfc-switch-on); }
.pfc-switch__knob { position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: left .15s; }
.pfc-switch[aria-checked="true"] .pfc-switch__knob { left: 25px; }

/* placeholders in posts */
.pfc-ph {
	display: flex; align-items: center; justify-content: center; width: 100%; max-width: 100%;
	aspect-ratio: 16 / 9; min-height: 220px; border-radius: 8px;
	background: var(--pfc-inset); border: 1px solid var(--pfc-border);
	font-family: var(--pfc-font); color: var(--pfc-text); text-align: center;
}
.pfc-ph--img { aspect-ratio: auto; min-height: 160px; max-width: 480px; }
.ipsEmbeddedVideo .pfc-ph { position: relative; }
.pfc-ph__inner { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 20px; max-width: 460px; }
.pfc-ph__icon { width: 52px; height: 52px; border-radius: 50%; background: var(--pfc-surface-2); color: var(--pfc-text-strong); display: flex; align-items: center; justify-content: center; }
.pfc-ph__title { font-size: 15px; color: var(--pfc-text-strong); }
.pfc-ph__text { font-size: 13px; line-height: 1.5; color: var(--pfc-text-soft); }
.pfc-ph__actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

@keyframes pfc-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.pfc-modal { animation-name: pfc-fade; }
@keyframes pfc-fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pfc-up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { .pfc-banner, .pfc-modal { animation: none; } }
