/* Mantra Player – matches the Arogya theme: white, navy headings, orange accent.
   Uses the theme's own font; Devanagari uses Tiro Devanagari Sanskrit. */
.mp-wrap {
	--mp-navy: #141b34;
	--mp-orange: #d9580f;
	--mp-orange-2: #e0611a;
	--mp-peach: #fdeee3;
	--mp-peach-2: #fff7f1;
	--mp-line: #eee6e0;
	--mp-muted: #6b7280;
	--mp-radius: 18px;
	position: relative;
	margin: 2em 0;
	color: var(--mp-navy);
	font-family: inherit;
}
.mp-wrap *, .mp-wrap *::before, .mp-wrap *::after { box-sizing: border-box; }
.mp-wrap p { margin: 0; }
.mp-wrap button { font-family: inherit; }

/* ---------- Header ---------- */
.mp-hero {
	position: relative;
	display: flex;
	flex-wrap: wrap-reverse;
	align-items: center;
	justify-content: space-between;
	gap: 24px 40px;
	padding: 40px 44px;
	margin-bottom: 18px;
	border-radius: 24px;
	background: #fff;
	border: 1px solid var(--mp-line);
	overflow: hidden;
}
.mp-hero::before {
	content: "";
	position: absolute;
	right: -120px;
	top: -120px;
	width: 460px;
	height: 460px;
	border-radius: 50%;
	background: radial-gradient(closest-side, rgba(224, 97, 26, .14), rgba(224, 97, 26, 0));
	pointer-events: none;
}
.mp-hero-text { position: relative; flex: 1 1 380px; max-width: 620px; }
.mp-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--mp-orange);
}
.mp-eyebrow::before { content: ""; width: 28px; height: 2px; background: var(--mp-orange); }
.mp-hero-title {
	margin: 14px 0 12px;
	font-size: clamp(34px, 5vw, 54px);
	line-height: 1.04;
	font-weight: 800;
	letter-spacing: -.025em;
	color: var(--mp-navy);
}
.mp-hero-title span { display: block; color: var(--mp-orange-2); }
.mp-hero-sub { font-size: 17px; line-height: 1.6; color: var(--mp-muted); max-width: 520px; }
.mp-stats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; padding: 0; }
.mp-stats li {
	margin: 0;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--mp-peach-2);
	border: 1px solid var(--mp-peach);
	font-size: 14px;
	color: var(--mp-muted);
}
.mp-stats b { color: var(--mp-orange); font-weight: 800; margin-right: 2px; }
.mp-mandala { position: relative; flex: 0 0 auto; width: 210px; height: 210px; }
@media (prefers-reduced-motion: no-preference) {
	.mp-mandala > g { transform-origin: 100px 100px; animation: mp-spin 60s linear infinite; }
}
@keyframes mp-spin { to { transform: rotate(360deg); } }

/* ---------- Toolbar ---------- */
.mp-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 14px 22px;
	padding: 18px 20px;
	margin-bottom: 14px;
	background: #fff;
	border: 1px solid var(--mp-line);
	border-radius: var(--mp-radius);
}
.mp-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.mp-search-field { flex: 1 1 240px; }
.mp-label { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--mp-muted); }
.mp-search-box { position: relative; display: block; }
.mp-search-box svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--mp-muted); }
.mp-toolbar input[type="search"],
.mp-toolbar select {
	width: 100%;
	min-height: 46px;
	padding: 10px 14px;
	border: 1px solid var(--mp-line);
	border-radius: 12px;
	background: var(--mp-peach-2);
	font: inherit;
	font-size: 16px;
	color: var(--mp-navy);
}
.mp-toolbar input[type="search"] { padding-left: 42px; }
.mp-toolbar input:focus, .mp-toolbar select:focus { outline: 2px solid var(--mp-orange-2); outline-offset: 1px; border-color: transparent; }
.mp-speed-row { display: flex; align-items: center; gap: 10px; min-height: 46px; font-size: 13px; color: var(--mp-muted); }
.mp-speed { width: 130px; accent-color: var(--mp-orange-2); }

