/* Events calendar and event pages. Scoped so themes do not restyle the controls. */

.et-wrap,
.et-single,
.et-lightbox {
  --et-ink: #1c1917;
  --et-muted: #74685f;
  --et-line: #e7e0d8;
  --et-paper: #fffdfb;
  --et-soft: #f6f1eb;
  --et-accent: #9a3412;
  --et-accent-soft: color-mix(in srgb, var(--et-accent) 14%, white);
  --et-accent-ink: color-mix(in srgb, var(--et-accent) 78%, black);
  --et-shadow: 0 16px 50px rgba(48, 32, 20, 0.08);
  color: var(--et-ink);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", Palatino, serif;
  line-height: 1.5;
}

.et-wrap *,
.et-single *,
.et-lightbox * {
  box-sizing: border-box;
}

.et-wrap {
  width: 100%;
  margin: 0 auto 2rem;
  padding: 18px;
  background: var(--et-paper);
  border: 1px solid var(--et-line);
  border-radius: 24px;
  box-shadow: var(--et-shadow);
}

.et-wrap button,
.et-wrap input,
.et-wrap select,
.et-single button,
.et-lightbox button {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: inherit;
}

.et-wrap a {
  color: inherit;
  text-decoration: none;
}

.et-sr,
.et-skip {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.et-skip:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100001;
  width: auto;
  height: auto;
  margin: 0;
  padding: 10px 14px;
  clip: auto;
  background: var(--et-ink);
  color: #fff;
  border-radius: 999px;
}

.et-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.et-nav,
.et-view-switch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.et-month-label {
  flex: 1;
  margin: 0;
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.et-nav-btn,
.et-today,
.et-view-switch a,
.et-cat,
.et-text-btn,
.et-dialog-close,
.et-light-nav {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--et-line);
  border-radius: 999px;
  background: #fff;
  color: var(--et-ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

.et-nav-btn {
  width: 40px;
  padding: 0;
}

.et-view-switch a[aria-pressed="true"],
.et-cat.is-active {
  background: var(--et-ink);
  border-color: var(--et-ink);
  color: #fff;
}

.et-nav-btn:hover,
.et-today:hover,
.et-view-switch a:hover,
.et-cat:hover,
.et-text-btn:hover {
  border-color: color-mix(in srgb, var(--et-ink) 30%, var(--et-line));
}

.et-loading,
.et-error {
  margin: 0 0 12px;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.92rem;
}

.et-error {
  color: var(--et-accent-ink);
}

.et-app.is-loading .et-grid,
.et-app.is-loading .et-agenda,
.et-app.is-loading .et-month-list {
  opacity: 0.45;
}

.et-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 16px;
}

.et-search input[type="search"] {
  width: min(260px, 100%);
  min-height: 42px;
  padding: 8px 14px;
  border: 1px solid var(--et-line);
  border-radius: 999px;
  background: #fff;
  color: var(--et-ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
}

.et-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.et-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 320px);
  gap: 16px;
  align-items: start;
}

.et-dow,
.et-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.et-dow {
  margin-bottom: 4px;
}

