/* Floating Chat Button - WhatsApp Style Design */
.wplc-floating-wrapper {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 99990;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* WhatsApp Style Button */
.wplc-fab {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	border: none;
	background: #25D366;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
	overflow: hidden;
}

.wplc-fab::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, rgba(255,255,255,0.1) 100%);
	border-radius: 50%;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.wplc-fab:hover {
	transform: scale(1.05);
	box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

.wplc-fab:hover::before {
	opacity: 1;
}

.wplc-fab:active {
	transform: scale(0.98);
	transition: all 0.1s ease;
}

.wplc-fab-icon {
	font-size: 20px;
	line-height: 1;
	position: relative;
	z-index: 1;
}

/* Speech Bubble Button */
.wplc-speech-bubble {
	position: absolute;
	left: 45px;
	bottom: 8px;
	background: #fff;
	border-radius: 20px;
	padding: 8px 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	font-size: 14px;
	font-weight: 500;
	color: #333;
	white-space: nowrap;
	display: none !important; /* unify UX: hide white bubble on all devices */
}

.wplc-speech-bubble::before {
	content: '';
	position: absolute;
	left: -6px;
	bottom: 8px;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 6px 8px 6px 0;
	border-color: transparent #fff transparent transparent;
}

/* white speech bubble removed */

/* Support Label - always visible beside the FAB */
.wplc-support-label {
	position: absolute !important;
	left: 55px !important;
	bottom: 8px !important;
	opacity: 1 !important;
	display: block !important;
	visibility: visible !important;
	background: #25D366 !important;
	color: #fff !important;
	border-radius: 16px !important;
	padding: 6px 12px !important;
	box-shadow: 0 2px 6px rgba(37, 211, 102, 0.3) !important;
	font-size: 12px !important;
	font-weight: 600 !important;
	white-space: nowrap !important;
	transition: all 0.2s ease !important;
	pointer-events: none !important;
	text-transform: uppercase !important;
	letter-spacing: 0.5px !important;
	z-index: 10000 !important;
}

.wplc-support-label::before {
	content: '';
	position: absolute;
	left: -6px;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 6px 8px 6px 0;
	border-color: transparent #25D366 transparent transparent;
}

/* Force Support label to be visible */
.wplc-floating-wrapper .wplc-support-label {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
	position: absolute !important;
	left: 55px !important;
	bottom: 8px !important;
}

/* Compact Chat Popup */
.wplc-popup {
	position: absolute;
	left: 0;
	bottom: 70px;
	width: 320px;
	max-width: calc(100vw - 40px);
	background: #fff;
	border: none;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
	overflow: hidden;
	opacity: 0;
	transform: translateY(20px) scale(0.95);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wplc-popup[hidden] {
	opacity: 0;
	transform: translateY(20px) scale(0.95);
	pointer-events: none;
}

.wplc-popup:not([hidden]) {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.wplc-popup .wplc-box {
	max-width: unset;
	border: none;
	border-radius: 0;
	box-shadow: none;
}

/* WhatsApp Style Header */
.wplc-popup .wplc-header {
	background: #25D366;
	color: #fff;
	padding: 12px 16px;
	font-weight: 500;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.wplc-popup .wplc-header::before {
	content: '💬';
	font-size: 16px;
}

/* Compact Chat Body */
.wplc-popup .wplc-body {
	background: #f0f0f0;
	height: 280px;
	overflow: auto;
	padding: 0;
	background-image: 
		radial-gradient(circle at 20px 20px, rgba(37, 211, 102, 0.1) 1px, transparent 1px),
		radial-gradient(circle at 40px 40px, rgba(37, 211, 102, 0.05) 1px, transparent 1px);
	background-size: 20px 20px, 40px 40px;
}

.wplc-popup .wplc-messages {
	padding: 12px;
	min-height: 100%;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Compact Message Bubbles */
.wplc-popup .wplc-msg {
	margin: 0;
	padding: 8px 12px;
	border-radius: 12px;
	max-width: 80%;
	word-wrap: break-word;
	position: relative;
	animation: messageSlideIn 0.3s ease-out;
	font-size: 13px;
}

.wplc-popup .wplc-msg.user {
	background: #DCF8C6;
	color: #333;
	align-self: flex-end;
	margin-left: auto;
	border-bottom-right-radius: 4px;
}

.wplc-popup .wplc-msg.admin {
	background: #fff;
	color: #333;
	align-self: flex-start;
	margin-right: auto;
	border-bottom-left-radius: 4px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.wplc-popup .wplc-meta {
	font-size: 10px;
	color: #666;
	margin-top: 2px;
	text-align: right;
}

.wplc-popup .wplc-msg.admin .wplc-meta {
	text-align: left;
	color: #999;
}

/* Compact Input Area */
.wplc-popup .wplc-input {
	display: flex;
	flex-direction: column;
	gap: 8px;
	border-top: 1px solid #e0e0e0;
	padding: 12px;
	background: #fff;
	position: relative;
}

.wplc-popup .wplc-input input,
.wplc-popup .wplc-input textarea {
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	padding: 8px 12px;
	font-size: 13px;
	font-family: inherit;
	transition: all 0.2s ease;
	resize: none;
	background: #f8f8f8;
}

.wplc-popup .wplc-input input:focus,
.wplc-popup .wplc-input textarea:focus {
	outline: none;
	border-color: #25D366;
	background: #fff;
	box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.1);
}

/* Send button inside textarea */
.wplc-popup .wplc-input .wplc-send-container {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: 8px;
}

.wplc-popup .wplc-input .wplc-send-container textarea {
	flex: 1;
	padding-right: 50px;
}

.wplc-popup .wplc-input .wplc-send-btn { display: none !important; }

.wplc-popup .wplc-input .wplc-send-btn:hover {
    background: #20b358;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(37, 211, 102, 0.4);
}

.wplc-popup .wplc-input .wplc-send-btn:active {
	transform: scale(0.95);
}

.wplc-popup .wplc-input .wplc-send-btn::before {
	content: '➤';
	font-weight: bold;
}

/* Main send button - visible on all devices */
.wplc-popup .wplc-input button {
	align-self: flex-end;
	background: #25D366;
	color: #fff;
	border: none;
	padding: 10px 16px;
	border-radius: 16px;
	cursor: pointer;
	font-weight: 500;
	font-size: 14px;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(37, 211, 102, 0.3);
	display: inline-flex !important; /* always show on all devices */
}

.wplc-popup .wplc-input button:hover {
	background: #20b358;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(37, 211, 102, 0.4);
}

.wplc-popup .wplc-input button:active {
	transform: translateY(0);
}

/* Animations */
@keyframes messageSlideIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
}

/* Notification Badge */
.wplc-fab.has-notification::after {
	content: '';
	position: absolute;
	top: 6px;
	right: 6px;
	width: 10px;
	height: 10px;
	background: #ff4757;
	border-radius: 50%;
	border: 2px solid #fff;
	animation: pulse 2s infinite;
}

/* Remove responsive overrides so mobile matches desktop exactly */

