.wcpsv-audio-wrapper {
	max-width: 700px;
	margin: 0 auto;
}

/* ===== การ์ดเครื่องเล่นแบบเต็ม (หน้า "หนังสือของฉัน") ===== */

.wcpsv-player-card {
	background: #fff;
	border: 1px solid #e5d9c8;
	border-radius: 14px;
	padding: 20px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.wcpsv-player-header {
	display: flex;
	gap: 20px;
	align-items: stretch;
	margin-bottom: 20px;
}

.wcpsv-cover {
	position: relative;
	flex: 0 0 125px;
	width: 160px;
	height: 160px;
	border-radius: 12px;
	background: linear-gradient(160deg, #d7c3a1 0%, #8a7458 55%, #4a3f33 100%);
	background-size: cover;
	background-position: center;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 10px;
	box-sizing: border-box;
}

.wcpsv-cover-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: rgba(0, 0, 0, 0.55);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.04em;
	padding: 4px 8px;
	border-radius: 999px;
}

.wcpsv-cover-fallback-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -55%);
	font-size: 42px;
	opacity: 0.85;
}

.wcpsv-cover-title {
	position: relative;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	line-height: 1.3;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
	display: none;
	box-shadow: 0 2px 10px rgb(0 0 0 / 60%);
}

.wcpsv-now-playing {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.wcpsv-now-playing-eyebrow {
	font-size: 12px;
	font-weight: 700;
	color: #9d4f2b;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	margin-bottom: 4px;
	background: #fdece0;
	width: fit-content;
    padding: 5px 20px;
    border-radius: 50px;
    font-weight: 500;
	font-family: "Prompt", Sans-serif;
}

.wcpsv-now-playing-title {
	margin: 0 0 2px;
	font-size: 19px;
	line-height: 1.3;
	color: #23282d;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wcpsv-now-playing-subtitle {
	margin: 0 0 14px;
	font-size: 13px;
	color: #777;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wcpsv-seek-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.wcpsv-time {
	flex: 0 0 auto;
	font-size: 12px;
	color: #777;
	font-variant-numeric: tabular-nums;
	min-width: 34px;
}

.wcpsv-time-duration {
	text-align: right;
}

.wcpsv-seek-bar {
	flex: 1 1 auto;
	appearance: none;
	height: 4px;
	border-radius: 999px;
	background: #e7dfd3;
	outline: none;
	cursor: pointer;
}

.wcpsv-seek-bar::-webkit-slider-thumb {
	appearance: none;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	background: #b8752e;
	cursor: pointer;
}

.wcpsv-seek-bar::-moz-range-thumb {
	width: 13px;
	height: 13px;
	border: none;
	border-radius: 50%;
	background: #b8752e;
	cursor: pointer;
}

.wcpsv-seek-bar:disabled {
	cursor: not-allowed;
	opacity: 0.6;
}

.wcpsv-controls-row {
	display: flex;
	align-items: center;
	gap: 14px;
}

.wcpsv-ctrl-btn {
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	border: none;
	background: none;
	font-size: 16px;
	color: #6b6b6b;
	cursor: pointer;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}

.wcpsv-ctrl-btn:hover {
	background: #f3ece0;
	color: #23282d;
}

.wcpsv-ctrl-btn[aria-pressed="true"] {
	color: #b8752e;
	background: #f6e9d8;
}

.wcpsv-play-btn {
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	border: none;
	background: #b8752e;
	color: #fff;
	font-size: 18px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 3px 8px rgba(184, 117, 46, 0.35);
}

.wcpsv-play-btn:hover {
	background: #a4661f;
}

.wcpsv-play-icon {
	line-height: 1;
	margin-left: 2px; /* จัดกึ่งกลางสามเหลี่ยม ▶ ให้พอดีวงกลม */
}

.wcpsv-play-btn.is-playing .wcpsv-play-icon {
	margin-left: 0;
}

.wcpsv-volume-group {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: auto;
}

.wcpsv-volume-icon {
	font-size: 15px;
	color: #6b6b6b;
}

.wcpsv-volume-bar {
	width: 80px;
	appearance: none;
	height: 4px;
	border-radius: 999px;
	background: #e7dfd3;
	outline: none;
	cursor: pointer;
}

.wcpsv-volume-bar::-webkit-slider-thumb {
	appearance: none;
	width: 11px;
	height: 11px;
	border-radius: 50%;
	background: #6b6b6b;
	cursor: pointer;
}

.wcpsv-volume-bar::-moz-range-thumb {
	width: 11px;
	height: 11px;
	border: none;
	border-radius: 50%;
	background: #6b6b6b;
	cursor: pointer;
}

.wcpsv-player-card .wcpsv-audio-el {
	display: none;
}

.wcpsv-chapter-section-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 10px;
}

.wcpsv-chapter-section-head h4 {
	margin: 0;
	font-size: 15px;
	color: #23282d;
}

/* ===== รายชื่อบท (ใช้ร่วมกันทั้งเครื่องเล่นเต็มและปุ่มทดลองฟัง) ===== */

.wcpsv-chapter-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

