/* Lantern ONE FEED — donor-style wide grid + shared Explore/Locker layout */
:root {
  --feed-fs-base: 22px;
  --feed-fs-title: 28px;
  --feed-fs-tag: 18px;
  --feed-bg: #0b1220;
  --feed-ink: #eaf0ff;
  --feed-muted: #b9c6ea;
  --feed-accent: #5aa7ff;
  --feed-line: rgba(255, 255, 255, 0.12);
  --feed-r: 18px;
  /* Donor archive-content-wide: 6 × 280px + 5 × 1rem gaps */
  --feed-grid-max-width: 1760px;
  --lantern-feed-page-max-width: var(--feed-grid-max-width);
}

/* Wide feed pages break out of the default 980px shell */
.wrap.lanternContent.lanternContent--feedWide {
  max-width: none;
  width: 100%;
  box-sizing: border-box;
}

.lanternExplorePageContainer {
  width: min(var(--lantern-feed-page-max-width), calc(100vw - 2.5rem));
  max-width: 100%;
  margin-inline: auto;
  box-sizing: border-box;
}

.feedHeading {
  width: 100%;
  margin: 0 0 16px;
  box-sizing: border-box;
}

.feedHeadingRow {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px 16px;
  flex-wrap: wrap;
}

/* Prompt #169 — title + Filters + item count as one compact right-aligned control stack */
.feedHeadingControls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  flex: 0 0 auto;
  margin-left: auto;
  min-width: 0;
}

.feedHeadingControls .feedFiltersToggle {
  margin-left: 0;
}

.feedHeadingControls .feedItemCount,
.feedHeadingControls .feedStatus {
  margin: 0;
  margin-left: 0;
  line-height: 1.2;
  text-align: right;
}

/* Prompt #185 — Locker My Lantern: one compact row (title | count | Filters) */
.feedHeadingControls--inline {
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 10px 12px;
  flex-wrap: nowrap;
}

.feedHeadingControls--inline .feedItemCount,
.feedHeadingControls--inline .feedStatus {
  text-align: right;
  white-space: nowrap;
}

.feedHeading--lockerCompact {
  margin: 0 0 var(--lantern-space-sm, 12px);
}

.feedHeading--lockerCompact .feedHeadingRow {
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 12px;
}

.feedHeading--lockerCompact .feedPageTitle {
  flex: 1 1 auto;
  min-width: 0;
  line-height: 1.2;
}

.feedHeading--lockerCompact .feedFiltersToggle {
  padding: 8px 12px;
}

@media (max-width: 420px) {
  .feedHeading--lockerCompact .feedHeadingRow {
    gap: 6px 8px;
  }
  .feedHeadingControls--inline {
    gap: 6px 8px;
  }
  .feedHeading--lockerCompact .feedFiltersToggle {
    padding: 8px 10px;
  }
}

.feedMetaRow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px 16px;
  flex-wrap: wrap;
  margin-top: 6px;
}

.feedMetaRow--statusOnly {
  justify-content: flex-end;
  margin-top: 4px;
  min-height: 0;
}

/* Explore-only: tighter gap from title/controls to first card row */
.feedHeading--exploreCompact {
  margin: 0 0 var(--lantern-space-sm, 12px);
}

.feedHeading--exploreCompact .feedHeadingRow {
  align-items: flex-start;
  gap: var(--lantern-space-sm, 12px) var(--lantern-space-md, 16px);
}

.feedHeading--exploreCompact .feedPageTitle {
  padding-top: 8px; /* optically align with Filters button text, not full 48px control */
  line-height: 1.2;
}

/* Prompt #187 — Explore body chrome removed; only filter panel remains above cards */
.feedHeading--exploreHeaderFilters {
  margin: 0;
  width: 100%;
  box-sizing: border-box;
}

.feedHeading--exploreHeaderFilters .feedFiltersPanel {
  margin-top: 0;
  margin-bottom: var(--lantern-space-sm, 12px);
  padding-top: 10px;
}

.feedHeading--exploreHeaderFilters .feedFiltersPanel[hidden] {
  margin: 0;
  padding: 0;
  border: 0;
}

.feedPageTitle {
  font-size: 32px;
  font-weight: 900;
  margin: 0;
  padding: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.feedPageSub {
  font-size: var(--feed-fs-base);
  color: var(--feed-muted);
  margin: 0;
  padding: 0;
  line-height: 1.4;
  flex: 1 1 auto;
  min-width: 0;
  max-width: min(100%, 42rem);
}

.feedHeadingRow .feedFiltersToggle {
  flex: 0 0 auto;
  margin-left: auto;
}

.feedItemCount,
.feedMetaRow .feedStatus {
  flex: 0 0 auto;
  margin: 0;
  margin-left: auto;
  text-align: right;
  white-space: nowrap;
}

.feedFiltersToggle {
  font-size: var(--feed-fs-base);
  font-weight: 900;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--feed-line);
  background: rgba(0, 0, 0, 0.22);
  color: var(--feed-ink);
  cursor: pointer;
  font-family: inherit;
  min-height: 48px;
}

