/**
 * Ifat Chat — floating chat bubble styles.
 *
 * @package IfatChat
 */

/* Container */
.ifatchat-chat-bubble {
	position: fixed;
	z-index: 99998;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.ifatchat-chat-bottom-right {
	right: 20px;
	bottom: 20px;
}

.ifatchat-chat-bottom-left {
	left: 20px;
	bottom: 20px;
}

/* Trigger button */
.ifatchat-chat-trigger {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--bubble-size, 56px);
	height: var(--bubble-size, 56px);
	border-radius: 50%;
	border: none;
	background: var(--bubble-color, #25D366);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding: 0;
	outline: none;
	position: relative;
}

.ifatchat-chat-trigger:hover {
	transform: scale(1.08);
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.ifatchat-chat-trigger:active {
	transform: scale(0.96);
}

/* Icon toggle (dual-platform mode) */
.ifatchat-chat-icon,
.ifatchat-chat-close-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s ease, transform 0.2s ease;
	position: absolute;
}

.ifatchat-chat-close-icon {
	opacity: 0;
	transform: rotate(-90deg);
}

.ifatchat-chat-bubble.is-open .ifatchat-chat-icon {
	opacity: 0;
	transform: rotate(90deg);
}

.ifatchat-chat-bubble.is-open .ifatchat-chat-close-icon {
	opacity: 1;
	transform: rotate(0);
}

/* Single-platform trigger — just show the icon */
.ifatchat-chat-trigger svg {
	display: block;
}

/* Panel */
.ifatchat-chat-panel {
	position: absolute;
	bottom: calc(var(--bubble-size, 56px) + 12px);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
	width: 240px;
	overflow: hidden;
	opacity: 0;
	transform: translateY(10px) scale(0.95);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.ifatchat-chat-bottom-right .ifatchat-chat-panel {
	right: 0;
}

.ifatchat-chat-bottom-left .ifatchat-chat-panel {
	left: 0;
}

.ifatchat-chat-bubble.is-open .ifatchat-chat-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* Panel header */
.ifatchat-chat-header {
	padding: 14px 16px;
	background: #f7f7f7;
	border-bottom: 1px solid #eee;
	font-size: 14px;
	font-weight: 600;
	color: #333;
}

/* Chat options */
.ifatchat-chat-options {
	padding: 8px 0;
}

.ifatchat-chat-option {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 16px;
	text-decoration: none;
	color: #333;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.15s ease;
}

.ifatchat-chat-option:hover {
	background: #f5f5f5;
	color: #333;
	text-decoration: none;
}

.ifatchat-chat-option svg {
	flex-shrink: 0;
}

/* Hide on mobile */
@media (max-width: 768px) {
	.ifatchat-chat-hide-mobile {
		display: none !important;
	}

	.ifatchat-chat-panel {
		width: 200px;
	}
}
