/* Floating Quick Links */
.fql {
	--fql-primary: #ed1c24;
	--fql-secondary: #f47a7e;
	--fql-icon: #fff;
	--fql-size: 58px;
	--fql-size-m: 52px;
	--fql-item-bg: #fff;
	--fql-item-text: #1b2835;
	--fql-font: inherit;
	--fql-fs: 14px;
	--fql-fw: 600;
	--fql-radius: 999px;
	--fql-x: 24px;
	--fql-y: 24px;
	--fql-x-m: 16px;
	--fql-y-m: 16px;
	--fql-z: 9999;
	--fql-sh: 0 8px 24px rgba(16, 24, 40, .16), 0 2px 6px rgba(16, 24, 40, .08);
	--fql-s: var(--fql-size);
	position: fixed;
	z-index: var(--fql-z);
	right: var(--fql-x);
	bottom: var(--fql-y);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 14px;
	font-family: var(--fql-font);
	line-height: 1.2;
	-webkit-tap-highlight-color: transparent;
	box-sizing: border-box;
}
.fql *, .fql *::before, .fql *::after { box-sizing: border-box; }
.fql[data-side="left"] { right: auto; left: var(--fql-x); align-items: flex-start; }
.fql[data-vertical="top"] { bottom: auto; top: var(--fql-y); flex-direction: column-reverse; }

.fql[data-shadow="none"] { --fql-sh: none; }
.fql[data-shadow="soft"] { --fql-sh: 0 4px 14px rgba(16, 24, 40, .10); }
.fql[data-shadow="strong"] { --fql-sh: 0 14px 34px rgba(16, 24, 40, .26), 0 4px 10px rgba(16, 24, 40, .12); }

/* Launcher */
.fql .fql-fab {
	position: relative;
	width: var(--fql-s);
	height: var(--fql-s);
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--fql-secondary), var(--fql-primary));
	color: var(--fql-icon);
	display: grid;
	place-items: center;
	cursor: pointer;
	box-shadow: var(--fql-sh);
	transition: transform .25s ease, box-shadow .25s ease;
	outline: none;
	line-height: 0;
	font: inherit;
}
.fql .fql-fab:hover { transform: translateY(-2px); background: linear-gradient(135deg, var(--fql-secondary), var(--fql-primary)); color: var(--fql-icon); }
.fql .fql-fab:focus { background: linear-gradient(135deg, var(--fql-secondary), var(--fql-primary)); }
.fql .fql-fab:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--fql-primary), var(--fql-sh); }
.fql-fab-ico { grid-area: 1 / 1; display: grid; place-items: center; transition: transform .3s cubic-bezier(.2, .8, .2, 1), opacity .2s ease; }
.fql-fab-ico svg { width: calc(var(--fql-s) * .44); height: calc(var(--fql-s) * .44); display: block; }
.fql-fab-ico img { width: calc(var(--fql-s) * .5); height: calc(var(--fql-s) * .5); object-fit: contain; display: block; }
.fql-fab-close { opacity: 0; transform: rotate(-90deg) scale(.5); }
.fql.is-open .fql-fab-open { opacity: 0; transform: rotate(90deg) scale(.5); }
.fql.is-open .fql-fab-close { opacity: 1; transform: none; }

/* Attention pulse (3 times, until first opened) */
.fql-pulse::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--fql-primary);
	z-index: -1;
	animation: fql-pulse 2.2s ease-out 1s 3;
}
@keyframes fql-pulse {
	0% { transform: scale(1); opacity: .45; }
	100% { transform: scale(1.7); opacity: 0; }
}

/* Tooltip next to the launcher */
.fql-tip {
	position: absolute;
	top: 50%;
	right: calc(100% + 12px);
	transform: translate(6px, -50%);
	background: var(--fql-item-bg);
	color: var(--fql-item-text);
	font-family: var(--fql-font);
	font-size: var(--fql-fs);
	font-weight: var(--fql-fw);
	line-height: 1.2;
	white-space: nowrap;
	padding: 8px 12px;
	border-radius: 8px;
	box-shadow: var(--fql-sh);
	opacity: 0;
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
}
.fql[data-side="left"] .fql-tip { right: auto; left: calc(100% + 12px); transform: translate(-6px, -50%); }
.fql:not(.is-open) .fql-fab:hover .fql-tip,
.fql:not(.is-open) .fql-fab:focus-visible .fql-tip { opacity: 1; transform: translate(0, -50%); }

