/* FC Schedule Manager public interface — scoped to prevent theme collisions. */
.fc-sm-schedule,
.fc-sm-single-event {
  --fc-bg: #0d0d0d;
  --fc-card: #181818;
  --fc-hover: #202020;
  --fc-border: #303030;
  --fc-red: #ff2b2b;
  --fc-text: #f5f5f5;
  --fc-sub: #ababab;
  color: var(--fc-text);
  font-family: Inter, Geist, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.fc-sm-schedule {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 16px;
}

.fc-sm-controls {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 18px;
}

.fc-sm-control-types {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.fc-sm-control-types button,
.fc-sm-control-types select {
  box-sizing: border-box;
  min-height: 38px;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  padding: 0 14px;
  background: #151515;
  color: var(--fc-sub);
  font: inherit;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.fc-sm-control-types button { flex: 0 0 auto; }

.fc-sm-control-types select {
  min-width: 184px;
  appearance: auto;
}

.fc-sm-control-types button:hover,
.fc-sm-control-types button.is-active,
.fc-sm-control-types select:focus {
  border-color: #626262;
  background: #292929;
  color: var(--fc-text);
  outline: 0;
}

.fc-sm-events {
  display: grid;
  gap: 14px;
}

.fc-sm-event {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 110px;
  gap: 15px;
  align-items: center;
  min-height: 150px;
  box-sizing: border-box;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  padding: 10px 16px;
  background: var(--fc-card);
  cursor: pointer;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: auto 150px;
  transition: background-color .18s ease, transform .18s ease, border-color .18s ease;
}

.fc-sm-event:hover,
.fc-sm-event:focus-visible {
  border-color: #494949;
  background: var(--fc-hover);
  outline: 0;
  transform: translateY(-1px);
}

.fc-sm-event__image {
  display: grid;
  width: 120px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  place-items: center;
  border-radius: 10px;
  background: #232323;
  color: var(--fc-red);
}

.fc-sm-event__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fc-sm-event__body {
  display: flex;
  min-width: 0;
  align-self: stretch;
  flex-direction: column;
  justify-content: center;
}

.fc-sm-event__topline {
  display: flex;
  min-height: 14px;
  align-items: center;
  gap: 5px;
  margin: 0 0 5px;
}

.fc-sm-badge {
  display: inline-block;
  border-radius: 10px;
  padding: 2px 6px;
  background: #292929;
  color: var(--fc-sub);
  font-size: 8px;
  font-weight: 750;
  letter-spacing: .03em;
  line-height: 1.25;
  text-transform: uppercase;
}

.fc-sm-badge--live { background: rgba(255, 43, 43, .16); color: #ff8585; }
.fc-sm-badge--featured { background: rgba(255, 190, 76, .14); color: #ffc45f; }

.fc-sm-event h3 {
  overflow: hidden;
  margin: 0 0 4px;
  color: var(--fc-text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.015em;
  line-height: 1.28;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fc-sm-event p { display: none; }

.fc-sm-event__details {
  display: grid;
  gap: 3px;
  color: var(--fc-sub);
  font-size: 14px;
  line-height: 1.32;
}

.fc-sm-event__details span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fc-sm-event__aside {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.fc-sm-event__aside button {
  border: 0;
  padding: 2px 0;
  background: transparent;
  color: var(--fc-sub);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
}

.fc-sm-event__aside button:hover { color: var(--fc-text); }

.fc-sm-pagination {
  display: flex;
  justify-content: center;
  margin: 20px 0 4px;
}

.fc-sm-load-more,
.fc-sm-button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  padding: 0 14px;
  background: #171717;
  color: var(--fc-text) !important;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: transform .18s ease, background-color .18s ease;
}

.fc-sm-load-more:hover,
.fc-sm-button:hover { background: #242424; transform: translateY(-1px); }
.fc-sm-load-more:disabled { cursor: wait; opacity: .65; transform: none; }
.fc-sm-button { border-color: var(--fc-red); background: var(--fc-red); }
.fc-sm-button:hover { background: #ff4646; }
.fc-sm-button--ghost { border-color: var(--fc-border); background: transparent; }

.fc-sm-public-empty {
  display: grid;
  min-height: 180px;
  place-content: center;
  justify-items: center;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  padding: 18px;
  background: var(--fc-card);
  text-align: center;
}

.fc-sm-public-empty span { color: var(--fc-red); font-size: 22px; }
.fc-sm-public-empty h3 { margin: 8px 0 3px; color: var(--fc-text); font-size: 16px; }
.fc-sm-public-empty p { margin: 0; color: var(--fc-sub); font-size: 13px; }
.fc-sm-fetch-error { margin: 0; color: #ff9898; font-size: 13px; }

/* Detail popup. The banner uses the dedicated 16:9 image, with thumbnail fallback. */
.fc-sm-modal[hidden] { display: none; }
.fc-sm-modal {
  position: fixed;
  z-index: 99999;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 18px;
}

.fc-sm-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .76);
  backdrop-filter: blur(7px);
}

.fc-sm-modal__panel {
  position: relative;
  width: min(100%, 620px);
  max-height: min(84vh, 720px);
  overflow: auto;
  box-sizing: border-box;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  padding: 22px;
  background: #141414;
  color: var(--fc-text);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .6);
}

.fc-sm-modal__close {
  position: absolute;
  z-index: 1;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  background: #1a1a1a;
  color: var(--fc-text);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.fc-sm-modal__banner {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 14px;
  border-radius: 10px;
  object-fit: cover;
}

.fc-sm-modal .fc-sm-badge { padding: 4px 8px; font-size: 11px; }
.fc-sm-modal__panel h2 {
  margin: 10px 36px 8px 0;
  color: var(--fc-text);
  font-size: 19px;
  letter-spacing: -.025em;
  line-height: 1.3;
}

.fc-sm-modal__meta {
  display: grid;
  gap: 4px;
  margin: 0;
  color: var(--fc-sub);
  font-size: 14px;
  line-height: 1.45;
}

.fc-sm-modal__meta span { color: var(--fc-sub); font-weight: 400; }

.fc-sm-modal__countdown {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 16px 0 0;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  padding: 10px 12px;
  background: #1a1a1a;
  color: var(--fc-sub);
  font-size: 12px;
}

.fc-sm-modal__countdown strong {
  border-radius: 10px;
  padding: 6px 9px;
  background: #292929;
  color: var(--fc-text);
  font-size: 14px;
  line-height: 1.2;
  white-space: nowrap;
}

.fc-sm-modal__description {
  margin-top: 16px;
  border-top: 1px solid var(--fc-border);
  padding-top: 15px;
  color: #e5e5e5;
  font-size: 14px;
  line-height: 1.6;
}

.fc-sm-modal__actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
}

.fc-sm-text-link { color: #e5e5e5; font-size: 13px; text-decoration: none; }
.fc-sm-modal-open { overflow: hidden; }

/* Retained single-event and optional hero styles for existing shortcodes. */
.fc-sm-hero {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  margin-bottom: 18px;
  border: 1px solid var(--fc-border);
  border-radius: 10px;
  background: linear-gradient(90deg, #151515 35%, rgba(21, 21, 21, .55)), var(--fc-sm-hero-image) center / cover, var(--fc-card);
}

.fc-sm-hero__content {
  display: flex;
  min-height: 260px;
  max-width: 570px;
  flex-direction: column;
  justify-content: center;
  padding: 30px;
}

.fc-sm-hero h2,
.fc-sm-single-event h1 { margin: 9px 0 7px; color: var(--fc-text); font-size: clamp(24px, 4vw, 38px); line-height: 1.08; }
.fc-sm-hero p { margin: 0; color: var(--fc-sub); font-size: 14px; }
.fc-sm-hero__meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; color: var(--fc-sub); font-size: 13px; }
.fc-sm-single { background: var(--fc-bg); }
.fc-sm-single-event { max-width: 1120px; margin: auto; padding: 30px 18px 60px; }
.fc-sm-single-event__back { color: var(--fc-sub); font-size: 13px; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .fc-sm-schedule *,
  .fc-sm-single-event * { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media (max-width: 700px) {
  .fc-sm-schedule { padding: 20px 14px; }
  .fc-sm-controls { overflow: hidden; margin-bottom: 14px; }
  .fc-sm-control-types { width: 100%; gap: 4px; }
  .fc-sm-control-types button,
  .fc-sm-control-types select { min-height: 36px; padding: 0 8px; font-size: 10px; }
  .fc-sm-control-types select { min-width: 0; flex: 1 1 108px; }

  .fc-sm-events { gap: 10px; }
  .fc-sm-event {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 11px;
    align-items: start;
    min-height: 0;
    padding: 10px;
  }

  .fc-sm-event__image { width: 72px; align-self: start; }
  .fc-sm-event__body { align-self: start; justify-content: start; padding-top: 1px; }
  .fc-sm-event__topline { min-height: 11px; margin-bottom: 3px; }
  .fc-sm-badge { padding: 1px 5px; font-size: 7px; }
  .fc-sm-event h3 { margin-bottom: 3px; font-size: 13px; line-height: 1.27; }
  .fc-sm-event__details { gap: 2px; font-size: 12px; line-height: 1.3; }
  .fc-sm-event__aside { grid-column: 2; justify-content: flex-end; padding-top: 2px; }
  .fc-sm-event__aside button { padding: 1px 0; font-size: 12px; }
  .fc-sm-pagination { margin-top: 16px; }
  .fc-sm-load-more { min-height: 36px; font-size: 12px; }

  .fc-sm-modal { padding: 12px; }
  .fc-sm-modal__panel { max-height: 88vh; padding: 18px; }
  .fc-sm-modal__banner { margin-bottom: 12px; }
  .fc-sm-modal .fc-sm-badge { padding: 3px 7px; font-size: 10px; }
  .fc-sm-modal__panel h2 { margin-top: 8px; font-size: 17px; }
  .fc-sm-modal__meta,
  .fc-sm-modal__description { font-size: 13px; }
  .fc-sm-modal__countdown { margin-top: 14px; padding: 9px 10px; font-size: 11px; }
  .fc-sm-modal__countdown strong { padding: 6px 8px; font-size: 13px; }
  .fc-sm-modal__actions .fc-sm-button { width: 100%; }
  .fc-sm-hero__content { min-height: 230px; padding: 22px; }
}
