/* Andudo Chat v2 */

:root {
	--acv-accent: #06c755;
	--acv-accent-ink: #fff;
	--acv-bg: #eef1f5;
	--acv-surface: #fff;
	--acv-ink: #111b21;
	--acv-ink-2: #667781;
	--acv-line: #e6e8eb;
	--acv-red: #e53935;
	--acv-radius: 18px;
	--acv-z: 100000; /* เหนือ WP admin bar (99999) */
}

/* ---------- reset ภายในแชท (กันสไตล์ของธีมรั่วเข้ามา) ---------- */
.acv-root,
.acv-root *,
.acv-toast,
.acv-toast *,
.acv-lightbox,
.acv-lightbox * {
	box-sizing: border-box;
}
.acv-root [hidden],
.acv-root[hidden],
.acv-toast [hidden],
[data-andudo-chat-badge][hidden] {
	display: none !important;
}
.acv-root button,
.acv-toast button,
.acv-lightbox button,
.acv-tb-btn,
.acv-fab {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
	text-decoration: none;
	min-height: 0;
	min-width: 0;
	width: auto;
	height: auto;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}
.acv-root button:disabled {
	cursor: default;
}
.acv-root input,
.acv-root textarea {
	margin: 0;
	font: inherit;
	color: var(--acv-ink);
	box-shadow: none;
	letter-spacing: normal;
}
.acv-root img {
	max-width: none;
	border: 0;
	margin: 0;
	box-shadow: none;
}
.acv-root svg {
	display: block;
	width: 22px;
	height: 22px;
}
.acv-root p {
	margin: 0;
}

/* ---------- ไอคอนแชทบน Top Bar ---------- */
.atb-bar .acv-tb-btn {
	position: relative;
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: var(--atb-icon-color, #5f6368);
	transition: background-color .15s ease;
}
.atb-bar .acv-tb-btn:hover,
.atb-bar .acv-tb-btn:focus {
	background: rgba(60, 64, 67, .08);
	color: #202124;
}
.atb-bar .acv-tb-btn:focus-visible {
	outline: 2px solid #1a73e8;
	outline-offset: 2px;
}
.acv-tb-btn .acv-ico,
.acv-fab .acv-ico {
	display: block;
	width: 24px;
	height: 24px;
}
.atb-bar .acv-tb-divider {
	margin: 0 -6px;
}
/* ไม่มีเมนูไอคอนบนแถบ (หรือถูกซ่อนบนอุปกรณ์นี้) → ดันปุ่มแชทไปชิดขวา */
.atb-bar .atb-brand + .acv-tb-btn {
	margin-left: auto;
}
@media screen and (min-width: 1025px) {
	.atb-bar .atb-icons.atb-off-pc ~ .acv-tb-btn { margin-left: auto; }
}
@media screen and (min-width: 601px) and (max-width: 1024px) {
	.atb-bar .atb-icons.atb-off-tablet ~ .acv-tb-btn { margin-left: auto; }
}
@media screen and (max-width: 600px) {
	.atb-bar .atb-icons.atb-off-mobile ~ .acv-tb-btn { margin-left: auto; }
}
html.acv-open .atb-bar .acv-tb-btn {
	background: rgba(60, 64, 67, .08);
	color: #202124;
}

.acv-badge {
	position: absolute;
	top: 2px;
	right: 0;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	border-radius: 9px;
	background: var(--acv-red);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 18px;
	text-align: center;
	box-shadow: 0 0 0 2px #fff;
	pointer-events: none;
}

/* ปุ่มลอย (หน้าที่ไม่มี Top Bar) */
.acv-fab {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: calc(var(--acv-z) - 1);
	display: grid;
	place-items: center;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	background: var(--acv-accent);
	color: var(--acv-accent-ink);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
	transition: transform .15s ease;
}
.acv-fab:hover {
	transform: scale(1.05);
}
.acv-fab .acv-badge {
	top: -2px;
	right: -2px;
}
html.acv-open .acv-fab {
	display: none;
}
@media (max-width: 600px) {
	.acv-fab {
		right: 14px;
		bottom: calc(76px + env(safe-area-inset-bottom, 0px));
	}
}

/* ปุ่ม shortcode [andudo_contact_admin] — หน้าตาเดิมของ v1 */
.andudo-contact-admin {
	display: inline-block;
	margin: 10px 0;
}
.andudo-contact-btn {
	position: relative;
	background: #4caf50;
	color: #fff;
	border: none;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
	font-family: inherit;
	transition: all .3s;
}
.andudo-contact-btn:hover {
	background: #45a049;
	opacity: .9;
}
.andudo-unread-badge {
	position: absolute;
	top: -6px;
	right: -6px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 9px;
	background: var(--acv-red);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	box-shadow: 0 0 0 2px #fff;
}

/* ---------- กล่องหลัก ---------- */
.acv-float {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: var(--acv-z);
	width: 380px;
	height: min(640px, calc(100vh - 100px));
	height: min(640px, calc(100dvh - 100px));
	max-height: calc(100vh - 40px);
}
.acv-panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	overflow: hidden;
	background: var(--acv-surface);
	color: var(--acv-ink);
	font-size: 15px;
	line-height: 1.45;
	text-align: left;
}
.acv-float .acv-panel {
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .18), 0 0 0 1px rgba(0, 0, 0, .05);
	animation: acv-pop .16s ease-out;
}
@keyframes acv-pop {
	from { opacity: 0; transform: translateY(12px) scale(.98); }
	to { opacity: 1; transform: none; }
}
@media (max-width: 600px) {
	.acv-float {
		top: var(--acv-vtop, 0px);
		right: 0;
		bottom: auto;
		left: 0;
		width: 100%;
		height: var(--acv-vh, 100vh);
		max-height: none;
	}
	@supports (height: 100dvh) {
		.acv-float {
			height: var(--acv-vh, 100dvh);
		}
	}
	.acv-float .acv-panel {
		border-radius: 0;
		box-shadow: none;
		animation: acv-up .18s ease-out;
	}
	html.acv-lock,
	html.acv-lock body {
		overflow: hidden !important;
	}
}
@keyframes acv-up {
	from { transform: translateY(24px); opacity: .6; }
	to { transform: none; opacity: 1; }
}

