/* ============================================================
   Shik WhatsApp Bubble – Frontend styles
   All sizes/colors are overridable from the Elementor panel
   via CSS custom properties set on .shik-wa
   ============================================================ */

.shik-wa {
	--shik-green: #30bf39;
	--shik-icon-color: #ffffff;
	--shik-pulse-color: #30bf39;
	--shik-badge-color: #ff3b30;
	--shik-bubble-size: 60px;
	--shik-offset-x: 25px;
	--shik-offset-y: 25px;
	--shik-tooltip-gap: 14px;
	--shik-popup-width: 340px;
	--shik-z: 9999;

	position: fixed;
	bottom: var(--shik-offset-y);
	z-index: var(--shik-z);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font-family: inherit;
}

.shik-wa--right { right: var(--shik-offset-x); }
.shik-wa--left  { left: var(--shik-offset-x); align-items: flex-start; }

/* ---------- Launcher (bubble + white tooltip) ---------- */

.shik-wa__launcher {
	display: flex;
	align-items: center;
	gap: var(--shik-tooltip-gap);
	flex-direction: row; /* tooltip first (right side in RTL) */
}

.shik-wa--left .shik-wa__launcher {
	flex-direction: row-reverse;
}

.shik-wa__tooltip {
	background: #ffffff;
	color: #222222;
	padding: 8px 14px;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
	white-space: nowrap;
	font-size: 15px;
	line-height: 1.4;
	cursor: default;
	animation: shik-fade-in 0.4s ease both;
	animation-delay: 0.6s;
}

.shik-wa__bubble {
	position: relative;
	width: var(--shik-bubble-size);
	height: var(--shik-bubble-size);
	padding: 0;
	border: 0;
	background: transparent;
	border-radius: 50%;
	cursor: pointer;
	line-height: 0;
	-webkit-appearance: none;
	appearance: none;
	animation: scale-in 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.shik-wa__bubble svg {
	width: 100%;
	height: 100%;
	display: block;
	border-radius: 50%;
}

.shik-wa-svg-circle { fill: var(--shik-green); }
.shik-wa-svg-path   { fill: var(--shik-icon-color); }

.shik-wa__badge {
	position: absolute;
	top: 4%;
	inset-inline-end: 4%;
	width: 22%;
	height: 22%;
	min-width: 8px;
	min-height: 8px;
	background: var(--shik-badge-color);
	border-radius: 50%;
	border: 2px solid #ffffff;
	box-sizing: border-box;
}

/* ---------- Pulse animation (as provided) ---------- */

.shik-wa--pulse .shik-wa__bubble {
	animation: shikwhatsapp linear 3s infinite,
		scale-in 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

@keyframes shikwhatsapp {
	0% {
		box-shadow: 0 4px 6px rgba(48, 191, 57, 0.3),
			0 0 0 0 rgba(48, 191, 57, 0.2),
			0 0 0 0 rgba(48, 191, 57, 0.2);
	}
	40% {
		box-shadow: 0 4px 6px rgba(48, 191, 57, 0.3),
			0 0 0 25px rgba(48, 191, 57, 0.2),
			0 0 0 0 rgba(48, 191, 57, 0.2);
	}
	80% {
		box-shadow: 0 4px 6px rgba(48, 191, 57, 0.3),
			0 0 0 45px rgba(48, 191, 57, 0),
			0 0 0 18px rgba(48, 191, 57, 0.067);
	}
	100% {
		box-shadow: 0 4px 6px rgba(48, 191, 57, 0.3),
			0 0 0 60px rgba(48, 191, 57, 0),
			0 0 0 32px rgba(48, 191, 57, 0);
	}
}

/* Modern browsers: pulse follows the color chosen in the panel */
@supports (color: rgb(from white r g b)) {
	@keyframes shikwhatsapp {
		0% {
			box-shadow: 0 4px 6px rgb(from var(--shik-pulse-color) r g b / 0.3),
				0 0 0 0 rgb(from var(--shik-pulse-color) r g b / 0.2),
				0 0 0 0 rgb(from var(--shik-pulse-color) r g b / 0.2);
		}
		40% {
			box-shadow: 0 4px 6px rgb(from var(--shik-pulse-color) r g b / 0.3),
				0 0 0 25px rgb(from var(--shik-pulse-color) r g b / 0.2),
				0 0 0 0 rgb(from var(--shik-pulse-color) r g b / 0.2);
		}
		80% {
			box-shadow: 0 4px 6px rgb(from var(--shik-pulse-color) r g b / 0.3),
				0 0 0 45px rgb(from var(--shik-pulse-color) r g b / 0),
				0 0 0 18px rgb(from var(--shik-pulse-color) r g b / 0.067);
		}
		100% {
			box-shadow: 0 4px 6px rgb(from var(--shik-pulse-color) r g b / 0.3),
				0 0 0 60px rgb(from var(--shik-pulse-color) r g b / 0),
				0 0 0 32px rgb(from var(--shik-pulse-color) r g b / 0);
		}
	}
}

@keyframes scale-in {
	0%   { transform: scale(0); opacity: 1; }
	100% { transform: scale(1); opacity: 1; }
}

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

@media (prefers-reduced-motion: reduce) {
	.shik-wa__bubble,
	.shik-wa--pulse .shik-wa__bubble,
	.shik-wa__tooltip,
	.shik-wa__popup {
		animation: none !important;
	}
}

/* ---------- Popup ---------- */

.shik-wa__popup {
	display: none;
	width: var(--shik-popup-width);
	max-width: calc(100vw - 2 * var(--shik-offset-x));
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.22);
	background: #ffffff;
}

.shik-wa--open .shik-wa__popup {
	display: block;
	animation: shik-fade-in 0.25s ease both;
}

.shik-wa__popup-header {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 14px;
	background: #1d5c56;
	padding: 18px;
}

.shik-wa__header-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	text-align: center;
}

