/* Artiha public site — styles for the WordPress front site plugin.
   The page/listing/event/player blocks below are ported from the Artiha app's
   src/css/style.css (public pages), so both stay visually identical; the
   layout/chrome rules at the top replace the Bootstrap utilities the app
   pages use (WordPress pages must not load Bootstrap). */

:root {
  --color-sage: #5E7C68;
  --color-terracotta: #CE6A50;
  --color-charcoal: #2A2725;
  --color-body-text: #6C6661;
  --color-cream-bg: #FAF6F0;
  --color-surface: #FFFFFF;
  --color-sage-tint: #EBF0ED;
  --color-terracotta-tint: #FDF1EE;
  --color-gold: #DDA15E;
  --color-gold-tint: #FBF1E0;
  --color-gold-dark: #A66A1E;
  --color-border: #EAE3DB;
  --radius-xs: 3px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-pill: 100px;
  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
}

.d-none { display: none !important; }
[hidden] { display: none !important; }

body.artiha-site {
  background-color: var(--color-cream-bg);
  color: var(--color-charcoal);
  font-family: var(--font-body);
}

/* Hide the theme's own header/footer when the Artiha chrome is active. */
body.artiha-chrome #site-header,
body.artiha-chrome #site-footer { display: none; }

/* ---- Shared bits ---- */
.artiha-public {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1rem 3rem;
  font-family: var(--font-body);
  color: var(--color-charcoal);
}
.artiha-public *, .artiha-public *::before, .artiha-public *::after { box-sizing: border-box; }
.ap-muted { color: var(--color-body-text); }
.ap-small { font-size: 0.85rem; }
.ap-block { display: block; }
.ap-empty { text-align: center; color: var(--color-body-text); padding: 3rem 0; margin: 0; }
.ap-h { font-family: var(--font-heading); font-size: 1.25rem; margin: 2rem 0 0.75rem; color: var(--color-charcoal); }
.ap-link { color: var(--color-sage); font-weight: 700; text-decoration: none; }

