/**
 * FixSteel wisdom glass/metal bubble — tip of the day (not a ticker).
 */

.fsp-wisdom-bubble {
	--fsp-wb-blue: #1e40af;
	--fsp-wb-orange: #f97316;
	--fsp-wb-gold: #ffcc00;
	position: fixed;
	z-index: 99940;
	inset-inline-end: 1.1rem;
	inset-block-end: 5.5rem;
	font-family: inherit;
	direction: rtl;
}

.fsp-wisdom-bubble__toggle {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.42rem 0.7rem 0.42rem 0.5rem;
	border: 1px solid rgba(148, 163, 184, 0.4);
	border-radius: 4px;
	background:
		linear-gradient(
			145deg,
			rgba(71, 85, 105, 0.45) 0%,
			rgba(15, 23, 42, 0.82) 50%,
			rgba(30, 64, 175, 0.55) 100%
		);
	backdrop-filter: blur(14px) saturate(1.15);
	-webkit-backdrop-filter: blur(14px) saturate(1.15);
	color: #f8fafc;
	box-shadow:
		0 10px 26px rgba(15, 23, 42, 0.32),
		inset 0 1px 0 rgba(255, 255, 255, 0.16);
	cursor: pointer;
	transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.fsp-wisdom-bubble__toggle:hover,
.fsp-wisdom-bubble__toggle:focus-visible {
	transform: translateY(-2px);
	border-color: rgba(255, 204, 0, 0.45);
	box-shadow:
		0 14px 30px rgba(15, 23, 42, 0.38),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
	outline: none;
}

.fsp-wisdom-bubble__mark {
	display: grid;
	place-items: center;
	width: 2.05rem;
	height: 2.05rem;
	border-radius: 4px;
	border: 1.5px solid rgba(255, 204, 0, 0.55);
	background: linear-gradient(145deg, rgba(255, 204, 0, 0.26) 0%, rgba(15, 23, 42, 0.88) 100%);
	color: var(--fsp-wb-gold);
	flex: 0 0 auto;
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.16),
		0 2px 8px rgba(2, 6, 23, 0.3);
}

.fsp-wisdom-bubble__mark .fsp-wisdom-glyph {
	width: 1.15rem;
	height: 1.15rem;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.4));
}

.fsp-wisdom-bubble__mark--panel {
	width: 2.35rem;
	height: 2.35rem;
}

.fsp-wisdom-bubble__mark--panel .fsp-wisdom-glyph {
	width: 1.3rem;
	height: 1.3rem;
}

.fsp-wisdom-bubble[data-cat='installers'] .fsp-wisdom-bubble__mark {
	color: #fb923c;
	border-color: rgba(249, 115, 22, 0.65);
	background: linear-gradient(145deg, rgba(249, 115, 22, 0.28) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.fsp-wisdom-bubble[data-cat='sellers'] .fsp-wisdom-bubble__mark {
	color: #93c5fd;
	border-color: rgba(59, 130, 246, 0.6);
	background: linear-gradient(145deg, rgba(59, 130, 246, 0.28) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.fsp-wisdom-bubble[data-cat='cabin'] .fsp-wisdom-bubble__mark {
	color: #e2e8f0;
	border-color: rgba(226, 232, 240, 0.5);
	background: linear-gradient(145deg, rgba(203, 213, 225, 0.24) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.fsp-wisdom-bubble[data-cat='factory'] .fsp-wisdom-bubble__mark {
	color: #60a5fa;
	border-color: rgba(30, 64, 175, 0.7);
	background: linear-gradient(145deg, rgba(30, 64, 175, 0.38) 0%, rgba(15, 23, 42, 0.88) 100%);
}

.fsp-wisdom-bubble__label {
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	white-space: nowrap;
}

.fsp-wisdom-bubble__panel {
	position: absolute;
	inset-inline-end: 0;
	inset-block-end: calc(100% + 0.55rem);
	width: min(20rem, calc(100vw - 2rem));
	padding: 1rem 1.05rem 0.95rem;
	border-radius: 5px;
	border: 1px solid rgba(148, 163, 184, 0.35);
	background:
		linear-gradient(
			165deg,
			rgba(30, 41, 59, 0.94) 0%,
			rgba(15, 23, 42, 0.94) 55%,
			rgba(23, 37, 84, 0.9) 100%
		);
	backdrop-filter: blur(18px) saturate(1.2);
	-webkit-backdrop-filter: blur(18px) saturate(1.2);
	color: #f1f5f9;
	box-shadow:
		0 18px 40px rgba(2, 6, 23, 0.45),
		inset 0 1px 0 rgba(255, 255, 255, 0.1);
	animation: fsp-wb-rise 0.26s ease-out;
}

.fsp-wisdom-bubble__panel[hidden] {
	display: none !important;
}

.fsp-wisdom-bubble__head {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	margin: 0 0 0.55rem;
	padding-inline-start: 1.4rem;
}

.fsp-wisdom-bubble__eyebrow {
	margin: 0;
	font-size: 0.7rem;
	font-weight: 700;
	color: var(--fsp-wb-gold);
	letter-spacing: 0.02em;
}

.fsp-wisdom-bubble__text {
	margin: 0 0 0.8rem;
	font-size: 0.92rem;
	line-height: 1.8;
	color: #f1f5f9;
	font-weight: 600;
}

.fsp-wisdom-bubble__more {
	display: inline-block;
	font-size: 0.78rem;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	border-bottom: 1px solid rgba(249, 115, 22, 0.85);
}

.fsp-wisdom-bubble__more:hover {
	color: var(--fsp-wb-orange);
}

.fsp-wisdom-bubble__close {
	position: absolute;
	inset-block-start: 0.35rem;
	inset-inline-start: 0.4rem;
	border: 0;
	background: transparent;
	color: #94a3b8;
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.15rem 0.35rem;
}

.fsp-wisdom-bubble__close:hover {
	color: #fff;
}

@keyframes fsp-wb-rise {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 640px) {
	.fsp-wisdom-bubble {
		inset-inline-end: 0.75rem;
		inset-block-end: 4.75rem;
	}

	.fsp-wisdom-bubble__label {
		font-size: 0.7rem;
	}
}

/* Lift above bottom ticker when present */
body.fsp-has-ticker-bottom .fsp-wisdom-bubble {
	inset-block-end: 6.25rem;
}