.shik-wa__title {
	color: #ffffff;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.2;
}

.shik-wa__subtitle {
	color: #d8e4e2;
	font-size: 15px;
	line-height: 1.3;
}

.shik-wa__logo {
	width: 56px;
	height: 56px;
	border-radius: 50%;
	object-fit: cover;
	background: #ffffff;
	flex-shrink: 0;
}

.shik-wa__close {
	position: absolute;
	top: 8px;
	inset-inline-start: 10px;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #ffffff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.85;
	transition: opacity 0.15s ease;
}

.shik-wa__close:hover { opacity: 1; }

.shik-wa__popup-body {
	background: #f2efe9;
	padding: 20px 16px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* ---------- Chat message ---------- */

.shik-wa__msg {
	background: #ffffff;
	border-radius: 10px;
	padding: 12px 14px 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
	align-self: stretch;
}

.shik-wa__sender {
	font-weight: 700;
	font-size: 16px;
	color: #111111;
	margin-bottom: 2px;
}

.shik-wa__msg-text {
	font-size: 15px;
	color: #222222;
	line-height: 1.45;
}

.shik-wa__time {
	font-size: 12px;
	color: #8a8a8a;
	text-align: left;
	direction: ltr;
	margin-top: 4px;
}

/* ---------- Branch buttons ---------- */

.shik-wa__branches-title {
	font-size: 14px;
	color: #444444;
	text-align: center;
}

.shik-wa__branches {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.shik-wa__branch-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	background: #2ecc5e;
	color: #ffffff;
	text-decoration: none;
	padding: 12px 16px;
	border-radius: 30px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	transition: background-color 0.15s ease, transform 0.1s ease;
}

.shik-wa__branch-btn:hover {
	background: #28b452;
	color: #ffffff;
	transform: translateY(-1px);
}

.shik-wa__branch-btn:focus-visible,
.shik-wa__bubble:focus-visible,
.shik-wa__close:focus-visible {
	outline: 2px solid #1d5c56;
	outline-offset: 2px;
}

.shik-wa__branch-icon {
	display: inline-flex;
	line-height: 0;
}

.shik-wa__branch-btn svg {
	width: 22px;
	height: 22px;
}

.shik-wa__branch-btn--disabled {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 12px 16px;
	border-radius: 30px;
	background: #cccccc;
	color: #666666;
	font-size: 14px;
}

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

@media (max-width: 480px) {
	.shik-wa__popup {
		max-width: calc(100vw - 24px);
	}
}
