/* SHO WhatsApp Lead — WhatsApp görünümlü, adım adım lead widget'ı */

:is(#sho-wa-root, .showa-inline-host) {
	--wa-green: #25d366;
	--wa-dark: #075e54;
	--wa-head: #128c7e;
	--wa-ink: #111b21;
	--wa-muted: #667781;
	--wa-line: #e9edef;
	--wa-bg: #f0f2f5;
}

:is(#sho-wa-root, .showa-inline-host) *,
:is(#sho-wa-root, .showa-inline-host) *::before,
:is(#sho-wa-root, .showa-inline-host) *::after { box-sizing: border-box; }

/* --- Açılış butonu ------------------------------------------------------ */

:is(#sho-wa-root, .showa-inline-host) .showa-launcher {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99998;
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

:is(#sho-wa-root, .showa-inline-host) .showa-btn {
	width: 60px;
	height: 60px;
	flex: none;
	border: 0;
	border-radius: 50%;
	background: var(--wa-green);
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
	transition: transform .15s ease, box-shadow .15s ease;
}

:is(#sho-wa-root, .showa-inline-host) .showa-btn:hover {
	transform: scale(1.06);
	box-shadow: 0 8px 26px rgba(37, 211, 102, .55);
}

:is(#sho-wa-root, .showa-inline-host) .showa-bubble {
	position: relative;
	max-width: 230px;
	padding: 12px 30px 12px 14px;
	background: #fff;
	border-radius: 14px;
	font-size: 14px;
	line-height: 1.45;
	color: var(--wa-ink);
	box-shadow: 0 4px 18px rgba(0, 0, 0, .14);
	cursor: pointer;
	animation: showa-in .35s ease both;
}

:is(#sho-wa-root, .showa-inline-host) .showa-bubble-x {
	position: absolute;
	top: 4px;
	right: 6px;
	border: 0;
	background: transparent;
	color: var(--wa-muted);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 4px;
}

@keyframes showa-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: none; }
}

/* --- Panel -------------------------------------------------------------- */

:is(#sho-wa-root, .showa-inline-host) .showa-panel {
	position: fixed;
	right: 20px;
	bottom: 96px;
	z-index: 99999;
	width: 370px;
	max-height: min(620px, calc(100vh - 130px));
	display: none;
	flex-direction: column;
	overflow: hidden;
	background: var(--wa-bg);
	border-radius: 16px;
	box-shadow: 0 12px 44px rgba(0, 0, 0, .28);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--wa-ink);
	animation: showa-in .22s ease both;
}

:is(#sho-wa-root, .showa-inline-host) .showa-panel.acik { display: flex; }

:is(#sho-wa-root, .showa-inline-host) .showa-head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 14px;
	background: var(--wa-head);
	color: #fff;
	flex: none;
}

:is(#sho-wa-root, .showa-inline-host) .showa-back,
:is(#sho-wa-root, .showa-inline-host) .showa-close {
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 6px;
	opacity: .9;
}

:is(#sho-wa-root, .showa-inline-host) .showa-close { margin-left: auto; }

:is(#sho-wa-root, .showa-inline-host) .showa-avatar {
	width: 36px;
	height: 36px;
	flex: none;
	border-radius: 50%;
	background: var(--wa-green);
	display: flex;
	align-items: center;
	justify-content: center;
}

:is(#sho-wa-root, .showa-inline-host) .showa-title { display: flex; flex-direction: column; line-height: 1.3; }
:is(#sho-wa-root, .showa-inline-host) .showa-title strong { font-size: 15px; }
:is(#sho-wa-root, .showa-inline-host) .showa-status { font-size: 12px; opacity: .85; }

/* --- İlerleme ----------------------------------------------------------- */

:is(#sho-wa-root, .showa-inline-host) .showa-steps {
	display: flex;
	gap: 6px;
	justify-content: center;
	padding: 12px 0 4px;
	background: var(--wa-bg);
	flex: none;
}

:is(#sho-wa-root, .showa-inline-host) .showa-step {
	width: 26px;
	height: 4px;
	border-radius: 99px;
	background: #cfd6da;
	transition: background .25s ease;
}

:is(#sho-wa-root, .showa-inline-host) .showa-step.aktif { background: var(--wa-green); }

/* --- Gövde -------------------------------------------------------------- */

:is(#sho-wa-root, .showa-inline-host) .showa-body {
	padding: 14px 18px 20px;
	overflow-y: auto;
	flex: 1;
}

:is(#sho-wa-root, .showa-inline-host) .showa-q {
	margin: 6px 0 4px;
	font-size: 19px;
	line-height: 1.3;
	color: var(--wa-ink);
}

:is(#sho-wa-root, .showa-inline-host) .showa-hint {
	margin: 0 0 16px;
	font-size: 13.5px;
	color: var(--wa-muted);
}

/* --- Seçenekler --------------------------------------------------------- */

:is(#sho-wa-root, .showa-inline-host) .showa-options { display: flex; flex-direction: column; gap: 9px; }

:is(#sho-wa-root, .showa-inline-host) .showa-opt {
	display: flex;
	align-items: flex-start;
	gap: 11px;
	width: 100%;
	padding: 13px 14px;
	background: #fff;
	border: 1.5px solid transparent;
	border-radius: 12px;
	text-align: left;
	cursor: pointer;
	font: inherit;
	color: inherit;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
	transition: border-color .12s ease, transform .12s ease;
}

:is(#sho-wa-root, .showa-inline-host) .showa-opt:hover {
	border-color: var(--wa-green);
	transform: translateY(-1px);
}

:is(#sho-wa-root, .showa-inline-host) .showa-opt-icon { font-size: 20px; line-height: 1.2; flex: none; }
:is(#sho-wa-root, .showa-inline-host) .showa-opt-text { display: flex; flex-direction: column; gap: 2px; }
:is(#sho-wa-root, .showa-inline-host) .showa-opt-text strong { font-size: 15px; }
:is(#sho-wa-root, .showa-inline-host) .showa-opt-text span { font-size: 12.5px; color: var(--wa-muted); line-height: 1.4; }

/* --- Form --------------------------------------------------------------- */

:is(#sho-wa-root, .showa-inline-host) .showa-form { display: flex; flex-direction: column; }
:is(#sho-wa-root, .showa-inline-host) .showa-field { display: block; margin-bottom: 12px; }

:is(#sho-wa-root, .showa-inline-host) .showa-field span {
	display: block;
	margin-bottom: 5px;
	font-size: 13px;
	font-weight: 600;
	color: var(--wa-muted);
}

:is(#sho-wa-root, .showa-inline-host) .showa-field input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--wa-line);
	border-radius: 10px;
	font: inherit;
	font-size: 15px;
	background: #fff;
	color: var(--wa-ink);
}

:is(#sho-wa-root, .showa-inline-host) .showa-field input:focus {
	outline: 2px solid var(--wa-green);
	outline-offset: 1px;
	border-color: var(--wa-green);
}

:is(#sho-wa-root, .showa-inline-host) .showa-submit {
	display: block;
	width: 100%;
	margin-top: 4px;
	padding: 14px 20px;
	border: 0;
	border-radius: 99px;
	background: var(--wa-green);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background .12s ease;
}

:is(#sho-wa-root, .showa-inline-host) .showa-submit:hover { background: #1eb757; }
:is(#sho-wa-root, .showa-inline-host) .showa-submit:disabled { opacity: .6; cursor: not-allowed; }

:is(#sho-wa-root, .showa-inline-host) .showa-err {
	margin: 4px 0 10px;
	font-size: 13px;
	font-weight: 600;
	color: #b4231d;
}

:is(#sho-wa-root, .showa-inline-host) .showa-consent {
	margin: 12px 0 0;
	font-size: 11.5px;
	color: var(--wa-muted);
	text-align: center;
}

:is(#sho-wa-root, .showa-inline-host) .showa-done-icon {
	width: 56px;
	height: 56px;
	margin: 10px auto 14px;
	border-radius: 50%;
	background: var(--wa-green);
	color: #fff;
	font-size: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* --- Mobil: tam ekran --------------------------------------------------- */

@media (max-width: 480px) {
	:is(#sho-wa-root, .showa-inline-host) .showa-panel {
		right: 0;
		bottom: 0;
		left: 0;
		width: 100%;
		max-height: 100%;
		height: 100dvh;
		border-radius: 0;
	}
	:is(#sho-wa-root, .showa-inline-host) .showa-bubble { max-width: 180px; font-size: 13px; }
	:is(#sho-wa-root, .showa-inline-host) .showa-launcher { right: 14px; bottom: 14px; }
}

/* --- Tam sayfa (kampanya) modu ------------------------------------------
   [sho_whatsapp_akis] kısakodunun konduğu sayfada akış yüzen panel olarak
   değil, sayfanın içinde büyük bir kart olarak çalışır. */

.showa-inline-host {
	display: block;
	max-width: 480px;
	margin: 0 auto;
}

:is(#sho-wa-root, .showa-inline-host) .showa-panel.showa-inline {
	position: static;
	right: auto;
	bottom: auto;
	width: 100%;
	max-height: none;
	display: flex;
	border-radius: 18px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .12);
	animation: none;
}

:is(#sho-wa-root, .showa-inline-host) .showa-inline .showa-body {
	min-height: 340px;
	padding: 20px 24px 28px;
	overflow: visible;
}

:is(#sho-wa-root, .showa-inline-host) .showa-inline .showa-q { font-size: 22px; }
:is(#sho-wa-root, .showa-inline-host) .showa-inline .showa-opt { padding: 15px 16px; }

@media (max-width: 480px) {
	:is(#sho-wa-root, .showa-inline-host) .showa-panel.showa-inline {
		border-radius: 14px;
		height: auto;
	}
	:is(#sho-wa-root, .showa-inline-host) .showa-inline .showa-q { font-size: 19px; }
}

/* ========================================================================
   SOHBET GÖRÜNÜMÜ — gerçek bir WhatsApp konuşması hissi
   ===================================================================== */

:is(#sho-wa-root, .showa-inline-host) .showa-avatar {
	overflow: hidden;
	background: #cfd8dc;
}

:is(#sho-wa-root, .showa-inline-host) .showa-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	border-radius: 50%;
}

/* WhatsApp'ın desenli sohbet zemini */
:is(#sho-wa-root, .showa-inline-host) .showa-chat {
	flex: 1;
	overflow-y: auto;
	padding: 16px 14px 20px;
	background-color: #e5ddd5;
	background-image:
		radial-gradient(circle at 20% 30%, rgba(255,255,255,.35) 0 2px, transparent 2px),
		radial-gradient(circle at 70% 60%, rgba(255,255,255,.28) 0 2px, transparent 2px);
	background-size: 46px 46px, 62px 62px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* --- Balonlar ---------------------------------------------------------- */

:is(#sho-wa-root, .showa-inline-host) .showa-msg {
	position: relative;
	max-width: 84%;
	padding: 8px 11px 6px;
	border-radius: 10px;
	font-size: 14.5px;
	line-height: 1.45;
	box-shadow: 0 1px 1px rgba(0, 0, 0, .13);
	animation: showa-pop .22s ease both;
	word-wrap: break-word;
}

@keyframes showa-pop {
	from { opacity: 0; transform: translateY(6px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

:is(#sho-wa-root, .showa-inline-host) .showa-msg-in {
	align-self: flex-start;
	background: #fff;
	color: #111b21;
	border-top-left-radius: 3px;
}

:is(#sho-wa-root, .showa-inline-host) .showa-msg-out {
	align-self: flex-end;
	background: #d9fdd3;
	color: #111b21;
	border-top-right-radius: 3px;
}

:is(#sho-wa-root, .showa-inline-host) .showa-msg-text { display: block; }

:is(#sho-wa-root, .showa-inline-host) .showa-msg-time {
	display: block;
	margin-top: 2px;
	font-size: 11px;
	color: #667781;
	text-align: right;
}

/* --- "yazıyor…" animasyonu --------------------------------------------- */

:is(#sho-wa-root, .showa-inline-host) .showa-typing {
	display: flex;
	gap: 4px;
	align-items: center;
	padding: 12px 14px;
	width: 56px;
}

:is(#sho-wa-root, .showa-inline-host) .showa-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9aa5ab;
	animation: showa-blink 1.3s infinite ease-in-out;
}

:is(#sho-wa-root, .showa-inline-host) .showa-typing span:nth-child(2) { animation-delay: .2s; }
:is(#sho-wa-root, .showa-inline-host) .showa-typing span:nth-child(3) { animation-delay: .4s; }

@keyframes showa-blink {
	0%, 60%, 100% { opacity: .3; transform: translateY(0); }
	30%           { opacity: 1;  transform: translateY(-3px); }
}

/* --- Cevap seçenekleri -------------------------------------------------- */

:is(#sho-wa-root, .showa-inline-host) .showa-choices {
	display: flex;
	flex-direction: column;
	gap: 7px;
	align-self: flex-end;
	align-items: stretch;
	max-width: 88%;
	margin-top: 4px;
}

:is(#sho-wa-root, .showa-inline-host) .showa-choice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	width: 100%;
	padding: 11px 13px;
	background: #fff;
	border: 1.5px solid #25d366;
	border-radius: 12px;
	text-align: left;
	cursor: pointer;
	font: inherit;
	color: #111b21;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
	transition: background .12s ease, transform .12s ease;
}

:is(#sho-wa-root, .showa-inline-host) .showa-choice:hover {
	background: #f2fff5;
	transform: translateY(-1px);
}

:is(#sho-wa-root, .showa-inline-host) .showa-choice-icon { font-size: 18px; line-height: 1.25; flex: none; }
:is(#sho-wa-root, .showa-inline-host) .showa-choice-text { display: flex; flex-direction: column; gap: 2px; }
:is(#sho-wa-root, .showa-inline-host) .showa-choice-text strong { font-size: 14.5px; font-weight: 600; }
:is(#sho-wa-root, .showa-inline-host) .showa-choice-text span { font-size: 12px; color: #667781; line-height: 1.35; }

/* --- Sohbet içindeki form ---------------------------------------------- */

:is(#sho-wa-root, .showa-inline-host) .showa-chat .showa-form {
	align-self: stretch;
	background: #fff;
	padding: 14px;
	border-radius: 12px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .12);
	margin-top: 4px;
}

:is(#sho-wa-root, .showa-inline-host) .showa-wa-link {
	align-self: stretch;
	margin-top: 6px;
	text-decoration: none;
}

/* Sohbet zemini yüksekliği */
:is(#sho-wa-root, .showa-inline-host) .showa-inline .showa-chat { min-height: 420px; max-height: 60vh; }

/* Sohbet başlığındaki avatar biraz daha büyük — kişiyi öne çıkarır */
:is(#sho-wa-root, .showa-inline-host) .showa-inline .showa-avatar {
	width: 44px;
	height: 44px;
}
:is(#sho-wa-root, .showa-inline-host) .showa-inline .showa-title strong { font-size: 16px; }

/* ========================================================================
   KÖŞE POP-UP'I (basit mod) — saf CSS, JavaScript yok
   ===================================================================== */

#sho-wa-root .showa-pop {
	position: fixed;
	right: 20px;
	bottom: 96px;
	z-index: 99999;
	width: 330px;
	max-width: calc(100vw - 32px);
	display: none;
	flex-direction: column;
	overflow: hidden;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 14px 46px rgba(0, 0, 0, .26);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	animation: showa-in .22s ease both;
}

#sho-wa-root .showa-ac:checked ~ .showa-pop { display: flex; }

/* --- Başlık ------------------------------------------------------------- */

#sho-wa-root .showa-pop-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 16px 18px;
	background: #1f5c54;
	color: #fff;
}

#sho-wa-root .showa-pop-av {
	position: relative;
	width: 48px;
	height: 48px;
	flex: none;
	border-radius: 50%;
	overflow: visible;
}

#sho-wa-root .showa-pop-av img {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

#sho-wa-root .showa-pop-dot {
	position: absolute;
	right: 1px;
	bottom: 1px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #25d366;
	border: 2px solid #1f5c54;
}

#sho-wa-root .showa-pop-title { display: flex; flex-direction: column; line-height: 1.35; }
#sho-wa-root .showa-pop-title strong { font-size: 16px; font-weight: 700; }
#sho-wa-root .showa-pop-title span { font-size: 13px; opacity: .85; }

#sho-wa-root .showa-pop-x {
	margin-left: auto;
	align-self: flex-start;
	font-size: 22px;
	line-height: 1;
	color: #fff;
	opacity: .8;
	cursor: pointer;
	padding: 0 2px;
	user-select: none;
}

#sho-wa-root .showa-pop-x:hover { opacity: 1; }

/* --- Mesaj gövdesi ------------------------------------------------------ */

#sho-wa-root .showa-pop-body {
	padding: 18px 16px 20px;
	background-color: #e6ddd4;
	background-image:
		radial-gradient(circle at 18% 25%, rgba(0,0,0,.045) 0 3px, transparent 3px),
		radial-gradient(circle at 72% 65%, rgba(0,0,0,.04) 0 3px, transparent 3px);
	background-size: 52px 52px, 68px 68px;
}

#sho-wa-root .showa-pop-msg {
	position: relative;
	background: #fff;
	border-radius: 12px;
	padding: 11px 13px 8px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, .14);
}

#sho-wa-root .showa-pop-from {
	display: block;
	font-size: 13px;
	font-weight: 700;
	color: #8696a0;
	margin-bottom: 4px;
}

#sho-wa-root .showa-pop-text {
	display: block;
	font-size: 14.5px;
	line-height: 1.5;
	color: #111b21;
}

#sho-wa-root .showa-pop-time {
	display: block;
	margin-top: 4px;
	font-size: 11px;
	color: #8696a0;
	text-align: right;
}

/* --- Alt buton ---------------------------------------------------------- */

#sho-wa-root .showa-pop-foot { padding: 14px; background: #fff; }

#sho-wa-root .showa-pop-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 14px 18px;
	border-radius: 10px;
	background: #4fce5d;
	color: #fff;
	font-size: 15.5px;
	font-weight: 700;
	text-decoration: none;
	transition: background .12s ease;
}

#sho-wa-root .showa-pop-cta:hover { background: #3fbc4d; color: #fff; }

/* --- Buton üzerindeki kırmızı bildirim noktası -------------------------- */

#sho-wa-root .showa-btn-label {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
}

#sho-wa-root .showa-btn-dot {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #ff3b30;
	border: 2px solid #fff;
}

#sho-wa-root .showa-ac:checked ~ .showa-launcher .showa-btn-dot,
#sho-wa-root .showa-ac:checked ~ .showa-btn-label .showa-btn-dot { display: none; }

@media (max-width: 480px) {
	#sho-wa-root .showa-pop { right: 14px; left: 14px; width: auto; bottom: 90px; }
}

/* Basit modda buton doğrudan #sho-wa-root içinde bir <label> */
#sho-wa-root > .showa-btn-label {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99998;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #25d366;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(37, 211, 102, .45);
	transition: transform .15s ease;
}
#sho-wa-root > .showa-btn-label:hover { transform: scale(1.06); }

@media (max-width: 480px) {
	#sho-wa-root > .showa-btn-label { right: 14px; bottom: 14px; }
}
