#oa-root, #oa-root * {
	box-sizing: border-box;
}

/* Tema/eklenti CSS'lerinin buton ve form elemanlarını bozmasını engelleyen izolasyon katmanı. */
:where(#oa-root) button,
:where(#oa-root) input,
:where(#oa-root) select,
:where(#oa-root) textarea,
:where(#oa-root) a {
	all: revert;
	box-sizing: border-box;
}
:where(#oa-root) button {
	font-family: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	background: none;
	border: none;
	margin: 0;
	padding: 0;
	color: inherit;
	text-align: inherit;
	white-space: normal;
	line-height: normal;
}
:where(#oa-root) input, :where(#oa-root) select, :where(#oa-root) textarea {
	font-family: inherit;
	border-radius: 0;
}
:where(#oa-root) a { text-decoration: none; color: inherit; }
:where(#oa-root) svg { display: block; }

#oa-root {
	--oa-primary: #0e6f66;
	--oa-secondary: #142430;
	--oa-accent: #e2a33c;
	--oa-ink: #16212c;
	--oa-muted: #6c7686;
	--oa-line: #e9e5da;
	--oa-bg-soft: #f8f6f0;
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 999999;
	font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* ---------- Launcher ---------- */
#oa-launcher {
	height: 54px;
	padding: 0 20px 0 6px;
	border-radius: 30px;
	background: var(--oa-ink);
	box-shadow: 0 12px 28px rgba(15, 25, 35, .34);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 11px;
	position: relative;
	transition: transform .18s ease, box-shadow .18s ease, padding-right .18s ease;
}
#oa-launcher:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(15, 25, 35, .4); }
#oa-launcher .oa-launcher-icon {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: linear-gradient(150deg, var(--oa-primary), var(--oa-secondary));
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	position: relative;
	flex-shrink: 0;
}
#oa-launcher .oa-launcher-dot {
	position: absolute;
	bottom: -1px;
	right: -1px;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: #33c481;
	border: 2.5px solid var(--oa-ink);
}
#oa-launcher .oa-launcher-dot-offline { background: #8a939e; }
#oa-launcher .oa-launcher-text {
	color: #fff;
	font-size: 13.5px;
	font-weight: 700;
	letter-spacing: .01em;
	white-space: nowrap;
}
#oa-launcher .oa-badge {
	position: absolute;
	top: -4px;
	right: -4px;
	background: var(--oa-accent);
	color: #16212c;
	font-size: 11px;
	font-weight: 800;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 2.5px solid #fff;
}

/* ---------- Panel ---------- */
#oa-panel {
	position: absolute;
	right: 0;
	bottom: 70px;
	width: 384px;
	max-width: calc(100vw - 24px);
	height: 600px;
	max-height: calc(100vh - 116px);
	background: var(--oa-bg-soft);
	border-radius: 20px;
	box-shadow: 0 26px 68px rgba(15, 25, 35, .26), 0 4px 14px rgba(15,25,35,.08);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border: 1px solid rgba(20, 30, 40, .05);
}
#oa-panel.oa-hidden { display: none; }

#oa-panel .oa-view { display: none; flex-direction: column; height: 100%; min-height: 0; }
#oa-panel .oa-view.oa-active { display: flex; }
#oa-panel .oa-icon { display: block; flex-shrink: 0; }

