body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  padding: 0;
  background: #0f172a;
  color: #e5e7eb;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Retreat intro block above header */
.retreat-intro {
  background: #1e293b;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #334155;
}
.retreat-intro h2 {
  margin: 0;
  font-size: 1rem;
  color: #f1f5f9;
  font-weight: 600;
}
.retreat-intro p {
  margin: 0.35rem 0 0;
  font-size: 0.85rem;
  color: #cbd5e1;
  line-height: 1.35;
}

header {
  padding: 1rem 1.5rem;
  background: #020617;
  border-bottom: 1px solid #1f2937;
}
header h1 {
  margin: 0;
  font-size: 1.2rem;
}
header p {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

main {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
}

.top-bar {
  margin-bottom: 0.5rem;
}

.session-label {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.4rem;
}

.session-select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.9rem;
}
.session-select:focus {
  outline: none;
  border-color: #f97316;
}

.player-container {
  width: 100%;
}

/* Session banner + theme marker */
.session-banner {
  margin: 0.75rem 0 0.75rem;
  padding: 0.75rem 0.85rem;
  border-radius: 0.6rem;
  border: 1px solid #1f2937;
  background: linear-gradient(180deg, rgba(2, 6, 23, 0.9), rgba(15, 23, 42, 0.9));
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.session-banner__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  border: 1px solid #334155;
  background: rgba(2, 6, 23, 0.55);
  color: #e5e7eb;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.theme-marker {
  width: 52px;
  height: 8px;
  border-radius: 999px;
  background: #f97316; /* default accent */
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}

.session-banner__theme {
  font-size: 0.95rem;
  font-weight: 600;
  color: #f1f5f9;
  line-height: 1.2;
}

/* Optional per-session accents (set by JS via data-accent) */
.session-banner[data-accent="orange"] .theme-marker {
  background: #f97316;
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.12);
}
.session-banner[data-accent="sky"] .theme-marker {
  background: #38bdf8;
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}
.session-banner[data-accent="emerald"] .theme-marker {
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
}

video {
  width: 100%;
  max-height: 60vh;
  background: #000;
  border-radius: 0.5rem;
  outline: none;
}

.now-playing {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #9ca3af;
}

.clip-details {
  margin-top: 0.75rem;
}

.details-toggle {
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.75rem;
  border-radius: 0.4rem;
  border: 1px solid #1f2937;
  background: #020617;
  color: #e5e7eb;
  font-size: 0.9rem;
  cursor: pointer;
}
.details-toggle:hover {
  border-color: #9ca3af;
}

.details-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
  font-size: 0.85rem;
  color: #9ca3af;
  padding: 0 0.25rem;
  margin-top: 0.25rem;
  white-space: pre-wrap;
}
.details-body.open {
  max-height: 200px; /* enough for a short paragraph */
}

.playlist {
  margin-top: 1rem;
  border-top: 1px solid #1f2937;
  padding-top: 0.75rem;
}
.playlist-title {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

ul#playlist {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul#playlist li {
  position: relative;
  padding: 0.6rem 0.75rem 0.6rem 2.15rem; /* left space for indicator */
  margin-bottom: 0.25rem;
  border-radius: 0.4rem;
  background: #020617;
  border: 1px solid #1f2937;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
ul#playlist li span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  margin-right: 0.5rem;
}
ul#playlist li small {
  font-size: 0.75rem;
  color: #6b7280;
  white-space: nowrap;
}
ul#playlist li.active {
  border-color: #f97316;
  background: #111827;
  color: #f9fafb;
}
ul#playlist li:hover {
  border-color: #9ca3af;
}

/* Progress indicators */
ul#playlist li::before {
  content: "";
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid #334155;
  background: rgba(2, 6, 23, 0.5);
}

ul#playlist li.played::before {
  content: "✓";
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  color: #cbd5e1;
  border-color: #475569;
  background: rgba(30, 41, 59, 0.6);
}

ul#playlist li.active::before {
  content: "▶";
  display: grid;
  place-items: center;
  font-size: 0.65rem;
  color: #f97316;
  border-color: rgba(249, 115, 22, 0.55);
  background: rgba(249, 115, 22, 0.12);
}

ul#playlist li.active.played::before {
  content: "▶";
}

@media (min-width: 768px) {
  main {
    flex-direction: row;
  }
  .left-panel {
    flex: 2;
    display: flex;
    flex-direction: column;
  }
  .playlist {
    flex: 1;
    margin-top: 0;
    margin-left: 1rem;
    border-top: none;
    border-left: 1px solid #1f2937;
    padding-top: 0;
    padding-left: 1rem;
  }
}

/* ===============================
   Sticky Prayer CTA (Footer)
   =============================== */

.footer-action {
  position: sticky;
  bottom: 0;
  width: 100%;
  background: #020617;
  border-top: 1px solid #1f2937;
  padding: 0.75rem 1rem;
  display: flex;
  justify-content: center;
  z-index: 50;
}

.prayer-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: #111827;
  border: 1px solid #334155;
  border-radius: 9999px;
  color: #e5e7eb;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
}

.prayer-link::before {
  content: "🔒";
  font-size: 0.85rem;
}

.prayer-link:hover {
  border-color: #f97316;
  color: #f9fafb;
}

/* Desktop refinement */
@media (min-width: 768px) {
  .footer-action {
    position: relative;
  }
}

/* ===============================
   Prayer Page Header
   =============================== */

