/* Landing Support Button — frontend */
.lsb, .lsb * , .lsb-inline, .lsb-inline * { box-sizing: border-box; }

.lsb {
	--lsb-color: #25d366;
	--lsb-text: #fff;
	--lsb-x: 20px;
	--lsb-y: 20px;
	position: fixed;
	bottom: var(--lsb-y);
	z-index: 99999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #1f2933;
}
.lsb--right { right: var(--lsb-x); align-items: flex-end; }
.lsb--left  { left: var(--lsb-x);  align-items: flex-start; }

.lsb--wait { opacity: 0; visibility: hidden; transform: translateY(12px); }
.lsb--wait.lsb--ready { opacity: 1; visibility: visible; transform: none; transition: opacity .35s, transform .35s; }

/* Tombol */
.lsb__toggle {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 56px;
	padding: 0 22px 0 16px;
	border-radius: 999px;
	background: var(--lsb-color);
	color: var(--lsb-text);
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .22);
	transition: transform .15s ease, box-shadow .15s ease;
}
.lsb__toggle:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(0, 0, 0, .26); }
.lsb__toggle:focus-visible { outline: 3px solid rgba(0, 0, 0, .35); outline-offset: 2px; }
.lsb--icon .lsb__toggle { width: 60px; height: 60px; padding: 0; justify-content: center; }

.lsb__toggle-icon { display: inline-flex; width: 28px; height: 28px; }
.lsb__toggle-icon svg { width: 100%; height: 100%; }
.lsb__toggle-icon--close { display: none; }
.lsb.is-open .lsb__toggle-icon--open { display: none; }
.lsb.is-open .lsb__toggle-icon--close { display: inline-flex; }
.lsb.is-open .lsb__label { display: none; }
.lsb.is-open:not(.lsb--icon) .lsb__toggle { padding: 0 16px; }

.lsb__label { font-size: 14px; line-height: 1.25; white-space: nowrap; }
.lsb__label strong { font-weight: 700; }