/* กรณีเป็นวิดเจ็ต [wer_audio_sample_button] แบบเรียบง่าย (ไม่มี .wcpsv-player-card ห่อ)
   ให้รายชื่อบทมีกรอบการ์ดบางๆ ของตัวเอง จะได้ไม่ดูเปล่าเปลือยเกินไป */
.wcpsv-audio-wrapper > .wcpsv-chapter-list {
	background: #fff;
	border: 1px solid #eee0cd;
	border-radius: 10px;
	padding: 10px;
}

.wcpsv-chapter-list .wcpsv-chapter-play{
    border-color: #fdf8f6;
    background: #fdf8f6;
    width: 100%;
    color: #3b302b;
    font-family: "Prompt", Sans-serif;
    font-size: 15px;
	border-radius: 7px !important;
	text-align: left;
	box-shadow: 0 2px 6px #F9F4F0;
}
.wcpsv-chapter-list .wcpsv-chapter-play .wcpsv-chapter-icon{
	color: #9D4F2B;
	border-radius: 100%;
	border: 1px solid #9D4F2B;
    width: 30px;
    height: 30px;
    position: relative;
    display: inline-block;
    align-content: center;
	text-align: center;
    line-height: 30px;
    font-size: 13px;
	margin-right: 10px;
}
.wcpsv-chapter-play {
	width: 100%;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	background: #fff;
	border: 1px solid #eee0cd;
	border-radius: 8px;
	cursor: pointer;
	text-align: left;
	font-size: 14px;
	color: #23282d;
}

.wcpsv-chapter-play:hover:not(:disabled) {
	border-color:#fdf8f6;
	background: #fdf8f6;
	color: #3b302b;
}

.wcpsv-chapter-play:disabled {
	cursor: not-allowed;
	color: #999;
	background: #f5f5f5;
	border-color: #e5e5e5;
}

.wcpsv-chapter.is-queued .wcpsv-chapter-play {
	border-color: #fdece0;
	background: #fdece0;
	width: 100%;
	color: #3b302b;
	font-family: "Prompt", Sans-serif;
	font-size: 15px;
}

.wcpsv-chapter.is-playing .wcpsv-chapter-play {
	border-color:#f7f2ee;
	background: #f7f2ee;
	font-weight: 600;
	width: 100%;
}

.wcpsv-chapter.is-loading .wcpsv-chapter-play {
	border-color: #999;
	background: #f5f5f5;
	opacity: 0.85;
	cursor: wait;
}

.wcpsv-chapter.is-error .wcpsv-chapter-play {
	border-color: #d63638;
	background: #fcf0f1;
}

.wcpsv-chapter-icon {
	flex: 0 0 auto;
	width: 20px;
	text-align: center;
}

.wcpsv-chapter-title {
	flex: 1 1 auto;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wcpsv-chapter-badge {
	flex: 0 0 auto;
	font-size: 11px;
	font-weight: 600;
	color: #b8752e;
	background: #f6e9d8;
	border: 1px solid #e9c891;
	border-radius: 999px;
	padding: 2px 8px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.wcpsv-chapter.is-locked .wcpsv-chapter-badge {
	display: none;
}

.wcpsv-chapter-duration {
	flex: 0 0 auto;
	font-size: 12px;
	color: #999;
	font-variant-numeric: tabular-nums;
	display: none;
}

/* จอเล็ก: วางปกไว้ด้านบน เต็มความกว้าง แล้วค่อยเป็นแผงควบคุมด้านล่าง */
@media (max-width: 560px) {
	.wcpsv-player-header {
		flex-direction: column;
	}

	.wcpsv-cover {
		width: 100%;
		flex-basis: auto;
		height: 140px;
	}

	.wcpsv-volume-group {
		display: none; /* จอเล็กพื้นที่จำกัด ซ่อนตัวคุมเสียงเพื่อไม่ให้ปุ่มควบคุมล้น */
	}
}



/* ไอคอน "กำลังเล่น" หน้าบทที่กำลังเล่นอยู่ — แท่งเสียงขยับขึ้นลง */
.wcpsv-chapter.is-audio-playing .wcpsv-chapter-icon {
	background: #9D4F2B;
	color: #fff;
}
.wcpsv-eq {
	display: inline-flex;
	align-items: flex-end;
	justify-content: center;
	gap: 2px;
	width: 14px;
	height: 12px;
	vertical-align: middle;
}
.wcpsv-eq i {
	display: block;
	width: 3px;
	height: 100%;
	background: currentColor;
	border-radius: 1px;
	transform-origin: bottom;
	animation: wcpsv-eq-bounce 0.9s ease-in-out infinite;
}
.wcpsv-eq i:nth-child(2) { animation-delay: 0.25s; }
.wcpsv-eq i:nth-child(3) { animation-delay: 0.5s; }
@keyframes wcpsv-eq-bounce {
	0%, 100% { transform: scaleY(0.3); }
	50%      { transform: scaleY(1); }
}
@media (prefers-reduced-motion: reduce) {
	.wcpsv-eq i { animation: none; transform: scaleY(0.7); }
}
