/* BluePoint Footer Designer — base styles.
   Colors, sizes and timings come from the --bpf-* variables the plugin prints
   from the admin settings. */

/* Theme container that receives the footer (NewStore: .footer-site-info.site-info) */
.bpf-mounted {
	background: var(--bpf-bg) !important;
	padding: 0 !important;
	margin: 0 !important;
	border: 0 !important;
}

.bpf-footer,
.bpf-footer * {
	box-sizing: border-box;
}

.bpf-footer {
	position: relative;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: var(--bpf-pady) 5%;
	display: flex;
	align-items: center;
	justify-content: space-between;
	overflow: hidden;
	isolation: isolate;
	background: var(--bpf-bg);
	font-family: var(--bpf-font);
	line-height: 1;
}

/* ---------- technology grid ---------- */
.bpf-footer.bpf-has-grid::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -3;
	background-image:
		linear-gradient(var(--bpf-grid) 1px, transparent 1px),
		linear-gradient(90deg, var(--bpf-grid) 1px, transparent 1px);
	background-size: var(--bpf-grid-size) var(--bpf-grid-size);
	opacity: var(--bpf-grid-opacity);
	pointer-events: none;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.15) 5%, #000 18%, #000 82%, rgba(0,0,0,.15) 95%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.15) 5%, #000 18%, #000 82%, rgba(0,0,0,.15) 95%, transparent 100%);
}

/* ---------- watermark ---------- */
.bpf-footer.bpf-has-wm::before {
	content: attr(data-wm);
	position: absolute;
	z-index: -2;
	top: 50%;
	left: 50%;
	width: 100%;
	transform: translate(-50%, -50%);
	text-align: center;
	color: var(--bpf-wm);
	opacity: var(--bpf-wm-opacity);
	font-size: clamp(38px, 7vw, 105px);
	font-weight: 900;
	line-height: 1;
	letter-spacing: clamp(4px, 1vw, 15px);
	white-space: nowrap;
	pointer-events: none;
	user-select: none;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.15) 8%, #000 22%, #000 78%, rgba(0,0,0,.15) 92%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0%, rgba(0,0,0,.15) 8%, #000 22%, #000 78%, rgba(0,0,0,.15) 92%, transparent 100%);
}

/* ---------- lighting line ---------- */
.bpf-footer .bpf-line {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: var(--bpf-line-h);
	margin: 0;
	padding: 0;
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(var(--bpf-accent-rgb), .04) 8%,
		rgba(var(--bpf-accent-rgb), .18) 20%,
		rgba(var(--bpf-accent-rgb), .40) 32%,
		var(--bpf-accent) 50%,
		rgba(var(--bpf-accent-rgb), .40) 68%,
		rgba(var(--bpf-accent-rgb), .18) 80%,
		rgba(var(--bpf-accent-rgb), .04) 92%,
		transparent 100%
	);
	box-shadow: 0 0 14px rgba(var(--bpf-accent-rgb), var(--bpf-glow));
	pointer-events: none;
}

.bpf-footer.bpf-pos-bottom .bpf-line {
	top: auto;
	bottom: 0;
}

.bpf-footer.bpf-line-none .bpf-line {
	display: none;
}

.bpf-footer.bpf-line-pulse .bpf-line {
	animation: bpfPulseLine 3.2s ease-in-out infinite;
}

/* moving light */
.bpf-footer.bpf-line-scan .bpf-line::after {
	content: "";
	position: absolute;
	top: 0;
	left: calc(-1 * var(--bpf-scan-w));
	width: var(--bpf-scan-w);
	height: calc(var(--bpf-line-h) + 4px);
	background: linear-gradient(
		90deg,
		transparent 0%,
		rgba(var(--bpf-light-rgb), .08) 20%,
		rgba(var(--bpf-light-rgb), .75) 45%,
		var(--bpf-light) 50%,
		var(--bpf-accent) 60%,
		rgba(var(--bpf-accent-rgb), .40) 75%,
		transparent 100%
	);
	filter: blur(1.5px);
	animation: bpfScan var(--bpf-scan-speed) linear infinite;
	pointer-events: none;
	-webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0%, #000 18%, #000 82%, transparent 100%);
}

.bpf-footer.bpf-line-scan.bpf-pos-bottom .bpf-line::after {
	top: auto;
	bottom: 0;
}

@keyframes bpfScan {
	0%   { left: calc(-1 * var(--bpf-scan-w)); opacity: 0; }
	15%  { left: 5%;   opacity: 1; }
	85%  { left: 88%;  opacity: 1; }
	100% { left: 115%; opacity: 0; }
}

@keyframes bpfPulseLine {
	0%, 100% { opacity: .45; }
	50%      { opacity: 1; }
}

/* ---------- left ---------- */
.bpf-footer .bpf-left,
.bpf-footer .bpf-right {
	position: relative;
	z-index: 5;
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	white-space: nowrap;
}

.bpf-footer .bpf-left {
	gap: 18px;
}

.bpf-footer .bpf-right {
	gap: 8px;
}

.bpf-footer .bpf-copy {
	color: var(--bpf-text);
	font-size: var(--bpf-fs-text);
	font-weight: var(--bpf-fw-text);
	letter-spacing: .5px;
	line-height: 1;
	transition: color .3s ease;
}

.bpf-footer .bpf-left:hover .bpf-copy {
	color: var(--bpf-text-hover);
}

/* extra fields */
.bpf-footer .bpf-extra {
	color: var(--bpf-text);
	font-size: var(--bpf-fs-text);
	font-weight: var(--bpf-fw-text);
	letter-spacing: .3px;
	line-height: 1;
	text-decoration: none !important;
	transition: color .3s ease;
}

