/* One schedule surface, shared by every page and the service calendar. */
@font-face {
  font-family: 'Source Serif 4 Display';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/source-serif-4/source-serif-4-display-regular.woff2') format('woff2');
}

html.schedule-is-open,
.schedule-is-open body {
  overflow: hidden;
}

.service-dialog,
.home-service,
.schedule-page {
  --service-green: #1f4034;
  --service-ink: #263c33;
  --service-muted: #59655d;
  --service-gold: #b99759;
  --service-line: #e2ded2;
  --service-paper: #fffefa;
  --service-shadow: 0 3px 7px rgba(24, 46, 35, 0.025), 0 14px 36px rgba(24, 46, 35, 0.055);

  color: var(--service-ink);
}

.service-dialog {
  width: min(680px, calc(100% - 40px));
  max-width: none;
  max-height: min(900px, calc(100dvh - 64px));
  margin: auto;
  padding: 0;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #d8cfbb;
  border-radius: 28px;
  background: #f7f6f0;
  box-shadow: 0 10px 30px rgba(12, 27, 21, 0.18), 0 40px 100px rgba(12, 27, 21, 0.3);
}

.service-dialog::backdrop {
  background: radial-gradient(ellipse at 50% 25%, rgba(43, 64, 49, 0.58), rgba(10, 23, 18, 0.78));
  backdrop-filter: blur(7px);
}

.service-dialog__header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 30px 30px 25px;
  border-bottom: 1px solid var(--service-line);
  background: linear-gradient(115deg, #fffefa, #f5f2e9);
  box-shadow: 0 4px 16px rgba(24, 46, 35, 0.035);
}

.service-dialog__header > div {
  min-width: 0;
}

.service-dialog__title {
  margin: 8px 0 0;
  font-family: 'Source Serif 4 Display', georgia, serif;
  font-size: clamp(1.65rem, 4vw, 2.15rem);
  font-weight: 400;
  line-height: 1.2;
  color: var(--service-ink);
  overflow-wrap: anywhere;
}

.service-dialog__close {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  align-items: center;
  justify-content: center;
  padding: 0 0 3px;
  border: 1px solid #dbdccc;
  border-radius: 50%;
  background: var(--service-paper);
  color: var(--service-ink);
  font-size: 2rem;
  font-weight: 300;
  line-height: 1;
  box-shadow: 0 2px 5px rgba(24, 46, 35, 0.035);
}

.service-dialog__close:hover {
  border-color: var(--service-green);
  background: #eaf0e8;
}

.service-dialog__body {
  padding: 28px 30px 0;
}

.service-dialog__footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  padding: 24px 30px 26px;
}

.service-dialog__footer > .service-link {
  align-self: center;
}