/* ---------- Headers ---------- */
#oa-panel .oa-header {
	background: linear-gradient(120deg, var(--oa-primary), var(--oa-secondary));
	color: #fff;
	padding: 20px 22px 30px;
	flex-shrink: 0;
	position: relative;
	clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
}
#oa-panel .oa-header::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(130% 100% at 100% -20%, rgba(255,255,255,.16), transparent 55%);
	pointer-events: none;
}
#oa-panel .oa-header-top {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 18px;
	position: relative;
}
#oa-panel .oa-header-avatar {
	width: 32px;
	height: 32px;
	background: rgba(255,255,255,.16);
	border: 1px solid rgba(255,255,255,.3);
	border-radius: 9px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #fff;
}
#oa-panel .oa-header-bubble {
	background: rgba(255,255,255,.96);
	color: var(--oa-secondary);
	font-size: 12.5px;
	font-weight: 700;
	padding: 8px 13px;
	border-radius: 14px;
	flex-grow: 1;
	box-shadow: 0 3px 8px rgba(10,20,30,.14);
}
#oa-panel .oa-close {
	background: rgba(255,255,255,.2) !important;
	border: none !important;
	color: #fff !important;
	cursor: pointer;
	width: 28px;
	height: 28px;
	min-width: 28px;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background .15s ease;
	padding: 0 !important;
}
#oa-panel .oa-close:hover { background: rgba(255,255,255,.32) !important; }
#oa-panel .oa-header h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; letter-spacing: -.02em; position: relative; }
#oa-panel .oa-header p { margin: 0 0 12px; font-size: 13px; opacity: .88; position: relative; }
#oa-panel .oa-header-status {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 7px;
	font-size: 11.5px;
	font-weight: 600;
	color: #fff;
	background: rgba(0,0,0,.16);
	padding: 5px 11px 5px 8px;
	border-radius: 20px;
}
#oa-panel .oa-header-status-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #33c481;
	box-shadow: 0 0 0 0 rgba(51,196,129,.6);
	animation: oa-dot-pulse 2s infinite;
	flex-shrink: 0;
}
#oa-panel .oa-header-status-offline .oa-header-status-dot {
	background: #b7bfc9;
	animation: none;
	box-shadow: none;
}
@keyframes oa-dot-pulse {
	0% { box-shadow: 0 0 0 0 rgba(51,196,129,.55); }
	70% { box-shadow: 0 0 0 6px rgba(51,196,129,0); }
	100% { box-shadow: 0 0 0 0 rgba(51,196,129,0); }
}

#oa-panel .oa-subheader {
	background: linear-gradient(120deg, var(--oa-primary), var(--oa-secondary));
	color: #fff;
	padding: 17px 18px;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-shrink: 0;
}
#oa-panel .oa-subheader h3 { margin: 0; font-size: 16px; font-weight: 800; flex-grow: 1; letter-spacing: -.01em; }
#oa-panel .oa-header-actions { display: flex; gap: 6px; flex-shrink: 0; }
#oa-panel .oa-icon-btn {
	background: rgba(255,255,255,.2) !important;
	border: none !important;
	color: #fff !important;
	width: 30px;
	height: 30px;
	min-width: 30px;
	border-radius: 50% !important;
	cursor: pointer;
	display: flex !important;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: background .15s ease;
	padding: 0 !important;
}
#oa-panel .oa-icon-btn:hover { background: rgba(255,255,255,.32) !important; }

/* ---------- Body ---------- */
#oa-panel .oa-body {
	padding: 18px 20px 20px;
	overflow-y: auto;
	flex-grow: 1;
	min-height: 0;
	background: var(--oa-bg-soft);
}
#oa-panel .oa-body label {
	display: block;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--oa-ink);
	margin-bottom: 13px;
}
#oa-panel .oa-body input[type="text"],
#oa-panel .oa-body input[type="email"],
#oa-panel .oa-body input[type="number"],
#oa-panel .oa-body input[type="search"],
#oa-panel .oa-body select,
#oa-panel .oa-body textarea {
	display: block;
	width: 100%;
	margin-top: 6px;
	padding: 11px 13px;
	border: 1.5px solid var(--oa-line);
	border-radius: 9px;
	background: #fff;
	font-size: 13.5px;
	font-family: inherit;
	color: var(--oa-ink);
	transition: border-color .15s ease;
}
#oa-panel .oa-body input:focus, #oa-panel .oa-body select:focus, #oa-panel .oa-body textarea:focus {
	outline: none;
	border-color: var(--oa-primary);
}
#oa-panel .oa-primary-btn {
	width: 100%;
	background: linear-gradient(120deg, var(--oa-primary), var(--oa-secondary)) !important;
	color: #fff !important;
	border: none !important;
	padding: 13px !important;
	border-radius: 10px !important;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	text-align: center !important;
	display: block;
	text-decoration: none;
	box-shadow: 0 4px 10px rgba(20, 40, 55, .2);
	transition: transform .12s ease, box-shadow .12s ease;
}
#oa-panel .oa-primary-btn:hover { color: #fff !important; transform: translateY(-1px); box-shadow: 0 6px 14px rgba(20, 40, 55, .24); }
#oa-panel .oa-primary-btn:active { transform: translateY(0); }
#oa-panel .oa-secondary-btn {
	width: 100%;
	background: #fff !important;
	color: var(--oa-primary) !important;
	border: 1.5px solid var(--oa-primary) !important;
	padding: 11px !important;
	border-radius: 10px !important;
	font-weight: 700;
	font-size: 13.5px;
	cursor: pointer;
	text-align: center !important;
	display: block;
	margin-top: 10px;
}
#oa-panel .oa-secondary-btn:hover { background: var(--oa-bg-soft) !important; }