.et-dow div {
  padding: 4px 0 8px;
  color: var(--et-muted);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.et-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.et-day {
  display: flex;
  flex-direction: column;
  min-height: 92px;
  padding: 6px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.et-day:hover {
  background: var(--et-soft);
}

.et-day.is-out {
  opacity: 0.42;
}

.et-day.is-selected {
  background: var(--et-accent-soft);
  border-color: color-mix(in srgb, var(--et-accent) 35%, white);
}

.et-day-num {
  display: inline-grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
}

.et-day.is-today .et-day-num {
  color: var(--et-accent-ink);
  box-shadow: inset 0 0 0 1.5px var(--et-accent);
  border-radius: 999px;
}

.et-day.is-selected .et-day-num {
  background: var(--et-accent);
  color: #fff;
  border-radius: 999px;
  box-shadow: none;
}

.et-pills {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 4px;
}

.et-pill,
.et-more {
  appearance: none;
  display: block;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 2px 6px;
  overflow: hidden;
  border: 0;
  border-left: 3px solid var(--et-accent);
  border-radius: 6px;
  background: #fff;
  color: var(--et-ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 650;
  font-weight: 600;
  line-height: 1.3;
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
  cursor: pointer;
}

.et-pill.is-past {
  border-left-color: var(--et-muted);
  color: var(--et-muted);
}

.et-pill.is-draft {
  border-left-style: dashed;
}

.et-more {
  border-left-color: transparent;
  background: transparent;
  color: var(--et-muted);
  font-weight: 700;
}

.et-dot {
  display: none;
}

.et-agenda {
  position: sticky;
  top: 24px;
  min-height: 180px;
  padding: 16px;
  border-radius: 18px;
  background: var(--et-soft);
}

.admin-bar .et-agenda,
.admin-bar .et-facts-card {
  top: 48px;
}

.et-agenda h3,
.et-agenda-item h3 {
  margin: 0 0 10px;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.et-agenda-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--et-line) 80%, white);
}

.et-agenda-item:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.et-agenda-thumb {
  display: block;
  width: 64px;
  height: 64px;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
}

.et-agenda-thumb img,
.et-card-media img,
.et-hero-img,
.et-dialog-img,
.et-gallery-link img,
.et-lightbox img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.et-agenda-when,
.et-agenda-meta,
.et-card-meta,
.et-card-excerpt,
.et-state,
.et-kicker {
  margin: 0;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.et-agenda-when,
.et-card-meta {
  color: var(--et-muted);
  font-size: 0.82rem;
}

.et-agenda-item h3 {
  margin: 2px 0;
  font-size: 1rem;
}

.et-agenda-item:not(:has(.et-agenda-thumb)) {
  grid-template-columns: 1fr;
}

.et-text-btn {
  min-height: 32px;
  margin-top: 6px;
  padding: 0 10px;
  background: transparent;
}

.et-text-link {
  color: var(--et-accent-ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-weight: 650;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.et-empty {
  margin: 8px 0 0;
  color: var(--et-muted);
  font-family: "Segoe UI", system-ui, sans-serif;
}

.et-app[data-view="list"] .et-layout {
  display: none;
}

.et-app[data-view="calendar"] .et-month-list {
  display: none;
}

.et-month-list {
  margin-top: 8px;
}

.et-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.et-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  border: 1px solid var(--et-line);
  border-radius: 18px;
  background: #fff;
}

.et-card-media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  background: var(--et-accent-soft);
}

.et-card-media-empty {
  display: grid;
  place-items: center;
}

.et-badge {
  position: absolute;
  left: 10px;
  bottom: 10px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 253, 251, 0.94);
  color: var(--et-ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.et-badge-plain {
  position: static;
  background: transparent;
  color: var(--et-accent-ink);
  font-family: Georgia, "Iowan Old Style", Palatino, serif;
  font-size: 1.4rem;
}

.et-card-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 14px 16px;
}

.et-card h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.et-card h3 a:hover,
.et-agenda-item h3 a:hover {
  color: var(--et-accent-ink);
}

.et-card-excerpt {
  color: var(--et-muted);
  font-size: 0.92rem;
}

.et-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--et-accent-ink);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.et-state.is-ongoing::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--et-accent);
}

.et-state.is-past {
  color: var(--et-muted);
}

.et-list-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.et-list-head h2,
.et-single h2,
.et-facts-card h2 {
  margin: 0;
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.et-switch {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.et-switch a {
  padding: 6px 10px;
  border-radius: 999px;
  color: var(--et-muted);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.88rem;
  font-weight: 650;
  font-weight: 600;
}

.et-switch a.is-active {
  background: var(--et-ink);
  color: #fff;
}

.et-pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  font-family: "Segoe UI", system-ui, sans-serif;
}

.et-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  padding: 12px 18px;
  border: 0;
  border-radius: 999px;
  background: var(--et-accent);
  color: #fff !important;
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
}

.et-btn:hover {
  filter: brightness(0.95);
}

.et-btn-ghost {
  width: auto;
  background: transparent;
  color: var(--et-ink) !important;
  border: 1px solid var(--et-line);
}

.et-dialog,
.et-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.et-dialog[hidden],
.et-lightbox[hidden] {
  display: none !important;
}

.et-dialog-backdrop,
.et-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(28, 25, 23, 0.55);
}

.et-dialog-panel,
.et-lightbox-panel {
  position: relative;
  z-index: 1;
  width: min(680px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  border-radius: 24px;
  background: var(--et-paper);
  box-shadow: var(--et-shadow);
}

.et-dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  padding: 0;
  background: rgba(255, 253, 251, 0.92);
  font-size: 1.4rem;
}

.et-dialog-img {
  aspect-ratio: 16 / 9;
  height: auto;
}

.et-dialog-copy {
  padding: 18px 20px 22px;
}

.et-dialog-copy h2 {
  margin: 6px 48px 8px 0;
  font-size: 1.8rem;
  letter-spacing: -0.03em;
  overflow-wrap: anywhere;
}