.ap-btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-body); font-weight: 700; font-size: 1rem;
  padding: 0.55rem 1.5rem; border-radius: var(--radius-pill);
  border: 1px solid var(--color-sage); cursor: pointer; text-decoration: none;
  transition: background-color .15s ease, color .15s ease;
}
.ap-btn-primary { background: var(--color-sage); color: #fff; }
.ap-btn-primary:hover { background: #4d6a58; border-color: #4d6a58; color: #fff; }
.ap-btn-secondary { background: var(--color-surface); color: var(--color-sage); }
.ap-btn-secondary:hover { background: var(--color-sage-tint); color: var(--color-sage); }
.ap-btn-sm { font-size: 0.85rem; padding: 0.35rem 1rem; }
.ap-btn-block { display: flex; width: 100%; }
.ap-btn:disabled { opacity: 0.55; cursor: default; }
.ap-close { border: none; background: none; font-size: 1.6rem; line-height: 1; color: var(--color-body-text); cursor: pointer; }
.ap-cta { padding: 0; display: flex; gap: 0.5rem; flex-wrap: wrap; }

.ap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.ap-grid .class-card-title { font-size: 0.95rem; }
/* Events: three per row (two on tablets, one on phones). */
.ap-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 991.98px) { .ap-grid--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575.98px) { .ap-grid--3 { grid-template-columns: minmax(0, 1fr); } }
.ap-card-box {
  background: var(--color-surface); border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px rgba(42, 39, 37, 0.08); padding: 1.25rem;
}
.ap-card-box h3 { font-family: var(--font-heading); font-size: 1rem; margin: 0 0 0.25rem; }
.ap-card-box ul { margin: 0.5rem 0 0; padding-left: 1.1rem; }
.class-card-media.ph { background-size: cover; background-position: center; }

/* ---- Event detail layout ---- */
.ap-event { padding-top: 1rem; }
.ap-breadcrumb { font-size: 0.85rem; color: var(--color-body-text); margin: 0.5rem 0 1rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.ap-breadcrumb a { color: var(--color-sage); text-decoration: none; }
.ap-event-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.ap-pills { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0.5rem; }
.ap-event-title { font-family: var(--font-heading); color: var(--color-terracotta); font-size: clamp(1.8rem, 3vw, 2.4rem); line-height: 1.15; margin: 0.25rem 0 1rem; }
.ap-incl { display: flex; flex-direction: column; gap: 0.75rem; }
.ap-host { display: flex; align-items: center; gap: 0.5rem; }
.ap-host img { border-radius: 50%; object-fit: cover; }
.event-reserve .reserve-status { margin-top: 0.75rem; }
.reserve-status.text-success { color: #2e7d4f; }
.reserve-status.text-danger { color: #c0392b; }
.reserve-status a { color: var(--color-sage); font-weight: 700; }
.event-reserve-bar { display: none; }

/* ---- Site header / footer ---- */
.artiha-header { background: var(--color-surface); border-bottom: 1px solid var(--color-border); position: relative; z-index: 50; }
.artiha-header-inner { max-width: 1140px; margin: 0 auto; padding: 0.6rem 1rem; display: flex; align-items: center; gap: 1.5rem; }
.artiha-brand { display: flex; align-items: center; line-height: 0; }
.artiha-brand img { height: 30px; width: auto; max-width: none; display: block; }
.ap-acc-toggle img { width: 24px; height: 24px; }
.artiha-nav { margin-left: auto; }
.ap-menu { display: flex; gap: 1.25rem; list-style: none; margin: 0; padding: 0; }
.ap-menu a { color: var(--color-charcoal); font-weight: 600; text-decoration: none; }
.ap-menu a:hover, .ap-menu .current-menu-item > a { color: var(--color-sage); }
.artiha-account { position: relative; display: flex; align-items: center; }
.ap-acc-out { display: flex; align-items: center; gap: 1rem; }
.ap-acc-toggle { display: flex; align-items: center; gap: 0.5rem; background: none; border: none; font: inherit; font-weight: 600; color: var(--color-charcoal); cursor: pointer; }
.ap-acc-toggle img { border-radius: 50%; object-fit: cover; }
.ap-acc-menu { position: absolute; right: 0; top: calc(100% + 0.5rem); min-width: 190px; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: 0 8px 24px rgba(42, 39, 37, 0.12); padding: 0.4rem; z-index: 60; }
.ap-acc-menu a, .ap-acc-menu button { display: block; width: 100%; text-align: left; padding: 0.5rem 0.75rem; border: none; background: none; border-radius: var(--radius-sm); font: inherit; color: var(--color-charcoal); text-decoration: none; cursor: pointer; }
.ap-acc-menu a:hover, .ap-acc-menu button:hover { background: var(--color-sage-tint); }
.artiha-footer { border-top: 1px solid var(--color-border); background: var(--color-surface); margin-top: 3rem; }
.artiha-footer-inner { max-width: 1140px; margin: 0 auto; padding: 1.25rem 1rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.75rem; color: var(--color-body-text); font-size: 0.9rem; }
.artiha-footer-links { display: flex; gap: 1rem; }
.artiha-footer-links a { color: var(--color-body-text); text-decoration: none; }
.artiha-footer-links a:hover { color: var(--color-sage); }

/* ---- Sign-up gate modal ---- */
.ap-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.ap-modal-backdrop { position: absolute; inset: 0; background: rgba(42, 39, 37, 0.5); }
.ap-modal-box { position: relative; background: var(--color-surface); border-radius: var(--radius-xl); padding: 1.75rem; width: min(440px, 100%); box-shadow: 0 16px 48px rgba(42, 39, 37, 0.25); font-family: var(--font-body); }
.ap-modal-box h2 { font-family: var(--font-heading); color: var(--color-terracotta); font-size: 1.5rem; margin: 0 0 0.5rem; }
.ap-modal-x { position: absolute; top: 0.6rem; right: 0.9rem; }
.ap-modal-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.25rem; }

@media (max-width: 991.98px) {
  .ap-event-layout { grid-template-columns: 1fr; }
  .ap-event-side .event-reserve .ap-btn { display: none; }
  .event-reserve-bar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--color-surface); border-top: 1px solid var(--color-border);
    box-shadow: 0 -2px 12px rgba(42, 39, 37, 0.08);
  }
  .ap-event { padding-bottom: 6rem; }
}
@media (max-width: 767.98px) {
  .artiha-header-inner { flex-wrap: wrap; gap: 0.5rem 1rem; }
  .artiha-nav { order: 3; width: 100%; margin-left: 0; }
  .artiha-account { margin-left: auto; }
  .kp-vol, .kp-vol-icon { display: none; }
}

/* ---- Ported: pills ---- */
/* Tags & pills */
.tag-pill {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 0.35rem 0.85rem;
  line-height: 1;
  white-space: nowrap;
}

.tag-category {
  background-color: var(--color-sage-tint);
  color: var(--color-sage);
}

.tag-difficulty {
  background-color: var(--color-terracotta-tint);
  color: var(--color-terracotta);
}

.tag-pending {
  background-color: var(--color-gold-tint);
  color: var(--color-gold-dark);
  white-space: normal;
}

.tag-duration {
  background-color: var(--color-surface);
  color: var(--color-body-text);
  border: 1px solid var(--color-border);
}


/* ---- Ported: cards ---- */
.class-card {
  background-color: var(--color-surface);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(42, 39, 37, 0.08);
  height: 100%;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease;
}

.class-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(42, 39, 37, 0.12);
  color: inherit;
}

