/**
 * UNIKATX Contact Bubble – Frontend.
 * Eigenständige Ebene, keine Eingriffe in Shop-, Cart- oder Checkout-Styles.
 */

.ucb {
	--ucb-color: #111111;
	--ucb-accent: #c6a15b;
	--ucb-bg: #ffffff;
	--ucb-bottom: 20px;
	--ucb-side: 20px;
	--ucb-bottom-m: 15px;
	--ucb-side-m: 15px;

	position: fixed;
	bottom: var(--ucb-bottom);
	z-index: 99990;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
	font-family: inherit;
	line-height: 1.4;
}

.ucb--right { right: var(--ucb-side); }
.ucb--left  { left: var(--ucb-side); align-items: flex-start; }

/* ---------------------------------------------------------------- Button. */

.ucb__button {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: 0;
	padding: 0;
	margin: 0;
	background: var(--ucb-color);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	animation: ucb-in 0.35s ease both;
	align-self: flex-end;
}

.ucb--left .ucb__button { align-self: flex-start; }

.ucb__button:hover { transform: scale(1.05); box-shadow: 0 10px 26px rgba(0, 0, 0, 0.24); }
.ucb__button:focus-visible { outline: 3px solid var(--ucb-accent); outline-offset: 3px; }

.ucb__icon-close { display: none; }
.ucb.is-open .ucb__icon-open { display: none; }
.ucb.is-open .ucb__icon-close { display: block; }

@keyframes ucb-in {
	from { opacity: 0; transform: scale(0.85); }
	to   { opacity: 1; transform: scale(1); }
}

/* ----------------------------------------------------------------- Panel. */

.ucb__panel {
	width: 320px;
	max-width: calc(100vw - 30px);
	background: var(--ucb-bg);
	color: var(--ucb-color);
	border-radius: 14px;
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	animation: ucb-panel-in 0.22s ease both;
}

.ucb__panel[hidden] { display: none; }

@keyframes ucb-panel-in {
	from { opacity: 0; transform: translateY(8px) scale(0.98); }
	to   { opacity: 1; transform: translateY(0) scale(1); }
}

.ucb__panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 16px 16px 12px;
	border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.ucb__title {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.01em;
	color: var(--ucb-color);
}

.ucb__close {
	background: none;
	border: 0;
	padding: 4px;
	cursor: pointer;
	color: var(--ucb-color);
	opacity: 0.55;
	display: flex;
	border-radius: 4px;
}

.ucb__close:hover { opacity: 1; }
.ucb__close:focus-visible { outline: 2px solid var(--ucb-accent); outline-offset: 2px; }

/* ------------------------------------------------------------- Kanalliste. */

.ucb__list { list-style: none; margin: 0; padding: 6px; }
.ucb__list li { margin: 0; }

.ucb__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 11px 12px;
	border-radius: 10px;
	text-decoration: none;
	color: var(--ucb-color);
	transition: background 0.15s ease;
}

.ucb__item:hover,
.ucb__item:focus-visible { background: rgba(17, 17, 17, 0.05); text-decoration: none; }
.ucb__item:focus-visible { outline: 2px solid var(--ucb-accent); outline-offset: -2px; }

.ucb__item-icon {
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(17, 17, 17, 0.06);
	color: var(--ucb-color);
}

.ucb__item--whatsapp .ucb__item-icon { background: rgba(37, 211, 102, 0.14); color: #128c7e; }
.ucb__item--product .ucb__item-icon,
.ucb__item--sizing .ucb__item-icon { background: rgba(198, 161, 91, 0.16); color: var(--ucb-accent); }

.ucb__item-text { display: flex; flex-direction: column; min-width: 0; }
.ucb__item-text strong { font-size: 14px; font-weight: 600; }
.ucb__item-text small { font-size: 12px; opacity: 0.65; }

/* ---------------------------------------------------------------- Teaser. */

.ucb__teaser {
	display: flex;
	align-items: center;
	gap: 8px;
	background: var(--ucb-bg);
	color: var(--ucb-color);
	padding: 9px 10px 9px 14px;
	border-radius: 999px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
	font-size: 13px;
	animation: ucb-teaser-in 0.3s ease both;
	max-width: calc(100vw - 40px);
}

.ucb__teaser[hidden] { display: none; }

@keyframes ucb-teaser-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

.ucb__teaser-close {
	background: none;
	border: 0;
	cursor: pointer;
	font-size: 17px;
	line-height: 1;
	opacity: 0.45;
	color: inherit;
	padding: 0 2px;
	border-radius: 3px;
}

.ucb__teaser-close:hover { opacity: 1; }
.ucb__teaser-close:focus-visible { outline: 2px solid var(--ucb-accent); outline-offset: 2px; }

/* ---------------------------------------------------------------- Mobile. */

@media (max-width: 782px) {
	.ucb {
		bottom: var(--ucb-bottom-m);
		gap: 8px;
	}

	.ucb--right { right: var(--ucb-side-m); }
	.ucb--left  { left: var(--ucb-side-m); }

	.ucb__button { width: 54px; height: 54px; }
	.ucb__panel { width: 300px; }
	.ucb__teaser { font-size: 12px; }
}

/* Sticky Add-to-Cart / Checkout-Leisten vieler Themes liegen unten –
   die Blase weicht nach oben aus, statt sie zu überdecken. */
@media (max-width: 782px) {
	body.single-product .ucb,
	body.woocommerce-checkout .ucb,
	body.woocommerce-cart .ucb {
		bottom: calc(var(--ucb-bottom-m) + 62px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ucb__button,
	.ucb__panel,
	.ucb__teaser { animation: none; }
	.ucb__button { transition: none; }
	.ucb__button:hover { transform: none; }
}

/* ------------------------------------------------------------ Dunkler Modus.
   Auf dunklem Hintergrund wäre eine schwarze Blase unsichtbar – sie wechselt
   deshalb auf die Akzentfarbe (Gold) mit dunklem Icon. */

.ucb.is-dark {
	--ucb-bg: #171717;
}

.ucb.is-dark .ucb__button {
	background: var(--ucb-accent);
	color: #111111;
	box-shadow: 0 6px 22px rgba(0, 0, 0, 0.5);
}

.ucb.is-dark .ucb__button:hover {
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.6);
}

.ucb.is-dark .ucb__button:focus-visible {
	outline-color: #ffffff;
}

.ucb.is-dark .ucb__panel,
.ucb.is-dark .ucb__teaser {
	background: var(--ucb-bg);
	color: #f5f5f5;
	box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55);
}

.ucb.is-dark .ucb__panel-head {
	border-bottom-color: rgba(255, 255, 255, 0.1);
}

.ucb.is-dark .ucb__title,
.ucb.is-dark .ucb__close,
.ucb.is-dark .ucb__item {
	color: #f5f5f5;
}

.ucb.is-dark .ucb__item:hover,
.ucb.is-dark .ucb__item:focus-visible {
	background: rgba(255, 255, 255, 0.07);
}

.ucb.is-dark .ucb__item-icon {
	background: rgba(255, 255, 255, 0.09);
	color: #f5f5f5;
}

.ucb.is-dark .ucb__item--whatsapp .ucb__item-icon {
	background: rgba(37, 211, 102, 0.18);
	color: #4ade80;
}

.ucb.is-dark .ucb__item--product .ucb__item-icon,
.ucb.is-dark .ucb__item--sizing .ucb__item-icon {
	background: rgba(198, 161, 91, 0.22);
	color: var(--ucb-accent);
}
