/* Hypnosis Breathing Exercise - styles (scoped to .hbx-root so themes can't clash) */

.hbx-root {
	--hbx-accent: #a78bfa;
	--hbx-bg: radial-gradient(ellipse at 50% 20%, #1e1b3a 0%, #0d0b1f 60%, #070613 100%);
	--hbx-text: #ece9ff;
	--hbx-muted: #a8a3c7;
	--hbx-surface: rgba(255, 255, 255, 0.06);
	--hbx-border: rgba(255, 255, 255, 0.14);
	--hbx-star: rgba(255, 255, 255, 0.55);

	position: relative;
	overflow: hidden;
	max-width: 560px;
	margin: 2rem auto;
	padding: 2rem 1.25rem 1.75rem;
	border-radius: 24px;
	background: var(--hbx-bg);
	color: var(--hbx-text);
	text-align: center;
	font-family: inherit;
	line-height: 1.5;
	box-sizing: border-box;
	outline: none;
}
.hbx-root *, .hbx-root *::before, .hbx-root *::after { box-sizing: border-box; }

.hbx-root.hbx-theme-light {
	--hbx-bg: linear-gradient(180deg, #f7f5ff 0%, #ece8fb 100%);
	--hbx-text: #1f1b3a;
	--hbx-muted: #5d587a;
	--hbx-surface: rgba(255, 255, 255, 0.7);
	--hbx-border: rgba(31, 27, 58, 0.14);
	--hbx-star: transparent;
}
@media (prefers-color-scheme: light) {
	.hbx-root.hbx-theme-auto {
		--hbx-bg: linear-gradient(180deg, #f7f5ff 0%, #ece8fb 100%);
		--hbx-text: #1f1b3a;
		--hbx-muted: #5d587a;
		--hbx-surface: rgba(255, 255, 255, 0.7);
		--hbx-border: rgba(31, 27, 58, 0.14);
		--hbx-star: transparent;
	}
}

/* Starfield */
.hbx-stars {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		radial-gradient(1px 1px at 12% 18%, var(--hbx-star), transparent 60%),
		radial-gradient(1px 1px at 78% 12%, var(--hbx-star), transparent 60%),
		radial-gradient(1.5px 1.5px at 32% 72%, var(--hbx-star), transparent 60%),
		radial-gradient(1px 1px at 88% 64%, var(--hbx-star), transparent 60%),
		radial-gradient(1px 1px at 55% 30%, var(--hbx-star), transparent 60%),
		radial-gradient(1.5px 1.5px at 18% 88%, var(--hbx-star), transparent 60%),
		radial-gradient(1px 1px at 66% 90%, var(--hbx-star), transparent 60%);
	animation: hbx-twinkle 6s ease-in-out infinite alternate;
}
@keyframes hbx-twinkle { from { opacity: 0.5; } to { opacity: 1; } }

.hbx-head, .hbx-stage, .hbx-cycle, .hbx-options, .hbx-controls, .hbx-done { position: relative; }

.hbx-title {
	margin: 0 0 0.35rem;
	font-size: 1.5rem;
	font-weight: 500;
	letter-spacing: 0.02em;
	color: var(--hbx-text);
}
.hbx-intro {
	margin: 0 auto 1.25rem;
	max-width: 36ch;
	color: var(--hbx-muted);
	font-size: 0.975rem;
}

/* Breathing stage */
.hbx-stage {
	position: relative;
	width: min(300px, 78vw);
	aspect-ratio: 1;
	margin: 0 auto 0.75rem;
	display: grid;
	place-items: center;
}
.hbx-stage > * { grid-area: 1 / 1; }

.hbx-ring {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	border: 1px solid var(--hbx-border);
}
.hbx-progress {
	--hbx-deg: 0deg;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: conic-gradient(var(--hbx-accent) var(--hbx-deg), transparent 0);
	-webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
	mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
	opacity: 0.85;
}
.hbx-glow {
	width: 82%;
	height: 82%;
	border-radius: 50%;
	background: radial-gradient(circle, var(--hbx-accent) 0%, transparent 68%);
	opacity: 0.35;
	filter: blur(18px);
	transform: scale(0.6);
}
.hbx-orb {
	width: 82%;
	height: 82%;
	border-radius: 50%;
	background:
		radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 45%),
		radial-gradient(circle at 50% 50%, var(--hbx-accent), color-mix(in srgb, var(--hbx-accent) 55%, #1b1440) 100%);
	box-shadow: 0 0 40px color-mix(in srgb, var(--hbx-accent) 45%, transparent);
	transform: scale(0.55);
	will-change: transform;
}
.hbx-center {
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.1rem;
	padding: 0 1rem;
	pointer-events: none;
}
.hbx-phase {
	font-size: 1.25rem;
	font-weight: 500;
	color: #fff;
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
.hbx-count {
	min-height: 1.6em;
	font-size: 1.6rem;
	font-variant-numeric: tabular-nums;
	color: rgba(255, 255, 255, 0.85);
	text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}
.hbx-root:not(.is-running):not(.is-done) .hbx-phase { font-size: 1rem; }

.hbx-cycle {
	min-height: 1.5em;
	margin: 0 0 1rem;
	font-size: 0.875rem;
	color: var(--hbx-muted);
	font-variant-numeric: tabular-nums;
}

/* Options */
.hbx-options {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
	margin-bottom: 1rem;
}
.hbx-field {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.25rem;
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--hbx-muted);
}
.hbx-field select {
	min-width: 9rem;
	padding: 0.45rem 0.6rem;
	border-radius: 10px;
	border: 1px solid var(--hbx-border);
	background: var(--hbx-surface);
	color: var(--hbx-text);
	font: inherit;
	font-size: 0.9rem;
	text-transform: none;
	letter-spacing: normal;
}
.hbx-field select option { color: #1f1b3a; }
.hbx-field select:disabled { opacity: 0.5; }

/* Buttons */
.hbx-controls {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.6rem;
}
.hbx-root .hbx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.55rem 1.2rem;
	border-radius: 999px;
	border: 1px solid var(--hbx-border);
	background: var(--hbx-surface);
	color: var(--hbx-text);
	font: inherit;
	font-size: 0.95rem;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, transform 0.1s;
}
.hbx-root .hbx-btn:hover { border-color: var(--hbx-accent); }
.hbx-root .hbx-btn:active { transform: scale(0.97); }
.hbx-root .hbx-btn:focus-visible { outline: 2px solid var(--hbx-accent); outline-offset: 2px; }
.hbx-root .hbx-btn-primary {
	min-width: 7.5rem;
	background: var(--hbx-accent);
	border-color: var(--hbx-accent);
	color: #fff;
	font-weight: 600;
}
.hbx-root .hbx-btn-primary:hover { filter: brightness(1.08); }
.hbx-root .hbx-btn-icon { width: 44px; padding: 0; font-size: 1.1rem; }
.hbx-root .hbx-btn-icon.is-off { opacity: 0.55; }

/* Completion */
.hbx-done { margin-top: 1.25rem; animation: hbx-fade 1.2s ease both; }
.hbx-done-text { margin: 0 auto 1rem; max-width: 36ch; font-size: 1.05rem; }
.hbx-root.is-done > .hbx-controls { display: none; }
@keyframes hbx-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hbx-root.is-paused .hbx-phase { opacity: 0.6; }

/* Screen-reader only */
.hbx-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0);
	white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
	.hbx-stars, .hbx-done { animation: none; }
	.hbx-orb, .hbx-glow { transition: none !important; }
}

/* ================================================================== *
 * Divi-proofing. Divi (and Divi Builder on other themes) adds padding
 * to paragraphs and headings and can restyle buttons and form fields
 * inside modules, sometimes with ID-level selectors, so the essentials
 * are pinned here.
 * ================================================================== */
.hbx-root, .hbx-root * { box-sizing: border-box !important; }
.hbx-root .hbx-title {
	margin: 0 0 0.35rem !important; padding: 0 !important; border: 0 !important;
	font-family: inherit !important; font-size: 1.5rem !important; font-weight: 500 !important;
	line-height: 1.3 !important; letter-spacing: 0.02em !important; text-transform: none !important;
	color: var(--hbx-text) !important;
}
.hbx-root .hbx-intro { margin: 0 auto 1.25rem !important; padding: 0 !important; line-height: 1.5 !important; color: var(--hbx-muted) !important; }
.hbx-root .hbx-cycle { margin: 0 0 1rem !important; padding: 0 !important; line-height: 1.5 !important; }
.hbx-root .hbx-done-text { margin: 0 auto 1rem !important; padding: 0 !important; line-height: 1.5 !important; color: var(--hbx-text) !important; }
.hbx-root button, .hbx-root a.hbx-btn {
	font-family: inherit !important; text-transform: none !important; letter-spacing: normal !important;
	line-height: 1 !important; box-shadow: none !important; text-shadow: none !important;
}
.hbx-root .hbx-btn::after, .hbx-root .hbx-btn::before { content: none !important; display: none !important; }
.hbx-root .hbx-btn {
	padding: 0.55rem 1.2rem !important; border-radius: 999px !important;
	border: 1px solid var(--hbx-border) !important; background: var(--hbx-surface) !important;
	color: var(--hbx-text) !important; font-size: 0.95rem !important; font-weight: 400 !important;
	text-decoration: none !important;
}
.hbx-root .hbx-btn:hover { border-color: var(--hbx-accent) !important; }
.hbx-root .hbx-btn-primary { background: var(--hbx-accent) !important; border-color: var(--hbx-accent) !important; color: #fff !important; font-weight: 600 !important; }
.hbx-root .hbx-btn-icon { padding: 0 !important; width: 44px !important; }
.hbx-root .hbx-field span { font-family: inherit !important; }
.hbx-root .hbx-field select {
	height: auto !important; margin: 0 !important; padding: 0.45rem 0.6rem !important;
	border-radius: 10px !important; border: 1px solid var(--hbx-border) !important;
	background: var(--hbx-surface) !important; color: var(--hbx-text) !important;
	font-family: inherit !important; font-size: 0.9rem !important; line-height: 1.3 !important; box-shadow: none !important;
}
.hbx-root button::after, .hbx-root button::before { content: none !important; display: none !important; }