/* Menu */
.fql-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: inherit;
	gap: 12px;
	pointer-events: none;
	/* Centre the (smaller) item icons over the main button. */
	padding-right: calc(var(--fql-s) * .1);
}
.fql[data-side="left"] .fql-menu { padding-right: 0; padding-left: calc(var(--fql-s) * .1); }
.fql.is-open .fql-menu { pointer-events: auto; }
.fql-li {
	margin: 0;
	padding: 0;
	list-style: none;
	opacity: 0;
	transform: translateY(14px) scale(.92);
	transition: opacity .22s ease, transform .3s cubic-bezier(.2, .8, .2, 1);
	transition-delay: 0s;
}
.fql[data-vertical="top"] .fql-li { transform: translateY(-14px) scale(.92); }
.fql[data-anim="fade"] .fql-li { transform: none; }
.fql[data-anim="pop"] .fql-li { transform: scale(.4); }
.fql.is-open .fql-li {
	opacity: 1;
	transform: none;
	transition-delay: calc(var(--fql-d, 0) * 45ms);
}
.fql-li::before, .fql-li::marker { content: none; }

.fql .fql-item {
	display: flex;
	flex-direction: row; /* right side: label, then icon at the edge */
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--fql-item-text);
	outline: none;
	border: 0;
	box-shadow: none;
	background: none;
}
.fql[data-side="left"] .fql-item { flex-direction: row-reverse; }
.fql-item:focus-visible .fql-ico { box-shadow: 0 0 0 3px #fff, 0 0 0 6px var(--fql-primary); }
.fql-item:focus-visible .fql-label { text-decoration: underline; }

.fql-label {
	background: var(--fql-item-bg);
	color: var(--fql-item-text);
	font-family: var(--fql-font);
	font-size: var(--fql-fs);
	font-weight: var(--fql-fw);
	line-height: 1.2;
	padding: 9px 14px;
	border-radius: min(var(--fql-radius), 999px);
	white-space: nowrap;
	box-shadow: var(--fql-sh);
	transition: transform .2s ease, opacity .2s ease;
}
.fql-item:hover .fql-label { transform: translateX(-3px); }
.fql[data-side="left"] .fql-item:hover .fql-label { transform: translateX(3px); }
.fql[data-labels="none"] .fql-label { display: none; }
.fql[data-labels="hover"] .fql-label { opacity: 0; transform: translateX(8px); pointer-events: none; }
.fql[data-side="left"][data-labels="hover"] .fql-label { transform: translateX(-8px); }
.fql[data-labels="hover"] .fql-item:hover .fql-label,
.fql[data-labels="hover"] .fql-item:focus-visible .fql-label { opacity: 1; transform: none; }

.fql-ico {
	--fql-c: var(--fql-primary);
	width: calc(var(--fql-s) * .8);
	height: calc(var(--fql-s) * .8);
	flex: none;
	border-radius: 50%;
	display: grid;
	place-items: center;
	box-shadow: var(--fql-sh);
	transition: transform .2s ease;
	background: linear-gradient(135deg, var(--fql-secondary), var(--fql-primary));
	color: var(--fql-icon);
}
.fql-ico[style*="--fql-c"] { background: var(--fql-c); }
.fql-item:hover .fql-ico { transform: scale(1.06); }
.fql-ico svg { width: 48%; height: 48%; display: block; }
.fql-ico img { width: 52%; height: 52%; object-fit: contain; display: block; }

/* Light: white circles, coloured icons */
.fql[data-style="light"] .fql-ico { background: var(--fql-item-bg); color: var(--fql-c); }
/* Brand: each service in its own colour */
.fql[data-style="brand"] .fql-ico { background: var(--fql-c); color: #fff; }

/* Backdrop */
.fql-backdrop {
	position: fixed;
	inset: 0;
	z-index: -1;
	background: rgba(15, 23, 42, .18);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease;
}
.fql.is-open .fql-backdrop { opacity: 1; pointer-events: auto; }

/* Mobile */
@media (max-width: 767px) {
	.fql { --fql-s: var(--fql-size-m); right: var(--fql-x-m); bottom: var(--fql-y-m); gap: 12px; }
	.fql[data-side="left"] { right: auto; left: var(--fql-x-m); }
	.fql[data-vertical="top"] { bottom: auto; top: var(--fql-y-m); }
	.fql-tip { display: none; }
	.fql[data-mobile="0"] { display: none; }
	.fql[data-labels="hover"] .fql-label { opacity: 1; transform: none; } /* no hover on touch */
}
@media (min-width: 768px) {
	.fql[data-desktop="0"] { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.fql *, .fql *::before { transition-duration: .01ms !important; animation: none !important; }
}

@media print { .fql { display: none !important; } }

/* Settings page preview: keep the widget inside the preview box */
.fql.fql-preview { position: absolute; }
.fql.fql-preview .fql-backdrop { position: absolute; inset: -3000px; } /* clipped by the preview box */

/* Font Awesome icons */
.fql-fab-ico i { font-size: calc(var(--fql-s) * .4); line-height: 1; }
.fql-ico i { font-size: calc(var(--fql-s) * .36); line-height: 1; }