/* แบบฝังในหน้า [andudo_chat_admin] */
.acv-embedded {
	position: relative;
	scroll-margin-top: calc(var(--atb-admin-offset, 0px) + var(--atb-height, 0px) + 12px);
	width: 100%;
	height: calc(100vh - 160px);
	min-height: 520px;
	margin: 0 0 24px;
}
.acv-embedded .acv-panel {
	border: 1px solid var(--acv-line);
	border-radius: 14px;
}
.acv-embedded.acv-wide .acv-panel {
	display: grid;
	grid-template-columns: minmax(280px, 340px) 1fr;
	grid-template-rows: auto 1fr;
}
.acv-embedded.acv-wide .acv-notice {
	grid-column: 1 / -1;
}
.acv-embedded.acv-wide .acv-v-inbox {
	grid-row: 2;
	grid-column: 1;
	border-right: 1px solid var(--acv-line);
}
.acv-embedded.acv-wide .acv-v-thread,
.acv-embedded.acv-wide .acv-v-empty {
	grid-row: 2;
	grid-column: 2;
}
.acv-embedded.acv-wide .acv-back {
	display: none;
}
.acv-embed-loading {
	padding: 40px;
	text-align: center;
	color: var(--acv-ink-2);
}

.acv-notice {
	padding: 8px 14px;
	background: #fff4e5;
	color: #8a4b00;
	font-size: 13px;
}

