/* === Huyang Bubble – Frontend Styles === */

/* Rohdaten-Container im Block-HTML immer verstecken */
.huyang-full-content {
	display: none !important;
}

/* Widget unsichtbar bis JS positioniert hat */
body:not(.huyang-ready) .huyang-widget,
body:not(.huyang-ready) .huyang-full-layer {
	visibility: hidden !important;
}

/* ==========================================
   WIDGET-CONTAINER (Kreis + Preview)
   ========================================== */

div.huyang-widget {
	position: fixed !important;
	z-index: 9999 !important;
	display: flex !important;
	align-items: flex-start !important;
	gap: 10px !important;
	pointer-events: none !important; /* Container blockiert keine Klicks */
	/* left/top per JS gesetzt */
}

div.huyang-widget .huyang-circle {
	pointer-events: auto !important;
}

/* Preview-Bubble nur klickbar wenn sichtbar */
div.huyang-widget.huyang-peek .huyang-preview-bubble,
div.huyang-widget.huyang-open .huyang-preview-bubble {
	pointer-events: auto !important;
}

/* Nicht-sticky-Modus: scrollt mit der Seite */
div.huyang-widget.huyang-absolute {
	position: absolute !important;
}

/* Mobile Nav offen (gkit_isActive): backdrop-filter deaktivieren damit Chrome-Compositor
   das Widget nicht über die Nav-Overlay rendert, z-index auf 0 senken */
body.huyang-nav-open div.huyang-widget,
body.huyang-nav-open div.huyang-full-layer {
	z-index: 0 !important;
	backdrop-filter: none !important;
	-webkit-backdrop-filter: none !important;
}

div.huyang-pos-title-left,
div.huyang-pos-middle-left  { flex-direction: row !important; }

div.huyang-pos-title-right,
div.huyang-pos-middle-right { flex-direction: row-reverse !important; }

div.huyang-pos-middle-left,
div.huyang-pos-middle-right {
	top: 50% !important;
	transform: translateY(-50%) !important;
}

/* ==========================================
   KREIS
   ========================================== */

div.huyang-widget .huyang-circle {
	width: 64px !important;
	height: 64px !important;
	border-radius: 50% !important;
	overflow: visible !important;
	background: rgba(10, 22, 40, 0.92) !important;
	cursor: grab !important;
	touch-action: none !important;
	flex-shrink: 0 !important;
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	box-shadow: 0 4px 16px rgba(0,0,0,.55), 0 0 0 1px rgba(100,160,255,0.3) !important;
	transition: transform .2s ease, box-shadow .2s ease !important;
	text-decoration: none !important;
}

div.huyang-widget .huyang-circle:hover {
	transform: scale(1.08) !important;
	box-shadow: 0 6px 22px rgba(0,0,0,.6), 0 0 0 1px rgba(100,160,255,0.6) !important;
}

div.huyang-widget .huyang-circle img {
	width: 64px !important;
	height: 64px !important;
	border-radius: 50% !important;
	object-fit: cover !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	border: none !important;
}

/* --- Notification-Dot --- */
div.huyang-widget .huyang-dot {
	position: absolute !important;
	top: 2px !important;
	right: 2px !important;
	width: 11px !important;
	height: 11px !important;
	background: #ef4444 !important;
	border-radius: 50% !important;
	border: 2px solid rgba(10,22,40,.95) !important;
	box-shadow: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* ==========================================
   VORSCHAU-BUBBLE (neben dem Kreis, normal breit)
   ========================================== */

div.huyang-widget .huyang-preview-bubble {
	background: rgba(10, 22, 40, 0.94) !important;
	backdrop-filter: blur(20px) saturate(160%) !important;
	-webkit-backdrop-filter: blur(20px) saturate(160%) !important;
	border: 1px solid rgba(100, 160, 255, 0.3) !important;
	border-radius: 10px !important;
	padding: 9px 13px !important;
	font-size: 13px !important;
	color: #d0e0ff !important;
	max-width: 260px !important;
	box-shadow: 0 6px 24px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,0.06) !important;
	position: relative !important;
	display: flex !important;
	align-items: center !important;
	gap: 7px !important;
	cursor: pointer !important;
	/* Collapsed */
	max-height: 0 !important;
	overflow: hidden !important;
	opacity: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	transition: max-height .35s ease, opacity .28s ease, padding .3s ease !important;
	user-select: none !important;
}

/* Peek: Preview eingeblendet, bleibt offen */
div.huyang-widget.huyang-peek .huyang-preview-bubble {
	max-height: 60px !important;
	opacity: 1 !important;
	padding-top: 9px !important;
	padding-bottom: 9px !important;
}

/* Wenn geöffnet: Preview ausgeblendet (via hidden-Attribut, trotzdem sichern) */
div.huyang-widget.huyang-open .huyang-preview-bubble {
	display: none !important;
}

/* Blasen-Pfeil (links für title-left/middle-left) */
div.huyang-pos-title-left .huyang-preview-bubble::before,
div.huyang-pos-middle-left .huyang-preview-bubble::before {
	content: '' !important;
	position: absolute !important;
	left: -12px !important;
	top: 14px !important;
	border: 7px solid transparent !important;
	border-right-color: rgba(10, 22, 40, 0.94) !important;
	border-left: none !important;
}

