/* WhatsApp İletişim Butonu — ön yüz */

.waib-wrap {
	position: fixed;
	z-index: 99998;
	bottom: var(--waib-bottom, 20px);
	right: var(--waib-side, 20px);
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.4;
}

.waib-wrap.waib-pos-left {
	right: auto;
	left: var(--waib-side, 20px);
	align-items: flex-start;
}

/* --- Buton --- */

.waib-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	height: var(--waib-size, 60px);
	min-width: var(--waib-size, 60px);
	box-sizing: border-box;
	border-radius: 999px;
	background: var(--waib-bg, #25d366);
	color: var(--waib-fg, #ffffff);
	text-decoration: none;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
	transition: transform .2s ease, box-shadow .2s ease;
	-webkit-tap-highlight-color: transparent;
}

.waib-btn:hover,
.waib-btn:focus {
	color: var(--waib-fg, #ffffff);
	text-decoration: none;
	transform: translateY(-2px) scale(1.04);
	box-shadow: 0 12px 28px rgba(0, 0, 0, .26);
}

.waib-btn:focus-visible {
	outline: 3px solid rgba(0, 0, 0, .4);
	outline-offset: 3px;
}

.waib-has-label .waib-btn {
	padding: 0 22px 0 18px;
}

.waib-icon {
	display: block;
	width: calc(var(--waib-size, 60px) * .55);
	height: calc(var(--waib-size, 60px) * .55);
}

.waib-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.waib-label {
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

/* --- Nabız efekti --- */

.waib-pulse .waib-btn {
	animation: waib-pulse 2.2s infinite;
}

@keyframes waib-pulse {
	0%   { box-shadow: 0 6px 20px rgba(0, 0, 0, .18), 0 0 0 0 var(--waib-ring, rgba(37, 211, 102, .55)); }
	70%  { box-shadow: 0 6px 20px rgba(0, 0, 0, .18), 0 0 0 16px var(--waib-ring-0, rgba(37, 211, 102, 0)); }
	100% { box-shadow: 0 6px 20px rgba(0, 0, 0, .18), 0 0 0 0 var(--waib-ring-0, rgba(37, 211, 102, 0)); }
}

/* --- Karşılama balonu --- */

.waib-bubble {
	position: relative;
	max-width: 280px;
	padding: 14px 34px 14px 16px;
	border-radius: 14px;
	background: #ffffff;
	color: #1f2937;
	font-size: 14px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .16);
	visibility: hidden;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity .25s ease, transform .25s ease, visibility .25s ease;
}

.waib-bubble.waib-show {
	visibility: visible;
	opacity: 1;
	transform: none;
}

.waib-bubble::after {
	content: "";
	position: absolute;
	bottom: -7px;
	right: 22px;
	width: 14px;
	height: 14px;
	background: #ffffff;
	transform: rotate(45deg);
	box-shadow: 3px 3px 6px rgba(0, 0, 0, .05);
}

.waib-pos-left .waib-bubble::after {
	right: auto;
	left: 22px;
}

.waib-bubble-title {
	margin-bottom: 4px;
	font-weight: 700;
	font-size: 15px;
}

.waib-bubble-text {
	color: #4b5563;
}

.waib-bubble-badge {
	display: inline-block;
	margin-top: 8px;
	padding: 2px 8px;
	border-radius: 999px;
	background: #f3f4f6;
	color: #6b7280;
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .03em;
}

.waib-bubble-close {
	position: absolute;
	top: 6px;
	right: 8px;
	width: 22px;
	height: 22px;
	padding: 0;
	border: 0;
	background: transparent;
	color: #9ca3af;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}

.waib-bubble-close:hover {
	color: #374151;
}

/* --- Satır içi kısa kod bağlantısı --- */

.waib-inline {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 999px;
	background: var(--waib-bg, #25d366);
	color: var(--waib-fg, #ffffff);
	font-weight: 600;
	text-decoration: none;
}

.waib-inline:hover {
	color: var(--waib-fg, #ffffff);
	filter: brightness(.94);
	text-decoration: none;
}

.waib-inline-icon,
.waib-inline-icon svg {
	display: block;
	width: 20px;
	height: 20px;
	fill: currentColor;
}

/* --- Cihaz görünürlüğü --- */

@media (max-width: 781px) {
	.waib-hide-mobile { display: none !important; }

	.waib-wrap { bottom: max(var(--waib-bottom, 20px), 16px); }
	.waib-bubble { max-width: min(280px, calc(100vw - 40px)); }
}

@media (min-width: 782px) {
	.waib-hide-desktop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.waib-pulse .waib-btn { animation: none; }
	.waib-btn,
	.waib-bubble { transition: none; }
}

@media print {
	.waib-wrap { display: none !important; }
}