.class-card-media {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--color-sage-tint);
  position: relative;
}

.class-card-media.is-vertical {
  aspect-ratio: 9 / 16;
}

.class-card-duration {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: rgba(42, 39, 37, 0.65);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-pill);
}

.class-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.class-card-category {
  font-family: var(--font-body);
  font-weight: 800;
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-terracotta);
}

.class-card-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--color-charcoal);
  margin: 0;
}

/* Smaller variant for the lesson list cards (lessonCardHtml) — the
   lesson detail page keeps the full-size .class-card-title. */
.class-card-title--sm {
  font-size: 0.95rem;
}

.class-card-meta {
  font-size: 0.85rem;
  color: var(--color-body-text);
}


/* ---------- Public (logged-out) listing pages: kirtan.php, talks.php, events.php ---------- */
.public-hero {
  padding: 2.5rem 0 1.5rem;
}

.public-hero p {
  max-width: 640px;
}

.class-card-media.is-placeholder {
  background-size: cover;
  background-position: center;
}

.class-card-media.ph-kirtan {
  background-image: url('/img/kirtan_holder.png');
}

.class-card-media.ph-talks {
  background-image: url('/img/talks_holder.png');
}

.class-card-media.ph-event {
  background-image: linear-gradient(135deg, var(--color-sage-tint), var(--color-gold-tint));
}

.public-card-cta {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-sage);
}

.class-card:hover .public-card-cta {
  color: var(--color-terracotta);
}

/* ---------- Public event detail page (event.php) ---------- */
.event-cover {
  aspect-ratio: 16 / 9;
  background-size: cover;
  background-position: center;
  background-color: var(--color-sage-tint);
  border-radius: var(--radius-xl);
}

.event-cover.ph-event {
  background-image: linear-gradient(135deg, var(--color-sage-tint), var(--color-gold-tint));
}

.event-description {
  line-height: 1.7;
}

.event-facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.65rem 1rem;
}

.event-facts dt {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-body-text);
  padding-top: 0.15rem;
}

.event-facts dd {
  margin: 0;
}

@media (min-width: 992px) {
  .event-reserve {
    position: sticky;
    top: 1.5rem;
  }
}

/* Phone: the Reserve Slot button stays reachable in a bottom bar (hidden on desktop by the rule near the top). */
@media (max-width: 991.98px) {
  .event-reserve-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -2px 12px rgba(42, 39, 37, 0.08);
  }
}

@media (max-width: 991.98px) {
  .event-page {
    padding-bottom: 6rem !important;
  }
}

/* ---------- Public Kirtan page: Spotify-style list + bottom player (kirtan.php) ---------- */
.kp-toolbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.kp-playall {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: none;
  background: var(--color-sage);
  color: #fff;
  font-size: 1.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform .12s ease, background-color .12s ease;
}

.kp-playall:hover {
  transform: scale(1.06);
  background: #4d6a58;
}

.kp-list {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px rgba(42, 39, 37, 0.08);
  overflow: hidden;
}

.kp-row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) 4rem 3rem;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
}

.kp-row:last-child {
  border-bottom: 0;
}

.kp-row:not(.kp-head):hover {
  background: var(--color-sage-tint);
}

.kp-head {
  cursor: default;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-body-text);
  padding-top: 0.6rem;
  padding-bottom: 0.6rem;
}

.kp-index {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-body-text);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}

.kp-icon-play,
.kp-icon-wave {
  display: none;
  font-size: 1.25rem;
  color: var(--color-sage);
}