.et-dialog-when,
.et-dialog-meta {
  margin: 0 0 8px;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: var(--et-muted);
}

.et-dialog-copy p {
  overflow-wrap: anywhere;
}

.et-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.et-dialog-actions .et-btn,
.et-dialog-actions .et-btn-ghost {
  width: auto;
}

.et-chip {
  display: inline-flex;
  align-items: center;
  margin: 0 6px 6px 0;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--et-accent-soft);
  color: var(--et-accent-ink);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 700;
}

.et-single {
  margin: 0 0 2rem;
}

.et-hero {
  margin: 0 0 22px;
  overflow: hidden;
  border-radius: 22px;
}

.et-hero-img {
  aspect-ratio: 16 / 8;
  height: auto;
}

.et-single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 300px);
  gap: 28px;
  align-items: start;
}

.et-facts-card {
  grid-column: 2;
  grid-row: 1;
  position: sticky;
  padding: 18px;
  border: 1px solid var(--et-line);
  border-radius: 20px;
  background: var(--et-paper);
  box-shadow: var(--et-shadow);
}

.et-single-main {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
}

.et-facts-card dl {
  margin: 14px 0;
}

.et-facts-card dl div {
  margin: 0 0 12px;
}

.et-facts-card dt {
  color: var(--et-muted);
  font-family: "Segoe UI", system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.et-facts-card dd {
  margin: 2px 0 0;
}

.et-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.et-prose {
  font-size: 1.05rem;
}

.et-prose > *:first-child {
  margin-top: 0;
}

.et-prose img,
.et-prose video,
.et-prose iframe {
  max-width: 100%;
  height: auto;
}

.et-gallery {
  margin-top: 28px;
}

.et-gallery h2 {
  margin: 0 0 12px;
  font-size: 1.4rem;
}

.et-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}

.et-gallery-link {
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: 16px;
  background: var(--et-soft);
}

.et-lightbox-panel {
  width: min(960px, 100%);
  padding: 48px 56px 20px;
  background: #161311;
  color: #fff;
}

.et-lightbox figure {
  margin: 0;
}

.et-lightbox img {
  max-height: 72vh;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
  border-radius: 12px;
}

.et-lightbox figcaption {
  margin-top: 10px;
  color: #e7e0d8;
  font-family: "Segoe UI", system-ui, sans-serif;
  text-align: center;
}

.et-light-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  padding: 0;
  transform: translateY(-50%);
}

.et-light-nav.is-prev {
  left: 10px;
}

.et-light-nav.is-next {
  right: 10px;
}

.et-excerpt-when {
  margin: 0 0 0.4em;
  color: var(--et-accent-ink);
  font-weight: 700;
}

.et-wrap :focus-visible,
.et-single :focus-visible,
.et-lightbox :focus-visible {
  outline: 2px solid var(--et-accent);
  outline-offset: 2px;
}

body.et-lock {
  overflow: hidden;
}

@media (max-width: 860px) {
  .et-layout,
  .et-single-layout {
    grid-template-columns: 1fr;
  }

  .et-facts-card,
  .et-single-main {
    grid-column: auto;
    grid-row: auto;
    position: static;
  }

  .et-month-label {
    flex-basis: 100%;
    order: -1;
    text-align: left;
  }
}

@media (max-width: 720px) {
  .et-wrap {
    padding: 12px;
    border-radius: 18px;
  }

  .et-pills {
    display: none;
  }

  .et-day {
    min-height: 0;
    aspect-ratio: 1;
    align-items: center;
    padding: 4px;
  }

  .et-day.has-events .et-dot {
    display: block;
    width: 5px;
    height: 5px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--et-accent);
  }

  .et-dow div {
    font-size: 0.65rem;
  }

  .et-lightbox-panel {
    padding: 48px 12px 16px;
  }

  .et-hero-img {
    aspect-ratio: 4 / 3;
  }
}

@media (prefers-reduced-motion: reduce) {
  .et-wrap *,
  .et-single *,
  .et-lightbox * {
    transition: none !important;
    animation: none !important;
  }
}

@media (forced-colors: active) {
  .et-day.is-selected {
    outline: 2px solid CanvasText;
  }
}

@media print {
  .et-nav,
  .et-view-switch,
  .et-filters,
  .et-dialog,
  .et-text-btn,
  .et-skip {
    display: none !important;
  }

  .et-wrap,
  .et-facts-card {
    box-shadow: none;
  }

  .et-layout {
    display: block;
  }
}
