/* Runtime styles for the rebuilt Calm Chair / Gut God pages: the audio player
   that stands in for Kajabi's Wistia "audio theme", background clips, form
   notes, and a few fixes to the captured theme. Shared with the app's /calm
   pages so a practice sees one player everywhere. */

/* ---- audio player ------------------------------------------------------- */
.mm-audio-wrap.kjb-video-responsive {
  padding-bottom: 0 !important;
  height: auto !important;
  position: relative;
}
.mm-audio {
  --mm-audio-color: #d1dfd1;
  --mm-ink: #262a2a;
  --mm-ink-soft: rgba(38, 42, 42, 0.62);
  --mm-track: rgba(38, 42, 42, 0.18);
  --mm-surface: rgba(255, 255, 255, 0.42);
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 76px;
  padding: 12px 18px 12px 12px;
  border-radius: 18px;
  background: var(--mm-surface);
  color: var(--mm-ink);
  box-sizing: border-box;
  font-family: inherit;
  text-align: left;
}
.mm-audio * { box-sizing: border-box; }
.mm-audio button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.mm-audio button:focus-visible,
.mm-audio__bar:focus-visible,
.mm-audio__gate:focus-visible {
  outline: 3px solid var(--mm-ink);
  outline-offset: 3px;
}
.mm-audio__play {
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--mm-ink);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  box-shadow: 0 6px 16px -8px rgba(38, 42, 42, 0.6);
  transition: transform 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}
.mm-audio__play:hover { transform: scale(1.05); box-shadow: 0 10px 20px -10px rgba(38, 42, 42, 0.7); }
.mm-audio__play:active { transform: scale(0.97); }
.mm-audio__play svg { width: 22px; height: 22px; fill: currentColor; }
.mm-audio__icon-play { margin-left: 3px; }
.mm-audio__icon-pause,
.mm-audio__icon-wait { display: none; }
.mm-audio--playing .mm-audio__icon-pause { display: block; }
.mm-audio--playing .mm-audio__icon-play { display: none; }
.mm-audio--loading .mm-audio__icon-play,
.mm-audio--loading .mm-audio__icon-pause { display: none; }
.mm-audio--loading .mm-audio__icon-wait { display: block; animation: mm-spin 0.9s linear infinite; }
@keyframes mm-spin { to { transform: rotate(360deg); } }

.mm-audio__body { flex: 1 1 auto; min-width: 0; }
.mm-audio__title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Kajabi's audio block already shows the title and length above the player. */
.audio-wrapper .mm-audio__title { display: none; }

.mm-audio__controls {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.mm-audio__time,
.mm-audio__dur {
  flex: 0 0 auto;
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
  color: var(--mm-ink-soft);
  min-width: 34px;
}
.mm-audio__dur { text-align: right; }
.mm-audio__bar {
  position: relative;
  flex: 1 1 auto;
  height: 28px; /* generous hit area; the visible line is 4px */
  min-width: 60px;
  cursor: pointer;
  border-radius: 14px;
}
.mm-audio__bar::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 2px;
  background: var(--mm-track);
}
.mm-audio__fill {
  position: absolute;
  left: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  width: 0;
  border-radius: 2px;
  background: var(--mm-ink);
}
.mm-audio__knob {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--mm-ink);
  box-shadow: 0 2px 6px rgba(38, 42, 42, 0.25);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.mm-audio__bar:hover .mm-audio__knob,
.mm-audio__bar:focus-visible .mm-audio__knob,
.mm-audio--playing .mm-audio__knob,
.mm-audio--scrubbing .mm-audio__knob { opacity: 1; transform: scale(1); }
.mm-audio--scrubbing .mm-audio__fill,
.mm-audio--scrubbing .mm-audio__knob { transition: none; }