/* ---------- Home: menu grid ---------- */
#oa-panel .oa-menu-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-bottom: 16px;
}
#oa-panel .oa-menu-btn {
	background: #fff !important;
	border: none !important;
	border-left: 3px solid var(--oa-primary) !important;
	border-radius: 4px 10px 10px 4px !important;
	box-shadow: 0 1px 3px rgba(20,30,40,.06);
	padding: 13px 12px !important;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--oa-ink) !important;
	cursor: pointer;
	display: flex !important;
	align-items: center;
	gap: 10px;
	text-align: left !important;
	transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
}
#oa-panel .oa-menu-btn:hover {
	border-left-color: var(--oa-accent) !important;
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(20, 30, 40, .1);
}
#oa-panel .oa-menu-btn-icon {
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: linear-gradient(150deg, rgba(14,111,102,.12), rgba(20,36,48,.10));
	color: var(--oa-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
#oa-panel .oa-menu-btn-label { line-height: 1.25; white-space: normal; }

/* ---------- Banner ---------- */
#oa-panel .oa-banner {
	display: block;
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	background: linear-gradient(135deg, var(--oa-ink), #24343f);
	text-decoration: none;
	color: inherit;
	margin-bottom: 16px;
	padding: 15px 16px 16px;
	box-shadow: 0 8px 20px rgba(15,25,35,.16);
}
#oa-panel .oa-banner-badge {
	display: inline-block;
	background: var(--oa-accent);
	color: #16212c;
	font-size: 10px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .06em;
	padding: 3px 9px;
	border-radius: 5px;
	margin-bottom: 9px;
}
#oa-panel .oa-banner-title {
	color: #fff;
	font-weight: 800;
	font-size: 14px;
	letter-spacing: -.01em;
	margin-bottom: 5px;
}
#oa-panel .oa-banner-text { color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.5; }

/* ---------- Trust strip ---------- */
#oa-panel .oa-trust-strip {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	padding-top: 4px;
}
#oa-panel .oa-trust-item {
	background: #fff;
	border-top: 2px solid var(--oa-primary);
	border-radius: 0 0 9px 9px;
	padding: 11px 6px 10px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	text-align: center;
	color: var(--oa-primary);
	box-shadow: 0 1px 3px rgba(20,30,40,.05);
}
#oa-panel .oa-trust-item span { font-size: 10px; font-weight: 700; color: var(--oa-muted); line-height: 1.25; }

/* ---------- Bottom nav ---------- */
#oa-panel .oa-bottom-nav {
	display: flex;
	border-top: 1px solid var(--oa-line);
	flex-shrink: 0;
	background: #fff;
	padding: 8px 8px 9px;
	gap: 2px;
}
#oa-panel .oa-nav-btn {
	flex: 1;
	background: none !important;
	border: none !important;
	padding: 6px 2px 4px !important;
	display: flex !important;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	cursor: pointer;
	color: #9aa3b0 !important;
	border-radius: 10px;
	transition: color .15s ease;
	min-height: 44px;
	overflow: visible;
	position: relative;
}
#oa-panel .oa-nav-icon { display: flex; flex-shrink: 0; position: relative; }
#oa-panel .oa-nav-icon::before {
	content: "";
	position: absolute;
	top: -8px;
	left: 50%;
	transform: translateX(-50%) scale(0);
	width: 4px;
	height: 4px;
	border-radius: 50%;
	background: var(--oa-accent);
	transition: transform .15s ease;
}
#oa-panel .oa-nav-btn.oa-active .oa-nav-icon::before { transform: translateX(-50%) scale(1); }
#oa-panel .oa-nav-label {
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: -.01em;
	line-height: 1.2;
	white-space: nowrap;
	overflow: visible;
}
#oa-panel .oa-nav-btn.oa-active { color: var(--oa-primary) !important; }

