/* AtomMek Live Chat */
.amlc-root {
	--amlc-color: #E10B17;
	--amlc-ink: #1d1e1c;
	--amlc-muted: #7c7c7c;
	--amlc-bot-bg: #f1f1f0;
	--amlc-radius: 10px;
	position: fixed;
	bottom: 20px;
	right: 20px;
	z-index: 2147483000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.45;
	color: var(--amlc-ink);
	-webkit-font-smoothing: antialiased;
}
.amlc-root.amlc-pos-left { right: auto; left: 20px; }
.amlc-root *, .amlc-root *::before, .amlc-root *::after { box-sizing: border-box; }
.amlc-root button { font-family: inherit; margin: 0; letter-spacing: normal; text-transform: none; box-shadow: none; }
.amlc-root svg { display: block; width: 100%; height: 100%; pointer-events: none; }

/* ---- balon butonu ---- */
.amlc-launcher {
	position: relative;
	width: 60px; height: 60px;
	border-radius: 50%;
	border: 0; padding: 0;
	background: var(--amlc-color);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	display: flex; align-items: center; justify-content: center;
	transition: transform .2s ease, box-shadow .2s ease;
	margin-left: auto;
}
.amlc-pos-left .amlc-launcher { margin-left: 0; }
.amlc-launcher:hover { transform: scale(1.06); box-shadow: 0 8px 26px rgba(0, 0, 0, .3); }
.amlc-launcher:focus-visible { outline: 3px solid rgba(0, 0, 0, .35); outline-offset: 3px; }
.amlc-launcher > span:not(.amlc-badge) { position: absolute; width: 28px; height: 28px; transition: transform .25s ease, opacity .2s ease; }
.amlc-l-close { width: 22px !important; height: 22px !important; opacity: 0; transform: rotate(-90deg) scale(.6); }
.amlc-open .amlc-l-chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.amlc-open .amlc-l-close { opacity: 1; transform: none; }
.amlc-badge {
	position: absolute; top: -2px; right: -2px;
	min-width: 20px; height: 20px; padding: 0 5px;
	border-radius: 10px; border: 2px solid #fff;
	background: #1d1e1c; color: #fff;
	font-size: 11px; font-weight: 700; line-height: 16px; text-align: center;
}
.amlc-open .amlc-badge { display: none; }

