/* ==========================================================================
   Smart WhatsApp Button – Frontend Styles
   ========================================================================== */

/* Wrapper */
.swb-wrapper {
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.swb-wrapper.swb-pos-right { right: 24px; }
.swb-wrapper.swb-pos-left  { left: 24px; }

/* Inline shortcode wrapper */
.swb-wrapper .swb-inline {
	position: relative !important;
	bottom: auto !important;
	right: auto !important;
	left: auto !important;
}

/* Core button */
.swb-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	text-decoration: none;
	cursor: pointer;
	border: none;
	outline: none;
	position: relative;
	transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1),
	            box-shadow 0.25s ease,
	            opacity 0.4s ease;
	animation: swb-fadein 0.5s ease forwards;
	box-shadow: 0 6px 28px rgba(37, 211, 102, 0.45);
	will-change: transform;
}

.swb-button:hover {
	transform: scale(1.08) translateY(-3px);
	box-shadow: 0 12px 40px rgba(37, 211, 102, 0.55);
}

.swb-button:active {
	transform: scale(0.97);
}

/* ---- Sizes ---- */
.swb-size-small  .swb-icon svg,
.swb-size-small .swb-icon { width: 44px; height: 44px; }
.swb-size-small  { min-width: 44px; min-height: 44px; }

.swb-size-medium .swb-icon svg,
.swb-size-medium .swb-icon { width: 56px; height: 56px; }
.swb-size-medium { min-width: 56px; min-height: 56px; }

.swb-size-large  .swb-icon svg,
.swb-size-large  .swb-icon { width: 68px; height: 68px; }
.swb-size-large  { min-width: 68px; min-height: 68px; }

/* ---- Styles ---- */

/* Circle */
.swb-style-circle {
	border-radius: 50%;
	padding: 0;
}

.swb-style-circle .swb-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 50%;
}

.swb-style-circle .swb-icon svg {
	padding: 12px;
	box-sizing: border-box;
}

/* Rounded rectangle */
.swb-style-rounded {
	border-radius: 60px;
	padding: 12px 22px 12px 16px;
	min-height: auto !important;
}

.swb-style-rounded .swb-icon {
	display: flex;
	align-items: center;
	justify-content: center;
}

.swb-style-rounded .swb-icon svg {
	width: 28px;
	height: 28px;
}

.swb-style-rounded.swb-size-large .swb-icon svg { width: 34px; height: 34px; }
.swb-style-rounded.swb-size-small .swb-icon svg { width: 22px; height: 22px; }

.swb-label {
	color: #fff;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-weight: 600;
	letter-spacing: 0.01em;
	white-space: nowrap;
}

.swb-size-small  .swb-label { font-size: 13px; }
.swb-size-medium .swb-label { font-size: 15px; }
.swb-size-large  .swb-label { font-size: 17px; }

/* Icon only */
.swb-style-icon {
	border-radius: 12px;
	padding: 0;
	box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
}

.swb-style-icon .swb-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	border-radius: 12px;
}

.swb-style-icon .swb-icon svg {
	padding: 10px;
	box-sizing: border-box;
}

/* ---- Badge ---- */
.swb-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	background: #e53935;
	color: #fff;
	border-radius: 50%;
	width: 22px;
	height: 22px;
	font-size: 11px;
	font-weight: 700;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2px solid #fff;
	animation: swb-bounce 2s infinite;
	z-index: 1;
}

/* ---- Pulse ring ---- */
.swb-pulse {
	position: absolute;
	bottom: 0;
	right: 0;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	opacity: 0;
	animation: swb-pulse 2.5s ease-out infinite;
	pointer-events: none;
	z-index: -1;
}

.swb-pos-right .swb-pulse { right: 0; }
.swb-pos-left  .swb-pulse { left: 0; }

/* ---- Hidden states ---- */
.swb-hidden { display: none !important; }

/* ---- Animations ---- */
@keyframes swb-fadein {
	from {
		opacity: 0;
		transform: translateY(20px) scale(0.8);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

@keyframes swb-pulse {
	0%   { transform: scale(1);   opacity: 0.6; }
	70%  { transform: scale(1.6); opacity: 0; }
	100% { transform: scale(1.6); opacity: 0; }
}

@keyframes swb-bounce {
	0%, 100% { transform: scale(1); }
	50%       { transform: scale(1.15); }
}

/* ---- Responsive ---- */
@media (max-width: 767px) {
	.swb-wrapper {
		bottom: 16px;
	}
	.swb-wrapper.swb-pos-right { right: 16px; }
	.swb-wrapper.swb-pos-left  { left: 16px; }

	.swb-size-large .swb-icon svg,
	.swb-size-large .swb-icon { width: 56px; height: 56px; }
	.swb-size-large { min-width: 56px; min-height: 56px; }

	.swb-style-rounded { padding: 10px 18px 10px 12px; }
	.swb-label { font-size: 14px !important; }
}
