/*
  Event Forge Upcoming Events Component
  v0.8.0-TC

  Portable client-site embed styles.
  Width is intentionally controlled by the host container or CSS variables.
*/

.eventforge-upcoming-events,
.eventforge-upcoming-events * {
  box-sizing: border-box !important;
}

.eventforge-upcoming-events {
  display: block !important;
  width: var(--ef-upcoming-width, auto) !important;
  max-width: var(--ef-upcoming-max-width, 100%) !important;
  margin: 0 !important;
  padding: 1rem !important;
  font-family: Arial, Helvetica, sans-serif !important;
  color: var(--ef-calendar-text-color, #1f2937) !important;
  background: var(--ef-calendar-surface-color, #ffffff) !important;
  border: 1px solid var(--ef-calendar-border-color, #d7dde5) !important;
  border-radius: 12px !important;
  isolation: isolate !important;
}

.eventforge-upcoming-events__heading {
  display: block !important;
  margin: 0 0 0.75rem !important;
  padding: 0 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 1.25rem !important;
  line-height: 1.2 !important;
  font-weight: 700 !important;
  color: var(--ef-calendar-text-color, #1f2937) !important;
}

.eventforge-upcoming-events__status {
  display: block !important;
  margin: 0 !important;
  padding: 0.85rem !important;
  color: var(--ef-calendar-text-color, #1f2937) !important;
  background: rgba(0, 0, 0, 0.035) !important;
  border-radius: 8px !important;
  font-size: 0.95rem !important;
  line-height: 1.4 !important;
}

.eventforge-upcoming-events__status[hidden] {
  display: none !important;
}

.eventforge-upcoming-events__status.is-error {
  color: #7f1d1d !important;
  background: #fee2e2 !important;
}

.eventforge-upcoming-events__list {
  display: flex !important;
  flex-direction: column !important;
  gap: 0.75rem !important;
  max-height: var(--ef-upcoming-max-height, 420px) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  padding: 0 0.25rem 0 0 !important;
  margin: 0 !important;
  scrollbar-width: thin !important;
  scroll-behavior: auto !important;
}

.eventforge-upcoming-events__list[hidden] {
  display: none !important;
}

.eventforge-upcoming-events__list.is-auto-scrolling,
.eventforge-upcoming-events__list.is-scroll-paused {
  overflow-y: auto !important;
}

.eventforge-upcoming-events__item {
  display: block !important;
  position: relative !important;
  flex: 0 0 auto !important;
  margin: 0 !important;
  padding: 0.85rem 0.9rem 0.9rem 1rem !important;
  background: #ffffff !important;
  color: var(--ef-calendar-text-color, #1f2937) !important;
  border: 1px solid var(--ef-calendar-border-color, #d7dde5) !important;
  border-left: 0.35rem solid var(--ef-upcoming-category-color, var(--ef-calendar-today-highlight-color, #f3be11)) !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.07) !important;
}

.eventforge-upcoming-events__item.is-canceled {
  opacity: 0.78 !important;
}

.eventforge-upcoming-events__item.is-canceled .eventforge-upcoming-events__title {
  display: block !important;
  margin: 0 0 0.35rem !important;
  padding: 0 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  color: var(--ef-upcoming-category-color, var(--ef-calendar-text-color, #1f2937)) !important;
}

.eventforge-upcoming-events__title {
  display: block !important;
  margin: 0 0 0.35rem !important;
  padding: 0 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 1rem !important;
  line-height: 1.25 !important;
  font-weight: 700 !important;
  color: var(--ef-upcoming-category-color, var(--ef-calendar-text-color, #1f2937)) !important;
}

.eventforge-upcoming-events__date,
.eventforge-upcoming-events__location,
.eventforge-upcoming-events__canceled {
  display: block !important;
  margin: 0.2rem 0 0 !important;
  padding: 0 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 0.9rem !important;
  line-height: 1.35 !important;
  color: var(--ef-calendar-text-color, #1f2937) !important;
}

.eventforge-upcoming-events__location {
  opacity: 0.85 !important;
}

.eventforge-upcoming-events__canceled {
  display: inline-block !important;
  margin-top: 0.45rem !important;
  padding: 0.2rem 0.45rem !important;
  color: #7f1d1d !important;
  background: #fee2e2 !important;
  border-radius: 999px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
}

.eventforge-upcoming-events__link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  margin: 0.65rem 0 0 !important;
  padding: 0.5rem 0.75rem !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 0.9rem !important;
  line-height: 1 !important;
  font-weight: 700 !important;
  color: var(--ef-calendar-button-text-color, #111111) !important;
  background: var(--ef-calendar-button-background-color, #ffffff) !important;
  border: 1px solid var(--ef-calendar-border-color, #d7dde5) !important;
  border-radius: 7px !important;
  text-decoration: none !important;
  cursor: pointer !important;
}

.eventforge-upcoming-events__link:hover,
.eventforge-upcoming-events__link:focus {
  filter: brightness(0.96) !important;
  text-decoration: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .eventforge-upcoming-events__list {
    overflow-y: auto !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 640px) {
  .eventforge-upcoming-events {
    padding: 0.85rem !important;
  }

  .eventforge-upcoming-events__list {
    max-height: var(--ef-upcoming-max-height, 360px) !important;
  }

  .eventforge-upcoming-events__item {
    padding: 0.8rem 0.8rem 0.85rem 0.9rem !important;
  }
}

.eventforge-display-footer {
  display: block !important;
  margin: 0.9rem 0 0 !important;
  padding: 0.75rem 0 0 !important;
  border-top: 1px solid var(--ef-calendar-border-color, #d7dde5) !important;
}

.eventforge-display-footer[hidden] {
  display: none !important;
}

.eventforge-display-category-key {
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 0.5rem 0.75rem !important;
  flex-wrap: wrap !important;
  margin: 0 0 0.55rem !important;
  padding: 0 !important;
  color: var(--ef-calendar-text-color, #1f2937) !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
}

.eventforge-display-category-key[hidden] {
  display: none !important;
}

.eventforge-display-category-key__item {
  display: inline-flex !important;
  align-items: center !important;
  gap: 0.35rem !important;
  margin: 0 !important;
  padding: 0 !important;
  white-space: nowrap !important;
}

.eventforge-display-category-key__swatch {
  display: inline-block !important;
  width: 0.75rem !important;
  height: 0.75rem !important;
  border-radius: 999px !important;
  border: 1px solid rgba(15, 23, 42, 0.18) !important;
  flex: 0 0 auto !important;
}

.eventforge-display-powered-by {
  display: block !important;
  margin: 0 !important;
  padding: 0 !important;
  color: var(--ef-calendar-text-color, #1f2937) !important;
  opacity: 0.72 !important;
  font-family: Arial, Helvetica, sans-serif !important;
  font-size: 0.78rem !important;
  line-height: 1.3 !important;
  text-align: right !important;
}

.eventforge-display-powered-by[hidden] {
  display: none !important;
}