.bpf-footer a.bpf-extra:hover {
	color: var(--bpf-accent) !important;
}

.bpf-footer .bpf-right .bpf-extra {
	margin-right: 10px;
}

/* ---------- right ---------- */
.bpf-footer .bpf-label {
	color: var(--bpf-label);
	font-size: var(--bpf-fs-label);
	font-weight: 700;
	letter-spacing: var(--bpf-ls-label);
	line-height: 1;
	display: inline-flex;
	align-items: center;
}

.bpf-footer .bpf-link {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 5px 7px;
	margin: 0;
	color: var(--bpf-link) !important;
	text-decoration: none !important;
	font-size: var(--bpf-fs-link);
	font-weight: var(--bpf-fw-link);
	letter-spacing: .2px;
	line-height: 1;
	border-radius: 4px;
	transition: color .3s ease, transform .3s ease, background .3s ease, text-shadow .3s ease;
}

/* pulsing dot */
.bpf-footer.bpf-has-dot .bpf-link::before {
	content: "";
	width: 5px;
	height: 5px;
	flex: 0 0 5px;
	border-radius: 50%;
	background: var(--bpf-accent);
	box-shadow: 0 0 0 3px rgba(var(--bpf-accent-rgb), .10), 0 0 12px rgba(var(--bpf-accent-rgb), .75);
	animation: bpfDot 2s ease-in-out infinite;
}

@keyframes bpfDot {
	0%, 100% {
		opacity: .65;
		box-shadow: 0 0 0 2px rgba(var(--bpf-accent-rgb), .08), 0 0 8px rgba(var(--bpf-accent-rgb), .45);
	}
	50% {
		opacity: 1;
		box-shadow: 0 0 0 5px rgba(var(--bpf-accent-rgb), .13), 0 0 18px rgba(var(--bpf-accent-rgb), .9);
	}
}

/* underline (hover) */
.bpf-footer .bpf-link::after {
	content: "";
	position: absolute;
	left: 4px;
	right: 4px;
	bottom: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--bpf-accent), transparent);
	transform: scaleX(.15);
	opacity: 0;
	transition: .3s ease;
}

.bpf-footer .bpf-link:hover {
	color: var(--bpf-accent) !important;
}

.bpf-footer.bpf-h-lift .bpf-link:hover {
	transform: translateY(calc(-1 * var(--bpf-lift)));
}

.bpf-footer.bpf-h-glow .bpf-link:hover {
	text-shadow: 0 0 18px rgba(var(--bpf-accent-rgb), .45);
	background: rgba(var(--bpf-accent-rgb), .05);
}

.bpf-footer.bpf-h-underline .bpf-link:hover::after {
	opacity: 1;
	transform: scaleX(1);
}

/* arrow */
.bpf-footer .bpf-arrow {
	color: var(--bpf-accent);
	font-size: calc(var(--bpf-fs-link) + 2px);
	line-height: 1;
	display: inline-block;
	transition: transform .3s ease;
}

.bpf-footer .bpf-link:hover .bpf-arrow {
	transform: translate(3px, -3px);
}

/* visibility toggles */
.bpf-footer.bpf-no-label .bpf-label,
.bpf-footer.bpf-no-link .bpf-link,
.bpf-footer.bpf-no-arrow .bpf-arrow {
	display: none;
}

/* ---------- responsive ---------- */

/* Desktop */
@media (min-width: 1025px) {
	.bpf-footer {
		min-height: var(--bpf-minh);
		justify-content: var(--bpf-justify);
		gap: var(--bpf-gap);
	}
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
	.bpf-footer {
		padding: calc(var(--bpf-pady) * .7) 22px;
		justify-content: space-between;
		gap: 20px;
	}
	.bpf-footer .bpf-copy,
	.bpf-footer .bpf-extra { font-size: calc(var(--bpf-fs-text) * .85); }
	.bpf-footer .bpf-label { font-size: calc(var(--bpf-fs-label) * .9); }
	.bpf-footer .bpf-link  { font-size: calc(var(--bpf-fs-link) * .85); }
	.bpf-footer .bpf-arrow { font-size: calc(var(--bpf-fs-link) * .85 + 2px); }
	.bpf-footer.bpf-has-wm::before { font-size: 48px; letter-spacing: 5px; }
}

/* Phone: stack and center */
@media (max-width: 767px) {
	.bpf-footer {
		flex-direction: column;
		justify-content: center;
		align-items: center;
		gap: 10px;
		padding: calc(var(--bpf-pady) * .7) 10px;
		text-align: center;
	}
	.bpf-footer .bpf-left,
	.bpf-footer .bpf-right {
		width: 100%;
		justify-content: center;
		flex-wrap: wrap;
		white-space: normal;
	}
	.bpf-footer .bpf-left { gap: 6px 14px; }
	.bpf-footer .bpf-copy,
	.bpf-footer .bpf-extra { font-size: calc(var(--bpf-fs-text) * .8); }
	.bpf-footer .bpf-label { font-size: calc(var(--bpf-fs-label) * .85); }
	.bpf-footer .bpf-link  { font-size: calc(var(--bpf-fs-link) * .8); padding: 3px 4px; }
	.bpf-footer .bpf-arrow { font-size: calc(var(--bpf-fs-link) * .8 + 2px); }
	.bpf-footer.bpf-has-wm::before { font-size: 36px; letter-spacing: 4px; }
	.bpf-footer.bpf-line-scan .bpf-line::after {
		left: -80px;
		width: 80px;
	}
}

/* Respect "reduce motion" */
@media (prefers-reduced-motion: reduce) {
	.bpf-footer .bpf-line,
	.bpf-footer .bpf-line::after,
	.bpf-footer .bpf-link::before {
		animation: none !important;
	}
}
