/* =============================================================
   Tolo Contact Widget — floating chat launcher + popup
   Colors come from --tcw-primary / --tcw-secondary (set inline).
   ============================================================= */

#tcw {
	--tcw-primary: #ED3237;
	--tcw-secondary: #0059E2;
	--tcw-ink: #101828;
	--tcw-body: #5B6573;
	--tcw-line: #E6EAF1;
	--tcw-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99990;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ---- launcher ---- */
#tcw .tcw-launcher {
	position: relative;
	width: 62px;
	height: 62px;
	border: none;
	border-radius: 50%;
	cursor: pointer;
	color: #fff;
	background: linear-gradient(135deg, var(--tcw-primary) 0%, #c2272b 100%);
	box-shadow: 0 12px 30px rgba(237, 50, 55, 0.42);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.25s var(--tcw-ease), box-shadow 0.25s var(--tcw-ease);
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}
/* taps always resolve to the button, never an inner icon/SVG */
#tcw .tcw-launcher .tcw-ico,
#tcw .tcw-launcher svg,
#tcw .tcw-close svg,
#tcw .tcw-online { pointer-events: none; }
#tcw .tcw-close {
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
}
#tcw .tcw-launcher:hover {
	transform: translateY(-3px) scale(1.04);
	box-shadow: 0 16px 38px rgba(237, 50, 55, 0.5);
}
#tcw .tcw-launcher:focus-visible {
	outline: 3px solid rgba(0, 89, 226, 0.5);
	outline-offset: 3px;
}
/* soft attention ring (cleaner than a scaling border) */
#tcw .tcw-launcher::before {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(237, 50, 55, 0.45);
	animation: tcw-pulse 2.8s var(--tcw-ease) infinite;
	pointer-events: none;
}
@keyframes tcw-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(237, 50, 55, 0.4); }
	70%  { box-shadow: 0 0 0 16px rgba(237, 50, 55, 0); }
	100% { box-shadow: 0 0 0 0 rgba(237, 50, 55, 0); }
}

/* availability "online" dot */
#tcw .tcw-online {
	position: absolute;
	top: 4px;
	right: 4px;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #25D366;
	border: 2.5px solid #fff;
	z-index: 3;
	box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
	animation: tcw-online 2s ease-in-out infinite;
}
@keyframes tcw-online {
	0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); }
	50%      { box-shadow: 0 0 0 5px rgba(37, 211, 102, 0); }
}
#tcw.is-open .tcw-online,
#tcw.is-open .tcw-launcher::before { display: none; }

#tcw .tcw-ico {
	position: absolute;
	display: inline-flex;
	transition: opacity 0.2s var(--tcw-ease), transform 0.3s var(--tcw-ease);
}
#tcw .tcw-ico-close {
	opacity: 0;
	transform: rotate(-90deg) scale(0.6);
}
#tcw.is-open .tcw-launcher::before { animation: none; }
#tcw.is-open .tcw-ico-chat {
	opacity: 0;
	transform: rotate(90deg) scale(0.6);
}
#tcw.is-open .tcw-ico-close {
	opacity: 1;
	transform: rotate(0) scale(1);
}

/* ---- popup panel ---- */
#tcw .tcw-panel {
	position: absolute;
	right: 0;
	bottom: 78px;
	width: 330px;
	max-width: calc(100vw - 32px);
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 60px rgba(16, 24, 40, 0.24);
	overflow: hidden;
	transform-origin: bottom right;
	opacity: 0;
	transform: translateY(14px) scale(0.92);
	pointer-events: none;
	transition: opacity 0.26s var(--tcw-ease), transform 0.26s var(--tcw-ease);
}
#tcw.is-open .tcw-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* header */
#tcw .tcw-head {
	position: relative;
	overflow: hidden;
	padding: 22px 22px 20px;
	color: #fff;
	background: linear-gradient(125deg, var(--tcw-secondary) 0%, #003d9b 100%);
}
/* soft decorative circles for depth (brand pattern) */
#tcw .tcw-head::before,
#tcw .tcw-head::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	pointer-events: none;
	z-index: 0;
}
#tcw .tcw-head::before { width: 130px; height: 130px; top: -55px; right: -28px; }
#tcw .tcw-head::after  { width: 84px;  height: 84px;  bottom: -42px; left: -18px; }
#tcw .tcw-head h3,
#tcw .tcw-head p { position: relative; z-index: 1; }
#tcw .tcw-head h3 {
	margin: 0;
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
}
#tcw .tcw-head p {
	margin: 5px 0 0;
	font-size: 13.5px;
	line-height: 1.55;
	color: rgba(255, 255, 255, 0.85);
}
#tcw .tcw-close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	z-index: 4; /* must sit above the header H3 (z-index:1) so taps land here */
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s var(--tcw-ease);
}
#tcw .tcw-close:hover { background: rgba(255, 255, 255, 0.3); }

