/* ============================================================
   Grypes Community UI 1.0.3
   Community switcher, bottom nav, invite, homepage compaction,
   and feed-card typography (directive Phase 4.4).
   Scoped to avoid touching Platform/Canvas rules more than needed.
   ============================================================ */

/* ---------- Community switcher (injected into .gyp-nav by JS) ---------- */
#gycu-switcher{margin:0 2px;flex:0 1 auto;min-width:0;}
.gycu-switcher-form{margin:0;}
.gycu-switcher-select{
  width:auto!important;max-width:180px;
  border:1px solid var(--gyp-border,#e5eaf2);border-radius:999px;
  padding:9px 32px 9px 14px;font-weight:800;font-size:.85rem;color:#14243e;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364708a' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center/13px;
  -webkit-appearance:none;appearance:none;cursor:pointer;white-space:nowrap;
  overflow:hidden;text-overflow:ellipsis;
}
.gycu-switcher-select:focus{border-color:#304edb;outline:2px solid #d4dcff;}

/* ---------- Bottom nav (replaces the Platform nav; mobile only) ---------- */
#gycu-bottom-nav{display:none;}
body.gycu-nav .gyp-bottom-nav{display:none!important;}
/* Canvas injects its own mobile nav (.gyc-bottom-nav, z-index 9999) whose
   "Post" is a dead /#gyp-compose link. It stacks on top of this nav, so
   suppress it wherever the Community UI nav is in charge. */
body.gycu-nav .gyc-bottom-nav{display:none!important;}

@media (max-width:620px){
  #gycu-bottom-nav{
    display:flex;position:fixed;bottom:0;left:0;right:0;z-index:300;
    justify-content:space-around;align-items:center;
    background:#fff;border-top:1px solid var(--gyp-border,#e5eaf2);
    padding:8px 4px calc(8px + env(safe-area-inset-bottom));
  }
  .gycu-bnav-item{
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:3px;min-width:60px;min-height:52px;
    color:#5a6982;text-decoration:none;font-size:11px;font-weight:700;
  }
  .gycu-bnav-item svg{width:24px;height:24px;}
  .gycu-bnav-item.is-active{color:#304edb;}
  .gycu-bnav-compose{
    display:flex;align-items:center;justify-content:center;
    width:58px;height:58px;border-radius:50%;
    background:#304edb;border:0;color:#fff;cursor:pointer;
    box-shadow:0 4px 16px rgba(48,78,219,.35);margin-top:-24px;flex:none;
  }
  .gycu-bnav-compose svg{width:28px;height:28px;}
  .gycu-bnav-compose:active{transform:scale(.94);}
  /* Keep the fixed nav from covering content. */
  body.gycu-nav{padding-bottom:calc(84px + env(safe-area-inset-bottom));}
  .gycu-switcher-select{max-width:132px;font-size:.8rem;padding:8px 28px 8px 12px;}
}

/* ---------- Get the app (Add to Home Screen) ---------- */
.gycu-install{
  position:fixed;left:12px;right:12px;z-index:290;
  bottom:calc(112px + env(safe-area-inset-bottom));
  display:flex;gap:8px;align-items:flex-start;
  background:#14243e;color:#fff;border-radius:16px;
  padding:14px 6px 14px 16px;box-shadow:0 10px 30px rgba(20,36,62,.35);
  font-size:.9rem;line-height:1.45;
}
.gycu-install strong{display:block;font-size:1rem;margin-bottom:2px;}
.gycu-install[hidden]{display:none!important;}
.gycu-install p{margin:0;color:#d7e0f5;}
.gycu-install-btn{
  margin-top:10px;background:#304edb;color:#fff;border:0;border-radius:999px;
  padding:10px 18px;font-weight:800;font-size:.9rem;cursor:pointer;min-height:44px;
}
.gycu-install-close{
  border:0;background:transparent;color:#fff;cursor:pointer;flex:none;
  font-size:1.5rem;line-height:1;min-width:44px;min-height:44px;
}
@media (min-width:621px){
  .gycu-install{left:auto;right:18px;bottom:18px;max-width:360px;}
}

/* ---------- Rutgers invitation ---------- */
.gycu-invite{
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  background:#ecf0ff;border:1px solid #d4dcff;border-radius:14px;
  padding:12px 8px 12px 16px;margin:0 0 16px;
  font-size:.9rem;color:#26357c;
}
.gycu-invite p{margin:0;}
.gycu-invite a{font-weight:800;color:#304edb;text-decoration:none;}
.gycu-invite button{
  border:0;background:transparent;cursor:pointer;color:#5a6982;
  font-size:1.4rem;line-height:1;min-width:44px;min-height:44px;flex:none;
}

/* ---------- Feed card typography (directive: 18-19px body, 16-17px bold
   username, 13-14px metadata, 14px reaction counts; dark high contrast) --- */
.grypes .gyp-card-text .gyp-card-body,
.grypes .gyp-card-body{
  font-size:19px;font-weight:600;line-height:1.45;color:#14243e;
}
.grypes .gyp-byline strong{font-size:16px;font-weight:800;color:#14243e;}
.grypes .gyp-byline span{font-size:13px;color:#64708a;}
.grypes .gyp-actions a,
.grypes .gyp-actions button{font-size:14px!important;}
.grypes .gyp-single .gyp-card-body{font-size:19px;line-height:1.5;color:#14243e;}

/* ---------- Signed-in homepage: content first ---------- */
/* If a hero/banner block ever renders above the home feed, signed-in
   members go straight to conversations. Logged-out visitors unaffected. */
body.logged-in .gyp-feed-home .gyp-page-hero{display:none;}
body.logged-in .gyp-feed-home .gyp-hero{display:none;}
body.logged-in .gyp-feed-home .gyp-composer-teaser{margin-bottom:12px;}

/* Keep the switcher from crowding the header icons on very small screens. */
@media (max-width:360px){
  .gyp-nav{gap:12px;}
  .gycu-switcher-select{max-width:112px;}
}