/* ---------- Filters ---------- */
.mp-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mp-chip {
	min-height: 42px;
	padding: 9px 18px;
	border: 1px solid var(--mp-line);
	border-radius: 999px;
	background: #fff;
	color: var(--mp-navy);
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.mp-chip:hover { border-color: var(--mp-orange-2); color: var(--mp-orange); }
.mp-chip.is-active { background: var(--mp-orange); border-color: var(--mp-orange); color: #fff; }

/* ---------- Cards ---------- */
.mp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 18px; }
.mp-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px;
	background: #fff;
	border: 1px solid var(--mp-line);
	border-radius: var(--mp-radius);
	transition: border-color .25s, box-shadow .25s, transform .25s;
}
.mp-card[hidden] { display: none; }
.mp-card:hover { border-color: #f3cfb7; box-shadow: 0 14px 34px -18px rgba(217, 88, 15, .35); }
@media (prefers-reduced-motion: no-preference) { .mp-card:hover { transform: translateY(-2px); } }
.mp-card.is-playing, .mp-card.is-speaking-meaning {
	border-color: var(--mp-orange-2);
	box-shadow: 0 0 0 4px var(--mp-peach), 0 18px 40px -20px rgba(217, 88, 15, .45);
}
.mp-card-head { display: flex; align-items: center; gap: 14px; }
.mp-icon {
	flex: 0 0 52px;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--mp-peach);
	color: var(--mp-orange);
}
.mp-icon-om { font-family: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", serif; font-size: 28px; padding-top: 6px; }
.mp-card-title { min-width: 0; }
.mp-name { margin: 0 0 4px; font-size: 19px; line-height: 1.25; font-weight: 700; letter-spacing: -.01em; color: var(--mp-navy); }
.mp-cat { font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mp-orange); }
.mp-sanskrit {
	padding: 14px 16px;
	border-radius: 14px;
	background: var(--mp-peach-2);
	font-family: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", "Mangal", serif;
	font-size: 21px;
	line-height: 1.65;
	color: #9a3d07;
}
.mp-translit { font-size: 15.5px; line-height: 1.55; font-style: italic; color: var(--mp-muted); }
.mp-meaning-box { display: flex; flex-direction: column; gap: 8px; }
.mp-meaning, .mp-benefit { font-size: 15.5px; line-height: 1.6; color: #374151; }
.mp-k { display: block; font-size: 11.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mp-navy); margin-bottom: 2px; }

