/* Kitchenu floating support hub — Homino-style, brand orange */

.ku-contact-hub-portal {
	position: relative;
	z-index: 10040;
	pointer-events: none;
}

.ku-contact-hub {
	position: fixed;
	z-index: 10040;
	left: max(0.9rem, env(safe-area-inset-left));
	bottom: max(0.9rem, env(safe-area-inset-bottom));
	pointer-events: none;
	transition: bottom 0.28s ease;
	font-family: inherit;
}

.ku-contact-hub[hidden] {
	display: none !important;
}

.ku-contact-hub__fab,
.ku-contact-hub__scrim,
.ku-contact-hub__panel {
	pointer-events: auto;
}

.ku-contact-hub__fab {
	position: relative;
	z-index: 3;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.75rem;
	height: 3.75rem;
	border: 0;
	border-radius: 1.25rem;
	color: #fff;
	background: linear-gradient(145deg, #f59e0b 0%, #f97316 55%, #ea580c 100%);
	box-shadow:
		0 16px 36px -12px rgba(249, 115, 22, 0.55),
		0 0 0 1px rgba(255, 255, 255, 0.28) inset;
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ku-contact-hub__fab:hover {
	transform: translateY(-3px) scale(1.04);
	box-shadow:
		0 20px 40px -12px rgba(234, 88, 12, 0.5),
		0 0 0 1px rgba(255, 255, 255, 0.3) inset;
}

.ku-contact-hub__fab-glow {
	position: absolute;
	inset: -4px;
	border-radius: inherit;
	background: radial-gradient(circle, rgba(249, 115, 22, 0.35), transparent 70%);
	animation: ku-contact-hub-glow 2.4s ease-out infinite;
	pointer-events: none;
}

.ku-contact-hub.is-open .ku-contact-hub__fab-glow {
	display: none;
}

@keyframes ku-contact-hub-glow {
	0% {
		transform: scale(1);
		opacity: 0.75;
	}
	100% {
		transform: scale(1.45);
		opacity: 0;
	}
}

.ku-contact-hub__fab-icon,
.ku-contact-hub__fab-close {
	position: absolute;
	width: 1.45rem;
	height: 1.45rem;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.ku-contact-hub__fab-icon svg,
.ku-contact-hub__fab-close svg {
	width: 100%;
	height: 100%;
	display: block;
}

.ku-contact-hub__fab-close {
	opacity: 0;
	transform: rotate(-50deg) scale(0.65);
}

.ku-contact-hub.is-open .ku-contact-hub__fab-icon {
	opacity: 0;
	transform: rotate(50deg) scale(0.65);
}

.ku-contact-hub.is-open .ku-contact-hub__fab-close {
	opacity: 1;
	transform: rotate(0) scale(1);
}

.ku-contact-hub__fab-badge {
	position: absolute;
	top: -0.45rem;
	right: -0.35rem;
	padding: 0.15rem 0.4rem;
	border-radius: 999px;
	background: #10b981;
	color: #fff;
	font-size: 9px;
	font-weight: 900;
	box-shadow: 0 4px 10px rgba(16, 185, 129, 0.45);
	white-space: nowrap;
}

.ku-contact-hub.is-open .ku-contact-hub__fab-badge {
	display: none;
}

.ku-contact-hub__scrim {
	position: fixed;
	inset: 0;
	z-index: 1;
	background: rgba(15, 23, 42, 0.48);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	opacity: 0;
	transition: opacity 0.22s ease;
}

.ku-contact-hub__scrim.is-visible {
	opacity: 1;
}

.ku-contact-hub__scrim[hidden],
.ku-contact-hub__panel[hidden] {
	display: none !important;
}

.ku-contact-hub__panel {
	position: fixed;
	z-index: 2;
	left: max(0.75rem, env(safe-area-inset-left));
	bottom: calc(3.75rem + 1.1rem + env(safe-area-inset-bottom));
	width: min(94vw, 24rem);
	max-height: min(80vh, 40rem);
	opacity: 0;
	transform: translateY(16px) scale(0.96);
	transition: opacity 0.22s ease, transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

.ku-contact-hub__panel.is-open {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.ku-contact-hub__shell {
	display: flex;
	flex-direction: column;
	max-height: min(80vh, 40rem);
	overflow: hidden;
	border-radius: 1.5rem;
	border: 1px solid rgba(255, 255, 255, 0.9);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 235, 0.96));
	box-shadow:
		0 30px 70px -18px rgba(15, 23, 42, 0.5),
		0 14px 28px -12px rgba(249, 115, 22, 0.28),
		0 0 0 1px rgba(249, 115, 22, 0.06);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

.ku-contact-hub__head {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding: 1rem 1rem 0.95rem;
	color: #fff;
	background:
		radial-gradient(120% 140% at 100% 0%, rgba(251, 191, 36, 0.45), transparent 55%),
		linear-gradient(135deg, #f59e0b 0%, #f97316 55%, #ea580c 100%);
}

.ku-contact-hub__avatar {
	display: flex;
	height: 2.85rem;
	width: 2.85rem;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.2);
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25) inset;
}

.ku-contact-hub__avatar svg {
	width: 1.35rem;
	height: 1.35rem;
}

.ku-contact-hub__head-text {
	min-width: 0;
	flex: 1;
}

.ku-contact-hub__eyebrow {
	margin: 0;
	font-size: 10px;
	font-weight: 800;
	color: rgba(255, 255, 255, 0.8);
}

.ku-contact-hub__title {
	margin: 0.1rem 0 0;
	font-size: 1rem;
	font-weight: 900;
	line-height: 1.3;
}

.ku-contact-hub__subtitle {
	margin: 0.15rem 0 0;
	font-size: 11px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.88);
}

.ku-contact-hub__x {
	display: flex;
	height: 2.25rem;
	width: 2.25rem;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	cursor: pointer;
}

.ku-contact-hub__x svg {
	width: 1rem;
	height: 1rem;
}

.ku-contact-hub__body {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0.85rem;
}

.ku-contact-card {
	border-radius: 1.15rem;
	border: 1px solid rgba(226, 232, 240, 0.95);
	background: linear-gradient(165deg, rgba(255, 255, 255, 0.98), rgba(255, 251, 235, 0.9));
	box-shadow: 0 8px 20px -14px rgba(15, 23, 42, 0.35);
	padding: 0.8rem;
}

.ku-contact-card--social {
	border-color: rgba(16, 185, 129, 0.25);
	background: linear-gradient(165deg, rgba(236, 253, 245, 0.85), rgba(255, 255, 255, 0.96));
}

.ku-contact-card__head {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	margin-bottom: 0.7rem;
}

.ku-contact-card__icon {
	display: flex;
	height: 2.35rem;
	width: 2.35rem;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border-radius: 0.85rem;
}

.ku-contact-card__icon svg {
	width: 1.1rem;
	height: 1.1rem;
}

.ku-contact-card__icon--office {
	background: rgba(249, 115, 22, 0.12);
	color: #ea580c;
}

.ku-contact-card__icon--mobile {
	background: rgba(37, 99, 235, 0.12);
	color: #2563eb;
}

.ku-contact-card__icon--social {
	background: rgba(16, 185, 129, 0.14);
	color: #059669;
}

.ku-contact-card__icon--map {
	background: rgba(239, 68, 68, 0.12);
	color: #dc2626;
}

.ku-contact-card__title {
	margin: 0;
	font-size: 0.82rem;
	font-weight: 900;
	color: #0f172a;
}

.ku-contact-card__hint {
	margin: 0.15rem 0 0;
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	line-height: 1.5;
}

.ku-contact-card__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 0.45rem;
}

.ku-contact-chip {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	min-height: 3rem;
	padding: 0.55rem 0.7rem;
	border-radius: 0.95rem;
	border: 1px solid rgb(226, 232, 240);
	background: #fff;
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ku-contact-chip:hover {
	border-color: rgba(249, 115, 22, 0.45);
	box-shadow: 0 8px 18px -12px rgba(249, 115, 22, 0.55);
	transform: translateY(-1px);
}

.ku-contact-chip--mobile:hover {
	border-color: rgba(37, 99, 235, 0.45);
	box-shadow: 0 8px 18px -12px rgba(37, 99, 235, 0.5);
}

.ku-contact-chip--featured {
	margin-bottom: 0.55rem;
	border-color: rgba(16, 185, 129, 0.35);
	background: linear-gradient(135deg, #ecfdf5, #fff);
}

.ku-contact-chip__text {
	display: flex;
	min-width: 0;
	flex: 1;
	flex-direction: column;
}

.ku-contact-chip__label {
	display: block;
	font-size: 10px;
	font-weight: 800;
	color: #64748b;
}

.ku-contact-chip__value {
	display: block;
	margin-top: 0.1rem;
	font-size: 0.92rem;
	font-weight: 900;
	color: #0f172a;
	letter-spacing: 0.01em;
	direction: ltr;
	unicode-bidi: isolate;
	text-align: start;
	font-variant-numeric: tabular-nums;
}

.ku-contact-chip__action {
	display: flex;
	height: 1.85rem;
	width: 1.85rem;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border-radius: 0.65rem;
	background: rgba(249, 115, 22, 0.1);
	color: #ea580c;
}

.ku-contact-chip--mobile .ku-contact-chip__action {
	background: rgba(37, 99, 235, 0.1);
	color: #2563eb;
}

.ku-contact-chip--featured .ku-contact-chip__action {
	background: rgba(16, 185, 129, 0.14);
	color: #059669;
}

.ku-contact-chip__action svg {
	width: 0.9rem;
	height: 0.9rem;
}

.ku-contact-msg-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.45rem;
}

.ku-contact-msg {
	display: inline-flex;
	min-height: 2.85rem;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	border-radius: 0.9rem;
	padding: 0.6rem 0.65rem;
	color: #fff;
	font-size: 0.8rem;
	font-weight: 900;
	text-decoration: none;
	box-shadow: 0 8px 16px -10px rgba(15, 23, 42, 0.45);
	transition: filter 0.15s ease, transform 0.15s ease;
	background-color: #64748b;
}

.ku-contact-msg:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
	color: #fff;
}

.ku-contact-msg span {
	color: #fff;
}

.ku-contact-msg__glyph {
	display: inline-flex;
	width: 2rem;
	height: 2rem;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	border-radius: 9999px;
	background: rgba(255, 255, 255, 0.28);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35);
}

