/* ELSA Study Set Banner v1.0.0 — theo mẫu banner Mansi gửi (04/08/2026) */

.esb {
	--esb-bg1: #1a1040;
	--esb-bg2: #2b1a6b;
	--esb-ok: #34d3a0;
	--esb-bad: #ffab3d;
	--esb-txt: #ffffff;
	--esb-dim: rgba(255, 255, 255, .68);
	--esb-line: rgba(255, 255, 255, .14);
	--esb-cta: #ffc93c;

	margin: 32px 0;
	border-radius: 20px;
	overflow: hidden;
	background: linear-gradient(150deg, var(--esb-bg1) 0%, var(--esb-bg2) 100%);
	color: var(--esb-txt);
	font-family: inherit;
	line-height: 1.5;
	box-shadow: 0 10px 34px rgba(26, 16, 64, .28);
}

/* Ẩn tạm cho tới khi JS dời banner vào đúng chỗ widget cũ — tránh nhảy layout. */
.esb--pending { display: none; }

.esb *, .esb *::before, .esb *::after { box-sizing: border-box; }
.esb__inner { padding: 22px 20px 24px; }

.esb__hook {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--esb-txt);
}

.esb__head { display: flex; justify-content: flex-end; margin-bottom: 8px; }
.esb__progress { font-size: 12px; font-weight: 600; color: var(--esb-dim); letter-spacing: .04em; }

/* ---------- thẻ luyện ---------- */

.esb__card {
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--esb-line);
	border-radius: 16px;
	padding: 22px 18px;
	text-align: center;
}

.esb__target {
	font-size: 26px;
	font-weight: 800;
	letter-spacing: -.01em;
	margin-bottom: 6px;
	word-break: break-word;
}
.esb__ipa  { font-size: 15px; color: var(--esb-ok); margin-bottom: 4px; }
.esb__mean { font-size: 14px; color: var(--esb-dim); margin-bottom: 16px; }

.esb__row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

.esb__btn {
	appearance: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	font-size: 15px;
	padding: 12px 20px;
	border-radius: 999px;
	transition: transform .12s ease, opacity .12s ease;
}
.esb__btn:hover:not(:disabled) { transform: translateY(-1px); }
.esb__btn:disabled { opacity: .45; cursor: not-allowed; }