/* body */
#tcw .tcw-body { padding: 14px 16px 18px; }

#tcw .tcw-row {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 11px 30px 11px 12px;
	border-radius: 12px;
	text-decoration: none;
	border: 1px solid transparent;
	opacity: 0;
	transition: background 0.2s var(--tcw-ease), border-color 0.2s var(--tcw-ease), transform 0.2s var(--tcw-ease), opacity 0.35s var(--tcw-ease);
}
#tcw .tcw-row + .tcw-row { margin-top: 4px; }
/* staggered fade-in when the popup opens */
#tcw.is-open .tcw-row,
#tcw.is-open .tcw-btn { opacity: 1; }
#tcw.is-open .tcw-row:nth-of-type(1) { transition-delay: 0.06s; }
#tcw.is-open .tcw-row:nth-of-type(2) { transition-delay: 0.12s; }
#tcw.is-open .tcw-row:nth-of-type(3) { transition-delay: 0.18s; }
#tcw .tcw-row:hover {
	background: #F7F9FC;
	border-color: var(--tcw-line);
	transform: translateX(3px);
}
/* hover chevron */
#tcw .tcw-row::after {
	content: "";
	position: absolute;
	right: 16px;
	top: 50%;
	width: 7px;
	height: 7px;
	border-right: 2px solid var(--tcw-body);
	border-top: 2px solid var(--tcw-body);
	transform: translateY(-50%) rotate(45deg);
	opacity: 0;
	transition: opacity 0.2s var(--tcw-ease), right 0.2s var(--tcw-ease);
}
#tcw .tcw-row:hover::after { opacity: 0.55; right: 13px; }
#tcw .tcw-row-ico {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	border-radius: 13px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, rgba(0, 89, 226, 0.13), rgba(0, 89, 226, 0.05));
	color: var(--tcw-secondary);
	transition: transform 0.2s var(--tcw-ease);
}
#tcw .tcw-row:hover .tcw-row-ico { transform: scale(1.06); }
#tcw .tcw-row-ico.tcw-wa {
	background: linear-gradient(135deg, rgba(37, 211, 102, 0.2), rgba(37, 211, 102, 0.07));
	color: #25D366;
}
#tcw .tcw-row-txt {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
#tcw .tcw-row-label {
	font-size: 11.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--tcw-body);
}
#tcw .tcw-row-value {
	font-size: 15px;
	font-weight: 600;
	color: var(--tcw-ink);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* request order button */
#tcw .tcw-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
	padding: 14px 18px;
	border-radius: 100px;
	background: linear-gradient(135deg, var(--tcw-primary) 0%, #c2272b 100%);
	color: #fff;
	font-size: 15.5px;
	font-weight: 700;
	letter-spacing: 0.01em;
	text-decoration: none;
	opacity: 0;
	box-shadow: 0 10px 24px rgba(237, 50, 55, 0.32);
	transition: transform 0.22s var(--tcw-ease), box-shadow 0.22s var(--tcw-ease), filter 0.22s var(--tcw-ease), opacity 0.35s var(--tcw-ease);
}
#tcw.is-open .tcw-btn { transition-delay: 0.24s; }
#tcw .tcw-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 14px 30px rgba(237, 50, 55, 0.42);
	filter: brightness(1.05);
}
#tcw .tcw-btn-arrow {
	display: inline-flex;
	transition: transform 0.22s var(--tcw-ease);
}
#tcw .tcw-btn:hover .tcw-btn-arrow { transform: translateX(4px); }

/* ---- responsive ---- */
@media (max-width: 480px) {
	#tcw { right: 16px; bottom: 16px; }
	#tcw .tcw-launcher { width: 56px; height: 56px; }
	#tcw .tcw-panel {
		width: calc(100vw - 32px);
		bottom: 70px;
	}
	#tcw .tcw-row-value { font-size: 14.5px; }
}

@media (prefers-reduced-motion: reduce) {
	#tcw .tcw-launcher,
	#tcw .tcw-panel,
	#tcw .tcw-ico,
	#tcw .tcw-row,
	#tcw .tcw-row-ico,
	#tcw .tcw-btn,
	#tcw .tcw-btn-arrow {
		transition: none !important;
		transition-delay: 0s !important;
	}
	#tcw .tcw-launcher::before,
	#tcw .tcw-online { animation: none !important; }
}
