.sam-agenda {
  --sam-border: rgba(0, 0, 0, 0.12);
  --sam-muted: rgba(0, 0, 0, 0.65);
  --sam-gap: 14px;
  /* Vaste breedte eerste kolom: ook zonder tijdregel gelijk met andere kaarten */
  --sam-meta-min: 11rem;
  --sam-meta-max: 13rem;
}

.sam-empty {
  padding: 14px 0;
}

.sam-month + .sam-month {
  margin-top: 24px;
}

.sam-month-title {
  margin: 0 0 10px;
}

.sam-month-events {
  display: flex;
  flex-direction: column;
  gap: var(--sam-gap);
}

.sam-tabs {
  display: flex;
  gap: 10px;
  margin: 0 0 14px;
}

.sam-tab {
  padding: 7px 12px;
  border: 1px solid var(--sam-border);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  cursor: pointer;
}

.sam-tab.is-active {
  border-color: rgba(0, 0, 0, 0.28);
}

.sam-tabpanel {
  display: none;
}

.sam-tabpanel.is-active {
  display: block;
}

.sam-filters {
  margin: 0 0 14px;
}

.sam-filters__row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-items: flex-end;
}

.sam-filters__field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.sam-filters__field--grow {
  flex: 1 1 420px;
  min-width: 0;
}

.sam-filters__label {
  font-size: 0.9em;
  color: var(--sam-muted);
}

.sam-filters select,
.sam-filters input[type="search"] {
  max-width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--sam-border);
  border-radius: 6px;
}

.sam-filters__submit {
  padding: 7px 12px;
  border: 1px solid var(--sam-border);
  border-radius: 6px;
  background: #fff;
  font-weight: 600;
  font-size: inherit;
  line-height: 1.2;
  cursor: pointer;
}

.sam-filters__reset {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border: 1px solid var(--sam-border);
  border-radius: 6px;
  background: transparent;
  font-weight: 600;
  font-size: inherit;
  line-height: 1.2;
  text-decoration: none;
}

.sam-filters__reset:hover,
.sam-filters__reset:focus {
  border-color: rgba(0, 0, 0, 0.28);
  text-decoration: none;
}

.sam-pagination {
  margin-top: 16px;
}

.sam-pagination__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sam-pagination__pages {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.sam-pagination__page,
.sam-pagination__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
}

.sam-pagination__page {
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--sam-border);
}

.sam-pagination__page:hover,
.sam-pagination__page:focus {
  border-color: rgba(0, 0, 0, 0.28);
  text-decoration: none;
}

.sam-pagination__page.is-current {
  background: rgba(0, 0, 0, 0.06);
  border-color: rgba(0, 0, 0, 0.18);
}

.sam-pagination__link {
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--sam-border);
  border-radius: 6px;
  padding: 6px 10px;
}

.sam-pagination__link--disabled {
  opacity: 0.5;
  pointer-events: none;
}

.sam-pagination__meta {
  color: var(--sam-muted);
  font-weight: 600;
}

.sam-event {
  border: 1px solid var(--sam-border);
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: minmax(var(--sam-meta-min), var(--sam-meta-max)) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.sam-event--has-link {
}

.sam-event-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sam-event-body {
  min-width: 0;
}

.sam-date {
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  min-width: 0;
  max-width: 100%;
}

.sam-time {
  color: var(--sam-muted);
  margin: 0;
  font-size: 0.95em;
  line-height: 1.35;
  min-width: 0;
  max-width: 100%;
}

.sam-title {
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 0.45em;
  padding: 0;
  min-width: 0;
}

/* geen extra ruimte nodig; knop zit niet meer rechtsboven */

.sam-desc {
  align-self: start;
  color: var(--sam-muted);
  line-height: 1.35;
  min-width: 0;
}

/* wpautop: geen extra ruimte boven eerste alinea onder de titel */
.sam-desc > p:first-child {
  margin-top: 0;
}

.sam-desc > p:last-child {
  margin-bottom: 0;
}

.sam-desc-wrap {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.sam-location-body {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--sam-border);
  color: var(--sam-muted);
  font-size: 0.95em;
  line-height: 1.35;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.sam-location-body__text {
  font-style: italic;
}

.sam-location-body__maps {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.sam-location-body__maps svg {
  display: block;
}

.sam-location-body__info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: help;
  position: relative;
  outline: none;
}

.sam-location-body__info svg {
  display: block;
}

.sam-location-body__info::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  white-space: normal;
  width: max-content;
  max-width: min(320px, 70vw);
  padding: 8px 10px;
  border: 1px solid var(--sam-border);
  border-radius: 8px;
  background: #fff;
  color: #111;
  font-size: 0.9em;
  line-height: 1.35;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 10;
}

.sam-location-body__info:hover::after,
.sam-location-body__info:focus::after,
.sam-location-body__info:focus-visible::after {
  opacity: 1;
  visibility: visible;
}

.sam-location-body__info:focus-visible {
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.15);
  border-radius: 6px;
}

.sam-desc--collapsed {
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.sam-desc-full[hidden],
.sam-desc-preview[hidden] {
  display: none !important;
}

.sam-desc-toggle {
  margin-top: 6px;
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid var(--sam-border);
  border-radius: 6px;
  background: transparent;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.sam-desc-toggle:hover,
.sam-desc-toggle:focus {
  border-color: rgba(0, 0, 0, 0.28);
  text-decoration: none;
}

.sam-desc-toggle[hidden] {
  display: none !important;
}

.sam-event-action {
  display: flex;
  flex-direction: column;
  gap: 8px;
  justify-content: flex-start;
  align-items: flex-start;
  align-self: start;
  margin-top: 6px;
}

.sam-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--sam-border);
  border-radius: 6px;
  background: #fff;
  color: inherit;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  min-width: 120px;
  justify-content: center;
}

/* Activities cards are often used in narrow columns (Divi sidebar). */
.sam-event--activity {
  grid-template-columns: 1fr;
}

.sam-activity-frequency {
  margin-top: 8px;
  color: var(--sam-muted);
  font-size: 0.95em;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  font-style: italic;
}

.sam-activity-frequency__label {
  font-weight: 600;
  opacity: 0.9;
}

.sam-activity-frequency__value {
  font-weight: 500;
}

.sam-btn:hover,
.sam-btn:focus {
  border-color: rgba(0, 0, 0, 0.28);
  text-decoration: none;
}

.sam-btn__icon {
  display: inline-flex;
  line-height: 0;
}

.sam-btn__icon svg {
  display: block;
}

@media (max-width: 700px) {
  .sam-event,
  .sam-event--has-link {
    display: flex;
    flex-direction: column;
    gap: 12px;
    grid-template-columns: unset;
    grid-template-rows: unset;
  }

  .sam-event--has-link {
    padding-right: 14px;
  }

  .sam-pagination__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .sam-pagination__link {
    text-align: center;
  }

  .sam-event-meta,
  .sam-event-body {
    display: block;
    max-width: none;
  }

  .sam-date,
  .sam-time,
  .sam-title,
  .sam-desc {
    grid-column: auto;
    grid-row: auto;
    max-width: none;
  }

  .sam-time {
    margin-top: 4px;
  }

  .sam-event--has-link .sam-event-action {
    grid-column: auto;
    grid-row: auto;
    justify-self: stretch;
  }

  .sam-event-action {
    justify-content: flex-start;
  }
}