.ku-contact-msg__glyph svg {
	width: 1.15rem;
	height: 1.15rem;
	display: block;
}

.ku-contact-msg__glyph svg path {
	fill: #fff;
}

.ku-contact-msg[data-tone='whatsapp'] {
	background-color: #16a34a;
	background-image: linear-gradient(135deg, #22c55e, #15803d);
}

.ku-contact-msg[data-tone='telegram'] {
	background-color: #0284c7;
	background-image: linear-gradient(135deg, #38bdf8, #0369a1);
}

.ku-contact-msg[data-tone='eitaa'] {
	background-color: #ea580c;
	background-image: linear-gradient(135deg, #fb923c, #ea580c);
}

.ku-contact-msg[data-tone='rubika'] {
	background-color: #7c3aed;
	background-image: linear-gradient(135deg, #c084fc, #7c3aed);
}

.ku-contact-msg[data-tone='neshan'] {
	background-color: #dc2626;
	background-image: linear-gradient(135deg, #f87171, #dc2626);
}

.ku-contact-msg[data-tone='google'] {
	background-color: #1d4ed8;
	background-image: linear-gradient(135deg, #60a5fa, #1d4ed8);
}

/* Hide legacy contact widget when hub is present */
body:has(.ku-contact-hub) .contact-widget,
body:has(.ku-contact-hub) .whatsapp-chat {
	display: none !important;
}

/* Mobile dock: hide FAB, lift panel above dock */
@media (max-width: 849px) {
	body.ku-mobile-dock-active .ku-contact-hub__fab {
		display: none !important;
	}

	body.ku-mobile-dock-active .ku-contact-hub__panel {
		left: max(0.65rem, env(safe-area-inset-left));
		right: max(0.65rem, env(safe-area-inset-right));
		bottom: calc(64px + env(safe-area-inset-bottom, 0px));
		width: auto;
		max-width: none;
	}

	body.ku-mobile-dock-active .ku-mobile-dock__tab--chaty.is-chaty-open {
		color: #ea580c;
	}
}

body.ku-contact-hub-open {
	overflow: hidden;
}

/* Scroll-to-top opposite of support FAB (left) */
#top-link.back-to-top,
button#top-link.back-to-top{
	left:auto !important;
	right:max(0.9rem, env(safe-area-inset-right)) !important;
}
#top-link.back-to-top.left,
button#top-link.back-to-top.left{
	left:auto !important;
	right:max(0.9rem, env(safe-area-inset-right)) !important;
}
