.waia { --waia-color: #4f46e5; position: fixed; bottom: 20px; z-index: 99999; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.waia-right { right: 20px; }
.waia-left { left: 20px; }

.waia-launcher { width: 56px; height: 56px; border-radius: 50%; border: none; background: var(--waia-color); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 20px rgba(0,0,0,.18); transition: transform .15s ease; }
.waia-launcher:hover { transform: scale(1.05); }
.waia-hidden { display: none; }

.waia-panel { position: absolute; bottom: 0; width: 360px; max-width: calc(100vw - 40px); height: 520px; max-height: calc(100vh - 100px); background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.22); display: none; flex-direction: column; overflow: hidden; }
.waia-right .waia-panel { right: 0; }
.waia-left .waia-panel { left: 0; }
.waia-panel.waia-on { display: flex; }

.waia-head { background: var(--waia-color); color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.waia-title { font-weight: 600; font-size: 15px; }
.waia-close { background: none; border: none; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; opacity: .9; }
.waia-close:hover { opacity: 1; }

.waia-body { flex: 1; overflow-y: auto; padding: 14px; background: #f7f8fa; }
.waia-msg { display: flex; margin-bottom: 10px; }
.waia-msg.waia-user { justify-content: flex-end; }
.waia-bubble { max-width: 80%; padding: 9px 13px; border-radius: 14px; font-size: 14px; line-height: 1.5; word-wrap: break-word; }
.waia-bot .waia-bubble { background: #fff; color: #1f2430; border: 1px solid #eceef2; border-bottom-left-radius: 4px; }
.waia-user .waia-bubble { background: var(--waia-color); color: #fff; border-bottom-right-radius: 4px; }
.waia-bubble p { margin: 0 0 6px; }
.waia-bubble p:last-child { margin-bottom: 0; }
.waia-bubble ul { margin: 4px 0; padding-left: 18px; }
.waia-bubble a { text-decoration: underline; font-weight: 500; }
.waia-bot .waia-bubble a { color: var(--waia-color) !important; }
.waia-user .waia-bubble a { color: #fff !important; }

.waia-poster { display: block; max-width: 180px; margin: -2px 0 12px; border-radius: 12px; overflow: hidden; border: 1px solid #eceef2; box-shadow: 0 2px 8px rgba(0,0,0,.08); background: #fff; line-height: 0; }
a.waia-poster { cursor: pointer; transition: box-shadow .15s ease, transform .15s ease; }
a.waia-poster:hover { box-shadow: 0 6px 16px rgba(0,0,0,.16); transform: translateY(-1px); }
.waia-poster img { display: block; width: 100%; height: auto; }

.waia-suggestions { display: flex; flex-direction: column; gap: 6px; margin: -2px 0 12px; width: 100%; box-sizing: border-box; }
.waia-suggestion { box-sizing: border-box; display: block; width: 100%; margin: 0; text-align: left; font-family: inherit; font-size: 13px; font-weight: 400; line-height: 1.45; color: #1f2430; background: #fff; border: 1px solid #e3e7ee; border-radius: 10px; padding: 8px 11px; cursor: pointer; white-space: normal; overflow-wrap: anywhere; transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease; }
.waia-suggestion:hover { border-color: var(--waia-color); background-color: #fafbff; box-shadow: 0 2px 8px rgba(0,0,0,.07); }
.waia-suggestion:focus-visible { outline: none; border-color: var(--waia-color); box-shadow: 0 0 0 2px rgba(0,0,0,.06); }
.waia-suggestion-title { color: var(--waia-color); font-weight: 600; }
.waia-suggestion-cta { color: #8a92a3; }

.waia-foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eceef2; background: #fff; }
.waia-input { flex: 1; border: 1px solid #dfe3e8; border-radius: 10px; padding: 9px 12px; font-size: 14px; outline: none; }
.waia-input:focus { border-color: var(--waia-color); }
.waia-input:disabled { background: #f0f0f0; }
.waia-send { width: 40px; border: none; border-radius: 10px; background: var(--waia-color); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.waia-send:disabled { opacity: .5; cursor: default; }
.waia-consent { padding: 0 12px 10px; margin: 0; font-size: 11px; line-height: 1.4; color: #9aa0aa; text-align: center; background: #fff; }

.waia-typing .waia-bubble { display: flex; gap: 4px; }
.waia-dot { width: 7px; height: 7px; border-radius: 50%; background: #b8bdc7; animation: waia-blink 1.2s infinite; }
.waia-dot:nth-child(2) { animation-delay: .2s; }
.waia-dot:nth-child(3) { animation-delay: .4s; }
@keyframes waia-blink { 0%, 60%, 100% { opacity: .3; } 30% { opacity: 1; } }

.waia-head-actions { display: flex; align-items: center; gap: 2px; }
.waia-new { background: none; border: none; color: #fff; cursor: pointer; opacity: .85; display: flex; align-items: center; padding: 4px; border-radius: 6px; }
.waia-new:hover { opacity: 1; background: rgba(255,255,255,.16); }
.waia-lead { background: none; border: none; color: #fff; cursor: pointer; opacity: .85; display: flex; align-items: center; padding: 4px; border-radius: 6px; }
.waia-lead:hover { opacity: 1; background: rgba(255,255,255,.16); }

.waia-leadform { background: #fff; border: 1px solid #e6e8ee; border-radius: 14px; padding: 14px; margin: 4px 0 12px; box-shadow: 0 2px 10px rgba(0,0,0,.06); display: flex; flex-direction: column; gap: 8px; }
.waia-lf-title { font-size: 13.5px; font-weight: 600; color: #1f2430; margin-bottom: 2px; }
.waia-lf-input { width: 100%; box-sizing: border-box; border: 1px solid #dfe3e8; border-radius: 9px; padding: 9px 11px; font-size: 13.5px; outline: none; font-family: inherit; color: #1f2430; background: #fff; }
.waia-lf-input:focus { border-color: var(--waia-color); }
textarea.waia-lf-input { resize: vertical; min-height: 56px; }
.waia-lf-consent { display: flex; align-items: flex-start; gap: 7px; font-size: 11.5px; line-height: 1.4; color: #6b7280; cursor: pointer; }
.waia-lf-consent input { margin-top: 2px; flex: 0 0 auto; }
.waia-lf-error { font-size: 12px; color: #d23f3f; }
.waia-lf-send { background: var(--waia-color); color: #fff; border: none; border-radius: 9px; padding: 10px; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.waia-lf-send:hover { filter: brightness(1.05); }
.waia-lf-send:disabled { opacity: .6; cursor: default; }
.waia-restart-wrap { text-align: center; padding: 12px 8px 4px; }
.waia-ended-note { font-size: 12px; color: #8c8f94; margin-bottom: 8px; }
.waia-restart { background: var(--waia-color); color: #fff; border: none; border-radius: 10px; padding: 8px 16px; font-size: 13px; cursor: pointer; }
.waia-restart:hover { opacity: .92; }

/* === Güncel telefonlar: tam ekran sohbet === */
@media (max-width: 480px) {
	.waia-panel {
		position: fixed;
		top: 0; left: 0; right: 0; bottom: auto;
		width: 100%;
		height: 100vh;            /* fallback */
		height: 100dvh;           /* tarayıcı çubuğunu hesaba katar */
		max-width: none;
		max-height: none;
		border-radius: 0;
		box-sizing: border-box;
		padding-bottom: env(safe-area-inset-bottom); /* ana çubuk (home indicator) */
	}
	.waia-head {
		padding-top: calc(12px + env(safe-area-inset-top)); /* çentik altı */
		padding-left: max(16px, env(safe-area-inset-left));
		padding-right: max(16px, env(safe-area-inset-right));
	}
	.waia-new, .waia-lead, .waia-close {
		min-width: 44px; min-height: 44px;
		display: flex; align-items: center; justify-content: center; padding: 0;
	}
	.waia-close { font-size: 26px; }
	.waia-body {
		padding-left: max(14px, env(safe-area-inset-left));
		padding-right: max(14px, env(safe-area-inset-right));
	}
	.waia-bubble { max-width: 85%; font-size: 15px; }
	.waia-foot {
		padding-left: max(10px, env(safe-area-inset-left));
		padding-right: max(10px, env(safe-area-inset-right));
	}
	.waia-input { font-size: 16px; min-height: 44px; } /* iOS odak zoom'unu engeller + dokunma */
	.waia-send { width: 44px; min-height: 44px; }
	.waia-lf-input { font-size: 16px; }                /* iOS odak zoom'unu engeller */
	.waia-suggestion { padding: 11px 12px; font-size: 14px; }
	.waia-consent {
		padding-left: max(12px, env(safe-area-inset-left));
		padding-right: max(12px, env(safe-area-inset-right));
	}
}