.feedFiltersToggle:hover,
.feedFiltersToggle:focus-visible {
  border-color: rgba(90, 167, 255, 0.45);
  outline: 2px solid rgba(90, 167, 255, 0.35);
  outline-offset: 2px;
}

.feedFiltersPanel {
  margin-top: 12px;
  padding: 14px 0 4px;
  border-top: 1px solid var(--feed-line);
}

.feedFiltersPanel[hidden] {
  display: none !important;
}

.feedFiltersSection {
  margin-bottom: 14px;
}

.feedFiltersSectionLabel {
  font-size: var(--feed-fs-base);
  font-weight: 800;
  color: var(--feed-muted);
  margin: 0 0 8px;
}

.feedFiltersToolbarRow {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 12px;
}

.feedSortSelect {
  font-size: var(--feed-fs-base);
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--feed-line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--feed-ink);
  min-height: 48px;
}

.feedToolbarBtn {
  font-size: var(--feed-fs-base);
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--feed-line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--feed-muted);
  cursor: pointer;
  font-weight: 800;
  min-height: 48px;
  font-family: inherit;
}

.feedToolbarBtn:hover {
  color: var(--feed-ink);
  border-color: rgba(90, 167, 255, 0.45);
}

.feedFilterBar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 0 8px;
  overflow-x: visible;
}

.feedFilterChip {
  font-size: var(--feed-fs-tag);
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--feed-line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--feed-muted);
  cursor: pointer;
  font-weight: 800;
  white-space: nowrap;
}

.feedFilterChip--active {
  background: rgba(90, 167, 255, 0.2);
  border-color: rgba(90, 167, 255, 0.5);
  color: var(--feed-ink);
}

.feedResultsHost {
  width: 100%;
  max-width: none;
  margin: 0;
  transform: none;
  position: relative;
  padding: 0 0 32px;
  box-sizing: border-box;
}

.feedStatus {
  font-size: var(--feed-fs-base);
  color: var(--feed-muted);
}

.feedGrid,
.homeFeaturedGrid,
#homeFeatured,
#homeLatest {
  display: grid;
  /* Donor .archive-grid — fixed track width, auto-fit column count, centered */
  grid-template-columns: repeat(auto-fit, var(--lantern-card-width, 280px));
  gap: var(--lantern-card-gap, 1rem);
  justify-content: center;
  align-items: start;
  width: 100%;
}

.feedGrid > .exploreCard,
.feedGrid > .exploreCardOuterWrap,
.homeFeaturedGrid > .exploreCard,
.homeFeaturedGrid > .exploreCardOuterWrap {
  width: var(--lantern-card-width, 280px);
  max-width: var(--lantern-card-width, 280px);
  justify-self: center;
}

.feedEmpty {
  text-align: center;
  padding: 40px 16px;
  font-size: var(--feed-fs-base);
  color: var(--feed-muted);
}

/* Detail overlay only — no production compact feed-card face */
.feedDetailReactions,
.feedDetailReactionsHost .feedDetailReactions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.feedReactionBtn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--feed-line);
  background: rgba(0, 0, 0, 0.2);
  cursor: pointer;
  font-size: 20px;
}

.feedReactionBtn--on {
  border-color: rgba(90, 167, 255, 0.6);
  background: rgba(90, 167, 255, 0.15);
}

.feedReactionCount {
  font-size: 16px;
  font-weight: 800;
  color: var(--feed-ink);
}

.feedTeacherComments {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: var(--feed-fs-tag);
}

.feedTeacherComment {
  padding: 8px 0;
  border-top: 1px solid var(--feed-line);
  line-height: 1.4;
}

.feedTeacherCommentBadge {
  display: inline-block;
  font-size: 14px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
  background: rgba(56, 208, 124, 0.2);
  color: #38d07c;
  margin-right: 6px;
}

.feedDetailCloseBtn,
.feedAddCommentBtn {
  font-size: var(--feed-fs-base);
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--feed-line);
  background: rgba(255, 255, 255, 0.08);
  color: var(--feed-ink);
  cursor: pointer;
  width: 100%;
}

.feedDetailSlotHost {
  margin: 10px 0;
}
.feedDetailSlot {
  font-size: var(--feed-fs-base);
  font-weight: 800;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(90, 167, 255, 0.1);
}
.feedDetailCommentsHost {
  margin-top: 12px;
}
.feedDetailTeacherTools {
  margin-top: 12px;
}

