/* ACC (Vapi) — ویجت عمومی سایت. مستقل از public-chat.css و بقیه‌ی استایل‌های پلاگین. */

.aat-acc-widget,
.aat-acc-floating-panel {
	--aat-acc-accent: #00FF96;
	--aat-acc-bg: #0c0d12;
	--aat-acc-bg-elevated: rgba(255,255,255,.05);
	--aat-acc-border: rgba(255,255,255,.1);
	--aat-acc-text: #f2f2f7;
	--aat-acc-text-muted: #9a9ca8;
	font-family: 'Yekan', 'Vazirmatn', Tahoma, sans-serif;
	direction: rtl;
}

/* ---------- پنل (مشترک بین حالت شورت‌کد و شناور) ---------- */
.aat-acc-panel {
	background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015)), var(--aat-acc-bg);
	border: 1px solid var(--aat-acc-border);
	border-radius: 20px;
	padding: 18px;
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	max-width: 420px;
	color: var(--aat-acc-text);
	box-shadow: 0 12px 40px rgba(0,0,0,.35);
}

.aat-acc-note {
	font-size: 13px;
	color: var(--aat-acc-text-muted);
	margin: 0 0 14px;
	line-height: 1.8;
}

.aat-acc-start-btn {
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 14px 18px;
	border-radius: 14px;
	border: 1px solid color-mix(in srgb, var(--aat-acc-accent) 45%, transparent);
	background: color-mix(in srgb, var(--aat-acc-accent) 14%, transparent);
	color: var(--aat-acc-accent);
	font-weight: 700;
	font-size: 14.5px;
	cursor: pointer;
	transition: transform .15s ease, background .2s ease;
}
.aat-acc-start-btn:hover { transform: translateY(-1px); background: color-mix(in srgb, var(--aat-acc-accent) 22%, transparent); }
.aat-acc-start-btn:active { transform: translateY(0); }

.aat-acc-status-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: var(--aat-acc-text-muted);
	flex-shrink: 0;
}

.aat-acc-widget[data-state="connecting"] .aat-acc-status-dot {
	background: #ffb75e;
	animation: aat-acc-pulse 1s infinite;
}
.aat-acc-widget[data-state="live"] .aat-acc-status-dot,
.aat-acc-floating-panel[data-state="live"] .aat-acc-status-dot {
	background: var(--aat-acc-accent);
	animation: aat-acc-pulse 1.4s infinite;
	box-shadow: 0 0 0 0 color-mix(in srgb, var(--aat-acc-accent) 60%, transparent);
}
.aat-acc-widget[data-state="live"] .aat-acc-start-btn,
.aat-acc-floating-panel[data-state="live"] .aat-acc-start-btn {
	border-color: rgba(255,92,124,.5);
	background: rgba(255,92,124,.12);
	color: #ff8fa3;
}

@keyframes aat-acc-pulse {
	0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--aat-acc-accent) 55%, transparent); }
	70% { box-shadow: 0 0 0 8px transparent; }
	100% { box-shadow: 0 0 0 0 transparent; }
}

.aat-acc-transcript {
	margin-top: 14px;
	max-height: 240px;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.aat-acc-transcript:empty { display: none; }

.aat-acc-line {
	font-size: 13px;
	line-height: 1.8;
	padding: 8px 12px;
	border-radius: 12px;
	background: var(--aat-acc-bg-elevated);
	border: 1px solid var(--aat-acc-border);
}
.aat-acc-line-user { border-color: color-mix(in srgb, var(--aat-acc-accent) 35%, transparent); }
.aat-acc-who {
	display: block;
	font-size: 10.5px;
	font-weight: 700;
	color: var(--aat-acc-text-muted);
	margin-bottom: 2px;
}
.aat-acc-line-user .aat-acc-who { color: var(--aat-acc-accent); }

/* ---------- شورت‌کد اینلاین ---------- */
.aat-acc-inline-widget { display: inline-block; width: 100%; }
.aat-acc-inline-widget .aat-acc-panel { max-width: 100%; }

/* ---------- ویجت شناور ---------- */
.aat-acc-floating-wrap {
	position: fixed;
	inset-inline-start: 24px;
	bottom: 24px;
	z-index: 999999;
	direction: rtl;
}

.aat-acc-fab {
	width: 58px;
	height: 58px;
	border-radius: 50%;
	border: 1px solid color-mix(in srgb, var(--aat-acc-accent) 45%, transparent);
	background: radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--aat-acc-accent) 30%, #10121e), #0c0d12);
	color: var(--aat-acc-accent);
	font-size: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 8px 28px rgba(0,0,0,.4), 0 0 0 4px color-mix(in srgb, var(--aat-acc-accent) 8%, transparent);
	transition: transform .2s ease;
}
.aat-acc-fab:hover { transform: scale(1.06); }

.aat-acc-floating-panel {
	position: absolute;
	bottom: 74px;
	inset-inline-start: 0;
	width: 340px;
	max-width: calc(100vw - 48px);
	background: var(--aat-acc-bg);
	border: 1px solid var(--aat-acc-border);
	border-radius: 20px;
	box-shadow: 0 16px 48px rgba(0,0,0,.45);
	overflow: hidden;
	opacity: 0;
	transform: translateY(12px) scale(.98);
	pointer-events: none;
	transition: opacity .18s ease, transform .18s ease;
}
.aat-acc-floating-panel .aat-acc-panel {
	border: none;
	box-shadow: none;
	border-radius: 0;
	backdrop-filter: none;
	background: transparent;
	max-width: none;
}

.aat-acc-floating-wrap.open .aat-acc-floating-panel {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

.aat-acc-floating-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 16px;
	border-bottom: 1px solid var(--aat-acc-border);
}
.aat-acc-floating-title {
	font-size: 13.5px;
	font-weight: 700;
	color: var(--aat-acc-text);
}
.aat-acc-close-btn {
	background: none;
	border: none;
	color: var(--aat-acc-text-muted);
	cursor: pointer;
	font-size: 14px;
	padding: 4px 8px;
	border-radius: 8px;
}
.aat-acc-close-btn:hover { background: var(--aat-acc-bg-elevated); color: var(--aat-acc-text); }

.aat-acc-floating-body { padding: 16px; }

@media (max-width: 480px) {
	.aat-acc-floating-wrap { inset-inline-start: 16px; bottom: 16px; }
	.aat-acc-floating-panel { width: calc(100vw - 32px); }
}