.prayer-header {
  padding: 1rem 1.25rem;
  background: #020617;
  border-bottom: 1px solid #1f2937;
}

.prayer-header h1 {
  margin: 0.5rem 0 0.25rem;
  font-size: 1.2rem;
}

.prayer-header p {
  margin: 0;
  font-size: 0.85rem;
  color: #9ca3af;
}

.back-link {
  display: inline-block;
  font-size: 0.8rem;
  color: #9ca3af;
  text-decoration: none;
}

.back-link:hover {
  color: #f9fafb;
}

/* ===============================
   Prayer Request Form (Dedicated Page)
   =============================== */

.prayer-request {
  max-width: 520px;
  margin: 2rem auto;
  padding: 1.25rem 1.25rem 1.5rem;
  background: #020617;
  border: 1px solid #1f2937;
  border-radius: 0.75rem;
}

.prayer-request form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.prayer-request label {
  font-size: 0.8rem;
  color: #9ca3af;
}

.prayer-request input,
.prayer-request textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border-radius: 0.45rem;
  border: 1px solid #334155;
  background: #0f172a;
  color: #e5e7eb;
  font-size: 0.9rem;
}

.prayer-request textarea {
  min-height: 110px;
  resize: vertical;
}

.prayer-request input:focus,
.prayer-request textarea:focus {
  outline: none;
  border-color: #f97316;
}

.prayer-request button {
  margin-top: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  border: none;
  background: #f97316;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

.prayer-request button:hover {
  background: #ea580c;
}

.prayer-status {
  margin-top: 0.5rem;
  font-size: 0.85rem;
}



/* ================================
   Chapel Page (prayer.html) – overrides
   Scoped to body.chapel-page so portal styles are untouched.
   ================================ */

body.chapel-page {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #0f172a;
  display: block; /* override portal flex layout */
  min-height: 100vh;
}

/* Ensure global dark header styles do NOT bleed into chapel header */
body.chapel-page header,
body.chapel-page .chapel-header {
  background: transparent;
  border-bottom: none;
}

body.chapel-page .chapel-header {
  max-width: 680px;
  margin: 3rem auto 2rem;
  padding: 0 1.25rem;
}

body.chapel-page .chapel-header h1 {
  margin: 0.75rem 0 0.5rem;
  font-size: 1.9rem;
  font-weight: 600;
  color: #0f172a;
}

body.chapel-page .chapel-header p,
body.chapel-page .chapel-header .chapel-intro {
  color: #475569;
}

body.chapel-page .chapel-header .chapel-intro {
  margin: 0;
  color: #475569;
  line-height: 1.55;
}

body.chapel-page .back-link {
  display: inline-block;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
  color: #334155;
  text-decoration: none;
  opacity: 0.85;
}

body.chapel-page .back-link:hover {
  opacity: 1;
}

body.chapel-page .back-link:hover {
  color: #0f172a;
}

body.chapel-page .chapel-main {
  max-width: 680px;
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
}

body.chapel-page .chapel-pause {
  margin: 0 0 2rem;
  color: #334155;
}

body.chapel-page .chapel-form {
  display: block;
}

body.chapel-page .chapel-form label {
  display: block;
  margin-top: 1.5rem;
  font-weight: 500;
  color: #0f172a;
}

body.chapel-page .chapel-form small {
  display: block;
  margin-top: 0.25rem;
  color: #64748b;
  line-height: 1.35;
}

body.chapel-page .chapel-form input,
body.chapel-page .chapel-form textarea {
  width: 100%;
  margin-top: 0.6rem;
  padding: 0.6rem 0;
  font-size: 1rem;
  border: none;
  border-bottom: 1px solid rgba(51, 65, 85, 0.35);
  background: transparent;
  color: #0f172a;
}

body.chapel-page .chapel-form input::placeholder,
body.chapel-page .chapel-form textarea::placeholder {
  color: rgba(71, 85, 105, 0.7);
}

body.chapel-page .chapel-form input:focus,
body.chapel-page .chapel-form textarea:focus {
  outline: none;
  border-bottom-color: #f97316;
}

body.chapel-page .chapel-form textarea {
  margin-top: 0.75rem;
  min-height: 170px;
  line-height: 1.65;
  font-family: Georgia, "Times New Roman", serif;
}

body.chapel-page .chapel-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 600px) {
  body.chapel-page .chapel-row {
    grid-template-columns: 1fr 1fr;
  }
}

body.chapel-page .chapel-consent {
  margin-top: 2rem;
  color: #334155;
  font-size: 0.95rem;
}

body.chapel-page .chapel-consent p {
  margin: 0 0 0.75rem;
  color: #334155;
  line-height: 1.5;
}

body.chapel-page .consent-line {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  line-height: 1.5;
}

body.chapel-page .consent-line input {
  margin-top: 0.25rem;
}

body.chapel-page button#submitBtn {
  margin-top: 2.25rem;
  width: 100%;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 999px;
  background: #f97316;
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

body.chapel-page button#submitBtn:hover {
  background: #ea580c;
}

body.chapel-page button#submitBtn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

body.chapel-page .chapel-privacy {
  margin-top: 0.85rem;
  text-align: center;
  color: #64748b;
  font-size: 0.85rem;
}

body.chapel-page .chapel-status {
  margin-top: 1.1rem;
  text-align: center;
  font-size: 0.95rem;
}

body.chapel-page .chapel-reassurance {
  margin-top: 0.6rem;
  text-align: center;
  color: #0f172a;
  font-style: italic;
}