.feedDetailOverlay {
  position: fixed;
  inset: 0;
  z-index: 10050;
  background: rgba(5, 7, 11, 0.92);
  overflow: auto;
  padding: 24px 16px;
}

.feedDetailPanel {
  max-width: 520px;
  margin: 0 auto;
  background: #0f1b33;
  border-radius: var(--feed-r);
  padding: 20px;
  border: 1px solid var(--feed-line);
}

.feedDetailTitle {
  font-size: 30px;
  font-weight: 900;
  margin: 0 0 12px;
}

.feedDetailBody {
  font-size: var(--feed-fs-base);
  line-height: 1.5;
  color: var(--feed-muted);
}

.feedDetailImg {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 12px;
}

.feedDetailClose {
  font-size: var(--feed-fs-base);
  margin-top: 16px;
  padding: 10px 16px;
  width: 100%;
}

.homeNavGrid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 0 var(--lantern-pad-x, 16px) 24px;
}

.homeNavBtn {
  display: block;
  font-size: 26px;
  font-weight: 900;
  padding: 18px 16px;
  border-radius: var(--feed-r);
  border: 1px solid var(--feed-line);
  background: rgba(15, 27, 51, 0.9);
  color: var(--feed-ink);
  text-align: center;
  text-decoration: none;
}

.homeFeaturedGrid {
  padding: 0 var(--lantern-pad-x, 16px) 32px;
}

.reviewRow {
  border: 1px solid var(--feed-line);
  border-radius: var(--feed-r);
  padding: 14px;
  margin-bottom: 12px;
  background: rgba(15, 27, 51, 0.85);
}

.reviewRowTitle {
  font-size: 26px;
  font-weight: 900;
  margin: 0 0 6px;
}

.reviewRowMeta {
  font-size: var(--feed-fs-base);
  color: var(--feed-muted);
  margin-bottom: 10px;
}

.reviewActions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.reviewActions button,
.reviewActions textarea {
  font-size: var(--feed-fs-base);
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--feed-line);
  background: rgba(0, 0, 0, 0.2);
  color: var(--feed-ink);
}

.createForm label {
  display: block;
  font-size: var(--feed-fs-base);
  font-weight: 800;
  margin: 12px 0 6px;
}

.createForm input,
.createForm select,
.createForm textarea {
  width: 100%;
  font-size: var(--feed-fs-base);
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--feed-line);
  background: rgba(0, 0, 0, 0.25);
  color: var(--feed-ink);
}

.createForm textarea {
  min-height: 120px;
}

.createFormActions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.createFormActions button {
  font-size: var(--feed-fs-base);
  font-weight: 800;
  padding: 14px;
  border-radius: 12px;
  border: 1px solid var(--feed-line);
  cursor: pointer;
}

/* Prompt #137 — SYSTEM_ADMIN Marquee Feed inspector (read-only Power Scroller). */
.marqueeFeedOverlay {
  position: fixed;
  inset: 0;
  z-index: 10060;
  background: rgba(5, 7, 11, 0.92);
  overflow: auto;
  padding: 24px 16px;
}
.marqueeFeedOverlay[hidden] {
  display: none !important;
}
.marqueeFeedPanel {
  max-width: 960px;
  margin: 0 auto;
  background: #0f1b33;
  border-radius: 16px;
  padding: 18px 16px 20px;
  border: 1px solid var(--feed-line, rgba(255, 255, 255, 0.12));
}
.marqueeFeedPanelHd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.marqueeFeedPanelHd h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 900;
}
.marqueeFeedHint {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 700;
  color: var(--feed-muted, #b9c6ea);
}
.marqueeFeedCloseBtn {
  font-size: 18px;
  font-weight: 800;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--feed-line, rgba(255, 255, 255, 0.12));
  background: rgba(0, 0, 0, 0.22);
  color: var(--feed-ink, #eaf0ff);
  cursor: pointer;
  font-family: inherit;
  min-height: 44px;
}
.marqueeFeedDl {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(120px, 0.7fr) minmax(0, 1.4fr);
  gap: 6px 12px;
  font-size: 16px;
  font-weight: 700;
}
.marqueeFeedDl dt {
  color: var(--feed-muted, #b9c6ea);
}
.marqueeFeedDl dd {
  margin: 0;
  word-break: break-word;
}

.feedLoadMoreWrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 24px 0 8px;
  width: 100%;
}

.feedLoadMoreBtn {
  min-height: 48px;
  padding: 12px 28px;
  border-radius: 14px;
  border: 2px solid rgba(90, 167, 255, 0.5);
  background: rgba(90, 167, 255, 0.16);
  color: var(--feed-ink, #eaf0ff);
  font-size: 22px;
  font-weight: 800;
  font-family: inherit;
  cursor: pointer;
}

.feedLoadMoreBtn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.feedLoadMoreStatus {
  margin: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: var(--feed-muted, #b9c6ea);
}