.acv-view {
	position: relative;
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

/* ---------- หัว ---------- */
.acv-head {
	display: flex;
	align-items: center;
	gap: 8px;
	min-height: 60px;
	padding: 10px 8px 10px 14px;
	border-bottom: 1px solid var(--acv-line);
	background: var(--acv-surface);
	flex-shrink: 0;
}
.acv-head .acv-back {
	margin-left: -8px;
}
.acv-head-txt {
	flex: 1;
	min-width: 0;
}
.acv-title {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.acv-sub {
	font-size: 12px;
	color: var(--acv-ink-2);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.acv-sub.is-online {
	color: #1e9e57;
}
.acv-root .acv-ib {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	color: #54656f;
	transition: background-color .15s ease;
}
.acv-root .acv-ib:hover,
.acv-root .acv-ib:focus-visible,
.acv-root .acv-ib.is-on {
	background: rgba(0, 0, 0, .06);
}
.acv-root .acv-ib:focus-visible {
	outline: 2px solid #1a73e8;
	outline-offset: -2px;
}
.acv-root .acv-bell.is-on {
	color: var(--acv-accent);
	background: none;
}

.acv-avw {
	position: relative;
	flex-shrink: 0;
	display: inline-block;
	width: 40px;
	height: 40px;
}
.acv-root .acv-av {
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	background: #dfe5ea;
}
.acv-av-ph {
	color: #fff;
	background: #9aa5ad !important;
	font-weight: 600;
	font-size: 16px;
	text-transform: uppercase;
}
.acv-dot {
	position: absolute;
	right: 0;
	bottom: 0;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #31c46c;
	box-shadow: 0 0 0 2px var(--acv-surface);
}
.acv-tag {
	flex-shrink: 0;
	padding: 1px 6px;
	border-radius: 6px;
	background: #fff1d6;
	color: #9a6400;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.5;
}

/* ---------- แถบเปิดการแจ้งเตือน ---------- */
.acv-pushbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 6px 8px 12px;
	background: #e9f7ef;
	color: #14532d;
	font-size: 13px;
	flex-shrink: 0;
}
.acv-pushbar-ic svg {
	width: 18px;
	height: 18px;
}
.acv-pushbar-txt {
	flex: 1;
	line-height: 1.3;
}
.acv-root .acv-pushbar-go {
	padding: 6px 12px;
	border-radius: 14px;
	background: var(--acv-accent);
	color: var(--acv-accent-ink);
	font-size: 13px;
	font-weight: 600;
	white-space: nowrap;
}
.acv-root .acv-pushbar-x {
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	color: #5b7363;
}
.acv-pushbar-x svg {
	width: 16px;
	height: 16px;
}

/* ---------- ข้อความ ---------- */
.acv-body {
	position: relative;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
	background: var(--acv-bg);
}
.acv-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 10px 14px;
	min-height: 100%;
	justify-content: flex-end;
}
.acv-loading {
	margin: auto;
	padding: 20px;
	color: var(--acv-ink-2);
	font-size: 13px;
	text-align: center;
}
.acv-root .acv-older {
	align-self: center;
	margin: 4px 0 8px;
	padding: 6px 14px;
	border-radius: 14px;
	background: rgba(0, 0, 0, .06);
	color: var(--acv-ink-2);
	font-size: 12px;
}
.acv-welcome {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 8px;
}
.acv-welcome .acv-small {
	text-align: center;
}
.acv-welcome-bubble {
	align-self: flex-start;
	max-width: 85%;
	white-space: pre-line;
}
.acv-day {
	display: flex;
	justify-content: center;
	margin: 10px 0 6px;
}
.acv-day span {
	padding: 3px 10px;
	border-radius: 10px;
	background: rgba(0, 0, 0, .12);
	color: #fff;
	font-size: 11px;
	font-weight: 500;
}

.acv-row {
	display: flex;
	align-items: flex-end;
	gap: 6px;
	max-width: 100%;
}
.acv-row.acv-gfirst {
	margin-top: 6px;
}
.acv-mine {
	justify-content: flex-end;
}
.acv-root .acv-row-av {
	flex-shrink: 0;
	align-self: flex-start;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	object-fit: cover;
	display: grid;
	place-items: center;
	font-size: 12px;
}
.acv-theirs:not(.acv-gfirst) .acv-row-av {
	visibility: hidden;
	height: 0;
}
.acv-col {
	display: flex;
	flex-direction: column;
	min-width: 0;
	max-width: 78%;
}
.acv-mine .acv-col {
	align-items: flex-end;
}
.acv-by {
	margin: 0 6px 2px;
	color: var(--acv-ink-2);
	font-size: 11px;
}
.acv-line {
	position: relative;
	display: flex;
	align-items: flex-end;
	gap: 4px;
	max-width: 100%;
}
.acv-mine .acv-line {
	flex-direction: row-reverse;
}

.acv-bubble {
	position: relative;
	min-width: 0;
	padding: 8px 12px;
	border-radius: var(--acv-radius);
	background: var(--acv-surface);
	color: var(--acv-ink);
	white-space: pre-wrap;
	word-break: break-word;
	overflow-wrap: anywhere;
	box-shadow: 0 1px 1px rgba(0, 0, 0, .06);
}
.acv-mine .acv-bubble {
	background: var(--acv-accent);
	color: var(--acv-accent-ink);
}
.acv-theirs.acv-gfirst .acv-bubble {
	border-top-left-radius: 6px;
}
.acv-mine.acv-gfirst .acv-bubble {
	border-top-right-radius: 6px;
}
.acv-bubble a {
	color: inherit;
	text-decoration: underline;
	word-break: break-all;
}
.acv-theirs .acv-bubble a {
	color: #0b62c4;
}
.acv-bubble.acv-deleted {
	background: transparent !important;
	color: var(--acv-ink-2) !important;
	font-style: italic;
	font-size: 13px;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.acv-img-bubble {
	padding: 0;
	overflow: hidden;
	background: #dfe5ea !important;
	line-height: 0;
}
.acv-root .acv-img {
	display: block;
	width: auto;
	height: auto;
	max-width: min(240px, 100%);
	max-height: 320px;
	object-fit: cover;
	cursor: zoom-in;
}
.acv-prog {
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: 8px;
	height: 4px;
	border-radius: 2px;
	background: rgba(255, 255, 255, .55);
	overflow: hidden;
}
.acv-prog span {
	display: block;
	width: 0;
	height: 100%;
	background: var(--acv-accent);
	transition: width .2s ease;
}

.acv-meta {
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	padding-bottom: 1px;
	color: var(--acv-ink-2);
	font-size: 10px;
	line-height: 1.25;
	white-space: nowrap;
}
.acv-mine .acv-meta {
	align-items: flex-end;
}
.acv-read {
	display: none;
}
.acv-row.is-read .acv-read {
	display: block;
}
.acv-root .acv-fail {
	display: flex;
	align-items: center;
	gap: 4px;
	color: var(--acv-red);
	font-size: 11px;
	white-space: normal;
	text-align: right;
	max-width: 110px;
}
.acv-fail svg {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}
.acv-root .acv-mbtn {
	display: grid;
	place-items: center;
	align-self: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	color: var(--acv-ink-2);
	opacity: 0;
	transition: opacity .12s ease;
}
.acv-mbtn svg {
	width: 16px;
	height: 16px;
}
.acv-line:hover .acv-mbtn,
.acv-root .acv-mbtn:focus-visible {
	opacity: 1;
}
@media (pointer: coarse) {
	.acv-root .acv-mbtn {
		display: none;
	}
	.acv-bubble {
		-webkit-user-select: none;
		user-select: none;
		-webkit-touch-callout: none;
	}
}

.acv-typing {
	display: flex;
	gap: 4px;
	padding: 12px 14px;
}
.acv-typing i {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #9aa5ad;
	animation: acv-blink 1.2s infinite ease-in-out;
}
.acv-typing i:nth-child(2) { animation-delay: .15s; }
.acv-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes acv-blink {
	0%, 80%, 100% { opacity: .3; transform: translateY(0); }
	40% { opacity: 1; transform: translateY(-3px); }
}
.acv-typing-row {
	padding-left: 36px;
	margin-top: 6px;
}

.acv-root .acv-jump {
	position: absolute;
	left: 50%;
	bottom: 76px;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 4px;
	padding: 6px 12px 6px 8px;
	border-radius: 16px;
	background: var(--acv-surface);
	color: var(--acv-ink);
	font-size: 12px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
	transform: translateX(-50%);
}
.acv-jump svg {
	width: 16px;
	height: 16px;
}

/* ---------- ช่องพิมพ์ ---------- */
.acv-compose {
	display: flex;
	align-items: flex-end;
	gap: 4px;
	padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--acv-line);
	background: var(--acv-surface);
	flex-shrink: 0;
}
.acv-root .acv-ta {
	flex: 1;
	min-width: 0;
	height: 40px;
	max-height: 132px;
	padding: 9px 14px;
	border: 0;
	border-radius: 20px;
	background: #f0f2f5;
	font-size: 15px;
	line-height: 22px;
	resize: none;
	outline: none;
	overflow-y: auto;
}
.acv-root .acv-ta:focus {
	background: #e9ecef;
}
@media (max-width: 600px) {
	.acv-root .acv-ta {
		font-size: 16px; /* iOS ไม่ซูมหน้าเว็บตอนแตะช่องพิมพ์ */
	}
}
.acv-root .acv-attach {
	width: 40px;
	height: 40px;
}
.acv-root .acv-send {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	color: var(--acv-accent);
	transition: opacity .15s ease, background-color .15s ease;
}
.acv-root .acv-send:not(:disabled):hover {
	background: rgba(0, 0, 0, .05);
}
.acv-root .acv-send:disabled {
	opacity: .35;
}

.acv-drop {
	position: absolute;
	inset: 0;
	z-index: 5;
	display: grid;
	place-items: center;
	background: rgba(6, 199, 85, .12);
	border: 2px dashed var(--acv-accent);
	color: #0b6b33;
	font-weight: 600;
	pointer-events: none;
}

/* ---------- inbox ---------- */
.acv-search {
	position: relative;
	padding: 8px 12px 4px;
	flex-shrink: 0;
}
.acv-search-ic {
	position: absolute;
	left: 22px;
	top: 50%;
	margin-top: 2px;
	transform: translateY(-50%);
	color: var(--acv-ink-2);
	pointer-events: none;
}
.acv-search-ic svg {
	width: 18px;
	height: 18px;
}
.acv-root .acv-search-in {
	width: 100%;
	height: 38px;
	padding: 0 12px 0 36px;
	border: 0;
	border-radius: 19px;
	background: #f0f2f5;
	font-size: 14px;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
}
.acv-tabs {
	display: flex;
	gap: 6px;
	padding: 6px 12px 8px;
	flex-shrink: 0;
}
.acv-root .acv-tab {
	padding: 4px 12px;
	border-radius: 14px;
	background: #f0f2f5;
	color: var(--acv-ink-2);
	font-size: 13px;
}
.acv-root .acv-tab.is-on {
	background: #e3f6ea;
	color: #0b6b33;
	font-weight: 600;
}
.acv-iscroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
}
.acv-ihint {
	padding: 24px 16px;
	color: var(--acv-ink-2);
	font-size: 13px;
	text-align: center;
}
.acv-root .acv-irow {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 10px 14px;
	text-align: left;
	transition: background-color .12s ease;
}
.acv-root .acv-irow:hover {
	background: #f5f6f6;
}
.acv-root .acv-irow.is-active {
	background: #eef6f1;
}
.acv-irow .acv-avw,
.acv-irow .acv-av {
	width: 46px;
	height: 46px;
}
.acv-irow-main {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}
.acv-irow-top,
.acv-irow-bot {
	display: flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
}
.acv-irow-name {
	flex: 0 1 auto;
	min-width: 0;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.acv-irow-time {
	margin-left: auto;
	flex-shrink: 0;
	color: var(--acv-ink-2);
	font-size: 12px;
}
.acv-irow-last {
	flex: 1;
	min-width: 0;
	color: var(--acv-ink-2);
	font-size: 13px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.acv-irow.is-unread .acv-irow-name,
.acv-irow.is-unread .acv-irow-last {
	color: var(--acv-ink);
	font-weight: 600;
}
.acv-irow.is-unread .acv-irow-time {
	color: #1e9e57;
}
.acv-count {
	flex-shrink: 0;
	min-width: 20px;
	height: 20px;
	padding: 0 6px;
	border-radius: 10px;
	background: var(--acv-accent);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
}
.acv-v-empty {
	align-items: center;
	justify-content: center;
	gap: 10px;
	background: var(--acv-bg);
	color: var(--acv-ink-2);
	font-size: 14px;
}
.acv-empty-ic svg {
	width: 56px;
	height: 56px;
	opacity: .5;
}
.acv-root .acv-new.is-on {
	color: var(--acv-accent);
}

/* ---------- guest ---------- */
.acv-guest-body {
	display: flex;
	flex-direction: column;
	gap: 12px;
	flex: 1;
	overflow-y: auto;
	padding: 18px 16px;
	background: var(--acv-bg);
}
.acv-guest-form {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
	border-radius: 14px;
	background: var(--acv-surface);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
}
.acv-label {
	font-weight: 600;
}
.acv-root .acv-input {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	border: 1px solid #d5dbe0;
	border-radius: 10px;
	background: #fff;
	font-size: 16px;
	outline: none;
}
.acv-root .acv-input:focus {
	border-color: var(--acv-accent);
	box-shadow: 0 0 0 3px rgba(6, 199, 85, .15);
}
.acv-root .acv-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
}
.acv-root .acv-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 18px;
	border-radius: 22px;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
}
.acv-root .acv-btn-primary {
	background: var(--acv-accent);
	color: var(--acv-accent-ink);
}
.acv-root .acv-btn-primary:disabled {
	opacity: .45;
}
.acv-root .acv-btn-ghost {
	border: 1px solid #c9d1d7;
	background: var(--acv-surface);
	color: var(--acv-ink);
}
.acv-root .acv-btn-ghost:hover {
	color: var(--acv-ink);
	background: #f6f7f8;
}
.acv-or {
	color: var(--acv-ink-2);
	font-size: 12px;
	text-align: center;
}
.acv-small {
	color: var(--acv-ink-2);
	font-size: 12px;
	line-height: 1.4;
}
.acv-err {
	color: var(--acv-red);
	font-size: 13px;
}