.kp-row:not(.kp-head):hover .kp-num,
.kp-row.is-current .kp-num {
  display: none;
}

.kp-row:not(.kp-head):hover .kp-icon-play {
  display: inline;
}

.kp-row.is-current .kp-icon-play {
  display: none;
}

.kp-row.is-playing .kp-icon-wave,
.kp-row.is-current:not(:hover) .kp-icon-wave {
  display: inline;
}

.kp-row.is-current .kp-name {
  color: var(--color-sage);
}

.kp-title-col {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.kp-art {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  background-color: var(--color-sage-tint);
}

.kp-art.ph-kirtan {
  background-image: url('/img/kirtan_holder.png');
}

.kp-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.kp-name {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-charcoal);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kp-artist {
  font-size: 0.8rem;
  color: var(--color-body-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kp-dur {
  text-align: right;
  font-size: 0.85rem;
  color: var(--color-body-text);
  font-variant-numeric: tabular-nums;
}

.kp-add {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-body-text);
  opacity: 0;
  transition: opacity .12s ease;
  cursor: pointer;
}

.kp-row:hover .kp-add,
.kp-add:focus-visible {
  opacity: 1;
}

@media (hover: none) {
  .kp-add { opacity: 1; }
}

/* The bar */
.kp-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr) minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 16px rgba(42, 39, 37, 0.08);
}

.kp-now {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.kp-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  min-width: 0;
}

.kp-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.kp-btn {
  position: relative;
  border: none;
  background: none;
  color: var(--color-charcoal);
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.2rem;
  cursor: pointer;
}

.kp-btn:disabled {
  opacity: 0.35;
  cursor: default;
}

.kp-btn-main {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-sage);
  color: #fff;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kp-seekrow {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 560px;
}

.kp-time {
  font-size: 0.75rem;
  color: var(--color-body-text);
  font-variant-numeric: tabular-nums;
  min-width: 2.5rem;
  text-align: center;
}

.kp-range {
  flex: 1;
  height: 4px;
  accent-color: var(--color-sage);
  cursor: pointer;
}

.kp-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1.1rem;
}

.kp-vol {
  flex: 0 0 96px;
  width: 96px;
}

.kp-vol-icon {
  color: var(--color-body-text);
}

.kp-badge {
  position: absolute;
  top: -4px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--color-terracotta);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
}

/* Page content never hides behind the bar. */
body.kp-active .kp-page {
  padding-bottom: 8rem !important;
}

/* Queue panel */
.kp-queue {
  position: fixed;
  right: 1.25rem;
  bottom: 5.5rem;
  z-index: 1031;
  width: min(380px, calc(100vw - 2rem));
  max-height: min(60vh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 24px rgba(42, 39, 37, 0.16);
}

.kp-queue-head {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border);
}

.kp-queue-body {
  overflow-y: auto;
  padding: 0.5rem 0;
}

.kp-qlabel {
  padding: 0.5rem 1rem 0.25rem;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-body-text);
}

.kp-qitem {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 1rem;
}

.kp-qitem:not(.is-current) {
  cursor: pointer;
}

.kp-qitem:not(.is-current):hover {
  background: var(--color-sage-tint);
}

.kp-qitem.is-current .kp-name {
  color: var(--color-sage);
}

.kp-qitem .kp-meta {
  flex: 1;
}

.kp-qremove {
  border: none;
  background: none;
  color: var(--color-body-text);
  padding: 0.25rem 0.4rem;
  cursor: pointer;
}

.kp-toast {
  position: fixed;
  left: 50%;
  bottom: 6rem;
  transform: translateX(-50%);
  z-index: 1032;
  max-width: calc(100vw - 2rem);
  padding: 0.6rem 1rem;
  background: var(--color-charcoal);
  color: #fff;
  font-size: 0.85rem;
  border-radius: var(--radius-md);
}

/* Phone: two-row bar (track + play on top, seek below), no volume. */
@media (max-width: 767.98px) {
  .kp-row {
    grid-template-columns: 2.25rem minmax(0, 1fr) 3rem 2.25rem;
  }

  .kp-bar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "now right" "center center";
    gap: 0.4rem 0.75rem;
    padding: 0.6rem 0.9rem calc(0.6rem + env(safe-area-inset-bottom, 0px));
  }

  .kp-now { grid-area: now; }
  .kp-right { grid-area: right; }
  .kp-center { grid-area: center; }

  .kp-queue {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    bottom: 8.5rem;
  }

  .kp-toast {
    bottom: 9rem;
  }

  body.kp-active .kp-page {
    padding-bottom: 11rem !important;
  }
}

