/* 📦 Wrapper chính */
#rp-container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 16px;
  box-shadow: none;
}

/* 🎯 Tiêu đề */
.rp-header {
  text-align: center;
  margin-bottom: 20px;
}

.rp-header h3,
#rp-chat-box h3 {
  color: #0baf4c;
  font-size: 25px;
  line-height: 1.2;
  margin: 4px 0 8px;
  padding: 0;
}

/* 🎛️ Nút điều khiển */
.rp-controls {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 20px;
}

.rp-controls button {
  background-color: #00b300;
  color: white;
  border: none;
  padding: 10px 18px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.rp-controls button:hover {
  background-color: #009900;
}

/* 🗨️ Chat box */
#rp-chat-box {
  display: flex;
  flex-direction: column;
  height: 500px;
}

#rp-chat-box.rp-hidden {
  display: none;
}

/* 💬 Nội dung hội thoại */
#rp-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#rp-chat-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  max-height: 60vh;
  box-sizing: border-box;
}

/* 🗨️ Khung hội thoại */
.rp-bubble {
  background: #f0f0f0;
  border-radius: 18px;
  padding: 12px 16px;
  margin: 12px 0;
  max-width: 90%;
  line-height: 1.6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.rp-bubble.right {
  margin-left: auto;
  background: #e1fce1;
}

.rp-text.hint {
  font-size: 16px;
  font-weight: 300;
  color: #333;
}





/* 🧠 So sánh kết quả */
.word-correct {
  color: #2ecc71;
  font-weight: normal;
  padding: 2px 4px;
  border-radius: 4px;
}

.word-wrong {
  color: #e74c3c;
  font-weight: normal;
  padding: 2px 4px;
  border-radius: 4px;
}

.correct { color: green; }
.incorrect { color: red; }

.highlighted {
  margin: 4px 0;
}

.spoken-line {
  font-style: italic;
  font-size: 14px;
  color: #555;
}

/* 🔊 Ghi âm đang chạy */
.rp-recording {
  animation: pulse 1s infinite;
  transform: scale(1.05);
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(0,255,0,0.5); }
  70%  { box-shadow: 0 0 0 10px rgba(0,255,0,0); }
  100% { box-shadow: 0 0 0 0 rgba(0,255,0,0); }
}

/* ⚠️ Hiện lỗi */
.rp-error {
  color: #d32f2f;
  font-weight: 300;
  font-style: italic;
  padding: 6px 8px;
  animation: shake 0.4s ease;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* 📶 Progress bar */
#rp-progress {
  height: 8px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
  margin: 12px 0;
}

#rp-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(to right, #00c853, #64dd17);
  transition: width 0.3s ease;
}

/* 🔤 Role lựa chọn */
.role-choice {
  background: white;
  border: 1px solid #ccc;
  color: #333;
  padding: 10px 16px;
  border-radius: 6px;
  margin-right: 8px;
	font-weight:300;
  margin-bottom: 15px;
  cursor: pointer;
}

.role-choice.selected {
  background-color: #28a745;
  color: white;
  border-color: #28a745;
  margin-bottom: 20px;
}

/* 📎 Khác */
.select {
  padding: 6px 10px;
  margin-bottom: 20px;
}

#language-hint {
  margin-bottom: 20px;
}

#rp-wrapper {
  padding: 10px;
  box-sizing: border-box;
}

#rp-progress-wrapper {
  position: relative;
}

#rp-next-wrapper {
  text-align: right;
  margin-top: 10px;
}

#rp-next-btn {
  background: transparent;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 6px 14px;
  font-size: 16px;
  cursor: pointer;
}

.rp-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
}

.rp-user-spoken {
  margin-top: 8px;
  font-style: italic;
  color: #444;
}

.rp-play-user {
  margin-top: 4px;
  background: #f0f0f0;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  border-radius: 6px;
}

/* 📱 Responsive: Mobile fix */
@media (max-width: 780px) {
  #rp-chat-box {
    height: auto;
    max-height: 80vh;
  }

  .rp-header h3 {
    font-size: 25px;
  }

  .rp-bubble {
    font-size: 14px;
    padding: 10px 14px;
  }
}

/* Hàng nút: giãn cách nhẹ, không nền */
.rp-action-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  background: none !important; /* 👈 XÓA NỀN */
  padding: 0;
  box-shadow: none !important;
}

/* Nút icon */
.rp-record-btn,
.rp-replay-btn {
  background: none !important; /* 👈 XÓA NỀN */
  border: none !important;
  padding: 0;
  margin-right: 10px;
	margin-bottom:5px;
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  box-shadow: none !important;
}

/* Icon cụ thể */
.rp-record-icon {
  font-size: 16px;
}


/* Ngăn mọi class khác áp dụng màu nền */
.rp-recording,
.rp-record-disabled,
.rp-recording-active {
  background: none !important;
  box-shadow: none !important;
}