/* ---------- FAQ ---------- */
#oa-panel .oa-faq-filter { margin-bottom: 14px; }
#oa-panel .oa-faq-item { background: #fff; border-radius: 9px; margin-bottom: 8px; box-shadow: 0 1px 3px rgba(20,30,40,.05); }
#oa-panel .oa-faq-q {
	width: 100%;
	background: none !important;
	border: none !important;
	text-align: left !important;
	padding: 13px 14px !important;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--oa-ink) !important;
	display: flex !important;
	justify-content: space-between;
	align-items: center;
	gap: 10px;
	cursor: pointer;
}
#oa-panel .oa-faq-plus { color: var(--oa-primary); font-weight: 700; font-size: 16px; transition: transform .15s ease; flex-shrink: 0; }
#oa-panel .oa-faq-item.oa-open .oa-faq-plus { transform: rotate(45deg); }
#oa-panel .oa-faq-a { display: none; padding: 0 14px 15px; font-size: 12.5px; color: var(--oa-muted); line-height: 1.55; }
#oa-panel .oa-faq-item.oa-open .oa-faq-a { display: block; }
#oa-panel .oa-faq-item.oa-filtered-out { display: none; }

/* ---------- KVKK / bot ---------- */
#oa-panel .oa-kvkk-title { color: var(--oa-secondary); text-align: center; margin: 4px 0 10px; font-size: 15px; letter-spacing: .02em; font-weight: 800; }
#oa-panel .oa-kvkk-screen p { font-size: 12.5px; color: var(--oa-muted); text-align: center; margin-bottom: 18px; line-height: 1.5; }
#oa-panel .oa-checkbox { display: flex; align-items: flex-start; gap: 8px; font-weight: 400 !important; font-size: 12px; color: var(--oa-muted); }
#oa-panel .oa-checkbox input { width: auto; margin: 2px 0 0; }
#oa-panel .oa-linklike { background: none !important; border: none !important; color: var(--oa-primary) !important; text-decoration: underline; cursor: pointer; padding: 0 !important; font: inherit; }
#oa-panel .oa-kvkk-full { margin-top: 12px; background: #fff; padding: 11px; border-radius: 9px; font-size: 12px; }

#oa-panel .oa-bot-messages, #oa-panel .oa-livechat-messages, #oa-panel .oa-lc-conv-messages {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
#oa-panel .oa-msg {
	max-width: 82%;
	padding: 10px 13px;
	border-radius: 12px;
	font-size: 13px;
	line-height: 1.45;
	white-space: normal;
	word-break: break-word;
}
#oa-panel .oa-msg-visitor, #oa-panel .oa-msg-user { align-self: flex-end; background: linear-gradient(120deg, var(--oa-primary), var(--oa-secondary)); color: #fff; border-bottom-right-radius: 3px; }
#oa-panel .oa-msg-admin, #oa-panel .oa-msg-bot { align-self: flex-start; background: #fff; color: var(--oa-ink); border-bottom-left-radius: 3px; box-shadow: 0 1px 3px rgba(20,30,40,.06); }
#oa-panel .oa-bot-quick-replies { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
#oa-panel .oa-quick-reply {
	background: #fff !important;
	border: 1.5px solid var(--oa-primary) !important;
	color: var(--oa-primary) !important;
	border-radius: 16px !important;
	padding: 8px 13px !important;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	white-space: normal !important;
	text-align: left !important;
	transition: background .15s ease, color .15s ease;
}
#oa-panel .oa-quick-reply:hover { background: var(--oa-primary) !important; color: #fff !important; }
#oa-panel .oa-quick-reply-livechat { border-color: var(--oa-accent) !important; color: #96660c !important; }
#oa-panel .oa-quick-reply-livechat:hover { background: var(--oa-accent) !important; color: #16212c !important; }