/* ---- Kirtan albums (/kirtan/albums, /kirtan/albums/{id}) ---- */
.kp-albums-link { margin: 0 0 0.75rem; }
.ap-album-intro { padding-top: 1.25rem; padding-bottom: 0; }
.ap-album-head { display: flex; gap: 1.5rem; align-items: flex-end; flex-wrap: wrap; margin: 0.5rem 0 1.5rem; }
.ap-album-cover {
  width: 220px; height: 220px; flex: none; border-radius: 14px;
  background-size: cover; background-position: center; box-shadow: 0 8px 24px rgba(42, 39, 37, 0.15);
}
.ap-album-title { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; margin: 0.15rem 0 0.4rem; }
@media (max-width: 575.98px) { .ap-album-cover { width: min(100%, 320px); height: auto; aspect-ratio: 1 / 1; } }

/* ---------- Public talk detail page (talk.php) ---------- */
.ap-talk-cover { position: relative; }
.ap-talk-play {
  position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%;
  background: rgba(42, 39, 37, 0.55); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.35);
}
.ap-talk-play::after {
  content: ""; position: absolute; top: 50%; left: 50%; transform: translate(-35%, -50%);
  border-style: solid; border-width: 13px 0 13px 21px; border-color: transparent transparent transparent #fff;
}
.ap-talk-by { margin: -0.25rem 0 0.5rem; }
.ap-watch-title { font-family: var(--font-heading); color: var(--color-terracotta); font-size: 1.4rem; margin: 0 0 0.5rem; }
.ap-watch .ap-btn-block { margin-top: 0.75rem; }
.ap-watch-signup { margin-top: 0.5rem; }
.ap-watch-facts { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--color-border); }
.event-reserve-bar[hidden], [data-watch-in][hidden] { display: none !important; }

/* Event sign-up form (the Reserve Slot modal on /events/{id}) */
.ap-modal-scroll { max-height: calc(100vh - 2rem); overflow-y: auto; }
.ap-field { margin-bottom: 0.75rem; flex: 1 1 0; min-width: 0; }
.ap-field label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--color-charcoal); margin-bottom: 0.25rem; }
.ap-field input, .ap-field select {
  width: 100%; box-sizing: border-box; padding: 0.5rem 0.75rem; font: inherit; font-size: 0.95rem;
  color: var(--color-charcoal); background: var(--color-cream-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm);
}
.ap-field input:focus, .ap-field select:focus { outline: 2px solid var(--color-sage); outline-offset: 1px; background: var(--color-surface); }
.ap-field-row { display: flex; gap: 0.75rem; }
.ap-form-error { background: var(--color-terracotta-tint); color: #9a3f27; border: 1px solid #f0c9be; border-radius: var(--radius-sm); padding: 0.6rem 0.8rem; font-size: 0.9rem; margin-bottom: 0.75rem; }
.ap-hp { position: absolute; left: -9999px; }

/* Completed (past) events: badge on the listing card and pill on the detail page */
.class-card-duration.is-completed { background: var(--color-sage); }
.tag-completed { background-color: var(--color-sage); color: #fff; }

/* Rich event description (sanitized HTML: paragraphs, headings, lists, quotes, links) */
.event-rich > :first-child { margin-top: 0; }
.event-rich > :last-child { margin-bottom: 0; }
.event-rich p { margin: 0 0 0.85rem; }
.event-rich h2, .event-rich h3, .event-rich h4 { font-family: var(--font-heading); color: var(--color-charcoal); margin: 1.25rem 0 0.5rem; line-height: 1.3; }
.event-rich h2 { font-size: 1.35rem; }
.event-rich h3 { font-size: 1.15rem; }
.event-rich h4 { font-size: 1rem; }
.event-rich ul, .event-rich ol { margin: 0 0 0.85rem; padding-left: 1.4rem; }
.event-rich li { margin-bottom: 0.25rem; }
.event-rich blockquote { margin: 0 0 0.85rem; padding: 0.25rem 0 0.25rem 1rem; border-left: 3px solid var(--color-sage); color: var(--color-body-text); }
.event-rich a { color: var(--color-sage); text-decoration: underline; }
