.wcc-widget, .wcc-widget * {
	box-sizing: border-box;
}

.wcc-widget.wcc-floating {
	--wcc-mobile-bottom: 20px;
	position: fixed !important;
	bottom: 24px !important;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
	z-index: 2147483647 !important;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wcc-widget {
	--wcc-btn-color: #25D366;
	--wcc-header-color: #075E54;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.wcc-pos-right { right: 24px !important; }
.wcc-pos-left  { left: 24px !important; }

@media (max-width: 480px) {
	.wcc-widget.wcc-floating {
		bottom: var(--wcc-mobile-bottom, 20px) !important;
		bottom: calc(var(--wcc-mobile-bottom, 20px) + env(safe-area-inset-bottom, 0px)) !important;
	}
}

/* Toggle button */
.wcc-toggle-btn {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--wcc-btn-color);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	position: relative;
	z-index: 2;
}

.wcc-toggle-btn:hover {
	transform: scale(1.06);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.wcc-toggle-btn svg {
	width: 28px;
	height: 28px;
	position: absolute;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.wcc-icon-close { opacity: 0; transform: scale(0.6) rotate(-45deg); }
.wcc-icon-chat  { opacity: 1; transform: scale(1) rotate(0deg); }

.wcc-widget.wcc-open .wcc-icon-chat  { opacity: 0; transform: scale(0.6) rotate(45deg); }
.wcc-widget.wcc-open .wcc-icon-close { opacity: 1; transform: scale(1) rotate(0deg); }

/* Pulse animation to attract attention */
.wcc-toggle-btn::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55);
	animation: wcc-pulse 2.4s infinite;
	pointer-events: none;
}

@keyframes wcc-pulse {
	0%   { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
	70%  { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
	100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* Panel */
.wcc-panel {
	position: absolute;
	bottom: 76px;
	width: 340px;
	max-width: calc(100vw - 32px);
	max-height: 70vh;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	opacity: 0;
	transform: translateY(16px) scale(0.98);
	transition: opacity 0.2s ease, transform 0.2s ease;
}

/* KRİTİK: native [hidden] özniteliği, yukarıdaki "display: flex" ile aynı
   önem derecesinde olduğu için bazı tarayıcılarda geçersiz kalabiliyor ve
   panel görünmez ama hâlâ tıklamaları yutan bir katman olarak kalabiliyor.
   Bu kural bunu kesin olarak engeller. */
.wcc-panel[hidden] {
	display: none !important;
	pointer-events: none;
}

.wcc-pos-right .wcc-panel { right: 0; }
.wcc-pos-left  .wcc-panel { left: 0; }

.wcc-widget.wcc-open .wcc-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.wcc-panel-header {
	background: var(--wcc-header-color);
	color: #fff;
	padding: 18px 20px;
	flex-shrink: 0;
}

.wcc-panel-header-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.wcc-panel-header-text strong {
	font-size: 16px;
	font-weight: 600;
}

.wcc-panel-header-text span {
	font-size: 12.5px;
	opacity: 0.85;
	line-height: 1.4;
}

.wcc-panel-body {
	overflow-y: auto;
	padding: 12px;
}

.wcc-screen-label {
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: #6b7280;
	margin: 4px 8px 10px;
}

.wcc-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* Department item */
.wcc-dept-item {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 12px 10px;
	background: #f5f7f8;
	border: none;
	border-radius: 10px;
	cursor: pointer;
	text-align: left;
	font-size: 14px;
	color: #1f2937;
	transition: background 0.15s ease;
}

.wcc-dept-item:hover { background: #ebeef0; }

.wcc-dept-icon {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--wcc-btn-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	flex-shrink: 0;
}

.wcc-dept-name { flex: 1; font-weight: 500; }
.wcc-chevron { color: #9ca3af; font-size: 18px; }

/* Back button */
.wcc-back-btn {
	background: none;
	border: none;
	color: var(--wcc-header-color);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	padding: 6px 8px;
	margin-bottom: 4px;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

/* Agent item */
.wcc-agent-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border-radius: 10px;
	text-decoration: none;
	color: #1f2937;
	background: #fff;
	border: 1px solid #eef0f1;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.wcc-agent-item:hover {
	background: #f5fbf7;
	border-color: var(--wcc-btn-color);
}

.wcc-agent-avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
}

.wcc-agent-avatar-initials {
	background: var(--wcc-header-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 15px;
}

.wcc-agent-info {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-width: 0;
}

.wcc-agent-name {
	font-size: 14px;
	font-weight: 600;
}

.wcc-agent-position {
	font-size: 12px;
	color: #6b7280;
}

.wcc-agent-status {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	flex-shrink: 0;
}

.wcc-status-online { background: #22c55e; }
.wcc-status-offline { background: #9ca3af; }

.wcc-agent-offline {
	opacity: 0.7;
}

@media (max-width: 480px) {
	.wcc-panel {
		width: calc(100vw - 24px);
		bottom: 74px;
	}
}

/* Gizlilik onayı kutusu */
.wcc-privacy-row {
	background: #fff8e6;
	border: 1px solid #f4dfa0;
	border-radius: 10px;
	padding: 10px 12px;
	margin: 0 0 12px;
	font-size: 12.5px;
	color: #4b4b4b;
	line-height: 1.4;
}

.wcc-privacy-row label {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
}

.wcc-privacy-row input[type="checkbox"] {
	margin-top: 2px;
	flex-shrink: 0;
}

.wcc-privacy-row a {
	color: var(--wcc-header-color);
	font-weight: 600;
}

.wcc-privacy-row.wcc-privacy-shake {
	animation: wcc-shake 0.4s ease;
	border-color: #e0575b;
}

@keyframes wcc-shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-4px); }
	75% { transform: translateX(4px); }
}

.wcc-agent-item.wcc-agent-locked {
	cursor: not-allowed;
}

/* "Yardıma mı ihtiyacınız var?" balonu */
.wcc-bubble {
	position: absolute;
	bottom: 8px;
	right: 72px;
	background: #fff;
	color: #1f2937;
	padding: 10px 14px;
	border-radius: 10px;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
	font-size: 13.5px;
	font-weight: 500;
	white-space: nowrap;
	display: flex;
	align-items: center;
	gap: 8px;
	animation: wcc-bubble-in 0.3s ease;
}

.wcc-pos-left .wcc-bubble {
	right: auto;
	left: 72px;
}

.wcc-widget.wcc-open .wcc-bubble {
	display: none;
}

.wcc-bubble::after {
	content: "";
	position: absolute;
	top: 50%;
	right: -6px;
	transform: translateY(-50%);
	border-width: 6px 0 6px 6px;
	border-style: solid;
	border-color: transparent transparent transparent #fff;
}

.wcc-pos-left .wcc-bubble::after {
	right: auto;
	left: -6px;
	border-width: 6px 6px 6px 0;
	border-color: transparent #fff transparent transparent;
}

.wcc-bubble button {
	background: none;
	border: none;
	color: #9ca3af;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
}

@keyframes wcc-bubble-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
	.wcc-bubble {
		max-width: 55vw;
		font-size: 12.5px;
		padding: 8px 10px;
		white-space: normal;
		line-height: 1.3;
	}
}

/* =========================================================================
   INLINE (shortcode / WooCommerce) BUTONLAR VE PANEL
   ========================================================================= */

.wcc-widget.wcc-inline {
	position: relative;
	display: inline-block;
	bottom: auto;
	right: auto;
	left: auto;
}

.wcc-widget.wcc-inline .wcc-panel {
	position: absolute;
	bottom: auto;
	top: calc(100% + 10px);
	left: 0;
	right: auto;
}

/* Doğrudan link olarak render edilen buton (panel olmayan mod) */
.wcc-inline-link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
	line-height: 1.2;
}

.wcc-inline-link:hover {
	transform: translateY(-1px);
}

.wcc-inline-link svg {
	flex-shrink: 0;
	width: 1.15em;
	height: 1.15em;
}

/* Stil: buton (dolgu, yuvarlak köşe) */
.wcc-style-button {
	background: var(--wcc-btn-color, #25D366);
	color: #fff;
	border-radius: 8px;
	padding: 12px 20px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wcc-style-button:hover {
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* Stil: bar (tam genişlik, ör. ürün sayfasında sepete ekle altı) */
.wcc-style-bar {
	background: var(--wcc-btn-color, #25D366);
	color: #fff;
	border-radius: 6px;
	padding: 13px 20px;
	width: 100%;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* Stil: sadece ikon, yuvarlak */
.wcc-style-icon {
	background: var(--wcc-btn-color, #25D366);
	color: #fff;
	border-radius: 50%;
	width: 48px;
	height: 48px;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.wcc-style-icon svg {
	width: 1.4em;
	height: 1.4em;
}

/* Stil: sade metin linki, arka plansız */
.wcc-style-text {
	background: none;
	color: var(--wcc-header-color, #075E54);
	padding: 4px 0;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.wcc-style-text svg {
	color: var(--wcc-btn-color, #25D366);
}

/* Boyutlar */
.wcc-size-small.wcc-style-button,
.wcc-size-small.wcc-style-bar { padding: 8px 14px; font-size: 13px; }
.wcc-size-medium.wcc-style-button,
.wcc-size-medium.wcc-style-bar { padding: 12px 20px; font-size: 14.5px; }
.wcc-size-large.wcc-style-button,
.wcc-size-large.wcc-style-bar { padding: 16px 26px; font-size: 16.5px; }

.wcc-size-small.wcc-style-icon { width: 38px; height: 38px; }
.wcc-size-medium.wcc-style-icon { width: 48px; height: 48px; }
.wcc-size-large.wcc-style-icon { width: 58px; height: 58px; }

.wcc-size-small.wcc-style-text { font-size: 13px; }
.wcc-size-medium.wcc-style-text { font-size: 14.5px; }
.wcc-size-large.wcc-style-text { font-size: 16.5px; }

/* WooCommerce ürün sayfası bütünleşmesi */
.wcc-woo-button-wrap {
	margin: 14px 0;
}
