/* BardakSA — Hızlı WhatsApp widget'ı */
.bs-wa { --wa: #25d366; --wa-d: #128c7e; --ink: #1c1917; --muted: #6b6560; --line: #ece8e4; --brand: #ff6b1f;
	position: fixed; right: 20px; bottom: 20px; z-index: 9990; font-family: inherit;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px)); right: calc(20px + env(safe-area-inset-right, 0px)); }
.bs-wa [hidden] { display: none !important; }

/* Yüzen buton */
.bs-wa__fab {
	position: relative; display: flex; align-items: center; gap: .6rem; height: 60px; padding: 0 1.25rem 0 .55rem;
	border: 0; border-radius: 999px; background: var(--wa); color: #fff; cursor: pointer;
	box-shadow: 0 14px 30px -10px rgba(18, 140, 126, .65), 0 2px 6px rgba(0,0,0,.08);
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease, padding .25s ease;
}
.bs-wa__fab:hover { transform: translateY(-2px); background: #1ebe5b; }
.bs-wa__fab:focus-visible { outline: 3px solid rgba(37, 211, 102, .45); outline-offset: 3px; }
.bs-wa__fab-ico, .bs-wa__fab-x { width: 46px; height: 46px; display: flex; align-items: center; justify-content: center; border-radius: 999px; }
.bs-wa__fab-ico { background: rgba(255,255,255,.16); }
.bs-wa__fab-ico svg { width: 28px; height: 28px; }
.bs-wa__fab-x { display: none; } .bs-wa__fab-x svg { width: 22px; height: 22px; }
.bs-wa__fab-label { font-weight: 800; font-size: 1rem; white-space: nowrap; letter-spacing: .01em; }
.bs-wa__fab::after { /* nabız halkası */
	content: ""; position: absolute; left: .55rem; top: 7px; width: 46px; height: 46px; border-radius: 999px;
	box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); animation: bs-wa-pulse 2.6s ease-out infinite; pointer-events: none;
}
@keyframes bs-wa-pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); } 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
.bs-wa.is-open .bs-wa__fab { padding: 0 .55rem; background: var(--ink); box-shadow: 0 14px 30px -12px rgba(0,0,0,.5); }
.bs-wa.is-open .bs-wa__fab::after { animation: none; }
.bs-wa.is-open .bs-wa__fab-ico, .bs-wa.is-open .bs-wa__fab-label { display: none; }
.bs-wa.is-open .bs-wa__fab-x { display: flex; }