.service-eyebrow,
.service-dialog .service-eyebrow {
  margin: 0 0 12px;
  color: var(--service-muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.065em;
  line-height: 1.45;
  text-transform: uppercase;
}

.service-dialog__header .service-eyebrow {
  margin: 0;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
}

.service-card {
  min-width: 0;
}

.service-card--featured {
  padding: 26px;
  border: 1px solid #dcdacb;
  border-radius: 22px;
  background: linear-gradient(135deg, #fffefa 35%, #f2f5ed);
  box-shadow: inset 0 1px 0 #fff, var(--service-shadow);
}

.service-card__top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.service-card__heading {
  min-width: 0;
}

.service-date {
  display: flex;
  width: 72px;
  min-height: 82px;
  flex: 0 0 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 8px 5px;
  border: 1px solid #456152;
  border-radius: 16px;
  background: linear-gradient(145deg, #345b47, #193a2e);
  color: #fff6df;
  box-shadow: inset 0 1px 0 rgba(255, 248, 221, 0.17), 0 5px 12px rgba(24, 46, 35, 0.13);
}

.service-date__day {
  font-size: 2.2rem;
  font-family: 'Source Serif 4 Display', georgia, serif;
  font-weight: 400;
  font-variant-numeric: lining-nums tabular-nums;
  line-height: 1.1;
}

.service-date__month {
  margin-top: 4px;
  color: #e8d7ad;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  line-height: 1.35;
  text-transform: uppercase;
}

.service-card__date {
  margin: 0 0 5px;
  font-family: 'Source Serif 4 Display', georgia, serif;
  font-size: clamp(1.45rem, 3.3vw, 1.85rem);
  font-weight: 400;
  line-height: 1.3;
  color: var(--service-ink);
  text-wrap: pretty;
}

.service-card__weekday {
  margin: 0;
  color: var(--service-muted);
  font-size: 1rem;
  line-height: 1.4;
}

.service-card__weekday::first-letter {
  text-transform: uppercase;
}

.service-card__liturgical {
  margin: 24px 0 0;
  color: var(--service-ink);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.5;
}

.service-card__commemoration {
  margin: 8px 0 0;
  color: #485345;
  font-size: 1.05rem;
  line-height: 1.55;
}

.service-card__service {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 20px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--service-line);
}

.service-card__time-block {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  max-width: 100%;
  gap: 3px;
  padding: 10px 14px;
  border: 1px solid #dcdccb;
  border-radius: 13px;
  background: var(--service-paper);
  box-shadow: 0 2px 5px rgba(24, 46, 35, 0.025);
}

.service-card__start {
  color: var(--service-muted);
  font-size: 0.8rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.service-card__time {
  color: var(--service-green);
  font-size: 2rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.25;
}

.service-card__name {
  min-width: 0;
  flex: 1 1 11rem;
  margin: 0;
  padding: 0;
  color: var(--service-ink);
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.service-card__liturgical,
.service-card__commemoration,
.service-row__content {
  overflow-wrap: anywhere;
}

.service-language-note {
  display: inline-block;
  margin-inline-end: 7px;
  padding: 2px 6px;
  border: 1px solid #d7d9c9;
  border-radius: 6px;
  background: #f6f3e9;
  color: var(--service-muted);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.5;
  vertical-align: 1px;
}

.service-overnight {
  margin: 12px 0 0;
  color: var(--service-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.service-calendar-details {
  margin-top: 20px;
  border: 0;
  border-top: 1px solid var(--service-line);
  border-radius: 0;
  background: transparent;
}

.service-calendar-details > summary {
  min-height: 44px;
  padding: 14px 0 6px;
  color: var(--service-green);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.service-calendar-details > summary::marker {
  color: #8f753e;
}

.service-calendar-details[open] > summary {
  color: #19392c;
}

.service-calendar-details > p,
.service-calendar-details > .service-link {
  margin: 8px 0 0;
  padding: 0;
  font-size: 0.9rem;
}

.service-calendar-details > .service-calendar-details__content {
  padding: 0;
  overflow-wrap: anywhere;
}

.service-calendar-details__content > h4 {
  margin: 18px 0 8px;
  color: var(--service-ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.service-calendar-details__content > .service-language-note {
  margin: 14px 0 0;
}

.service-calendar-details .service-calendar-details__list {
  margin: 0 0 16px;
  padding-inline-start: 1.15rem;
  color: var(--service-muted);
  font-size: 0.9375rem;
  line-height: 1.65;
  list-style: disc;
}

.service-calendar-details__list > li + li {
  margin-top: 8px;
}

.service-calendar-details__list > li::marker {
  color: #968052;
}

.service-calendar-details > .service-link {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.service-list-title {
  margin: 30px 0 16px;
  color: var(--service-ink);
  font-size: 1.15rem;
  font-weight: 600;
}

.service-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  column-gap: 20px;
  padding: 20px;
  border: 1px solid var(--service-line);
  border-radius: 17px;
  background: var(--service-paper);
  box-shadow: 0 2px 5px rgba(24, 46, 35, 0.025);
}

.service-row__content {
  display: contents;
}

.service-row__content > * {
  min-width: 0;
  grid-column: 1;
}

.service-row__content > .service-calendar-details {
  grid-column: 1 / -1;
  margin-top: 14px;
}

.service-row__date {
  display: block;
  color: var(--service-muted);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
}

.service-row__title {
  margin: 6px 0 0;
  color: var(--service-ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
}

.service-row__commemoration,
.service-row__service {
  margin: 5px 0 0;
  color: var(--service-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.service-row__time {
  grid-column: 2;
  grid-row: 1 / span 2;
  max-width: 100%;
  margin-top: 1px;
  padding: 7px 11px;
  border: 1px solid #d9dfd2;
  border-radius: 10px;
  background: #edf2e9;
  color: var(--service-green);
  font-size: 1rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-align: center;
}

.service-row__time--pending {
  max-width: min(7rem, 28vw);
  font-size: 0.875rem;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.service-status {
  margin-top: 20px;
}

.service-status p {
  margin: 0;
  color: var(--service-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.service-status--stale {
  padding: 12px 14px;
  border: 1px solid #e1cd9e;
  border-radius: 10px;
  background: #faf2df;
}

.service-status--stale p {
  color: #665024;
}

.service-status--stale .service-status__timestamp {
  margin-bottom: 5px;
}

.service-status .service-link {
  font-size: 0.85rem;
}

.service-place {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--service-line);
}

.service-place p {
  margin: 0;
  color: var(--service-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

.service-place .service-place__name {
  margin-bottom: 5px;
  color: var(--service-ink);
  font-weight: 600;
}

.service-place__actions,
.service-state__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0 22px;
  margin-top: 6px;
}

.service-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 6px 0;
  border: 0;
  background: transparent;
  color: var(--service-green);
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: #a6b0a0;
  overflow-wrap: anywhere;
}

.service-link:hover {
  color: #14271e;
  text-decoration-color: currentcolor;
}

.service-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 22px;
  border: 1px solid var(--service-green);
  border-radius: 13px;
  background: linear-gradient(145deg, #345846, var(--service-green));
  color: #fff8e8;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-decoration: none;
  overflow-wrap: anywhere;
  box-shadow: inset 0 1px 0 rgba(255, 249, 228, 0.11), 0 4px 10px rgba(24, 46, 35, 0.11);
}

.service-button:hover {
  border-color: #325744;
  background: linear-gradient(145deg, #3b624e, #284c3c);
  color: #fff8e8;
}

.service-button:focus-visible,
.service-link:focus-visible,
.service-dialog__close:focus-visible,
.service-calendar-details summary:focus-visible {
  outline: 3px solid #8a743b;
  outline-offset: 4px;
  box-shadow: none;
}

.service-state {
  min-height: 110px;
  padding: 22px;
  border: 1px solid var(--service-line);
  border-radius: 17px;
  background: var(--service-paper);
}

.service-state p {
  margin: 0;
  color: var(--service-muted);
  font-size: 1rem;
  line-height: 1.6;
}

.home-service {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px 36px;
  margin-block: 32px 0;
  padding: 32px;
  border: 1px solid #dcd5c4;
  border-top: 3px solid var(--service-gold);
  border-radius: 23px;
  background: linear-gradient(115deg, #fffefa 58%, #f0f3eb);
  box-shadow: inset 0 1px 0 #fff, var(--service-shadow);
}

.home-service__main {
  min-width: 0;
}

.home-service__content {
  min-height: 144px;
}

.home-service .service-card--compact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 30px;
}

.home-service .service-card__top {
  grid-column: 1;
}

.home-service .service-card__liturgical,
.home-service .service-card__commemoration {
  grid-column: 1;
  margin-top: 8px;
  font-size: 1rem;
}

.home-service .service-card__liturgical {
  margin-top: 14px;
}

.home-service .service-card__service {
  grid-column: 2;
  grid-row: 1 / span 3;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  max-width: 235px;
  margin: 0;
  padding: 0 0 0 26px;
  border-top: 0;
  border-left: 1px solid var(--service-line);
}

.home-service .service-card__time-block {
  max-width: 100%;
}

.home-service .service-card__time {
  font-size: 2.2rem;
}

.home-service .service-card__name {
  max-width: 100%;
  flex: 0 1 auto;
  padding: 0;
  font-size: 1.05rem;
}

.home-service .service-overnight {
  grid-column: 1 / -1;
}

.home-service .service-status {
  margin-top: 12px;
}

.home-service__action {
  align-self: center;
}

.schedule-page {
  padding-block: 40px 72px;
}

.schedule-page__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  margin-bottom: 36px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--service-line);
}

.schedule-page__title {
  max-width: 760px;
  margin-bottom: 16px;
  font-family: 'Source Serif 4 Display', georgia, serif;
  font-size: clamp(2.15rem, 4.2vw, 3.55rem);
  color: var(--service-ink);
}

.schedule-page__intro {
  max-width: 640px;
  margin: 0;
  color: var(--service-muted);
  font-size: 1.1rem;
  line-height: 1.7;
}

.schedule-page__header > .service-button {
  flex: 0 0 auto;
}

.schedule-page__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 0.44fr);
  align-items: start;
  gap: 40px;
}

.schedule-page__list {
  min-width: 0;
}

.schedule-page__sidebar {
  display: grid;
  gap: 22px;
}

.schedule-note {
  padding: 26px;
  border: 1px solid #d9dece;
  border-radius: 20px;
  background: linear-gradient(145deg, #f3f6ee, #eaf0e3);
  box-shadow: 0 5px 18px rgba(24, 46, 35, 0.035);
}

.schedule-note--contact {
  border-color: #d8cfbc;
  background: linear-gradient(145deg, #fffdf7, #f8f1e3);
}

.schedule-note h2 {
  margin-bottom: 14px;
  color: var(--service-ink);
  font-size: 1.4rem;
}

.schedule-note p {
  margin-bottom: 12px;
  color: #52614f;
  font-size: 1rem;
  line-height: 1.65;
}

.schedule-note p:last-child {
  margin-bottom: 0;
}

.schedule-calendar {
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--service-line);
}

.schedule-calendar h2,
.schedule-subscribe h2 {
  margin-bottom: 12px;
  color: var(--service-ink);
  font-family: 'Source Serif 4 Display', georgia, serif;
  font-size: 1.8rem;
}

.schedule-calendar > p,
.schedule-subscribe > p {
  color: var(--service-muted);
  font-size: 1rem;
}

.schedule-calendar__details {
  border-color: var(--service-line);
  border-radius: 14px;
  background: #fffcf6;
}

.schedule-calendar__details summary {
  min-height: 56px;
  color: var(--service-green);
}

.schedule-calendar__details .media-frame {
  padding: 0;
}

.schedule-calendar__details iframe {
  width: 100%;
  height: 650px;
}

.schedule-subscribe {
  margin-top: 28px;
}

.schedule-subscribe .cal-btn {
  min-height: 48px;
}

@keyframes service-appear {
  from {
    transform: translateY(12px) scale(0.99);
  }

  to {
    transform: none;
  }
}

@media (max-width: 1000px) {
  .home-service {
    column-gap: 24px;
  }

  .home-service__action {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .schedule-page__header {
    align-items: flex-start;
    flex-direction: column;
  }

  .schedule-page__grid {
    gap: 24px;
  }
}

@media (max-width: 760px) {
  .schedule-page__grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-page__sidebar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .home-service {
    padding: 24px;
  }

  .home-service .service-card--compact {
    column-gap: 20px;
  }

  .home-service .service-card__service {
    max-width: 160px;
    padding-left: 18px;
  }
}

@media (max-width: 540px) {
  .service-dialog {
    width: 100%;
    max-height: calc(100dvh - 16px);
    margin: auto 0 0;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 22px 22px 0 0;
  }

  .service-dialog__header {
    gap: 12px;
    padding: 24px 20px 18px;
  }

  .service-dialog__body {
    padding: 20px 20px 0;
  }

  .service-dialog__footer {
    padding: 20px 20px max(20px, env(safe-area-inset-bottom));
  }

  .service-dialog__title {
    font-size: 1.6rem;
  }

  .service-card--featured {
    padding: 18px;
    border-radius: 18px;
  }

  .service-card__top {
    gap: 14px;
  }

  .service-date {
    width: 62px;
    min-height: 72px;
    flex-basis: 62px;
  }

  .service-date__day {
    font-size: 2rem;
  }

  .service-card__date {
    font-size: 1.4rem;
  }

  .service-card__service {
    gap: 14px 18px;
  }

  .service-card__name {
    font-size: 1.08rem;
  }

  .service-row {
    column-gap: 14px;
    padding: 16px;
  }

  .home-service {
    display: block;
    margin-top: 18px;
    padding: 24px 20px;
    border-radius: 20px;
  }

  .home-service .service-card--compact {
    display: block;
  }

  .home-service .service-card__service {
    max-width: none;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 14px 18px;
    margin-top: 18px;
    padding: 16px 0 0;
    border-top: 1px solid var(--service-line);
    border-left: 0;
  }

  .home-service__action {
    display: flex;
    margin-top: 18px;
  }

  .home-service .service-card__name {
    flex: 1 1 11rem;
  }

  .schedule-page {
    padding-block: 28px 48px;
  }

  .schedule-page__header {
    margin-bottom: 26px;
    padding-bottom: 24px;
  }

  .schedule-page__sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .schedule-calendar__details iframe {
    height: 540px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .service-dialog[open] {
    animation: service-appear 220ms cubic-bezier(0.2, 0.65, 0.3, 1);
  }

  .service-button,
  .service-dialog__close {
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  }

  .service-row,
  .home-service {
    transition: border-color 180ms ease, box-shadow 180ms ease;
  }
}

@media (hover: hover) and (pointer: fine) {
  .service-row:hover,
  .service-row:focus-within {
    border-color: #c3cbb8;
    box-shadow: 0 4px 12px rgba(24, 46, 35, 0.045);
  }

  .service-calendar-details > summary:hover {
    color: #122c21;
    text-decoration: underline;
    text-underline-offset: 4px;
  }

  .home-service:hover {
    box-shadow: inset 0 1px 0 #fff, 0 6px 12px rgba(24, 46, 35, 0.035), 0 18px 42px rgba(24, 46, 35, 0.075);
  }
}

@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .service-button:hover,
  .service-dialog__close:hover {
    transform: translateY(-2px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .service-dialog[open] {
    animation: none;
  }

  .service-button,
  .service-link,
  .service-dialog__close,
  .service-row,
  .home-service {
    transition: none;
  }
}

@media (forced-colors: active) {
  .service-date,
  .service-card__time-block,
  .service-row__time,
  .service-button,
  .home-service,
  .service-card--featured,
  .service-row {
    border-color: buttontext;
    background: canvas;
    color: canvastext;
    box-shadow: none;
  }

  .service-date__month {
    color: inherit;
  }
}
