/* Shared Neighborhood visual system — Modern theme
 * Preserves all existing templates and interactions while reducing visual density.
 */
:root {
  --vf-neighborhood-canvas: #eef5fb;
  --vf-neighborhood-surface: #ffffff;
  --vf-neighborhood-border: rgba(65, 94, 134, .13);
  --vf-neighborhood-muted: #718099;
  --vf-neighborhood-ink: #172b4d;
  --vf-neighborhood-radius: 18px;
  --vf-neighborhood-shadow: 0 10px 28px rgba(37, 69, 112, .065);
}

html body:not(.vf-forge-admin) { background: var(--vf-neighborhood-canvas); color: var(--vf-neighborhood-ink); }
html body:not(.vf-forge-admin) .main-wrapper { background: transparent; }

/* One quiet card language for feeds, groups, pages, profiles and utility panels. */
html body:not(.vf-forge-admin) .main-wrapper :is(.post, .sidebar-card, .sidebar-meta-widget, .vf-widgetkit-card, .profile-card, .group-card, .page-card, .event-card, .blog-card) {
  border: 1px solid var(--vf-neighborhood-border);
  border-radius: var(--vf-neighborhood-radius);
  box-shadow: var(--vf-neighborhood-shadow);
}
html body:not(.vf-forge-admin) .main-wrapper .card:not(.publisher):not(.modal-content):not(.dropdown-widget) {
  border-color: var(--vf-neighborhood-border);
  border-radius: var(--vf-neighborhood-radius);
  box-shadow: var(--vf-neighborhood-shadow);
}
html body:not(.vf-forge-admin) .main-wrapper .card-header {
  border-color: rgba(65, 94, 134, .1);
}
html body:not(.vf-forge-admin) .main-wrapper :is(.page-header, .vf-feed-hero, .vf-events-hero, .vf-world-hero) {
  border-radius: 22px;
}

/* Preserve media impact while letting text and actions breathe. */
html body:not(.vf-forge-admin) .main-wrapper .post > .card-body,
html body:not(.vf-forge-admin) .main-wrapper .post .post-body,
html body:not(.vf-forge-admin) .main-wrapper .post .post-footer {
  padding-right: clamp(16px, 2vw, 24px);
  padding-left: clamp(16px, 2vw, 24px);
}
html body:not(.vf-forge-admin) .main-wrapper .post .post-footer { border-top-color: rgba(65, 94, 134, .1); }

/* Shared page rhythm on non-home destinations. */
@media (min-width: 1200px) {
  html body:not(.vf-forge-admin) .main-wrapper .container:not(.vf-newsfeed-shell),
  html body:not(.vf-forge-admin) .main-wrapper .container-fluid:not(.vf-newsfeed-shell) {
    padding-right: clamp(24px, 3vw, 52px);
    padding-left: clamp(24px, 3vw, 52px);
  }
  html body:not(.vf-forge-admin):not(.vf-page-index) .main-wrapper .page-header {
    margin-top: 28px;
    margin-bottom: 24px;
  }
}

/* Composer: one strong invitation to publish, with supporting actions on one calm line. */
html body:not(.vf-forge-admin) .main-wrapper .publisher {
  border: 1px solid var(--vf-neighborhood-border);
  border-radius: var(--vf-neighborhood-radius);
  box-shadow: var(--vf-neighborhood-shadow);
}
html body:not(.vf-forge-admin) .main-wrapper .publisher .publisher-message { min-height: 64px; }
html body:not(.vf-forge-admin) .main-wrapper .publisher .colored-text-wrapper textarea {
  min-height: 42px;
  border-radius: 14px;
  background: #f6f9fd;
}
html body:not(.vf-forge-admin) .main-wrapper .publisher .publisher-tools,
html body:not(.vf-forge-admin) .main-wrapper .publisher .publisher-tools-quick {
  border-top-color: rgba(65, 94, 134, .1);
}