div.huyang-pos-title-right .huyang-preview-bubble::before,
div.huyang-pos-middle-right .huyang-preview-bubble::before {
	content: '' !important;
	position: absolute !important;
	right: -12px !important;
	top: 14px !important;
	border: 7px solid transparent !important;
	border-left-color: rgba(10, 22, 40, 0.94) !important;
	border-right: none !important;
}

div.huyang-widget .huyang-preview {
	color: #d0e0ff !important;
	font-weight: 600 !important;
	font-size: 13px !important;
	line-height: 1.35 !important;
	margin: 0 !important;
	padding: 0 !important;
	flex: 1 !important;
}

/* Klick-Indikator ▸ */
div.huyang-widget .huyang-click-hint {
	color: rgba(100,160,255,0.65) !important;
	font-size: 15px !important;
	line-height: 1 !important;
	flex-shrink: 0 !important;
}

div.huyang-widget.huyang-peek .huyang-click-hint {
	animation: huyang-hint-pulse 1.1s ease-in-out infinite !important;
}

@keyframes huyang-hint-pulse {
	0%, 100% { opacity: 0.45; transform: translateX(0); }
	55%       { opacity: 1;    transform: translateX(4px); }
}

/* ==========================================
   VOLLTEXT-LAYER (volle Content-Breite, position:fixed via JS)
   ========================================== */

div.huyang-full-layer {
	position: fixed !important;
	z-index: 9998 !important;
	/* left, width, top per JS gesetzt (= Content-Bereich) */
	background: rgba(10, 22, 40, 0.96) !important;
	backdrop-filter: blur(24px) saturate(160%) !important;
	-webkit-backdrop-filter: blur(24px) saturate(160%) !important;
	border: 1px solid rgba(100, 160, 255, 0.3) !important;
	border-radius: 12px !important;
	padding: 20px 24px !important;
	box-shadow: 0 8px 40px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,0.07) !important;
	max-height: 70vh !important;
	overflow-y: auto !important;
	box-sizing: border-box !important;
}

div.huyang-full-layer .huyang-full {
	color: #c8daff !important;
	font-size: 15px !important;
	line-height: 1.65 !important;
	margin: 0 !important;
	padding: 0 0 0 0 !important;
	padding-right: 32px !important; /* Platz für den Schließen-Button */
}

div.huyang-full-layer .huyang-full a {
	color: rgba(130,180,255,0.95) !important;
	text-decoration: underline !important;
}
div.huyang-full-layer .huyang-full a:hover {
	color: #d0e0ff !important;
}

div.huyang-full-layer .huyang-full p {
	margin: 0 0 0.7em !important;
}
div.huyang-full-layer .huyang-full p:last-child {
	margin-bottom: 0 !important;
}

div.huyang-full-layer .huyang-full strong {
	color: #e8f0ff !important;
}

/* --- Schließen-Button im Full-Layer --- */
div.huyang-full-layer button.huyang-close {
	position: absolute !important;
	top: 12px !important;
	right: 14px !important;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	cursor: pointer !important;
	color: rgba(100,160,255,0.45) !important;
	font-size: 17px !important;
	line-height: 1 !important;
	padding: 2px 4px !important;
	transition: color .15s !important;
	box-shadow: none !important;
	outline: none !important;
	min-width: 0 !important;
	min-height: 0 !important;
	width: auto !important;
	text-transform: none !important;
	letter-spacing: normal !important;
}

div.huyang-full-layer button.huyang-close:hover,
div.huyang-full-layer button.huyang-close:focus {
	color: #d0e0ff !important;
	background: none !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

/* ==========================================
   MOBILE (< 768px)
   ========================================== */

@media (max-width: 767px) {
	/* Widget: JS übernimmt top/left – hier nur Bubble-Breite begrenzen */
	div.huyang-widget .huyang-preview-bubble {
		max-width: min(220px, calc(100vw - 90px)) !important;
		font-size: 12px !important;
	}

	/* Full-Layer: JS setzt left (neben Icon), right mit etwas Abstand */
	div.huyang-full-layer {
		right: 16px !important;
		width: auto !important;
		max-height: calc(100vh - 100px) !important;
		padding: 14px 16px !important;
	}

	/* Schließen-Button größer zum Antippen */
	div.huyang-full-layer button.huyang-close {
		font-size: 20px !important;
		padding: 4px 6px !important;
	}
}

/* ==========================================
   ANIMATIONEN
   ========================================== */

@keyframes huyang-wobble-anim {
	0%   { transform: rotate(0deg); }
	15%  { transform: rotate(-8deg); }
	30%  { transform: rotate(7deg); }
	45%  { transform: rotate(-5deg); }
	60%  { transform: rotate(4deg); }
	75%  { transform: rotate(-2deg); }
	90%  { transform: rotate(1deg); }
	100% { transform: rotate(0deg); }
}

div.huyang-widget.huyang-wobble .huyang-circle {
	animation: huyang-wobble-anim .8s ease-in-out 0.5s 1 both !important;
}

@keyframes huyang-pulse-anim {
	0%   { box-shadow: 0 0 0 0 rgba(100,160,255,.55), 0 4px 16px rgba(0,0,0,.55); }
	70%  { box-shadow: 0 0 0 14px rgba(100,160,255,0), 0 4px 16px rgba(0,0,0,.55); }
	100% { box-shadow: 0 0 0 0 rgba(100,160,255,0), 0 4px 16px rgba(0,0,0,.55); }
}

div.huyang-widget .huyang-circle.huyang-pulse {
	animation: huyang-pulse-anim .9s ease-out 1 !important;
}
