/*
 * Trang luyện Speaking - layout ngoài (.elc-ielts-reading-player: flex column,
 * full màn hình) dùng CHUNG với Reading/Listening, xem elc-ielts-reading-player.css.
 * Modal (.elc-irp-modal-overlay/.elc-irp-modal-box) cũng TÁI DÙNG từ file đó -
 * file này chỉ định nghĩa các phần riêng của Speaking (prefix elc-isp-*).
 */

.elc-isp-topbar {
	display: flex;
	align-items: center;
	gap: 16px;
	background: #fff;
	color: #1f2937;
	border-bottom: 1px solid #e5e7eb;
	padding: 14px 24px;
	flex: 0 0 auto;
	flex-wrap: wrap;
}

.elc-isp-close {
	background: none;
	border: none;
	font-size: 20px;
	color: #6b7280;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 8px;
	line-height: 1;
}

.elc-isp-close:hover {
	background: #f3f4f6;
	color: #1f2937;
}

.elc-isp-title {
	font-size: 16px;
}

.elc-isp-modeswitch {
	display: flex;
	gap: 4px;
	background: #f3f4f6;
	border-radius: 999px;
	padding: 4px;
	margin-left: auto;
}

.elc-isp-mode-btn {
	background: none;
	border: none;
	border-radius: 999px;
	padding: 6px 16px;
	font-size: 13px;
	font-weight: 600;
	color: #6b7280;
	cursor: pointer;
}

.elc-isp-mode-btn.is-active {
	background: #4B8EDE;
	color: #fff;
}

.elc-isp-timer {
	font-size: 18px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	background: #f3f4f6;
	color: #1f2937;
	padding: 4px 14px;
	border-radius: 999px;
	min-width: 60px;
	text-align: center;
}

.elc-isp-timer:empty {
	display: none;
}

.elc-isp-timer-warn {
	background: #dc2626;
	color: #fff;
}

/* ---------- Thanh Part 1/2/3 ---------- */

.elc-isp-partbar {
	display: flex;
	gap: 12px;
	padding: 14px 24px;
	background: #fafafa;
	border-bottom: 1px solid #e5e7eb;
	flex: 0 0 auto;
	flex-wrap: wrap;
}

.elc-isp-part-box {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	padding: 10px 20px;
	cursor: pointer;
	min-width: 110px;
}

.elc-isp-part-box:disabled {
	cursor: default;
	opacity: 0.7;
}

.elc-isp-part-box.is-active {
	background: #EBF7FF;
	border-color: #4B8EDE;
}

.elc-isp-part-name {
	font-weight: 700;
	font-size: 14px;
	color: #1f2937;
}

.elc-isp-part-count {
	font-size: 12px;
	color: #6b7280;
}

/* ---------- Thân trang ---------- */

.elc-isp-body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 24px;
	background: #fff;
}

.elc-isp-empty {
	color: #6b7280;
	text-align: center;
	margin-top: 40px;
}

.elc-isp-group {
	max-width: 760px;
	margin: 0 auto 32px;
}

.elc-isp-instructions {
	background: #f3f4f6;
	border-radius: 12px;
	padding: 14px 18px;
	margin-bottom: 16px;
	font-size: 14px;
	color: #374151;
}

.elc-isp-question {
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	padding: 18px 20px;
	margin-bottom: 16px;
}

.elc-isp-prompt {
	font-size: 15px;
	line-height: 1.6;
	color: #1f2937;
	margin: 0 0 14px;
}

.elc-isp-record-row {
	display: flex;
	align-items: center;
	gap: 14px;
	flex-wrap: wrap;
}

.elc-isp-record-row audio {
	flex: 1 1 220px;
	max-width: 320px;
	height: 36px;
}

/* ---------- Nút chung ---------- */

.elc-isp-btn {
	background: #4B8EDE;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 10px 22px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
}

.elc-isp-btn:disabled {
	background: #9ca3af;
	cursor: default;
}

.elc-isp-btn-ghost {
	background: #f3f4f6;
	color: #1f2937;
	border: 1px solid #e5e7eb;
}

.elc-isp-mic-btn {
	background: #4B8EDE;
}

.elc-isp-mic-btn.is-recording {
	background: #dc2626;
	animation: elc-isp-pulse 1.4s infinite;
}

@keyframes elc-isp-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
	50% { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

/* ---------- Đáy màn hình ---------- */

.elc-isp-bottombar {
	flex: 0 0 auto;
	background: #fff;
	border-top: 1px solid #e5e7eb;
	padding: 14px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.elc-isp-lock-note {
	margin: 0;
	font-size: 13px;
	color: #92400e;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 10px;
	padding: 8px 14px;
	text-align: center;
}

.elc-isp-lock-note a {
	color: #4B8EDE;
	font-weight: 600;
}

/* ---------- Chế độ "Tự động" ---------- */

.elc-isp-exam-intro {
	max-width: 620px;
	margin: 60px auto;
	text-align: center;
	color: #374151;
	font-size: 15px;
	line-height: 1.7;
}

.elc-isp-exam-stage {
	max-width: 620px;
	margin: 40px auto;
	text-align: center;
}

.elc-isp-exam-status {
	font-size: 14px;
	color: #6b7280;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	margin-bottom: 16px;
}

.elc-isp-cuecard {
	background: #f3f4f6;
	border-radius: 16px;
	padding: 24px 28px;
	font-size: 17px;
	line-height: 1.7;
	color: #1f2937;
	text-align: left;
	margin-bottom: 20px;
}

.elc-isp-exam-recording {
	font-size: 14px;
	color: #6b7280;
	margin-bottom: 16px;
}

.elc-isp-recording-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: #dc2626;
	margin-right: 6px;
	animation: elc-isp-pulse 1.4s infinite;
}

/* ---------- Màn kết quả ---------- */

.elc-isp-result {
	flex: 1 1 auto;
	overflow-y: auto;
	max-width: 620px;
	margin: 0 auto;
	padding: 40px 24px;
	text-align: center;
}

.elc-isp-bandgrid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 14px;
	margin: 24px 0;
}

.elc-isp-bandbox {
	background: #f3f4f6;
	border-radius: 14px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.elc-isp-band-label {
	font-size: 13px;
	color: #6b7280;
}

.elc-isp-band-value {
	font-size: 24px;
	font-weight: 700;
	color: #4B8EDE;
}

.elc-isp-overall {
	font-size: 20px;
	margin-bottom: 24px;
}

.elc-isp-feedback {
	text-align: left;
	background: #f9fafb;
	border-radius: 14px;
	padding: 18px 20px;
	line-height: 1.7;
	color: #374151;
	margin-bottom: 24px;
}

@media (max-width: 640px) {
	.elc-isp-bandgrid {
		grid-template-columns: 1fr;
	}
	.elc-isp-modeswitch {
		margin-left: 0;
		width: 100%;
		justify-content: center;
	}
}