/* ---------- Actions ---------- */
.mp-actions {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
	padding-top: 14px;
	border-top: 1px solid var(--mp-line);
}
.mp-play {
	position: relative;
	z-index: 1;
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--mp-orange);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 8px 18px -8px rgba(217, 88, 15, .7);
	transition: background .2s, transform .2s;
}
.mp-play:hover { background: #bf4c0b; }
.mp-play:active { transform: scale(.96); }
.mp-ring { position: absolute; inset: -6px; width: 68px; height: 68px; transform: rotate(-90deg); pointer-events: none; }
.mp-ring circle { fill: none; stroke-width: 3; }
.mp-ring-bg { stroke: transparent; }
.mp-ring-fg { stroke: var(--mp-orange-2); stroke-linecap: round; stroke-dasharray: 163.4; stroke-dashoffset: 163.4; transition: stroke-dashoffset .4s ease; }
.mp-card.is-playing .mp-ring-bg { stroke: var(--mp-peach); }
.mp-i-play { margin-left: 3px; }
.mp-i-stop, .mp-card.is-playing .mp-i-play { display: none; }
.mp-card.is-playing .mp-i-stop { display: block; }
.mp-play-meta { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.mp-play-label { font-size: 15px; font-weight: 700; color: var(--mp-navy); }
.mp-count { font-size: 13px; color: var(--mp-muted); }
.mp-card.is-playing .mp-count { color: var(--mp-orange); font-weight: 700; }
.mp-listen-meaning {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 9px 16px;
	border: 1px solid var(--mp-line);
	border-radius: 999px;
	background: #fff;
	color: var(--mp-navy);
	font-size: 14.5px;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s, border-color .2s, color .2s;
}
.mp-listen-meaning svg { color: var(--mp-orange); }
.mp-listen-meaning:hover { background: var(--mp-peach-2); border-color: #f3cfb7; color: var(--mp-orange); }
.mp-play:focus-visible, .mp-chip:focus-visible, .mp-listen-meaning:focus-visible, .mp-now-stop:focus-visible {
	outline: 3px solid var(--mp-navy);
	outline-offset: 3px;
}

.mp-empty, .mp-note { margin-top: 18px !important; font-size: 15px; color: var(--mp-muted); text-align: center; }

/* ---------- Now playing bar ---------- */
.mp-now {
	position: fixed;
	left: 50%;
	bottom: 18px;
	z-index: 9999;
	transform: translateX(-50%);
	width: min(560px, calc(100% - 24px));
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px 12px 12px;
	background: #fff;
	border: 1px solid var(--mp-line);
	border-radius: 20px;
	box-shadow: 0 22px 50px -18px rgba(20, 27, 52, .35);
}
.mp-now[hidden] { display: none; }
.mp-now-orb {
	position: relative;
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--mp-orange);
	display: flex;
	align-items: center;
	justify-content: center;
}
.mp-now-orb b { position: relative; color: #fff; font-weight: 400; font-family: "Tiro Devanagari Sanskrit", "Noto Serif Devanagari", serif; font-size: 24px; padding-top: 5px; }
.mp-now-orb span { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--mp-orange-2); opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
	.mp-now-orb span { animation: mp-pulse 2.4s ease-out infinite; }
	.mp-now-orb span + span { animation-delay: 1.2s; }
}
@keyframes mp-pulse { 0% { transform: scale(1); opacity: .7; } 100% { transform: scale(1.7); opacity: 0; } }
.mp-now-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mp-now-kicker { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--mp-orange); }
.mp-now-name { font-size: 15.5px; color: var(--mp-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-now-bar { display: block; height: 5px; border-radius: 99px; background: var(--mp-peach); overflow: hidden; margin-top: 3px; }
.mp-now-fill { display: block; height: 100%; width: 0; background: var(--mp-orange-2); border-radius: 99px; transition: width .4s ease; }
.mp-now-count { font-size: 14px; font-weight: 700; color: var(--mp-navy); white-space: nowrap; }
.mp-now-stop {
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	border: 0;
	border-radius: 50%;
	background: var(--mp-peach);
	color: var(--mp-orange);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}
.mp-now-stop:hover { background: #fbdcc6; }

/* ---------- Single mantra in a post ---------- */
.mp-single { max-width: 640px; }
.mp-single .mp-toolbar { margin: 10px 0 0; padding: 12px 16px; }

@media (max-width: 600px) {
	.mp-hero { padding: 28px 22px; }
	.mp-mandala { width: 150px; height: 150px; }
	.mp-grid { grid-template-columns: 1fr; }
	.mp-card { padding: 18px; }
	.mp-speed { width: 100%; }
	.mp-speed-field { flex: 1 1 100%; }
}

/* ---------- Animation ---------- */
.mp-play-wrap { position: relative; flex: 0 0 56px; width: 56px; height: 56px; }
.mp-ripple { position: absolute; inset: 0; border-radius: 50%; background: var(--mp-orange-2); opacity: 0; pointer-events: none; }
.mp-play-label { display: inline-flex; align-items: center; gap: 10px; }

/* sound wave */
.mp-wave { display: none; align-items: flex-end; gap: 3px; height: 16px; }
.mp-wave i { display: block; width: 3px; height: 30%; border-radius: 3px; background: var(--mp-orange-2); }
.mp-card.is-playing .mp-wave, .mp-card.is-speaking-meaning .mp-wave, .mp-now .mp-wave { display: inline-flex; }
.mp-wave-lg { height: 22px; gap: 4px; flex: 0 0 auto; }
.mp-wave-lg i { width: 4px; }

/* Sanskrit highlight sweep while chanting */
.mp-sanskrit { background-image: linear-gradient(90deg, rgba(224,97,26,0) 0%, rgba(224,97,26,.12) 50%, rgba(224,97,26,0) 100%); background-size: 200% 100%; background-position: 150% 0; background-repeat: no-repeat; background-color: var(--mp-peach-2); }

/* entrance */
.mp-anim .mp-card { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1), border-color .25s, box-shadow .25s; }
.mp-anim .mp-card.is-in { opacity: 1; transform: none; }
.mp-anim .mp-card.is-in:hover { transform: translateY(-3px); }

@media (prefers-reduced-motion: no-preference) {
	.mp-card.is-playing .mp-ripple { animation: mp-ripple 2s ease-out infinite; }
	.mp-card.is-playing .mp-ripple + .mp-ripple { animation-delay: 1s; }
	.mp-wave i { animation: mp-wave 1s ease-in-out infinite; }
	.mp-wave i:nth-child(2) { animation-delay: -.8s; }
	.mp-wave i:nth-child(3) { animation-delay: -.6s; }
	.mp-wave i:nth-child(4) { animation-delay: -.4s; }
	.mp-wave i:nth-child(5) { animation-delay: -.2s; }
	.mp-card.is-playing .mp-sanskrit { animation: mp-sweep 2.8s ease-in-out infinite; }
	.mp-card.is-playing .mp-icon, .mp-card.is-speaking-meaning .mp-icon { animation: mp-breathe 3.2s ease-in-out infinite; }
	.mp-now:not([hidden]) { animation: mp-slide-up .45s cubic-bezier(.2,.8,.2,1); }
	.mp-hero-text > * { animation: mp-fade-up .7s cubic-bezier(.2,.7,.2,1) both; }
	.mp-hero-text > *:nth-child(2) { animation-delay: .08s; }
	.mp-hero-text > *:nth-child(3) { animation-delay: .16s; }
	.mp-hero-text > *:nth-child(4) { animation-delay: .24s; }
	.mp-mandala { animation: mp-fade-in 1.2s ease both; }
	.mp-play:hover .mp-i-play { animation: mp-nudge .5s ease; }
}
@keyframes mp-ripple { 0% { transform: scale(1); opacity: .35; } 100% { transform: scale(1.9); opacity: 0; } }
@keyframes mp-wave { 0%, 100% { height: 25%; } 50% { height: 100%; } }
@keyframes mp-sweep { 0% { background-position: 150% 0; } 100% { background-position: -50% 0; } }
@keyframes mp-breathe { 0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(224,97,26,.35); } 50% { transform: scale(1.06); box-shadow: 0 0 0 10px rgba(224,97,26,0); } }
@keyframes mp-slide-up { from { transform: translate(-50%, 30px); opacity: 0; } to { transform: translate(-50%, 0); opacity: 1; } }
@keyframes mp-fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mp-fade-in { from { opacity: 0; transform: scale(.9) rotate(-20deg); } to { opacity: 1; transform: none; } }
@keyframes mp-nudge { 50% { transform: translateX(2px); } }