/* ---- panel ---- */
.amlc-panel {
	position: absolute;
	bottom: 76px; right: 0;
	width: 376px;
	height: min(620px, calc(100vh - 120px));
	background: #fff;
	border-radius: var(--amlc-radius);
	box-shadow: 0 12px 48px rgba(0, 0, 0, .22), 0 2px 8px rgba(0, 0, 0, .08);
	display: flex; flex-direction: column;
	overflow: hidden;
	opacity: 0; visibility: hidden;
	transform: translateY(14px) scale(.98);
	transform-origin: bottom right;
	transition: opacity .2s ease, transform .22s ease, visibility 0s linear .22s, width .2s ease, height .2s ease;
}
.amlc-pos-left .amlc-panel { right: auto; left: 0; transform-origin: bottom left; }
.amlc-open .amlc-panel { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.amlc-expanded .amlc-panel { width: min(560px, calc(100vw - 40px)); height: calc(100vh - 120px); }

.amlc-head {
	display: flex; align-items: center; gap: 10px;
	padding: 12px 10px 12px 14px;
	background: var(--amlc-color);
	color: #fff;
	flex: 0 0 auto;
}
.amlc-head-avatar { position: relative; width: 38px; height: 38px; flex: 0 0 38px; }
.amlc-head-avatar img { width: 38px; height: 38px; border-radius: 50%; background: #fff; object-fit: contain; padding: 5px; display: block; }
.amlc-online { position: absolute; right: 0; bottom: 0; width: 11px; height: 11px; border-radius: 50%; background: #22b14c; border: 2px solid var(--amlc-color); }
.amlc-head-title { flex: 1 1 auto; font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.amlc-icon-btn {
	width: 32px; height: 32px; padding: 7px;
	border: 0; border-radius: 6px;
	background: transparent; color: #fff;
	cursor: pointer; opacity: .9;
	transition: background .15s ease, opacity .15s ease;
}
.amlc-icon-btn:hover { background: rgba(255, 255, 255, .16); opacity: 1; }
.amlc-icon-btn:focus-visible { outline: 2px solid #fff; outline-offset: 1px; }
.amlc-close { padding: 8px; }

/* ---- mesajlar ---- */
.amlc-log {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 16px 16px 8px;
	scroll-behavior: smooth;
	overscroll-behavior: contain;
}
.amlc-row { display: flex; flex-direction: column; margin-top: 4px; max-width: 100%; }
.amlc-row.amlc-bot { position: relative; padding-left: 40px; align-items: flex-start; }
.amlc-row.amlc-user { align-items: flex-end; margin-top: 12px; }
.amlc-row.amlc-bot.amlc-first { margin-top: 14px; }
.amlc-row.amlc-bot.amlc-first:first-child { margin-top: 0; }
.amlc-avatar { position: absolute; left: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; object-fit: contain; background: #fff; border: 1px solid #eee; padding: 3px; }
.amlc-name { font-size: 12px; font-weight: 700; margin: 0 0 4px 2px; color: var(--amlc-ink); }
.amlc-bubble {
	display: inline-block;
	max-width: 280px;
	padding: 9px 13px;
	border-radius: 12px;
	white-space: pre-wrap;
	word-wrap: break-word; overflow-wrap: anywhere;
}
.amlc-expanded .amlc-bubble { max-width: 420px; }
.amlc-bot .amlc-bubble { background: var(--amlc-bot-bg); color: var(--amlc-ink); }
.amlc-bot .amlc-bubble.amlc-error { background: #fdecec; color: #8a1016; }
.amlc-user .amlc-bubble { background: var(--amlc-color); color: #fff; }
.amlc-time { font-size: 10.5px; color: var(--amlc-muted); margin: 3px 4px 0; }
.amlc-bot.amlc-first + .amlc-bot { margin-top: 6px; }

.amlc-typing .amlc-bubble { display: inline-flex; gap: 4px; padding: 12px 14px; }
.amlc-typing .amlc-bubble span { width: 7px; height: 7px; border-radius: 50%; background: #9a9a9a; animation: amlc-dot 1.2s infinite ease-in-out; }
.amlc-typing .amlc-bubble span:nth-child(2) { animation-delay: .15s; }
.amlc-typing .amlc-bubble span:nth-child(3) { animation-delay: .3s; }
@keyframes amlc-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }

/* ---- hızlı cevap butonları ---- */
.amlc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0 4px 40px; }
.amlc-chip {
	border: 1px solid #c9c9c9;
	background: #fff;
	color: var(--amlc-ink);
	border-radius: 8px;
	padding: 6px 11px;
	font-size: 13px; line-height: 1.3;
	cursor: pointer;
	text-align: start;
	transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.amlc-chip:hover, .amlc-chip:focus-visible { border-color: var(--amlc-color); color: var(--amlc-color); outline: none; }
.amlc-chip-again { border-color: var(--amlc-color); color: var(--amlc-color); font-weight: 600; }
.amlc-chip-again:hover { background: var(--amlc-color); color: #fff; }

/* ---- giriş ---- */
.amlc-privacy { font-size: 11px; color: var(--amlc-muted); padding: 0 16px 4px; }
.amlc-form {
	display: flex; align-items: center; gap: 6px;
	margin: 6px 12px 12px;
	padding: 4px 4px 4px 14px;
	border: 1px solid #cfcfcf;
	border-radius: 22px;
	background: #fff;
	flex: 0 0 auto;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.amlc-form:focus-within { border-color: var(--amlc-color); box-shadow: 0 0 0 3px rgba(0, 0, 0, .05); }
.amlc-root .amlc-input {
	flex: 1 1 auto; min-width: 0;
	border: 0 !important; outline: 0 !important; box-shadow: none !important;
	background: transparent !important;
	height: 34px; padding: 0 !important; margin: 0 !important;
	font: inherit; font-size: 14px; color: var(--amlc-ink);
}
.amlc-input:disabled { cursor: not-allowed; }
.amlc-hp { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }
.amlc-send {
	width: 34px; height: 34px; padding: 0;
	border: 0; border-radius: 50%;
	background: var(--amlc-color); color: #fff;
	cursor: pointer; flex: 0 0 34px;
	display: flex; align-items: center; justify-content: center;
	transition: filter .15s ease, background .15s ease;
}
.amlc-send:hover:not(:disabled) { filter: brightness(.9); }
.amlc-send:disabled { background: #d5d5d5; cursor: not-allowed; }
.amlc-is-done .amlc-form { opacity: .6; }

/* ---- RTL ---- */
.amlc-rtl .amlc-row.amlc-bot { padding-left: 0; padding-right: 40px; }
.amlc-rtl .amlc-avatar { left: auto; right: 0; }
.amlc-rtl .amlc-chips { padding: 10px 40px 4px 0; }
.amlc-rtl .amlc-form { padding: 4px 14px 4px 4px; }
.amlc-rtl .amlc-send svg { transform: scaleX(-1); }
.amlc-rtl .amlc-head { padding: 12px 14px 12px 10px; }

/* ---- mobil ---- */
@media (max-width: 520px) {
	.amlc-root { bottom: 14px; right: 14px; }
	.amlc-root.amlc-pos-left { left: 14px; }
	.amlc-launcher { width: 54px; height: 54px; }
	.amlc-panel,
	.amlc-expanded .amlc-panel {
		position: fixed;
		inset: 0;
		width: 100%; height: 100%;
		height: 100dvh;
		border-radius: 0;
		transform: translateY(24px);
	}
	.amlc-open .amlc-launcher { display: none; }
	.amlc-expand { display: none; }
	.amlc-bubble { max-width: 82vw; }
	.amlc-root .amlc-input { font-size: 16px; } /* iOS yakınlaştırmasını önler */
}

@media (prefers-reduced-motion: reduce) {
	.amlc-root *, .amlc-root *::before, .amlc-root *::after { transition: none !important; animation: none !important; }
}

/* ---- Tema stillerine karşı koruma (Impreza vb. button/input stillerini ezer) ---- */
#amlc-root button,
#amlc-root input[type="text"] {
	-webkit-appearance: none !important; appearance: none !important;
	min-width: 0 !important; min-height: 0 !important; max-width: none !important;
	margin: 0 !important;
	font-family: inherit !important; letter-spacing: normal !important; text-transform: none !important;
	text-shadow: none !important; box-shadow: none !important; line-height: 1.3 !important;
}
#amlc-root button::before, #amlc-root button::after { content: none !important; display: none !important; }
#amlc-root .amlc-send {
	width: 34px !important; height: 34px !important; flex: 0 0 34px !important;
	padding: 0 !important; border: 0 !important; border-radius: 50% !important;
	background: var(--amlc-color) !important; color: #fff !important;
	display: flex !important; align-items: center !important; justify-content: center !important;
	font-size: 0 !important;
}
#amlc-root .amlc-send:disabled { background: #d5d5d5 !important; }
#amlc-root .amlc-send svg { width: 17px !important; height: 17px !important; flex: 0 0 17px; margin-left: -2px; }
#amlc-root.amlc-rtl .amlc-send svg { margin-left: 0; margin-right: -2px; }
#amlc-root .amlc-launcher {
	width: 60px !important; height: 60px !important; padding: 0 !important;
	border: 0 !important; border-radius: 50% !important;
	background: var(--amlc-color) !important; color: #fff !important;
	display: flex !important; box-shadow: 0 6px 20px rgba(0, 0, 0, .25) !important;
}
#amlc-root .amlc-icon-btn {
	width: 32px !important; height: 32px !important; padding: 0 !important;
	border: 0 !important; border-radius: 6px !important;
	background: transparent !important; color: #fff !important;
	display: flex !important; align-items: center !important; justify-content: center !important;
}
#amlc-root .amlc-icon-btn:hover { background: rgba(255, 255, 255, .16) !important; }
#amlc-root .amlc-icon-btn svg { width: 18px !important; height: 18px !important; }
#amlc-root .amlc-close svg { width: 16px !important; height: 16px !important; }
#amlc-root .amlc-chip {
	width: auto !important; height: auto !important;
	padding: 6px 11px !important; border: 1px solid #c9c9c9 !important; border-radius: 8px !important;
	background: #fff !important; color: var(--amlc-ink) !important;
	font-size: 13px !important; font-weight: 400 !important; display: inline-block !important;
}
#amlc-root .amlc-chip:hover, #amlc-root .amlc-chip:focus-visible { border-color: var(--amlc-color) !important; color: var(--amlc-color) !important; }
#amlc-root .amlc-chip-again { border-color: var(--amlc-color) !important; color: var(--amlc-color) !important; font-weight: 600 !important; }
#amlc-root .amlc-chip-again:hover { background: var(--amlc-color) !important; color: #fff !important; }
#amlc-root .amlc-input { height: 34px !important; font-size: 14px !important; color: var(--amlc-ink) !important; }
@media (max-width: 520px) {
	#amlc-root .amlc-launcher { width: 54px !important; height: 54px !important; }
	#amlc-root .amlc-input { font-size: 16px !important; }
	#amlc-root.amlc-open .amlc-launcher { display: none !important; }
	#amlc-root .amlc-expand { display: none !important; }
}