/* The home launcher is a separate component from the legacy publisher. */
html body.vf-page-index:not(.vf-forge-admin) .main-wrapper .composer-launcher {
  border: 1px solid var(--vf-neighborhood-border);
  border-radius: 20px;
  box-shadow: var(--vf-neighborhood-shadow);
  overflow: hidden;
}
html body.vf-page-index:not(.vf-forge-admin) .main-wrapper .composer-launcher .composer-launcher-prompt {
  background: #f6f9fd;
  border-color: transparent;
  border-radius: 999px;
}
html body.vf-page-index:not(.vf-forge-admin) .main-wrapper .composer-launcher .composer-launcher-actions {
  border-top-color: rgba(65, 94, 134, .1);
}

/* Feed filters and page controls share a light, comfortably spaced treatment. */
html body:not(.vf-forge-admin) .main-wrapper :is(.vf-feed-filters, .posts-filter, .page-tabs, .profile-tabs) :is(.btn, .nav-link, a) {
  border-radius: 999px;
}

/* Story content reads as a living strip, not a large blank container. */
@media (min-width: 768px) {
  /* An empty Stories collection should remain a small invitation, not a blank billboard. */
  html body.vf-page-index .main-wrapper .vf-stories-card.vf-stories-card-empty {
    min-height: 116px !important;
  }
  html body.vf-page-index .main-wrapper .vf-stories-card.vf-stories-card-empty .card-header {
    display: none !important;
  }
  html body.vf-page-index .main-wrapper .vf-stories-card.vf-stories-card-empty .stories-wrapper {
    min-height: 0 !important;
    padding: 10px 22px !important;
    display: flex !important;
    align-items: center !important;
  }
  html body.vf-page-index #vf-main-content .vf-stories-card.vf-stories-card-empty #stories.vf-stories-rail {
    height: 96px !important;
    min-height: 96px !important;
    align-items: center !important;
  }
  html body.vf-page-index #vf-main-content .vf-stories-card.vf-stories-card-empty #stories.vf-stories-rail .add-story {
    height: 96px !important;
    justify-content: center !important;
  }
  html body.vf-page-index #vf-main-content .vf-stories-card.vf-stories-card-empty #stories.vf-stories-rail .add-story .add {
    width: 68px !important;
    min-width: 68px !important;
    height: 68px !important;
  }
  html body.vf-page-index .main-wrapper .vf-stories-card:not(.vf-stories-card-empty) .card-header {
    display: none;
  }
  html body.vf-page-index .main-wrapper .vf-stories-card:not(.vf-stories-card-empty) .stories-wrapper {
    padding: 16px 18px;
  }
  html body.vf-page-index .main-wrapper .vf-stories-card:not(.vf-stories-card-empty) #stories.stories.sngine.carousel {
    gap: 14px;
    padding-bottom: 2px;
  }
  html body.vf-page-index .main-wrapper .vf-stories-card:not(.vf-stories-card-empty) #stories .story,
  html body.vf-page-index .main-wrapper .vf-stories-card:not(.vf-stories-card-empty) #stories .add-story {
    width: 92px !important;
    min-width: 92px !important;
    height: 142px !important;
    border-radius: 15px;
  }
}

/* Utility rail: the same vertical cadence on every page. */
html body:not(.vf-forge-admin) .main-wrapper .vf-side-rail > * { margin-bottom: 18px; }
html body:not(.vf-forge-admin) .main-wrapper .vf-side-rail :is(.card, .vf-widgetkit-card) { overflow: hidden; }
html body:not(.vf-forge-admin) .main-wrapper .vf-side-rail .card-header { padding: 14px 16px 10px; }

/* Mobile keeps the system roomy without adding horizontal pressure. */
@media (max-width: 767.98px) {
  html body:not(.vf-forge-admin) .main-wrapper .card:not(.modal-content):not(.dropdown-widget),
  html body:not(.vf-forge-admin) .main-wrapper .publisher,
  html body:not(.vf-forge-admin) .main-wrapper :is(.post, .sidebar-card, .vf-widgetkit-card) {
    border-radius: 15px;
  }
  html body:not(.vf-forge-admin) .main-wrapper .page-header { border-radius: 18px; }
}