/* ---------- เมนู / lightbox / toast ---------- */
.acv-menu {
	position: absolute;
	z-index: 20;
	min-width: 170px;
	padding: 6px 0;
	border-radius: 12px;
	background: var(--acv-surface);
	box-shadow: 0 8px 28px rgba(0, 0, 0, .2), 0 0 0 1px rgba(0, 0, 0, .05);
}
.acv-root .acv-menu-i {
	display: block;
	width: 100%;
	padding: 10px 16px;
	text-align: left;
	font-size: 14px;
	color: var(--acv-ink);
}
.acv-root .acv-menu-i:hover {
	background: #f5f6f6;
}
.acv-root .acv-menu-i.is-danger {
	color: var(--acv-red);
}

.acv-lightbox {
	position: fixed;
	inset: 0;
	z-index: calc(var(--acv-z) + 10);
	display: grid;
	place-items: center;
	padding: 48px 12px;
	background: rgba(0, 0, 0, .88);
}
.acv-lightbox img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 4px;
	cursor: zoom-out;
}
.acv-lb-open {
	position: absolute;
	left: 50%;
	bottom: 14px;
	transform: translateX(-50%);
	color: #fff !important;
	font-size: 13px;
	text-decoration: underline;
}
.acv-lightbox .acv-lb-x {
	position: absolute;
	top: 10px;
	right: 10px;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
}
.acv-lightbox svg {
	width: 22px;
	height: 22px;
}