.mm-audio__skip,
.mm-audio__rate {
  flex: 0 0 auto;
  height: 36px;
  min-width: 36px;
  border: 0;
  border-radius: 18px;
  background: transparent;
  color: var(--mm-ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 6px;
  transition: background 0.15s ease;
}
.mm-audio__skip:hover,
.mm-audio__rate:hover { background: rgba(38, 42, 42, 0.09); }
.mm-audio__skip svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mm-audio__rate {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  padding: 0 10px;
}

/* Gated: outside a practice session the whole thing is an invitation. */
.mm-audio--gated .mm-audio__controls { display: none; }
.mm-audio__gate {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px 0 14px;
  border-radius: 20px;
  background: var(--mm-ink);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.18s ease, background 0.18s ease;
}
.mm-audio__gate svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mm-audio__gate:hover { transform: translateY(-1px); background: #111414; color: #fff; }
.mm-audio--gated .mm-audio__gate { display: inline-flex; }
.mm-audio--gated .mm-audio__play { opacity: 0.85; }
.mm-audio--error .mm-audio__controls { display: none; }
.mm-audio__error {
  display: none;
  font-size: 13px;
  color: var(--mm-ink-soft);
}
.mm-audio--error .mm-audio__error { display: block; }

@media (max-width: 560px) {
  .mm-audio { gap: 10px; padding: 10px 12px 10px 10px; min-height: 68px; border-radius: 16px; }
  .mm-audio__play { flex-basis: 46px; width: 46px; height: 46px; }
  .mm-audio__play svg { width: 20px; height: 20px; }
  .mm-audio__controls { gap: 6px; }
  .mm-audio__skip { display: none; }
  .mm-audio__time, .mm-audio__dur { min-width: 30px; font-size: 12px; }
  .mm-audio__gate { font-size: 13px; padding: 0 12px; }
  .mm-audio__gate span { white-space: normal; line-height: 1.2; }
}
@media (max-width: 380px) {
  .mm-audio__rate { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .mm-audio__play, .mm-audio__knob, .mm-audio__gate, .mm-audio__skip, .mm-audio__rate { transition: none; }
  .mm-audio__play:hover { transform: none; }
}

/* ---- the Kajabi audio block that surrounds the player --------------------- */
/* Its thumbnail is absolutely positioned; at tablet widths the cover and the
   controls used to collide. Give the block a real grid instead. */
.audio-wrapper {
  display: grid;
  grid-template-columns: 166px minmax(0, 1fr);
  gap: 0 20px;
  align-items: center;
  padding: 20px 22px 20px 20px !important;
  border-radius: 20px;
}
.audio-wrapper .audio-thumbnail,
.audio-wrapper .audio-player-wrapper {
  position: static !important;
  transform: none !important;
  margin: 0 !important;
  max-width: none !important;
  width: auto !important;
  display: block !important;
}
.audio-wrapper .audio-thumbnail img {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 14px;
  display: block;
}
.audio-wrapper .audio-meta { padding: 0 0 12px !important; margin: 0 !important; color: #262a2a !important; }
.audio-wrapper .audio-title { white-space: normal !important; font-weight: 600; }
.audio-wrapper .wistia-audio-theme-embed { padding-block-end: 0 !important; }
@media (max-width: 650px) {
  .audio-wrapper { grid-template-columns: 96px minmax(0, 1fr); gap: 0 14px; padding: 14px !important; }
  .audio-wrapper .audio-thumbnail { display: block !important; align-self: start; }
  .audio-wrapper .audio-thumbnail img { border-radius: 12px; }
  .audio-wrapper .audio-player-wrapper { grid-column: 1 / -1; }
  .audio-wrapper .audio-meta { grid-column: 2; padding: 0 0 10px !important; }
  .audio-wrapper .audio-thumbnail { grid-row: 1; }
}

/* ---- hero call-to-action buttons -------------------------------------------- */
/* The theme pulled the three "choose a practice" buttons together with negative
   margins, so between 768px and about 1000px wide they overlapped. Let them
   flow and wrap instead. */
.section .row:has(> .block-type--cta.col-3 ~ .block-type--cta.col-3) {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 16px;
}
.section .row:has(> .block-type--cta.col-3 ~ .block-type--cta.col-3) > .block-type--cta {
  flex: 0 0 auto !important;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding-left: 0;
  padding-right: 0;
}
.section .row:has(> .block-type--cta.col-3 ~ .block-type--cta.col-3) > .block-type--cta .block { padding: 0 !important; }
.section .row:has(> .block-type--cta.col-3 ~ .block-type--cta.col-3) .btn { white-space: nowrap; margin: 0; }

/* ---- full-bleed looping background clips (were Wistia fullScreenVideo) ---- */
.mm-bgvideo {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
  background-size: cover;
  background-position: center;
}
.mm-bgvideo video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}
.section:has(> .sizer > .mm-bgvideo) { position: relative; }
.section:has(> .sizer > .mm-bgvideo) > .sizer > .container { position: relative; z-index: 2; }
.section:has(> .sizer > .mm-bgvideo) > .sizer > .section__overlay { z-index: 1; }

/* ---- form notes ----------------------------------------------------------- */
.mm-form-note {
  margin-top: 12px;
  font-size: 14px;
  color: #2e7d74;
}
.mm-form-note--error { color: #b5473f; }
