/**
 * TENARYA — Floating Contact Buttons
 *
 * Lightweight, mobile-first and dependency-free.
 */

.sabit-iletisim-butonlari {
	--tenarya-contact-green: #1f4b30;
	--tenarya-contact-green-hover: #163722;
	--tenarya-contact-whatsapp: #25d366;
	--tenarya-contact-whatsapp-hover: #1fb959;
	--tenarya-contact-shadow: 0 6px 18px rgba(23, 32, 25, 0.18);

	position: fixed;
	z-index: 9990;
	right: max(12px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));

	display: grid;
	gap: 9px;

	margin: 0;
	padding: 0;

	pointer-events: none;
}

.iletisim-btn {
	width: 48px;
	height: 48px;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	box-sizing: border-box;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;

	color: #ffffff;
	text-decoration: none;
	box-shadow: var(--tenarya-contact-shadow);

	pointer-events: auto;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;

	transition:
		transform 140ms ease,
		background-color 140ms ease,
		box-shadow 140ms ease;
}

.iletisim-btn svg {
	width: 24px;
	height: 24px;
	display: block;
	fill: currentColor;
}

.telefon-btn {
	background: var(--tenarya-contact-green);
}

.whatsapp-btn {
	background: var(--tenarya-contact-whatsapp);
}

.iletisim-btn:focus-visible {
	outline: 3px solid rgba(31, 75, 48, 0.3);
	outline-offset: 3px;
}

.whatsapp-btn:focus-visible {
	outline-color: rgba(37, 211, 102, 0.36);
}

@media (hover: hover) and (pointer: fine) {
	.telefon-btn:hover {
		color: #ffffff;
		background: var(--tenarya-contact-green-hover);
		transform: translateY(-2px);
		box-shadow: 0 8px 22px rgba(23, 32, 25, 0.22);
	}

	.whatsapp-btn:hover {
		color: #ffffff;
		background: var(--tenarya-contact-whatsapp-hover);
		transform: translateY(-2px);
		box-shadow: 0 8px 22px rgba(23, 32, 25, 0.22);
	}
}

/*
 * Shoptimizer/CommerceKit sticky add-to-cart occupies the bottom edge on
 * mobile product pages. Keep the contact actions above that purchase UI.
 */
@media (max-width: 767px) {
	.sabit-iletisim-butonlari {
		right: max(10px, env(safe-area-inset-right));
		bottom: max(14px, env(safe-area-inset-bottom));
		gap: 8px;
	}

	.iletisim-btn {
		width: 44px;
		height: 44px;
		box-shadow: 0 4px 14px rgba(23, 32, 25, 0.17);
	}

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

	.single-product .sabit-iletisim-butonlari {
		bottom: max(78px, calc(env(safe-area-inset-bottom) + 70px));
	}
}

/*
 * On a visitor's first session the compact cookie banner sits at the bottom
 * of the viewport. Modern browsers can move the buttons above it without JS.
 */
@supports selector(body:has(*)) {
	@media (max-width: 480px) {
		body:has(.tenarya-cookie-banner:not([hidden])) .sabit-iletisim-butonlari {
			bottom: max(124px, calc(env(safe-area-inset-bottom) + 116px));
		}
	}
}

@media print {
	.sabit-iletisim-butonlari {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.iletisim-btn {
		transition: none;
	}

	.iletisim-btn:hover {
		transform: none;
	}
}
