/* =========================================================================
 * Ebony Music Chatbot — Stylesheet
 * All selectors prefixed with em-bot- to avoid colliding with theme CSS.
 * ========================================================================= */

.em-bot-launcher,
.em-bot-panel,
.em-bot-panel * {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* === Launcher button (the floating bubble) === */
.em-bot-launcher {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: #111;
	color: #f5ebd9;
	border: 2px solid #f5ebd9;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	z-index: 999998;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	padding: 0;
}
.em-bot-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
}
.em-bot-launcher:focus-visible {
	outline: 3px solid #f5ebd9;
	outline-offset: 3px;
}
.em-bot-launcher svg {
	width: 28px;
	height: 28px;
}
.em-bot-launcher[aria-expanded="true"] {
	transform: scale(0.85);
	opacity: 0.6;
}

/* === The chat panel === */
.em-bot-panel {
	position: fixed;
	bottom: 100px;
	right: 24px;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 560px;
	max-height: calc(100vh - 140px);
	background: #fafafa;
	border-radius: 12px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
	z-index: 999999;
	display: none;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #111;
}
.em-bot-panel.em-bot-open {
	display: flex;
	animation: em-bot-rise 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
}
@keyframes em-bot-rise {
	from { opacity: 0; transform: translateY(12px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* Header */
.em-bot-header {
	background: #111;
	color: #f5ebd9;
	padding: 16px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #2a2a2a;
}
.em-bot-header-title {
	font-family: Georgia, "Times New Roman", serif;
	font-size: 18px;
	font-weight: normal;
	letter-spacing: 0.02em;
	margin: 0;
	line-height: 1.2;
	color: #f5ebd9;
}
.em-bot-header-sub {
	font-size: 11px;
	opacity: 0.7;
	margin-top: 2px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.em-bot-close {
	background: transparent;
	color: #f5ebd9;
	border: none;
	cursor: pointer;
	font-size: 22px;
	line-height: 1;
	padding: 4px 8px;
	border-radius: 4px;
}
.em-bot-close:hover { background: rgba(245, 235, 217, 0.1); }
.em-bot-close:focus-visible { outline: 2px solid #f5ebd9; outline-offset: 2px; }

/* Messages area */
.em-bot-messages {
	flex: 1;
	overflow-y: auto;
	padding: 18px 16px;
	background: #fafafa;
	background-image:
		linear-gradient(180deg, rgba(245, 235, 217, 0.15) 0%, rgba(245, 235, 217, 0) 60%);
}
.em-bot-messages::-webkit-scrollbar { width: 8px; }
.em-bot-messages::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

.em-bot-msg {
	margin-bottom: 12px;
	max-width: 88%;
	word-wrap: break-word;
	line-height: 1.5;
	font-size: 14px;
	animation: em-bot-msg-in 0.25s ease;
}
@keyframes em-bot-msg-in {
	from { opacity: 0; transform: translateY(4px); }
	to   { opacity: 1; transform: translateY(0); }
}
.em-bot-msg-bot {
	background: #fff;
	color: #111;
	padding: 10px 14px;
	border-radius: 14px 14px 14px 2px;
	border: 1px solid #e5e5e5;
	user-select: text;
}
.em-bot-msg-bot strong {
	font-family: Georgia, "Times New Roman", serif;
	font-weight: normal;
	font-style: italic;
}
.em-bot-msg-bot a {
	color: #111;
	text-decoration: underline;
	text-underline-offset: 2px;
}
.em-bot-msg-bot a:hover { color: #555; }
.em-bot-msg-user {
	background: #111;
	color: #f5ebd9;
	padding: 10px 14px;
	border-radius: 14px 14px 2px 14px;
	margin-left: auto;
	user-select: text;
}

/* Quick reply buttons */
.em-bot-quick-replies {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
	margin-bottom: 4px;
}
.em-bot-chip {
	background: #fff;
	color: #111;
	border: 1px solid #111;
	padding: 7px 12px;
	border-radius: 999px;
	font-size: 12.5px;
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
	font-family: inherit;
	text-align: left;
}
.em-bot-chip:hover { background: #111; color: #f5ebd9; }
.em-bot-chip:focus-visible {
	outline: 2px solid #111;
	outline-offset: 2px;
}

/* Input area */
.em-bot-input-area {
	border-top: 1px solid #e5e5e5;
	padding: 10px 12px;
	background: #fff;
	display: flex;
	gap: 8px;
	align-items: center;
}
.em-bot-input {
	flex: 1;
	border: 1px solid #ccc;
	background: #fafafa;
	padding: 9px 12px;
	border-radius: 999px;
	font-size: 14px;
	font-family: inherit;
	outline: none;
	color: #111;
}
.em-bot-input:focus {
	border-color: #111;
	background: #fff;
}
.em-bot-send {
	background: #111;
	color: #f5ebd9;
	border: none;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.em-bot-send:hover { background: #333; }
.em-bot-send:focus-visible { outline: 2px solid #111; outline-offset: 2px; }
.em-bot-send svg { width: 16px; height: 16px; }

/* Footer note */
.em-bot-footer-note {
	text-align: center;
	font-size: 10px;
	color: #888;
	padding: 6px 12px 8px;
	background: #fff;
	border-top: 1px solid #f0f0f0;
	letter-spacing: 0.04em;
}

/* Mobile */
@media (max-width: 480px) {
	.em-bot-panel {
		width: calc(100vw - 16px);
		right: 8px;
		bottom: 88px;
		height: calc(100vh - 110px);
	}
	.em-bot-launcher {
		bottom: 16px;
		right: 16px;
	}
}