/* ---------- Contact ---------- */
#oa-panel .oa-contact-lead { color: var(--oa-muted); font-size: 12.5px; margin-bottom: 14px; }
#oa-panel .oa-contact-row {
	display: flex !important;
	align-items: center;
	gap: 13px;
	background: #fff !important;
	border: none !important;
	border-left: 3px solid transparent !important;
	width: 100%;
	text-align: left !important;
	padding: 12px 13px !important;
	border-radius: 4px 10px 10px 4px !important;
	margin-bottom: 9px;
	text-decoration: none;
	color: var(--oa-ink) !important;
	font-size: 12.5px;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(20,30,40,.05);
	transition: border-color .15s ease, transform .12s ease;
	white-space: normal;
}
#oa-panel .oa-contact-row:hover { border-left-color: var(--oa-primary) !important; transform: translateY(-1px); color: var(--oa-ink) !important; }
#oa-panel .oa-contact-row strong { font-size: 13px; display: block; white-space: normal; }
#oa-panel .oa-contact-row > span:last-child { flex: 1 1 auto; min-width: 0; white-space: normal; line-height: 1.4; }
#oa-panel .oa-contact-icon {
	width: 36px;
	height: 36px;
	border-radius: 9px;
	background: var(--oa-bg-soft);
	color: var(--oa-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
#oa-panel .oa-contact-icon-live { color: #1d9a52; }
#oa-panel .oa-hours { font-size: 11.5px; color: var(--oa-muted); margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--oa-line); line-height: 1.6; }

/* ---------- Live chat thread ---------- */
#oa-panel .oa-livechat-thread { display: flex; flex-direction: column; flex: 1; height: 100%; min-height: 0; }
#oa-panel .oa-livechat-messages { flex-grow: 1; overflow-y: auto; padding: 18px 20px; min-height: 0; }
#oa-panel .oa-livechat-input { display: flex; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--oa-line); flex-shrink: 0; background: #fff; }
#oa-panel .oa-livechat-input input {
	flex-grow: 1;
	padding: 10px 14px;
	border: 1.5px solid var(--oa-line);
	border-radius: 20px;
	background: var(--oa-bg-soft);
}
#oa-panel .oa-livechat-input button {
	background: linear-gradient(120deg, var(--oa-primary), var(--oa-secondary)) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 20px !important;
	padding: 0 18px !important;
	font-weight: 700;
	font-size: 13px;
	cursor: pointer;
	flex-shrink: 0;
}
#oa-panel .oa-chat-ended-banner {
	background: #fff6e8;
	color: #8a5a0c;
	border: 1px solid #f0d9a8;
	border-radius: 10px;
	padding: 12px 14px;
	font-size: 12.5px;
	line-height: 1.5;
	margin: 16px 20px 0;
}
#oa-panel .oa-chat-ended-banner .oa-secondary-btn { margin-top: 10px; }

/* ---------- Orders / tracking ---------- */
#oa-panel .oa-track-result { margin-top: 16px; }
#oa-panel .oa-order-card, #oa-panel .oa-track-card {
	background: #fff;
	border-radius: 10px;
	padding: 13px;
	margin-bottom: 10px;
	font-size: 12.5px;
	color: var(--oa-ink);
	line-height: 1.55;
	box-shadow: 0 1px 3px rgba(20,30,40,.05);
}
#oa-panel .oa-order-card strong, #oa-panel .oa-track-card strong { color: var(--oa-secondary); }
#oa-panel .oa-order-card a, #oa-panel .oa-track-card a { color: var(--oa-primary); font-weight: 700; }
#oa-panel .oa-empty { color: var(--oa-muted); font-size: 12.5px; text-align: center; padding: 22px 0; }
#oa-panel .oa-vehicle-current { font-size: 12.5px; color: var(--oa-secondary); font-weight: 700; margin-top: 12px; }

@media (max-width: 420px) {
	#oa-panel { width: calc(100vw - 20px); right: -12px; }
}

/* Mobilde temaların sabit "Sepete Ekle / Sipariş Ver" çubuğuyla çakışmayı önler. */
@media (max-width: 768px) {
	#oa-root {
		bottom: calc(14px + var(--oa-mobile-offset, 20px));
		right: 14px;
	}
	#oa-launcher {
		height: 48px;
		padding: 0 14px 0 4px;
		gap: 8px;
	}
	#oa-launcher .oa-launcher-icon { width: 38px; height: 38px; }
	#oa-launcher .oa-launcher-text { display: none; }
	#oa-panel { bottom: 60px; }
}
