/* ================= FINAL MOBILE CLEANUP ================= */
body {
  background: #121212;
}
/* ================= MOBILE: STOP PULL-TO-REFRESH & OVERSCROLL ================= */
html,
body {
  height: 100%;
  max-width: 100%;
  overflow-x: hidden;

  /* 🔒 Stops pull-to-refresh + overscroll chaining */
  overscroll-behavior: none;
}

/* iOS Safari fix */
body {
  position: relative;
  background: #121212;
  -webkit-overflow-scrolling: auto; /* disables rubber-band */
}

/* Ensure scrolling happens only inside page */
@media (max-width: 480px) {
  body {
    touch-action: pan-y;
  }
}

@media (max-width: 480px) {

  /* ---------------- GLOBAL REMOVALS ---------------- */

  .bottom-row,
  .bottom-row *,
  .footer,
  .footer-links,
  .footer-links *,
  body > div[style*="text-align:center"],
  .user-posts,
  .user-posts *,
  .banner-links,
  .banner-links *,
  .nav-links,
  .nav-links * {
    display: none !important;
  }

  /* ❌ REMOVE ACCOUNT BOX */
  .login-logo,
  .login-logo * {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* ❌ REMOVE FROG ICONS */
  img[src*="frog-1.png"] {
    display: none !important;
  }

  /* ---------------- LAYOUT ---------------- */

  .main-content {
    display: flex !important;
    flex-direction: column !important;
  }

  /* ---------------- FRIEND REQUESTS ---------------- */

  /* ✅ KEEP FRIENDS / REQUESTS */
  .right-box {
    display: block !important;
    width: 100% !important;
    margin: 0 0 12px 0 !important;
    order: 1; /* 👈 FIRST */
  }

  .right-box-content {
    height: auto !important;
    overflow: visible !important;
  }

  /* ---------------- RECENT POSTS ---------------- */

  .content-box.left-box {
    display: block !important;
    width: 100% !important;
    margin: 0 0 12px 0 !important;
    order: 2; /* 👈 BELOW FRIENDS */
  }

  #recent-posts,
  .left-box-content {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }
.right-box {
  display: none !important;
}
  /* ---------------- REMOVE MESSAGES ONLY ---------------- */


  /* ---------------- CONTAINER ---------------- */

  .container {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    transform: none !important;
    position: relative !important;

    min-height: 100vh !important;
    padding: 90px 8px 40px;

    display: flex;
    flex-direction: column;
  }
}
.mobile-bottom-nav {
  display: none !important;
}
/* ================= MOBILE BOTTOM NAV ================= */
@media (max-width: 480px) {

  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 52px;

    background: #121212;

    display: flex;
    justify-content: space-around;
    align-items: center;

    z-index: 5000;
  }

  .mobile-bottom-nav a {
    font-size: 12px;
    color: #6ab0ff;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
  }

  .mobile-bottom-nav a:hover {
    text-decoration: underline;
  }

  /* Prevent content from hiding behind nav */
  .container {
    padding-bottom: 80px !important;
  }
}

.banner-text,
.banner-search-wrapper,
.banner-search-wrapper *,
#banner-search-form {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}
/* ================= MOBILE: RECENT POSTS FIX ================= */
@media (max-width: 480px) {

  /* Remove desktop height constraints */
  .main-content {
    height: auto !important;
    overflow: visible !important;
  }

  .content-box.left-box {
    min-height: 0 !important;
    height: auto !important;
    overflow: visible !important;
  }

  .left-box-content,
  #recent-posts {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* Ensure post cards expand and wrap */
  .post-item {
    width: 100% !important;
    height: auto !important;
    overflow: hidden !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .post-item img {
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
  }

}

@media (max-width: 480px) {

  .banner {
    width: calc(100vw - env(safe-area-inset-left) - env(safe-area-inset-right));
    margin-left: calc(-50vw + 50% + env(safe-area-inset-left));
    margin-right: calc(-50vw + 50% + env(safe-area-inset-right));

    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;


  }

  #ribbitLogo {
    max-height: 56px;
  }
}

@media (max-width: 480px) {
  body {
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 480px) {

  /* Stop desktop centering behavior */
  body {
    display: block !important;
  }

  /* Normalize container for mobile flow */
  .container {
    position: static !important;
    transform: none !important;
    padding-top: 0 !important;
    border: none !important;
  }

  /* Clean, normal mobile banner */
  .banner {
    position: static !important;
    height: auto !important;
    min-height: 56px;

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;


  }

  #ribbitLogo {
    display: block !important;
    margin: 0 auto !important;
    max-height: 56px;
  }

}
@media (max-width: 480px) {
  #invite-bottom {
    display: none !important;
  }
}
@media (max-width: 480px) {

  /* FULL-WIDTH MOBILE BANNER */
  .banner {
    width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;

    position: relative !important;
    left: 0 !important;
    right: 0 !important;

    display: flex !important;
    justify-content: center !important;
    align-items: center !important;


  }

  #ribbitLogo {
    max-height: 56px;
  }

}
/* ================= MOBILE: MESSAGES BOX MUST EXPAND ================= */
@media (max-width: 480px) {

  /* Outer messages box */
  .people-you-may-know {
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    overflow: visible !important;
  }

  /* Inner messages container (THIS is the scrollbar culprit) */
  .people-you-may-know-content {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: block !important;
  }

  /* Defensive: ensure children don’t force scroll */
  .people-you-may-know-content > *,
  .people-you-may-know-content * {
    max-height: none !important;
    overflow: visible !important;
  }
}
.mobile-bottom-nav a {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}