/* Karşılama baloncuğu */
.bs-wa__teaser {
	position: absolute; right: 0; bottom: 76px; width: 270px; background: #fff; border: 1px solid var(--line);
	border-radius: 18px 18px 6px 18px; padding: .9rem 2rem .9rem 1rem; cursor: pointer;
	box-shadow: 0 18px 40px -16px rgba(28,25,23,.35); opacity: 0; transform: translateY(8px); transition: opacity .3s, transform .3s;
}
.bs-wa__teaser.is-in { opacity: 1; transform: none; }
.bs-wa__teaser p { margin: 0; font-size: .9375rem; line-height: 1.45; color: var(--ink); }
.bs-wa__teaser-x { position: absolute; top: 4px; right: 6px; width: 28px; height: 28px; border: 0; background: none; font-size: 20px; line-height: 1; color: #a8a29e; cursor: pointer; border-radius: 99px; }
.bs-wa__teaser-x:hover { background: #f5f5f4; color: var(--ink); }

/* Panel */
.bs-wa__panel {
	position: absolute; right: 0; bottom: 76px; width: 380px; max-height: min(640px, calc(100vh - 120px));
	display: flex; flex-direction: column; background: #fff; border-radius: 22px; overflow: hidden;
	box-shadow: 0 30px 70px -20px rgba(28,25,23,.45), 0 0 0 1px rgba(28,25,23,.05);
	transform-origin: bottom right; opacity: 0; transform: translateY(10px) scale(.97); transition: opacity .2s ease, transform .22s ease;
}
.bs-wa.is-open .bs-wa__panel { opacity: 1; transform: none; }
.bs-wa__head { display: flex; align-items: center; gap: .8rem; padding: 1rem 1rem 1rem 1.1rem; background: linear-gradient(135deg, #128c7e 0%, #0f7a6d 100%); color: #fff; }
.bs-wa__avatar { position: relative; flex-shrink: 0; width: 46px; height: 46px; border-radius: 999px; background: #fff; color: var(--brand); font-weight: 900; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; }
.bs-wa__status { position: absolute; right: 0; bottom: 1px; width: 12px; height: 12px; border-radius: 99px; background: #a8a29e; border: 2px solid #128c7e; }
.bs-wa__status.is-on { background: #4ade80; }
.bs-wa__who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bs-wa__who strong { font-size: 1.02rem; font-weight: 800; }
.bs-wa__who span { font-size: .8125rem; line-height: 1.35; color: rgba(255,255,255,.85); }
.bs-wa__close { width: 38px; height: 38px; flex-shrink: 0; border: 0; border-radius: 99px; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bs-wa__close svg { width: 18px; height: 18px; } .bs-wa__close:hover { background: rgba(255,255,255,.25); }

.bs-wa__body {
	flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1.1rem 1rem .6rem;
	background: #efeae2 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ccircle cx='2' cy='2' r='1.2' fill='%23d9d2c7'/%3E%3C/svg%3E");
}
.bs-wa__bubble {
	position: relative; max-width: 92%; background: #fff; color: var(--ink); padding: .75rem .9rem; border-radius: 4px 16px 16px 16px;
	font-size: .9375rem; line-height: 1.5; box-shadow: 0 1px 1px rgba(0,0,0,.06); margin-bottom: .7rem;
}
.bs-wa__topic { margin: 0 0 .6rem; font-size: .8125rem; color: #57534e; }
.bs-wa__topic strong { color: var(--ink); }
.bs-wa__replies { display: flex; flex-direction: column; gap: .45rem; }
.bs-wa__reply {
	display: flex; align-items: center; gap: .65rem; width: 100%; text-align: left; cursor: pointer;
	background: #fff; border: 1px solid #e3ded7; border-radius: 14px; padding: .7rem .75rem; font: inherit;
	color: var(--ink); transition: border-color .15s, background .15s, transform .15s;
}
.bs-wa__reply:hover, .bs-wa__reply:focus-visible { border-color: var(--wa); background: #f3fdf6; outline: none; transform: translateX(2px); }
.bs-wa__ico { width: 32px; height: 32px; flex-shrink: 0; border-radius: 10px; background: #f5f2ee; display: flex; align-items: center; justify-content: center; font-size: 1rem; }
.bs-wa__txt { flex: 1; font-size: .9375rem; font-weight: 600; line-height: 1.35; }
.bs-wa__arr { width: 16px; height: 16px; color: #a8a29e; flex-shrink: 0; }
.bs-wa__reply:hover .bs-wa__arr { color: var(--wa-d); }

.bs-wa__form { display: flex; gap: .5rem; padding: .7rem .8rem .3rem; border-top: 1px solid var(--line); background: #fff; }
.bs-wa__form input {
	flex: 1; min-width: 0; height: 46px; border: 1px solid #e3ded7; border-radius: 999px; padding: 0 1rem;
	font-size: 16px; /* iOS yakınlaştırmasını önler */ color: var(--ink); background: #fafaf9;
}
.bs-wa__form input:focus { outline: none; border-color: var(--wa); background: #fff; box-shadow: 0 0 0 3px rgba(37,211,102,.18); }
.bs-wa__form button { width: 46px; height: 46px; flex-shrink: 0; border: 0; border-radius: 999px; background: var(--wa); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.bs-wa__form button svg { width: 20px; height: 20px; } .bs-wa__form button:hover { background: var(--wa-d); }
.bs-wa__note { margin: 0; padding: .2rem 1rem .8rem; font-size: .75rem; color: #8a837d; background: #fff; text-align: center; }
.bs-wa__scrim { position: fixed; inset: 0; background: rgba(15, 12, 10, .45); z-index: -1; }

/* Mobil: alttan açılan sayfa, kompakt buton */
@media (max-width: 640px) {
	.bs-wa { right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(14px + env(safe-area-inset-bottom, 0px)); }
	.bs-wa__fab { height: 56px; padding: 0 .45rem; }
	.bs-wa__fab-label { display: none; }
	.bs-wa__fab-ico { width: 46px; height: 46px; background: transparent; }
	.bs-wa__fab::after { left: .45rem; top: 5px; }
	.bs-wa__teaser { width: min(260px, calc(100vw - 40px)); bottom: 68px; }
	.bs-wa__panel {
		position: fixed; left: 0; right: 0; bottom: 0; width: auto; max-height: 86vh; max-height: 86dvh;
		border-radius: 22px 22px 0 0; transform-origin: bottom center; transform: translateY(24px);
		padding-bottom: env(safe-area-inset-bottom, 0px);
	}
	.bs-wa__head::before { content: ""; position: absolute; left: 50%; top: 6px; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: rgba(255,255,255,.45); }
	.bs-wa__head { position: relative; padding-top: 1.2rem; }
	.bs-wa__reply { padding: .8rem .8rem; } /* 44px+ dokunma alanı */
	.bs-wa.is-open .bs-wa__fab { display: none; }
	html.bs-wa-lock, html.bs-wa-lock body { overflow: hidden; }
}
@media (prefers-reduced-motion: reduce) {
	.bs-wa__fab::after { animation: none; }
	.bs-wa__panel, .bs-wa__teaser, .bs-wa__fab, .bs-wa__reply { transition: none; }
}
@media print { .bs-wa { display: none; } }
