/* Nefa Chat Widget — styling default (navy + pink, aksen biru muda opsional) */

#nefa-chat-root {
	--nefa-primary: #0B1F3A;
	--nefa-secondary: #FF5DA2;
	--nefa-accent: #8FD3FE;
	--nefa-bg: #F7F8FC;
	--nefa-text: #1A1A1A;
	position: fixed;
	left: 20px;
	bottom: 10px;
	z-index: 999999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

#nefa-chat-root[data-nefa-inline="1"] {
	position: static;
	max-width: 420px;
}

.nefa-bubble-btn {
	height: 34px;
	padding: 0 12px;
	border-radius: 999px;
	background: linear-gradient(135deg, var(--nefa-primary), var(--nefa-secondary));
	color: #fff;
	border: none;
	box-shadow: 0 4px 14px rgba(11, 31, 58, 0.35);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	font-family: inherit;
	white-space: nowrap;
	transition: transform 0.15s ease;
}

.nefa-bubble-btn svg {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
}

.nefa-bubble-btn:hover {
	transform: scale(1.04);
}

.nefa-panel {
	position: absolute;
	left: 0;
	bottom: 50px;
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 480px;
	max-height: calc(100vh - 140px);
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(11, 31, 58, 0.25);
	display: none;
	flex-direction: column;
	overflow: hidden;
}

.nefa-panel.nefa-open {
	display: flex;
}

.nefa-header {
	background: linear-gradient(120deg, var(--nefa-primary), #16305c);
	color: #fff;
	padding: 14px 16px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.nefa-header-avatar {
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--nefa-secondary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
}

.nefa-header-text strong {
	display: block;
	font-size: 14px;
}

.nefa-header-text span {
	display: block;
	font-size: 11px;
	opacity: 0.8;
}

.nefa-close-btn {
	margin-left: auto;
	background: transparent;
	border: none;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	line-height: 1;
	opacity: 0.85;
}

.nefa-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	background: var(--nefa-bg);
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.nefa-msg {
	max-width: 82%;
	padding: 9px 12px;
	border-radius: 14px;
	font-size: 13.5px;
	line-height: 1.45;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.nefa-msg-bot {
	align-self: flex-start;
	background: #fff;
	color: var(--nefa-text);
	border: 1px solid #E7EAF3;
	border-bottom-left-radius: 4px;
}

.nefa-msg-user {
	align-self: flex-end;
	background: var(--nefa-secondary);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.nefa-typing {
	align-self: flex-start;
	font-size: 12px;
	color: #8a8f9c;
	padding-left: 4px;
}

.nefa-input-row {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #ECEEF5;
	background: #fff;
}

.nefa-input-row textarea {
	flex: 1;
	resize: none;
	border: 1px solid #DDE1EC;
	border-radius: 10px;
	padding: 8px 10px;
	font-size: 13.5px;
	font-family: inherit;
	max-height: 70px;
}

.nefa-input-row textarea:focus {
	outline: none;
	border-color: var(--nefa-accent);
}

.nefa-send-btn {
	background: var(--nefa-primary);
	color: #fff;
	border: none;
	border-radius: 10px;
	padding: 0 16px;
	font-size: 13px;
	cursor: pointer;
}

.nefa-send-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.nefa-panel {
		width: calc(100vw - 24px);
		left: -8px;
	}
}
