/* ============================================================
   Hustlers Crib – Community Feed (Skool-style)
   community-feed.css
   ============================================================ */

/* ── Reset ── */
.cf-body *, .cf-body *::before, .cf-body *::after { box-sizing: border-box; }
.cf-body { background: #f0eeeb !important; }

/* Hide default Sngine main-header & sidebar so our nav takes over */
.cf-body .main-header,
.cf-body .sg-offcanvas-sidebar { display: none !important; }

/* ================================================================
   TOP NAV
   ================================================================ */
.cf-nav {
  position: sticky;
  top: 0;
  z-index: 200;
  background: #ffffff;
  border-bottom: 1px solid #e0dedd;
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}
.cf-nav-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  gap: 16px;
}

/* Left: community brand */
.cf-nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  cursor: pointer;
}
.cf-nav-brand-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0dedd;
  flex-shrink: 0;
}
.cf-nav-brand-name {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cf-nav-brand-chevron {
  width: 16px;
  height: 16px;
  color: #888;
  flex-shrink: 0;
  transition: transform .2s;
}
.cf-nav-brand-chevron.open { transform: rotate(180deg); }

/* Center: search */
.cf-nav-search {
  flex: 1;
  max-width: 400px;
  margin: 0 auto;
  position: relative;
}
.cf-nav-search-input {
  width: 100%;
  height: 38px;
  border: 1.5px solid #e0dedd;
  border-radius: 20px;
  padding: 0 16px 0 40px;
  font-size: 14px;
  color: #1a1a1a;
  background: #f8f7f5;
  outline: none;
  transition: border-color .2s;
}
.cf-nav-search-input:focus { border-color: #e6b541; background: #fff; }
.cf-nav-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #aaa;
  pointer-events: none;
}

/* Right: icons + avatar */
.cf-nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.cf-icon-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border: none;
  background: transparent;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #444;
  transition: background .15s;
  text-decoration: none;
}
.cf-icon-btn:hover { background: #f0eeeb; }
.cf-icon-btn svg { width: 20px; height: 20px; }

.cf-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  background: #e6b541;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  line-height: 1;
}
.cf-badge-red { background: #e53e3e; }

.cf-user-menu { position: relative; }
.cf-avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: #f0eeeb;
}
.cf-avatar-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Nav Dropdown */
.cf-dd-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #e0dedd;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  min-width: 220px;
  z-index: 300;
  display: none;
  padding: 6px 0;
  animation: cfDdIn .15s ease;
}
.cf-dd-menu.open { display: block; }
@keyframes cfDdIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cf-dd-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 16px;
  font-size: 14px;
  color: #1a1a1a;
  text-decoration: none;
  cursor: pointer;
  transition: background .12s;
  white-space: nowrap;
}
.cf-dd-item:hover { background: #f8f7f5; color: #1a1a1a; }
.cf-dd-divider { height: 1px; background: #f0eeeb; margin: 6px 0; }
.cf-dd-user-header { padding: 12px 16px; display: flex; align-items: center; gap: 12px; }
.cf-dd-user-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.cf-dd-user-name { font-weight: 600; font-size: 14px; color: #1a1a1a; }
.cf-dd-user-email { font-size: 12px; color: #888; }

/* Brand dropdown */
.cf-brand-dd {
  left: 0;
  right: auto;
  min-width: 200px;
}

/* ================================================================
   TABS
   ================================================================ */
.cf-tabs {
  background: #ffffff;
  border-bottom: 1px solid #e0dedd;
  position: sticky;
  top: 60px;
  z-index: 190;
}
.cf-tabs-inner {
  display: flex;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.cf-tabs-inner::-webkit-scrollbar { display: none; }
.cf-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 16px 12px;
  font-size: 14px;
  font-weight: 500;
  color: #666;
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: color .15s, border-color .15s;
  flex-shrink: 0;
}
.cf-tab:hover { color: #1a1a1a; }
.cf-tab.active {
  color: #1a1a1a;
  font-weight: 700;
  border-bottom-color: #1a1a1a;
}
.cf-tab svg { width: 15px; height: 15px; }
.cf-tab-dim { opacity: .45; cursor: default; }
.cf-tab-dim:hover { color: #666; }

/* ================================================================
   MAIN LAYOUT
   ================================================================ */
.cf-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
}

/* Two-column feed layout */
.cf-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.cf-feed { flex: 1; min-width: 0; }
.cf-sidebar {
  width: 300px;
  flex-shrink: 0;
  position: sticky;
  top: 120px;
}

/* Generic card */
.cf-card {
  background: #ffffff;
  border: 1px solid #e0dedd;
  border-radius: 12px;
  margin-bottom: 16px;
  overflow: hidden;
}

/* ================================================================
   WRITE POST BAR
   ================================================================ */
.cf-write-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #ffffff;
  border: 1px solid #e0dedd;
  border-radius: 12px;
  padding: 12px 16px;
  cursor: pointer;
  margin-bottom: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.cf-write-bar:hover {
  border-color: #e6b541;
  box-shadow: 0 2px 8px rgba(230,181,65,.15);
}
.cf-write-bar-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid #e0dedd;
}
.cf-write-bar-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e6b541;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.cf-write-bar-prompt {
  flex: 1;
  height: 38px;
  display: flex;
  align-items: center;
  background: #f8f7f5;
  border: 1.5px solid #e0dedd;
  border-radius: 20px;
  padding: 0 16px;
  font-size: 14px;
  color: #aaa;
  pointer-events: none;
}

/* ================================================================
   FILTER PILLS
   ================================================================ */
.cf-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cf-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  color: #444;
  background: #fff;
  border: 1.5px solid #e0dedd;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
  white-space: nowrap;
}
.cf-pill:hover { border-color: #1a1a1a; color: #1a1a1a; }
.cf-pill.active {
  background: #1a1a1a;
  color: #fff;
  border-color: #1a1a1a;
}
.cf-pill svg { width: 13px; height: 13px; }

/* ================================================================
   SIDEBAR CARDS
   ================================================================ */
.cf-sidebar-cover {
  width: 100%;
  height: 100px;
  object-fit: cover;
  display: block;
}
.cf-sidebar-cover-placeholder {
  width: 100%;
  height: 100px;
  background: linear-gradient(135deg, #e6b541 0%, #c49330 100%);
}
.cf-sidebar-body { padding: 16px; }
.cf-sidebar-avatar-wrap {
  margin-top: -28px;
  margin-bottom: 12px;
}
.cf-sidebar-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}
.cf-sidebar-group-name {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 4px;
  text-decoration: none;
  display: block;
}
.cf-sidebar-group-name:hover { color: #e6b541; }
.cf-sidebar-url {
  font-size: 12px;
  color: #888;
  margin-bottom: 10px;
}
.cf-sidebar-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cf-sidebar-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 14px;
}
.cf-stat { text-align: center; }
.cf-stat-val {
  font-size: 18px;
  font-weight: 700;
  color: #1a1a1a;
  display: block;
}
.cf-stat-label { font-size: 11px; color: #888; text-transform: uppercase; letter-spacing: .5px; }

.cf-member-avatars {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
}
.cf-member-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  margin-right: -8px;
  flex-shrink: 0;
}
.cf-member-more {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #f0eeeb;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  color: #555;
  margin-right: -8px;
  flex-shrink: 0;
}

.cf-invite-btn {
  display: block;
  width: 100%;
  padding: 10px;
  background: #e6b541;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background .15s;
}
.cf-invite-btn:hover { background: #c49330; color: #fff; }

/* Join button */
.cf-join-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: #1a1a1a;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.cf-join-btn:hover { background: #333; color: #fff; }
.cf-joined-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  background: #f0eeeb;
  color: #1a1a1a;
  border: 1.5px solid #e0dedd;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background .15s;
}
.cf-joined-btn:hover { background: #e0dedd; }

/* Privacy badge */
.cf-privacy-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #888;
  padding: 2px 8px;
  background: #f0eeeb;
  border-radius: 10px;
  margin-bottom: 12px;
}
.cf-privacy-badge svg { width: 11px; height: 11px; }

/* Status card */
.cf-status-card { padding: 16px; }
.cf-status-title {
  font-size: 12px;
  font-weight: 700;
  color: #888;
  text-transform: uppercase;
  letter-spacing: .5px;
  margin-bottom: 12px;
}
.cf-status-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 13px;
  color: #444;
}
.cf-status-emoji { font-size: 18px; width: 28px; text-align: center; }
.cf-status-user { font-weight: 500; color: #1a1a1a; }
.cf-status-text { color: #666; font-size: 12px; }

/* Powered by footer */
.cf-powered {
  text-align: center;
  font-size: 11px;
  color: #aaa;
  padding: 12px 0 0;
}
.cf-powered a { color: #e6b541; text-decoration: none; font-weight: 600; }
.cf-powered a:hover { text-decoration: underline; }

/* ================================================================
   POSTS WRAPPER  (keep Sngine's post cards, just tweak spacing)
   ================================================================ */
.cf-feed .alert-post,
.cf-feed .post-wrapper {
  border-radius: 12px !important;
  border: 1px solid #e0dedd !important;
  margin-bottom: 16px !important;
}

/* ================================================================
   ADMIN QUICK ACTIONS (small strip above sidebar)
   ================================================================ */
.cf-admin-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid #e0dedd;
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.cf-admin-bar a, .cf-admin-bar button {
  font-size: 12px;
  color: #555;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid #e0dedd;
  background: #fff;
  cursor: pointer;
  transition: background .12s;
}
.cf-admin-bar a:hover, .cf-admin-bar button:hover { background: #f0eeeb; }
.cf-admin-bar svg { width: 13px; height: 13px; }

/* ================================================================
   PENDING POSTS ALERT
   ================================================================ */
.cf-pending-alert {
  background: #fff8e6;
  border: 1px solid #e6b541;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: #7a5a00;
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.cf-pending-alert:hover { background: #fff3cc; }
.cf-pending-alert svg { width: 16px; height: 16px; flex-shrink: 0; }

/* ================================================================
   OTHER VIEWS (members, settings, photos, etc.) — full-width
   ================================================================ */
.cf-full-content {
  background: #fff;
  border: 1px solid #e0dedd;
  border-radius: 12px;
  overflow: hidden;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 900px) {
  .cf-layout { flex-direction: column; }
  .cf-sidebar { width: 100%; position: static; }
  .cf-nav-search { max-width: 200px; }
  .cf-nav-brand-name { max-width: 120px; }
}
@media (max-width: 600px) {
  .cf-nav { padding: 0 12px; }
  .cf-page { padding: 16px 12px; }
  .cf-tabs-inner { padding: 0 12px; }
  .cf-tab { padding: 12px 12px 10px; }
  .cf-nav-search { display: none; }
}
