/* ══════════════════════ ECUMENICAL SUNDAY SERVICE ══════════════════════════
   The order of service as a timeline: time on the left, a green rail with a
   dot per item, what happens, and how long. Blue carries the type and green
   only the rail, as everywhere on the site (two greens, never a third).
   Loaded through $pageStyles by public/sunday-service.php, and by a session
   page whose agenda is written as items (public/_agenda.php, Agenda::parse).
   ────────────────────────────────────────────────────────────────────────── */

.pc-service-kicker {
  margin: 0 0 .35rem; color: var(--reef); font-weight: 700;
  font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
}

.pc-service { max-width: 860px; }

.pc-service-list {
  list-style: none; margin: .75rem 0 0; padding: .35rem 1.25rem;
  background: var(--surface); border: 1px solid var(--line, #dfe7ee); border-radius: 14px;
}

/* time | rail | body | duration. Cells carry the vertical padding so the rail,
   which stretches, runs unbroken from one item to the next. No column gap: the
   spacing is padding inside the cells, so each row's divider runs straight on
   from the text to the duration and breaks only at the rail. */
.pc-service-item {
  display: grid; grid-template-columns: 6.1rem 3.2rem minmax(0, 1fr) auto;
  align-items: start;
}
.pc-service-time { padding-right: .9rem; }
.pc-service-dur  { padding-left: 1rem; }
.pc-service-item + .pc-service-item .pc-service-body,
.pc-service-item + .pc-service-item .pc-service-time,
.pc-service-item + .pc-service-item .pc-service-dur { border-top: 1px solid var(--line, #dfe7ee); }
.pc-service-time, .pc-service-body, .pc-service-dur { padding-block: .95rem; }

.pc-service-time {
  color: var(--brand); font-weight: 800; font-variant-numeric: tabular-nums;
  white-space: nowrap; line-height: 1.35;
}

.pc-service-rail { position: relative; align-self: stretch; min-height: 2.5rem; }
.pc-service-rail::before {
  content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  transform: translateX(-50%);
  background: color-mix(in srgb, var(--reef-2) 55%, transparent);
}
.pc-service-rail::after {
  content: ''; position: absolute; top: 1.12rem; left: 50%; width: .8rem; height: .8rem;
  transform: translateX(-50%); border-radius: 50%;
  background: var(--reef); box-shadow: 0 0 0 3px var(--surface);
}
/* The rail starts at the first dot and ends at the last. */
.pc-service-item:first-child .pc-service-rail::before { top: 1.12rem; }
.pc-service-item:last-child  .pc-service-rail::before { bottom: auto; height: 1.52rem; }

.pc-service-title {
  margin: 0 0 .2rem; color: var(--brand); font-weight: 700;
  font-size: 1.06rem; line-height: 1.35;
}
.pc-service-line { margin: .1rem 0 0; color: var(--ink); line-height: 1.5; }

.pc-service-parts {
  list-style: none; margin: .55rem 0 0; padding: 0; display: grid; gap: .55rem;
}
.pc-service-parts li {
  display: grid; gap: .1rem; padding: .6rem .8rem; border-radius: 10px;
  background: var(--sand);
}
.pc-service-part-name { color: var(--brand); font-weight: 700; }
.pc-service-part-mins { color: var(--muted); font-weight: 600; font-size: .88rem; margin-left: .35rem; }
/* A numbered list under a row, as the source numbers the four prayer leaders (2026-09-30). */
.pc-service-names { margin: .35rem 0 0; padding-left: 1.4rem; color: var(--ink); line-height: 1.5; }
.pc-service-names li { padding-left: .15rem; }
.pc-service-names li::marker { color: var(--brand); font-weight: 700; }

.pc-service-dur {
  color: var(--muted); font-size: .9rem; font-weight: 600; white-space: nowrap;
  font-variant-numeric: tabular-nums; line-height: 1.5;
}

/* 4:30 PM, the end of the service, as the source closes it: a band of its own. */
.pc-service-close {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: .35rem 1rem;
  margin-top: .9rem; padding: 1rem 1.25rem; border-radius: 14px;
  background: var(--sand); border: 1px solid color-mix(in srgb, var(--reef-2) 45%, transparent);
}
.pc-service-close .pc-service-time { padding: 0; }
.pc-service-close-text { color: var(--brand); font-weight: 800; }
.pc-service-close-note { color: var(--muted); font-weight: 600; }

/* A duration's bracketed tail, e.g. "(3 mins per speaker)", under the figure. */
.pc-service-dur-note { display: block; font-weight: 500; font-size: .8rem; white-space: normal; max-width: 9rem; }

/* ── On a session page: inside the Agenda card, which is already the frame ── */
.pc-agenda { padding-top: .35rem; }
.pc-agenda-intro { margin: .35rem 0 .15rem; color: var(--muted); font-weight: 600; }
.pc-service-list-flush { margin: 0; padding: 0; background: none; border: 0; border-radius: 0; }
.pc-agenda .pc-service-item { grid-template-columns: 5.4rem 2.6rem minmax(0, 1fr) auto; }
.pc-agenda .pc-service-close { margin-top: .6rem; }

/* ── Register to attend (2026-09-30) ─────────────────────────────────────────
   public/_church_register.php, above the order of service. scroll-margin keeps
   the heading clear of the sticky bar when a form comes back to #register. */
.pc-church { margin: 0 0 1.75rem; scroll-margin-top: 7.5rem; }
.pc-church-card {
  background: var(--surface); border: 1px solid var(--line, #dfe7ee); border-radius: 14px;
  padding: 1.25rem 1.35rem; box-shadow: 0 6px 20px -16px rgba(11, 42, 82, .35);
}
.pc-church-head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .75rem 1.5rem; margin-bottom: .95rem;
}
.pc-church-title { margin: 0 0 .15rem; color: var(--brand); font-weight: 800; font-size: 1.3rem; }
.pc-church-sub { color: var(--muted); }
.pc-church-count {
  display: flex; align-items: baseline; gap: .4rem; padding: .45rem .95rem;
  border-radius: 999px; background: var(--sand);
}
.pc-church-count-n { color: var(--brand); font-weight: 800; font-size: 1.35rem; font-variant-numeric: tabular-nums; }
.pc-church-count-l { color: var(--muted); font-weight: 600; font-size: .88rem; }
.pc-church-row { display: flex; flex-wrap: wrap; gap: .6rem; }
.pc-church-row .form-control { flex: 1 1 16rem; min-width: 0; }
/* Name, address and the button on one line; stacked on a phone. */
.pc-church-fields {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: .75rem; align-items: end;
}
.pc-church-field .form-label { margin-bottom: .35rem; }
@media (max-width: 47.99em) {
  .pc-church-fields { grid-template-columns: minmax(0, 1fr); }
  .pc-church-submit { justify-self: start; }
}
.pc-church-help { margin-top: .65rem; color: var(--muted); font-size: .88rem; }
.pc-church-result {
  display: flex; gap: .55rem; align-items: flex-start; padding: .7rem .9rem;
  border-radius: 10px; margin-bottom: .95rem; font-weight: 600; color: var(--ink);
}
.pc-church-result.is-success { background: color-mix(in srgb, var(--reef) 12%, transparent); }
.pc-church-result.is-success i { color: var(--reef); }
.pc-church-result.is-warning,
.pc-church-result.is-info { background: color-mix(in srgb, var(--warning, #d97706) 12%, transparent); }
.pc-church-result.is-warning i,
.pc-church-result.is-info i { color: var(--warning, #b45309); }
.pc-church-full { font-weight: 600; color: var(--ink); }
.pc-church-held-ref { color: var(--brand); font-weight: 800; letter-spacing: .04em; white-space: nowrap; }

/* "Give up my place", from the link in the confirmation email
   (public/church_release.php): the place's number and address, then the button. */
.pc-church-release { max-width: 640px; }
.pc-church-release .pc-church-title { margin-bottom: .6rem; }
.pc-church-facts {
  display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .35rem 1.1rem; margin: 0 0 1rem;
}
.pc-church-facts dt { color: var(--muted); font-weight: 600; }
.pc-church-facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.pc-church-facts .pc-church-ref { color: var(--brand); font-weight: 800; letter-spacing: .04em; }

.pc-service-venue { margin: 1.25rem 0 0; }
.pc-service-venue a {
  display: inline-flex; align-items: center; gap: .45rem;
  color: var(--brand); font-weight: 600; text-decoration: none;
}
.pc-service-venue a:hover { text-decoration: underline; }

/* A phone: the duration moves under the text, and the rail spans both rows. */
@media (max-width: 35.99em) {
  .pc-service-list { padding: .2rem .9rem; }
  .pc-service-item,
  .pc-agenda .pc-service-item { grid-template-columns: 4.9rem 2.2rem minmax(0, 1fr); }
  .pc-service-time { padding-right: .6rem; }
  .pc-service-rail { grid-row: span 2; }
  .pc-service-dur { grid-column: 3; padding-top: 0; padding-left: 0; }
  .pc-service-item + .pc-service-item .pc-service-dur { border-top: 0; }
  .pc-service-time { font-size: .92rem; }
}

@media print {
  .pc-service-list, .pc-service-close { break-inside: auto; }
  .pc-service-item { break-inside: avoid; }
}