.acv-toast {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: calc(var(--acv-z) + 5);
	display: flex;
	align-items: flex-start;
	max-width: min(360px, calc(100vw - 24px));
	border-radius: 14px;
	background: #fff;
	color: #111b21;
	box-shadow: 0 10px 30px rgba(0, 0, 0, .2), 0 0 0 1px rgba(0, 0, 0, .05);
	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
	transition: opacity .2s ease, transform .2s ease;
	font-size: 14px;
	line-height: 1.4;
}
.acv-toast.is-on {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}
.acv-toast .acv-toast-card {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
	padding: 12px 4px 12px 14px;
	text-align: left;
}
.acv-toast-av {
	flex-shrink: 0;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
}
.acv-toast-txt {
	display: flex;
	flex-direction: column;
	min-width: 0;
}
.acv-toast-txt strong {
	font-weight: 600;
}
.acv-toast-txt span {
	color: #54656f;
	font-size: 13px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.acv-toast .acv-toast-x {
	display: grid;
	place-items: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	margin: 6px 6px 0 0;
	border-radius: 50%;
	color: #8696a0;
}
.acv-toast svg {
	display: block;
	width: 16px;
	height: 16px;
}
@media (max-width: 600px) {
	.acv-toast {
		left: 12px;
		right: 12px;
		top: calc(56px + env(safe-area-inset-top, 0px));
		bottom: auto;
		max-width: none;
		transform: translateY(-12px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.acv-float .acv-panel,
	.acv-typing i,
	.acv-toast {
		animation: none !important;
		transition: none !important;
	}
}

@media print {
	.acv-root:not(.acv-embedded),
	.acv-fab,
	.acv-toast {
		display: none !important;
	}
}