/* ================= MOBILE: HIDE BLOG CATEGORIES ================= */
@media (max-width: 480px) {

  /* Hide the "Categories:" title */
  .blog-green-box.left p {
    display: none !important;
  }

  /* Hide the entire categories container */
  .trending-categories {
    display: none !important;
  }

  /* Optional: tighten the left column spacing */
  .blog-green-box.left {
    padding-bottom: 0 !important;
    gap: 6px !important;
  }
}
/* ================= MOBILE: HIDE BLOG ACTION BUTTONS ================= */
@media (max-width: 480px) {

  /* Hide Upload Blog Entry */
  #create-entry-btn {
    display: none !important;
  }

  /* Hide Profile View */
  #profile-btn {
    display: none !important;
  }
}
/* ================= MOBILE: STACK BLOG LAYOUT ================= */
@media (max-width: 480px) {

  /* Make the blog row vertical instead of side-by-side */
  .blog-box-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px;
  }

  /* Ensure left profile box comes first */
  .blog-green-box.left {
    order: 1;
    width: 100% !important;
  }

  /* Blogs + entries BELOW profile info */
  .right-box-wrapper {
    order: 2;
    width: 100% !important;
  }

  /* Remove any desktop min-widths that force side-by-side */
  .blog-green-box.left,
  .blog-green-box.right,
  .right-box-wrapper {
    min-width: unset !important;
    max-width: 100% !important;
  }
}

/* ================= MOBILE: BLOG FEED ONLY ================= */
@media (max-width: 480px) {

  /* Remove the "Blogs" title */
  .blog-section-title {
    display: none !important;
  }

  /* Hide entire left profile/info box */
  .blog-green-box.left {
    display: none !important;
  }

  /* Hide username, profile picture, and counts if they exist elsewhere */
  #left-box-username,
  #left-box-pfp,
  #blog-profile-count,
  #blog-entry-total {
    display: none !important;
  }

  /* Ensure blog feed is the only visible content */
  .blog-box-row {
    display: block !important;
  }

  .right-box-wrapper {
    width: 100% !important;
    margin: 0 auto !important;
  }

  /* Center blog entries nicely */
  .blog-green-box.right {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .blog-entry {
    width: 95%;
    max-width: 420px;
    box-sizing: border-box;
  }
}
/* ================= MOBILE: CENTER BLOG CARDS HORIZONTALLY ================= */
@media (max-width: 480px) {

  /* Keep normal top-to-bottom flow */
  .blog-green-box.right {
    display: block !important;
  }

  /* Center cards horizontally, NOT vertically */
  .blog-entry {
    width: 110%;
    max-width: 420px;
    margin-left: 8px !important;
    margin-right: auto !important;
    box-sizing: border-box;
  }
}
/* ================= MOBILE (BLOG PAGE ONLY): REDUCE BANNER → BLOG GAP ================= */
@media (max-width: 480px) {

  /* Only when blog feed exists */
  .blog-box-row .right-box-wrapper {
    margin-top: 0 !important;
  }

  /* Tighten top of blog feed only */
  .blog-box-row .blog-green-box.right {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  /* Reduce space between blog cards (blog page only) */
  .blog-box-row .blog-entry {
    margin-bottom: 2px !important;
  }
}
@media (max-width: 480px) {
  body.has-site-background .container {
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
  }
}
@media (max-width: 480px) {

  .mobile-bottom-nav a,
  .mobile-bottom-nav a:link,
  .mobile-bottom-nav a:visited,
  .mobile-bottom-nav a:hover,
  .mobile-bottom-nav a:active,
  .mobile-bottom-nav a:focus {
    text-decoration: none !important;
    outline: none !important;
  }

  /* Remove iOS tap highlight */
  .mobile-bottom-nav a {
    -webkit-tap-highlight-color: transparent;
  }

}
@media (max-width: 480px) {

  .banner {
    position: relative;
    padding-top: env(safe-area-inset-top);
  }

  .banner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 32px; /* LOWER fade */

    pointer-events: none;
    z-index: 1;

    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;

    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.6) 0%,
      rgba(0,0,0,0.35) 40%,
      rgba(0,0,0,0.12) 70%,
      rgba(0,0,0,0) 100%
    );
  }

}
@media (max-width: 480px) {

  .mobile-bottom-nav {
    position: relative;
  }

  .mobile-bottom-nav::after {
    content: "";
    position: absolute;
    bottom: -32px; /* sits below nav */
    left: 0;
    width: 100%;
    height: 32px;

    pointer-events: none;
    z-index: 1;

    border-top-left-radius: 14px;
    border-top-right-radius: 14px;

    background: linear-gradient(
      to bottom,
      rgba(0,0,0,0.6) 0%,
      rgba(0,0,0,0.35) 40%,
      rgba(0,0,0,0.12) 70%,
      rgba(0,0,0,0) 100%
    );
  }

}

.right-column {
  background: transparent !important;
}