/* Panel */
.lsb__panel {
	width: 340px;
	max-width: calc(100vw - 2 * var(--lsb-x));
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
	transform-origin: bottom right;
	animation: lsb-pop .22s ease;
}
.lsb--left .lsb__panel { transform-origin: bottom left; }
.lsb__panel[hidden] { display: none; }
@keyframes lsb-pop { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

.lsb__head { position: relative; padding: 20px 52px 18px 20px; background: var(--lsb-color); color: var(--lsb-text); }
.lsb__title { font-size: 18px; font-weight: 700; line-height: 1.25; }
.lsb__desc { margin-top: 6px; font-size: 13px; opacity: .92; }
.lsb__desc a { color: inherit; text-decoration: underline; }
.lsb__close {
	all: unset;
	position: absolute;
	top: 12px;
	right: 12px;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	cursor: pointer;
	color: var(--lsb-text);
	opacity: .85;
}
.lsb__close:hover { opacity: 1; background: rgba(255, 255, 255, .18); }
.lsb__close:focus-visible { outline: 2px solid var(--lsb-text); }
.lsb__close svg { width: 16px; height: 16px; }

.lsb__body { max-height: min(60vh, 420px); overflow-y: auto; padding: 14px 14px 16px; background: #f6f7f9; }
.lsb__note { margin: 0 0 12px 4px; font-size: 12px; color: #6b7280; }
.lsb__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lsb__item { margin: 0; padding: 0; }

.lsb__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-left: 4px solid var(--lsb-color);
	border-radius: 10px;
	color: inherit;
	text-decoration: none;
	transition: box-shadow .15s, transform .15s;
}
.lsb__link:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .1); transform: translateY(-1px); color: inherit; }
.lsb__link:focus-visible { outline: 2px solid var(--lsb-color); outline-offset: 2px; }
.is-offline .lsb__link { border-left-color: #cbd2d9; }
.is-offline .lsb__avatar img, .is-offline .lsb__initial { filter: grayscale(1); opacity: .7; }

.lsb__avatar { position: relative; flex: 0 0 48px; width: 48px; height: 48px; }
.lsb__avatar img, .lsb__initial {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	object-fit: cover;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lsb__initial { background: var(--lsb-color); color: var(--lsb-text); font-size: 20px; font-weight: 700; }
.lsb__badge {
	position: absolute;
	right: -3px;
	bottom: -3px;
	width: 20px;
	height: 20px;
	padding: 3px;
	border-radius: 50%;
	border: 2px solid #fff;
	background: #6b7280;
	color: #fff;
	display: flex;
}
.lsb__badge svg { width: 100%; height: 100%; }
.lsb__badge--whatsapp { background: #25d366; }
.lsb__badge--telegram { background: #229ed9; }
.lsb__badge--phone    { background: #3b82f6; }
.lsb__badge--email    { background: #ef6c4d; }

.lsb__info { display: flex; flex-direction: column; min-width: 0; }
.lsb__role { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; }
.lsb__name { font-size: 15px; font-weight: 600; color: #111827; }
.lsb__status { margin-top: 2px; font-size: 11px; color: #b45309; }

/* Tampilkan sesuai perangkat */
@media (min-width: 769px) { .lsb--no-desktop { display: none; } }
@media (max-width: 768px) {
	.lsb--no-mobile { display: none; }
	.lsb__panel { width: 100%; }
	.lsb { max-width: calc(100vw - 2 * var(--lsb-x)); }
}
@media (prefers-reduced-motion: reduce) {
	.lsb__panel, .lsb__toggle, .lsb__link, .lsb--wait.lsb--ready { animation: none; transition: none; }
}

/* Shortcode [lsb_button] */
.lsb-inline {
	--lsb-color: #25d366;
	--lsb-text: #fff;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 14px 26px;
	border-radius: 999px;
	background: var(--lsb-color);
	color: var(--lsb-text);
	font-weight: 600;
	text-decoration: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .15);
	transition: transform .15s, box-shadow .15s;
}
.lsb-inline:hover { color: var(--lsb-text); transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .2); }
.lsb-inline__icon { display: inline-flex; width: 22px; height: 22px; }
.lsb-inline__icon svg { width: 100%; height: 100%; }

/* ===== v1.2.0 ===== */
/* Titik notifikasi */
.lsb__toggle { position: relative; }
.lsb__dot {
	display: none;
	position: absolute;
	top: 2px;
	right: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #ff3b30;
	border: 2px solid #fff;
}
.lsb--notify:not(.lsb--seen) .lsb__dot { display: block; }
.lsb.is-open .lsb__dot { display: none; }

/* Denyut */
.lsb--pulse:not(.is-open):not(.lsb--seen) .lsb__toggle::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	box-shadow: 0 0 0 0 var(--lsb-color);
	opacity: .55;
	animation: lsb-pulse 2.4s ease-out infinite;
	pointer-events: none;
}
@keyframes lsb-pulse { 0% { box-shadow: 0 0 0 0 var(--lsb-color); opacity: .55; } 70% { box-shadow: 0 0 0 16px var(--lsb-color); opacity: 0; } 100% { box-shadow: 0 0 0 0 var(--lsb-color); opacity: 0; } }

/* Balon sapaan */
.lsb__greeting {
	position: relative;
	max-width: 260px;
	padding: 12px 34px 12px 16px;
	background: #fff;
	color: #1f2933;
	border-radius: 14px;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .18);
	animation: lsb-pop .3s ease;
	cursor: pointer;
}
.lsb__greeting[hidden] { display: none; }
.lsb--right .lsb__greeting { border-bottom-right-radius: 4px; }
.lsb--left .lsb__greeting { border-bottom-left-radius: 4px; }
.lsb__greeting-text { display: block; font-size: 14px; font-weight: 500; }
.lsb__greeting-close {
	all: unset;
	position: absolute;
	top: 6px;
	right: 8px;
	width: 22px;
	height: 22px;
	text-align: center;
	line-height: 22px;
	font-size: 18px;
	color: #9aa5b1;
	cursor: pointer;
}
.lsb__greeting-close:hover { color: #1f2933; }

/* Form lead offline */
.lsb__form { display: flex; flex-direction: column; gap: 8px; margin: 0 0 14px; }
.lsb__form input[type="text"], .lsb__form input[type="tel"] {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid #d5dae1;
	border-radius: 10px;
	font-size: 14px;
	background: #fff;
	color: #1f2933;
	box-shadow: none;
}
.lsb__form input:focus { outline: 2px solid var(--lsb-color); outline-offset: 1px; border-color: transparent; }
.lsb__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.lsb__submit {
	all: unset;
	box-sizing: border-box;
	text-align: center;
	padding: 11px 14px;
	border-radius: 10px;
	background: var(--lsb-color);
	color: var(--lsb-text);
	font-weight: 600;
	cursor: pointer;
}
.lsb__submit:hover { filter: brightness(.95); }
.lsb__submit:disabled { opacity: .6; cursor: default; }
.lsb__form-msg { margin: 0; font-size: 12px; min-height: 1em; }
.lsb__form-msg.is-ok { color: #15803d; }
.lsb__form-msg.is-error { color: #b91c1c; }
.lsb--offline .lsb__list { opacity: .95; }

@media (prefers-reduced-motion: reduce) {
	.lsb--pulse .lsb__toggle::after, .lsb__greeting { animation: none; }
}

/* ===== v1.3.0 ===== */
.lsb__prechat { margin: 0 0 12px; }
.lsb__prechat-input {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #d5dae1;
	border-radius: 10px;
	font-size: 14px;
	background: #fff;
	color: #1f2933;
	box-shadow: none;
}
.lsb__prechat-input:focus { outline: 2px solid var(--lsb-color); outline-offset: 1px; border-color: transparent; }
.lsb__prechat-input.is-error { border-color: #dc2626; background: #fef2f2; }

.lsb__topics { margin: 0 0 12px; }
.lsb__topics-title { display: block; margin: 0 0 6px 2px; font-size: 12px; color: #6b7280; }
.lsb__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lsb__chip {
	all: unset;
	box-sizing: border-box;
	padding: 6px 12px;
	border: 1px solid #d5dae1;
	border-radius: 999px;
	background: #fff;
	color: #1f2933;
	font-size: 13px;
	cursor: pointer;
	transition: all .15s;
}
.lsb__chip:hover { border-color: var(--lsb-color); }
.lsb__chip:focus-visible { outline: 2px solid var(--lsb-color); outline-offset: 2px; }
.lsb__chip.is-active { background: var(--lsb-color); border-color: var(--lsb-color); color: var(--lsb-text); font-weight: 600; }
.lsb__item[hidden] { display: none; }

/* Preset: minimal */
.lsb--style-minimal .lsb__toggle { box-shadow: 0 2px 8px rgba(0, 0, 0, .18); }
.lsb--style-minimal .lsb__panel { border-radius: 10px; box-shadow: 0 6px 24px rgba(0, 0, 0, .15); border: 1px solid #e5e7eb; }
.lsb--style-minimal .lsb__head { background: #fff; color: #111827; border-bottom: 1px solid #eef0f3; }
.lsb--style-minimal .lsb__close { color: #6b7280; }
.lsb--style-minimal .lsb__close:hover { background: #f3f4f6; }
.lsb--style-minimal .lsb__body { background: #fff; }
.lsb--style-minimal .lsb__link { border: 1px solid #e5e7eb; border-left-width: 1px; border-radius: 8px; }
.lsb--style-minimal .lsb__link:hover { transform: none; box-shadow: none; border-color: var(--lsb-color); }

/* Preset: dark */
.lsb--style-dark .lsb__panel { background: #111827; box-shadow: 0 14px 44px rgba(0, 0, 0, .5); }
.lsb--style-dark .lsb__body { background: #111827; }
.lsb--style-dark .lsb__note, .lsb--style-dark .lsb__topics-title, .lsb--style-dark .lsb__role { color: #9ca3af; }
.lsb--style-dark .lsb__link { background: #1f2937; border-color: #374151; border-left-color: var(--lsb-color); color: #f3f4f6; }
.lsb--style-dark .lsb__name { color: #f9fafb; }
.lsb--style-dark .lsb__status { color: #fbbf24; }
.lsb--style-dark .lsb__badge { border-color: #1f2937; }
.lsb--style-dark .lsb__chip, .lsb--style-dark .lsb__prechat-input, .lsb--style-dark .lsb__form input[type="text"], .lsb--style-dark .lsb__form input[type="tel"] { background: #1f2937; border-color: #374151; color: #f3f4f6; }
.lsb--style-dark .lsb__chip.is-active { background: var(--lsb-color); color: var(--lsb-text); }

/* Preset: square */
.lsb--style-square .lsb__toggle { border-radius: 14px; }
.lsb--style-square .lsb__panel { border-radius: 8px; }
.lsb--style-square .lsb__link, .lsb--style-square .lsb__chip, .lsb--style-square .lsb__prechat-input, .lsb--style-square .lsb__submit, .lsb--style-square .lsb__greeting { border-radius: 6px; }
.lsb--style-square .lsb__avatar img, .lsb--style-square .lsb__initial { border-radius: 8px; }
