/* ============================================================
   Custom Additions - All Features
   ============================================================ */

/* ── Post Actions: prevent scroll/hide issue ────────────────
   Root cause: some parent has overflow:hidden or transform
   that clips the post-actions bar.
   Fix: ensure the entire post card stack is overflow:visible
   ─────────────────────────────────────────────────────────── */

.post,
.post-body,
.post-footer,
.post-actions-wrapper,
.post-actions {
  overflow: visible !important;
}

/* Post actions - single row, no wrap, no scroll */
.post-actions {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  position: relative !important;
  width: 100% !important;
}

/* Each action button gets equal flex space */
.post-actions > * {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  text-align: center !important;
}

/* Follow button in post actions - same style as other action buttons */
.post-actions .js_post-follow-btn {
  flex: 1 1 0 !important;
  min-width: 0 !important;
  padding: 10px 4px !important;
  color: #555;
  font-size: 13px;
  font-weight: 700;
  line-height: 14px;
  text-align: center;
  border-radius: 14px;
  transition: all 0.1s ease-in-out;
  cursor: pointer;
  background: none !important;
  border: none !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
body.night-mode .post-actions .js_post-follow-btn {
  color: var(--body-color-dark);
}
.post-actions .js_post-follow-btn:hover {
  background: #f5f5f5 !important;
}
body.night-mode .post-actions .js_post-follow-btn:hover {
  background: var(--card-dark-hover) !important;
}

/* ── Post card: allow category search dropdown to overflow ── */
.post {
  overflow: visible !important;
  position: relative;
}

/* Global Category Assignment Box */
.post-global-category-box {
  background: linear-gradient(135deg, #f3e5f5 0%, #ede7f6 100%);
  border-top: 2px solid #9C27B0;
  padding: 12px 15px;
  position: relative;
  overflow: visible !important;
  border-radius: 0 0 16px 16px;
  z-index: 10;
}
body.night-mode .post-global-category-box {
  background: linear-gradient(135deg, #2d1b3d 0%, #1a1a2e 100%);
  border-top-color: #9C27B0;
}
.post-global-category-box .gc-assign-form {
  position: relative;
  overflow: visible !important;
}
.post-global-category-box .gc-search-input { font-size: 13px; }

/* Category search dropdown - ALWAYS show ABOVE the input, high z-index */
.post-global-category-box .gc-search-results {
  position: fixed !important;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.25);
  z-index: 999999 !important;
  max-height: 220px;
  overflow-y: auto;
  min-width: 250px;
  max-width: 400px;
}
body.night-mode .post-global-category-box .gc-search-results {
  background: #2d2d2d;
  border-color: #444;
}
.gc-search-result-item {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.15s;
}
.gc-search-result-item:last-child { border-bottom: none; }
.gc-search-result-item:hover { background: #f3e5f5; }
body.night-mode .gc-search-result-item:hover { background: #3d2b4d; }
.gc-search-result-item .gc-parent-name { font-size: 11px; color: #999; margin-left: 5px; }
.gc-assigned-tags { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; }
.gc-tag {
  display: inline-flex;
  align-items: center;
  background: #9C27B0;
  color: #fff;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  gap: 5px;
}
.gc-tag .gc-tag-remove { cursor: pointer; opacity: 0.7; font-size: 10px; }
.gc-tag .gc-tag-remove:hover { opacity: 1; }
.gc-skip-btn { font-size: 12px; }

/* ── Edge-to-Edge: Photo, Video, Reel ───────────────────── */
.post .post-photos-edge {
  margin: 8px -1px 0;
  overflow: hidden;
}
.post .post-photos-edge .pg_1x img {
  width: 100%;
  max-height: 600px;
  object-fit: cover;
  display: block;
}
.post .post-photos-edge .pg_1x { text-align: left; }
.post .post-photos-edge .pg_wrapper { overflow: hidden; }

.post .post-video-edge {
  margin: 0 -1px;
  overflow: hidden;
}
.post .post-video-edge video { display: block; width: 100%; }
.post .post-video-edge .plyr { border-radius: 0 !important; }

.post .post-reel-edge {
  margin: 0 -1px;
  overflow: hidden;
}
.post .post-reel-edge video { display: block; width: 100%; }
.post .post-reel-edge .plyr { border-radius: 0 !important; }

.post-reel-edge-wrapper { position: relative; }
.reel-newsfeed-fullscreen {
  position: absolute;
  top: 10px; right: 10px;
  z-index: 10;
  background: rgba(0,0,0,0.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.2s;
  padding: 0;
}
.reel-newsfeed-fullscreen:hover { background: rgba(0,0,0,0.85); }

/* ── User Suggestion Widget ─────────────────────────────── */
.gc-user-suggestion-widget {
  background: #fff;
  border-radius: 16px;
  padding: 15px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  border: 1px solid #f0f0f0;
}
body.night-mode .gc-user-suggestion-widget {
  background: var(--card-dark-color);
  border-color: var(--card-dark-divider);
}
.gc-user-suggestion-widget .widget-title {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gc-user-suggestion-widget .users-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 5px;
  scrollbar-width: thin;
}
.gc-user-suggestion-widget .user-card { flex: 0 0 auto; text-align: center; width: 80px; }
.gc-user-suggestion-widget .user-card img {
  width: 52px; height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e0e0;
}
.gc-user-suggestion-widget .user-card .user-name {
  font-size: 11px; color: #555;
  margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gc-user-suggestion-widget .user-card .follow-btn {
  font-size: 11px; padding: 2px 8px; margin-top: 4px;
}
.gc-user-suggestion-widget-li {
  list-style: none; padding: 0; margin-bottom: 20px;
}

/* ── City Autocomplete ───────────────────────────────────── */
.city-autocomplete-results,
.ads-city-suggestions,
.ads-cat-suggestions {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.12);
  z-index: 9999;
  max-height: 200px;
  overflow-y: auto;
}
body.night-mode .city-autocomplete-results,
body.night-mode .ads-city-suggestions,
body.night-mode .ads-cat-suggestions {
  background: #2d2d2d; border-color: #444;
}
.city-suggest-item, .ads-cat-suggest-item {
  padding: 8px 12px; cursor: pointer; font-size: 13px;
  border-bottom: 1px solid #f0f0f0; transition: background 0.15s;
}
.city-suggest-item:last-child, .ads-cat-suggest-item:last-child { border-bottom: none; }
.city-suggest-item:hover, .ads-cat-suggest-item:hover { background: #e3f2fd; }
body.night-mode .city-suggest-item:hover,
body.night-mode .ads-cat-suggest-item:hover { background: #1a3a4d; }
.bg-purple { background-color: #9C27B0 !important; }
.text-purple { color: #9C27B0 !important; }

/* ── Activity Posts List (newsfeed style) ────────────────── */
.activity-posts-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.activity-posts-list > li {
  margin-bottom: 20px;
}

/* Activity filter tabs - sky blue */
.activity-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.activity-tab-btn {
  text-decoration: none !important;
}
.activity-filter-tabs .btn,
.activity-tab-btn {
  background-color: #87CEEB !important;
  border-color: #5bb8d4 !important;
  color: #0d2137 !important;
  font-weight: 600;
  min-width: 80px;
}
.activity-filter-tabs .btn.active,
.activity-filter-tabs .btn-primary,
.activity-tab-btn.active,
.activity-tab-btn.btn-primary {
  background-color: #0288d1 !important;
  border-color: #0277bd !important;
  color: #ffffff !important;
}
.activity-filter-tabs .btn:hover,
.activity-tab-btn:hover {
  background-color: #5bb8d4 !important;
  border-color: #4aa8c4 !important;
  color: #0d2137 !important;
  text-decoration: none !important;
}

/* ── Hide "View New Posts" staging button ────────────────── */
.posts-staging-btn { display: none !important; }