.esb__btn--mic { background: linear-gradient(135deg, #3fc8ff, #4a7dff); color: #08102b; }
.esb__btn--mic.is-live { background: #ff5c72; color: #fff; animation: esb-pulse 1.1s ease-in-out infinite; }
.esb__btn--ghost { background: rgba(255, 255, 255, .1); color: var(--esb-txt); border: 1px solid var(--esb-line); }

@keyframes esb-pulse { 0%, 100% { opacity: 1 } 50% { opacity: .62 } }

/* ---------- kết quả ---------- */

.esb__result {
	background: rgba(255, 255, 255, .06);
	border: 1px solid var(--esb-line);
	border-radius: 16px;
	padding: 20px 18px;
}

.esb__result-top { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.esb__said { flex: 1 1 auto; min-width: 0; }
.esb__said-label { font-size: 11px; letter-spacing: .1em; color: var(--esb-dim); margin-bottom: 6px; }
.esb__said-text { font-size: 22px; font-weight: 800; line-height: 1.3; word-break: break-word; }
.esb__w.is-ok  { color: var(--esb-ok); }
.esb__w.is-bad { color: var(--esb-bad); }
.esb__heard {
	margin-top: 8px;
	font-size: 13px;
	color: var(--esb-bad);
	font-style: italic;
	word-break: break-word;
}

.esb__ring {
	--esb-p: 0;
	--esb-ring: var(--esb-ok);
	flex: 0 0 auto;
	width: 92px; height: 92px;
	border-radius: 50%;
	display: flex; flex-direction: column; align-items: center; justify-content: center;
	background:
		radial-gradient(closest-side, var(--esb-bg2) 78%, transparent 79%),
		conic-gradient(var(--esb-ring) calc(var(--esb-p) * 1%), rgba(255, 255, 255, .16) 0);
}
.esb__ring.is-bad { --esb-ring: var(--esb-bad); }
.esb__ring.is-bad .esb__ring-n { color: var(--esb-bad); }
.esb__ring-n { font-size: 28px; font-weight: 800; line-height: 1; }
.esb__ring-l { font-size: 11px; color: var(--esb-dim); margin-top: 2px; }

.esb__chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 16px; }
.esb__chip {
	flex: 1 1 88px;
	min-width: 88px;
	background: rgba(255, 255, 255, .07);
	border: 1px solid var(--esb-line);
	border-radius: 12px;
	padding: 10px 8px;
	text-align: center;
}
.esb__chip-w { font-weight: 800; font-size: 14px; margin-bottom: 6px; word-break: break-word; }
.esb__chip-t { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 3px 8px; display: inline-block; }
.esb__chip.is-ok  .esb__chip-t { background: rgba(52, 211, 160, .18); color: var(--esb-ok); }
.esb__chip.is-bad .esb__chip-t { background: rgba(255, 171, 61, .18); color: var(--esb-bad); }

.esb__tip {
	margin-top: 14px;
	background: rgba(63, 200, 255, .1);
	border: 1px solid rgba(63, 200, 255, .26);
	border-radius: 12px;
	padding: 10px 12px;
	font-size: 14px;
	color: var(--esb-txt);
}

/* ---------- cổng chuyển đổi ---------- */

.esb__gate { text-align: center; padding: 10px 4px 4px; }
.esb__gate-title { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.esb__gate-body { font-size: 15px; color: var(--esb-dim); margin: 0 auto 18px; max-width: 46ch; }
.esb__setname { margin-top: 12px; font-size: 12px; color: var(--esb-dim); }

.esb__cta {
	display: inline-block;
	margin-top: 14px;
	background: var(--esb-cta);
	color: #1a1040 !important;
	font-weight: 800;
	font-size: 16px;
	padding: 14px 28px;
	border-radius: 999px;
	text-decoration: none !important;
	box-shadow: 0 6px 18px rgba(255, 201, 60, .28);
}
.esb__cta:hover { transform: translateY(-1px); }

/* ---------- CTA thường trực ---------- */

/* Cố tình để nhạt hơn nút vàng ở màn hình cổng: có mặt suốt để ai muốn tải là tải
   được ngay, nhưng không tranh chỗ với lời mời sau khi user đã thấy điểm của mình. */
.esb__foot {
	margin-top: 16px;
	padding-top: 14px;
	border-top: 1px solid var(--esb-line);
	text-align: center;
}

.esb__foot-cta {
	display: inline-block;
	color: var(--esb-cta) !important;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: none !important;
	border-bottom: 1px solid rgba(255, 201, 60, .4);
	padding-bottom: 2px;
}
.esb__foot-cta:hover { border-bottom-color: var(--esb-cta); }

/* Ở màn hình cổng đã có nút vàng to rồi — giấu bớt cho khỏi hai nút chồng nhau. */
.esb--gated .esb__foot { display: none; }

.esb__note {
	margin: 14px 0 0;
	font-size: 12px;
	color: var(--esb-dim);
	text-align: center;
}
.esb__note--err { color: var(--esb-bad); font-size: 14px; }

/* ---------- mobile ---------- */

@media (max-width: 480px) {
	.esb__inner { padding: 18px 14px 20px; }
	.esb__hook { font-size: 16px; }
	.esb__target { font-size: 21px; }
	.esb__said-text { font-size: 18px; }
	.esb__result-top { flex-direction: column; align-items: stretch; text-align: center; gap: 14px; }
	.esb__ring { align-self: center; }
	.esb__btn { flex: 1 1 100%; }
	.esb__chip { flex: 1 1 calc(50% - 4px); }
}

@media (prefers-reduced-motion: reduce) {
	.esb__btn, .esb__cta { transition: none; }
	.esb__btn--mic.is-live { animation: none; }
}
