.chat-panel {
	width: 89%;
	max-width: 600px;
	background: #22242C;
	border-radius: 28px;
	padding: 9px 13px;
	margin: 0 auto;
	margin-left: 6px;
	margin-right: 6px;
	position: relative; 
	box-shadow: 0 -4px 8px rgba(0,0,0,0.4);
	z-index: 100;
}


.default-panel.recording .chat-panel {
	display: none !important;
}

.row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.btn-circle {
	background: #353944;
	border: none;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	cursor: pointer;
	flex-shrink: 0;
}

.btn-circle img {
	width: 24px;
	height: 24px;
}

.chat-input {
	flex: 1;
	background: #2e303a;
	color: #ddd;
	padding: 10px 14px;
	border-radius: 20px;
	border: 1px solid #444;
	font-size: 16px;
	line-height: 1.5;
	max-height: 90px;
	overflow-y: auto;
	white-space: pre-wrap;
	word-break: break-word;
	outline: none;
}

.chat-menu, .chat-tooltip-box {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 0;
	background: #2E303A;

	border-radius: 22px;
	padding: 8px 12px;
	box-shadow: 0 2px 6px rgba(0,0,0,0.4);
	display: flex;
	flex-direction: column;
	gap: 6px;
	z-index: 5;
	opacity: 0;
	pointer-events: none;
	transform: translateY(6px);
	transition: opacity 0.2s ease, transform 0.2s ease;
	min-width: 140px;
}

#tooltipBox {
  max-width: 95vw;
  box-sizing: border-box;
  word-break: break-word;
}


html {
  -webkit-text-size-adjust: 100%;
}




.chat-menu.show, .chat-tooltip-box.show {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0);
}

.chat-menu button, .chat-tip {
	background: none;
	border: none;
	display: flex;
	align-items: center;
	color: #dedede;
	cursor: pointer;
	padding: 6px 10px;
	border-radius: 12px;
	font-size: 16px;
	line-height: 1.5;
	gap: 8px;
	width: 100%;
	text-align: left;
	opacity: 0.99;
}


.chat-menu img {
	width: 24px;
	height: 24px;
}

.chat-tip:hover, .chat-menu button:hover {
	background: rgba(255,255,255,0.05);
}

.action-btn {
	position: relative;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	flex-shrink: 0;
	z-index: 1;
	border: none;
}

.action-btn img {
	width: 66%;
}

#startBtn {
	position: relative;
	background-color: #28a745;
	animation: pulse-shadow 1.5s infinite ease-in-out;
	z-index: 200;
}

@keyframes pulse-shadow {
	0%   { box-shadow: 0 0 0   0 rgba(40,167,69,0.4); }
	70%  { box-shadow: 0 0 0  28px rgba(40,167,69,0); }
	100% { box-shadow: 0 0 0   0 rgba(40,167,69,0); }
}

.record-ui {
	position: fixed;
	bottom: 0px;
	left: 50%;
	transform: translateX(-50%);
	width: calc(90% - 16px);
	max-width: 640px;
	background: #22242C;
	border-radius: 26px;
	padding: 0 20px;
	height: 130px;
	display: flex;
	justify-content: space-between;
	gap: 10px;
	opacity: 0;
	pointer-events: none;
	transition: 0.3s;
	z-index: 200;
	align-items: center;
}

.record-ui.show {
	opacity: 1;
	pointer-events: auto;
}

.record-ui .item {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: center;
}

.timer {
	color: red;
	font-weight: bold;
	font-size: 18px;
}

.stopBtn {
	background: red;
	width: 80px;
	height: 80px;
	border-radius: 50%;
	border: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

.stopBtn img {
	width: 40px;
}

.dual-buttons {
	display: flex;
	gap: 8px;
	align-items: center;
	flex: 0 0 auto;
}

#speedBtn {
	background: #353944;
	border: none;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	cursor: pointer;
	flex-shrink: 0;
	font-size: 12px;
	color: #fff;
	font-weight: 600;
	transition: background-color 0.2s ease;
}

#speedBtn:active {
	background: #28a745;
	opacity: 0.9;
}

#speedDisplay {
	display: block;
	line-height: 1;
}

#sendBtn {
	background-color: #353944;
	display: none;
}

#startBtn {
	width: 56px;
	height: 56px;
	margin: -8px -12px -8px 0;
}

.blink-circle {
	display: inline-block;
	width: 0.6em;
	height: 0.6em;
	border-radius: 50%;
	background-color: red;
	margin-right: 0.5em;
	animation: blink 0.5s infinite alternate;
}

@keyframes blink {
	from { opacity: 1; }
	to   { opacity: 0.2; }
}

@media (max-width: 480px) {
	.chat-panel {
		padding: 10px 13px;
		margin-bottom: 12px;
		padding-bottom: calc(10px + env(safe-area-inset-bottom, 8px));
	}
	
	.chat-input {
		font-size: 14px;
		padding: 8px 10px;
	}
	
	.chat-menu button span,
	.chat-tip {
		font-size: 14px;
	}
	
	.btn-circle img {
		width: 28px;
		height: 28px;
	}
	
	.action-btn img {
		width: 28px;
		height: 28px;
	}
	
	.record-ui {
		bottom: 0px;
		height: 122px;
		padding: 0 10px;
		width: 93%;
		margin-bottom: 0px;
	}
	
	.stopBtn {
		width: 70px;
		height: 70px;
	}
	
	.stopBtn img {
		width: 32px;
	}
}
