/* HMH Browser — Slice 1: floating button + summary panel */

.hmhb-helper-btn {
	position: fixed;
	bottom: 24px;
	right: 24px;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	border: none;
	background: #1d2327;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hmhb-helper-btn:hover {
	transform: scale(1.05);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.hmhb-helper-icon {
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1;
}

/* Panel overlay */
.hmhb-panel-wrap {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease, visibility 0.2s ease;
}

.hmhb-panel-wrap.hmhb-panel-open {
	opacity: 1;
	visibility: visible;
}

.hmhb-panel-wrap[aria-hidden="true"] {
	pointer-events: none;
}

.hmhb-panel {
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	max-width: 480px;
	width: 100%;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	pointer-events: auto;
}

.hmhb-panel-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	border-bottom: 1px solid #dcdcde;
	position: relative;
	overflow: hidden;
}

.hmhb-viz-canvas {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}

.hmhb-panel-title {
	font-weight: 600;
	font-size: 1rem;
	position: relative;
	z-index: 1;
}

.hmhb-panel-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #50575e;
	padding: 0 4px;
	position: relative;
	z-index: 1;
}

.hmhb-panel-close:hover {
	color: #1d2327;
}

.hmhb-panel-body {
	padding: 16px;
	overflow-y: auto;
	flex: 1;
	min-height: 80px;
}

.hmhb-panel-loading {
	color: #50575e;
}

.hmhb-progress-track {
	height: 6px;
	background: #dcdcde;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 8px;
}

.hmhb-progress-bar {
	height: 100%;
	width: 0%;
	background: #2271b1;
	border-radius: 3px;
	transition: width 0.25s ease-out;
}

.hmhb-progress-label {
	font-size: 13px;
	color: #50575e;
}

.hmhb-panel-error {
	color: #b32d2e;
}

.hmhb-panel-content {
	word-wrap: break-word;
	line-height: 1.6;
	font-size: 14px;
	color: #1d2327;
}

.hmhb-panel-content p {
	margin: 0 0 10px 0;
}

.hmhb-panel-content p:last-child {
	margin-bottom: 0;
}

.hmhb-panel-content ul,
.hmhb-panel-content ol {
	margin: 6px 0 10px 0;
	padding-left: 20px;
}

.hmhb-panel-content li {
	margin-bottom: 4px;
	line-height: 1.5;
}

.hmhb-panel-content strong {
	font-weight: 600;
	color: #1d2327;
}

.hmhb-panel-content em {
	font-style: italic;
}

.hmhb-panel-content .hmhb-link {
	color: #2271b1;
	text-decoration: underline;
	cursor: pointer;
}

.hmhb-panel-content .hmhb-link:hover {
	color: #135e96;
}

.hmhb-panel-ask {
	margin-top: 12px;
}

.hmhb-whisper-area {
	text-align: center;
	padding: 10px 0;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #f9f9f9;
}

.hmhb-whisper-transcript {
	font-size: 15px;
	color: #1d2327;
	min-height: 28px;
	padding: 6px 12px;
	margin-bottom: 6px;
	word-wrap: break-word;
	line-height: 1.5;
}

.hmhb-whisper-transcript:empty {
	min-height: 0;
	margin-bottom: 0;
	padding: 0 12px;
}

.hmhb-whisper-transcript.hmhb-interim {
	color: #8c8f94;
	font-style: italic;
}

.hmhb-whisper-controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 0 12px;
}

.hmhb-whisper-indicator {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #50575e;
	font-size: 13px;
}

.hmhb-btn-whisper-send {
	padding: 5px 14px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 13px;
	font-weight: 600;
}

.hmhb-btn-whisper-send:hover {
	background: #135e96;
}

.hmhb-mic-pulse {
	display: inline-block;
	width: 10px;
	height: 10px;
	background: #b32d2e;
	border-radius: 50%;
	animation: hmhb-pulse 1.5s ease infinite;
}

@keyframes hmhb-pulse {
	0%, 100% { opacity: 1; transform: scale(1); }
	50% { opacity: 0.5; transform: scale(1.4); }
}

.hmhb-text-area {
	display: flex;
	gap: 8px;
}

.hmhb-btn-mic {
	padding: 8px 10px;
	background: #1d2327;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

.hmhb-btn-mic:hover {
	background: #2c3338;
}

.hmhb-input {
	flex: 1;
	padding: 8px 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 14px;
}

.hmhb-btn-ask,
.hmhb-btn-speak {
	padding: 8px 14px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 14px;
}

.hmhb-btn-ask:hover,
.hmhb-btn-speak:hover {
	background: #135e96;
}

.hmhb-btn-speak.hmhb-speak-loading {
	background: #8c8f94;
	cursor: wait;
}

.hmhb-btn-speak.hmhb-speak-playing {
	background: #b32d2e;
}

.hmhb-btn-speak.hmhb-speak-playing:hover {
	background: #8a2424;
}

.hmhb-nav-buttons {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 10px;
}

.hmhb-btn-navigate {
	width: 100%;
	padding: 10px 16px;
	background: #1d7b4e;
	color: #fff;
	border: none;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	text-align: left;
	transition: background 0.15s ease;
}

.hmhb-btn-navigate:hover {
	background: #15603c;
}

.hmhb-panel-actions {
	margin-top: 8px;
}

/* Finger overlay */
.hmhb-finger-wrap {
	position: fixed;
	inset: 0;
	pointer-events: none;
	z-index: 100000;
}

.hmhb-finger {
	position: fixed;
	width: 64px;
	height: 64px;
	margin-left: -32px;
	margin-top: 0;
	pointer-events: none;
	transition: left 0.4s ease, top 0.4s ease;
}

.hmhb-highlight {
	outline: 3px solid #2271b1;
	outline-offset: 2px;
	border-radius: 4px;
	transition: outline 0.2s ease;
}
