/* Netrep Support Bot widget — scoped under #netrep-bot to avoid theme collisions.
   Clean, light, corporate; accent is set inline from the plugin setting. */

#netrep-bot,
#netrep-bot * {
	box-sizing: border-box;
}

#netrep-bot {
	--nb-accent: #374151;
	--nb-bg: #ffffff;
	--nb-panel: #f7f8fa;
	--nb-text: #1f2329;
	--nb-muted: #6b7280;
	--nb-border: #e3e6ea;
	--nb-radius: 14px;
	--nb-shadow: 0 12px 32px rgba(17, 24, 39, 0.18);
	position: fixed;
	right: 22px;
	bottom: 22px;
	z-index: 2147483000;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--nb-text);
}

/* Launcher bubble */
#netrep-bot .nb-launch {
	display: flex;
	align-items: center;
	gap: 9px;
	border: none;
	cursor: pointer;
	background: var(--nb-accent);
	color: #fff;
	padding: 13px 18px;
	border-radius: 999px;
	box-shadow: var(--nb-shadow);
	font-size: 15px;
	font-weight: 600;
	transition: transform 0.15s ease, filter 0.15s ease;
}
#netrep-bot .nb-launch:hover { filter: brightness(1.07); transform: translateY(-1px); }
#netrep-bot .nb-launch svg { width: 20px; height: 20px; }

/* Panel */
#netrep-bot .nb-panel {
	position: absolute;
	right: 0;
	bottom: 64px;
	width: 374px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 120px);
	background: var(--nb-bg);
	border: 1px solid var(--nb-border);
	border-radius: var(--nb-radius);
	box-shadow: var(--nb-shadow);
	display: none;
	flex-direction: column;
	overflow: hidden;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.16s ease, transform 0.16s ease;
}
#netrep-bot.nb-open .nb-panel { display: flex; opacity: 1; transform: translateY(0); }
#netrep-bot.nb-open .nb-launch { display: none; }

/* Header — white strip so a grey logo reads; accent stays on launcher/bubbles/send */
#netrep-bot .nb-head {
	background: #ffffff;
	color: var(--nb-text);
	border-bottom: 1px solid var(--nb-border);
	padding: 10px 12px 10px 14px;
	min-height: 52px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
#netrep-bot .nb-head .nb-title { font-weight: 600; font-size: 15px; }
#netrep-bot .nb-logo { flex: 0 0 auto; background-repeat: no-repeat; }
#netrep-bot .nb-close {
	background: transparent; border: none; color: var(--nb-muted); cursor: pointer;
	font-size: 22px; line-height: 1; padding: 4px;
}
#netrep-bot .nb-close:hover { color: var(--nb-text); }
#netrep-bot .nb-reset {
	margin-left: auto; background: transparent; border: none; color: var(--nb-muted);
	cursor: pointer; padding: 4px; display: inline-flex; align-items: center;
}
#netrep-bot .nb-reset:hover { color: var(--nb-text); }
#netrep-bot .nb-reset svg { width: 17px; height: 17px; }

/* Message list */
#netrep-bot .nb-log {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	background: var(--nb-panel);
	display: flex;
	flex-direction: column;
	gap: 10px;
}
#netrep-bot .nb-msg { max-width: 86%; padding: 10px 13px; border-radius: 13px; white-space: pre-wrap; word-wrap: break-word; }
#netrep-bot .nb-bot  { align-self: flex-start; background: #fff; border: 1px solid var(--nb-border); border-bottom-left-radius: 4px; }
#netrep-bot .nb-user { align-self: flex-end; background: var(--nb-accent); color: #fff; border-bottom-right-radius: 4px; }
#netrep-bot .nb-msg p { margin: 0 0 8px; }
#netrep-bot .nb-msg p:last-child { margin-bottom: 0; }
#netrep-bot .nb-msg ul { margin: 6px 0; padding-left: 18px; }
#netrep-bot .nb-msg table { border-collapse: collapse; margin: 6px 0; font-size: 13px; width: 100%; }
#netrep-bot .nb-msg th, #netrep-bot .nb-msg td { border: 1px solid var(--nb-border); padding: 4px 7px; text-align: left; }
#netrep-bot .nb-bot table th { background: var(--nb-panel); }

/* Clickable quick-reply option chips */
#netrep-bot .nb-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
#netrep-bot .nb-opt {
	border: 1px solid var(--nb-accent); color: var(--nb-accent); background: #fff;
	border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px;
	cursor: pointer; transition: background 0.12s ease, color 0.12s ease;
}
#netrep-bot .nb-opt:hover:not(:disabled) { background: var(--nb-accent); color: #fff; }
#netrep-bot .nb-opt:disabled { opacity: 0.45; cursor: default; }

/* Typing indicator */
#netrep-bot .nb-typing { display: inline-flex; gap: 4px; align-items: center; }
#netrep-bot .nb-typing span {
	width: 7px; height: 7px; border-radius: 50%; background: var(--nb-muted);
	animation: nb-bounce 1.2s infinite ease-in-out;
}
#netrep-bot .nb-typing span:nth-child(2) { animation-delay: 0.15s; }
#netrep-bot .nb-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes nb-bounce { 0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; } 40% { transform: scale(1); opacity: 1; } }

/* Composer */
#netrep-bot .nb-foot { border-top: 1px solid var(--nb-border); padding: 10px; background: var(--nb-bg); }
#netrep-bot .nb-row { display: flex; gap: 8px; align-items: flex-end; }
#netrep-bot .nb-input {
	flex: 1; resize: none; border: 1px solid var(--nb-border); border-radius: 10px;
	padding: 9px 11px; font: inherit; max-height: 120px; min-height: 40px; outline: none;
}
#netrep-bot .nb-input:focus { border-color: var(--nb-accent); }
#netrep-bot .nb-send {
	border: none; background: var(--nb-accent); color: #fff; border-radius: 10px;
	width: 40px; height: 40px; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
#netrep-bot .nb-send:disabled { opacity: 0.5; cursor: default; }
#netrep-bot .nb-send svg { width: 18px; height: 18px; }
#netrep-bot .nb-consent { font-size: 11px; color: var(--nb-muted); margin: 7px 2px 0; }
#netrep-bot .nb-consent a { color: var(--nb-accent); }

@media (max-width: 480px) {
	#netrep-bot { right: 12px; bottom: 12px; }
	#netrep-bot .nb-panel { width: calc(100vw - 24px); height: calc(100vh - 96px); }
}
@media (prefers-reduced-motion: reduce) {
	#netrep-bot .nb-panel, #netrep-bot .nb-launch { transition: none; }
	#netrep-bot .nb-typing span { animation: none; }
}
