/* =============================================================================
 * RoamRecs shared navbar styles.
 * Assembled from member-home.css (base) + site-chrome.css (the app-chrome
 * overrides that load last), so any page can render the exact same navbar by
 * linking this file. The navbar markup is <nav class="navbar navbar--app">.
 * ========================================================================== */

/* ---- member-home.css: NAVBAR base ---------------------------------------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 2000;
  height: 72px;
  padding: 0 52px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  background: linear-gradient(180deg, #ffffff 0%, #fcfbff 100%);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
  justify-content: center;
  grid-column: 2;
}
.nav-logo {
  width: 160px;
  height: auto;
  grid-column: 1;
  justify-self: start;
}
.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
  grid-column: 3;
  justify-self: end;
}
.nav-item {
  font-size: 0.9rem;
  font-weight: 500;
  color: #000e33;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 0;
  position: relative;
  white-space: nowrap;
}
.nav-item::before {
  content: '';
  position: absolute;
  top: 100%;
  left: -12px;
  right: -12px;
  height: 18px;
  background: transparent;
}
.nav-item:hover i { transform: translateY(1px); }
.nav-item::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0066ff, #c27aff);
  opacity: 0;
  transform: scaleX(0.5);
  transform-origin: left center;
  transition: opacity 0.22s ease, transform 0.25s ease;
}
.nav-item:hover::after { opacity: 1; transform: scaleX(1); }
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  color: #6b7280;
  transition: color 0.2s ease, background 0.2s ease;
}
.icon-btn:hover { color: #000e33; background: rgba(0, 0, 0, 0.04); }
.create-btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #ffffff;
  background: linear-gradient(135deg, #0066ff 0%, #c27aff 100%);
  box-shadow: none;
  transition: box-shadow 0.25s ease, transform 0.15s ease;
}
.create-btn:hover { box-shadow: 0 6px 22px rgba(0, 102, 255, 0.38); transform: translateY(-1px); }
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  padding: 1px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.avatar:hover { transform: scale(1.03); box-shadow: none; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.menu-toggle { display: none; }
.hamburger { color: #000e33; font-size: 22px; cursor: pointer; display: none; }
.mobile-menu {
  display: none;
  flex-direction: column;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: #ffffff;
  padding: 16px 24px 24px;
  gap: 4px;
  border-top: 1px solid rgba(0, 0, 0, 0.07);
  box-sizing: border-box;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
}
.menu-toggle:checked ~ .mobile-menu { display: flex; }
.dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #ffffff;
  border-radius: 14px;
  padding: 6px;
  min-width: 190px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 1100;
}
.nav-item:hover .dropdown { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.dropdown a {
  display: block;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 400;
  color: #000e33 !important;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}
.dropdown a:hover { background: rgba(75, 91, 213, 0.08); color: #4b5bd5 !important; }
.profile-container { position: relative; display: flex; align-items: center; }
.profile-container::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -8px;
  right: -8px;
  height: 14px;
  background: transparent;
}
.profile-container .avatar { cursor: pointer; }
.profile-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: #ffffff !important;
  border-radius: 16px;
  padding: 6px;
  min-width: 180px;
  border: none;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.13), 0 1px 4px rgba(0, 0, 0, 0.06);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-8px);
  z-index: 1100;
}
.profile-dropdown::before {
  content: '';
  position: absolute;
  top: -12px;
  left: 0;
  right: 0;
  height: 12px;
  background: transparent;
}
.profile-container:hover .profile-dropdown { opacity: 1; pointer-events: auto; transform: translateY(0); }
.profile-dropdown a {
  display: flex;
  padding: 10px 14px;
  font-size: 0.9rem;
  font-weight: 400;
  color: #000e33 !important;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: 0;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}
.profile-dropdown a i { width: 15px; font-size: 0.85rem; opacity: 0.38; transition: opacity 0.15s ease; }
.profile-dropdown a:hover { background: rgba(75, 91, 213, 0.08) !important; color: #4b5bd5 !important; }
.profile-dropdown a:hover i { opacity: 0.85; }

@media (max-width: 1100px) { .navbar { padding: 0 36px; } }
@media (max-width: 900px) {
  .navbar { padding: 0 24px; }
  .nav-logo { width: 180px; }
  .nav-left { gap: 20px; }
}
@media (max-width: 768px) {
  .navbar { display: flex; justify-content: space-between; align-items: center; padding: 0 20px; max-width: 100vw; box-sizing: border-box; }
  .nav-logo { width: 170px; }
  .nav-left { display: none; }
  .nav-right { gap: 10px; }
  .nav-right .create-btn { display: none; }
  .hamburger { display: block; }
  .mobile-menu { z-index: 9999; }
  .mobile-menu a { color: #000e33 !important; text-decoration: none; }
  .mobile-menu .nav-item { color: #000e33; font-size: 1rem; font-weight: 500; padding: 8px 0; }
  .mobile-menu .create-btn { display: flex; width: 100%; justify-content: center; }
}

/* Notifications */
.notification-container { position: relative; display: flex; align-items: center; z-index: 2000001 !important; }
.notification-bell { position: relative; }
.notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 18px;
  text-align: center;
  display: none;
  box-shadow: 0 0 0 2px #ffffff;
}
.notification-modal {
  position: absolute;
  top: 52px;
  right: 0;
  width: 320px;
  max-height: 420px;
  background: linear-gradient(180deg, #ffffff 0%, #fcfbff 100%) !important;
  border-radius: 16px;
  color: #000e33;
  padding: 12px 0;
  border: 1px solid rgba(0, 14, 51, 0.06) !important;
  box-shadow: 0 18px 45px rgba(0,0,0,0.5);
  overflow-y: auto;
  z-index: 2000001 !important;
}
.notification-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px 8px;
  border-bottom: 1px solid rgba(0, 14, 51, 0.08);
}
.notification-header h4 {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.8;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.notif-close { background: none; border: none; color: #000e33 !important; font-size: 18px; cursor: pointer; padding: 4px; }
.notification-list { list-style: none; margin: 0; padding: 0; max-height: 360px; overflow-y: auto; color: #000e33; }
.notification-entry {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 16px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(0, 14, 51, 0.06);
}
.notification-entry.unread { background: rgba(0, 102, 255, 0.06); }
.notification-empty { padding: 12px 16px; font-size: 0.85rem; opacity: 0.7; }
@media (max-width: 768px) {
  .notification-modal { right: 50%; transform: translateX(50%); width: min(360px, calc(100vw - 32px)); }
}

/* Nav create menu */
.nav-create-menu { position: relative; }
.nav-create-trigger { white-space: nowrap; }
.nav-create-chevron { font-size: 0.72rem; margin-left: 2px; opacity: 0.85; }
.nav-create-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  padding: 6px;
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(0, 14, 51, 0.08);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.12);
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
  z-index: 2500;
}
.nav-create-menu:hover .nav-create-dropdown { opacity: 1; pointer-events: auto; transform: translateY(0); }
.nav-create-dropdown button {
  width: 100%;
  border: none;
  background: transparent;
  color: #000e33;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  cursor: pointer;
  text-align: left;
}
.nav-create-dropdown button:hover { background: rgba(75, 91, 213, 0.08); color: #4b5bd5; }
.nav-create-menu::after {
  content: '';
  position: absolute;
  top: 100%;
  left: -8px;
  right: -8px;
  height: 14px;
  background: transparent;
}

/* ---- site-chrome.css: NAVBAR chrome (loaded last; overrides above) ------- */
.navbar {
  --ink:#000e33;
  --ink-soft:#16224d;
  --muted:#55607d;
  --muted-2:#626b7d;
  --line:rgba(0,14,51,.10);
  --line-2:rgba(0,14,51,.06);
  --blue:#0066ff;
  --purple:#7c3aed;
  --grad:linear-gradient(103deg, #0066ff 0%, #6a5bff 48%, #c27aff 100%);
  --grad-soft:linear-gradient(103deg, rgba(0,102,255,.14), rgba(194,122,255,.14));
  --shadow:0 18px 50px -18px rgba(9,20,55,.28);
  --ease:cubic-bezier(.22,.61,.36,1);
  --nav-h:74px;
  --max:1200px;
  font-family:'Helvetica Neue', Arial, sans-serif;
}
.navbar *{ box-sizing:border-box; }
.navbar a{ text-decoration:none; }
.navbar{
  position:sticky; top:0; z-index:2000;
  height:var(--nav-h);
  display:grid; grid-template-columns:1fr auto 1fr; align-items:center;
  padding:0 34px;
  background:rgba(255,255,255,.72);
  backdrop-filter:blur(18px) saturate(1.4);
  -webkit-backdrop-filter:blur(18px) saturate(1.4);
  border-bottom:1px solid var(--line-2);
}
.nav-logo{ width:158px; height:auto; grid-column:1; justify-self:start; }
.nav-left{ grid-column:2; display:flex; align-items:center; gap:6px; justify-self:center; }
.nav-item{
  position:relative;
  font-size:.92rem; font-weight:500; color:var(--ink);
  padding:10px 14px; border-radius:12px;
  display:flex; align-items:center; gap:6px; cursor:pointer;
  transition:background .2s, color .2s;
}
.nav-item::before{
  content:""; position:absolute; top:calc(100% - 4px); left:0; right:0; height:18px; background:transparent;
}
.nav-item:hover{ background:rgba(0,14,51,.045); color:var(--ink); }
.nav-item::after{
  content:"\f078"; font-family:"Font Awesome 6 Free"; font-weight:900;
  font-size:.6rem; opacity:.5; transition:transform .2s;
  position:static; left:auto; right:auto; bottom:auto; top:auto;
  width:auto; height:auto; background:none; border-radius:0; transform:none;
}
.nav-item:hover::after{ transform:translateY(2px); opacity:.7; }
.dropdown{
  position:absolute; top:calc(100% + 8px); left:50%;
  transform:translateX(-50%) translateY(6px);
  min-width:220px; padding:8px;
  background:#fff; border:1px solid var(--line-2);
  border-radius:18px; box-shadow:var(--shadow);
  opacity:0; pointer-events:none;
  transition:opacity .18s var(--ease), transform .18s var(--ease);
}
.nav-item:hover .dropdown{ opacity:1; pointer-events:auto; transform:translateX(-50%) translateY(0); }
.dropdown a{
  display:block; padding:11px 14px; border-radius:12px;
  font-size:.9rem; font-weight:500; color:var(--ink);
  transition:background .16s, color .16s;
}
.dropdown a:hover{ background:var(--grad-soft); color:#4b5bd5; }
.nav-right{ grid-column:3; display:flex; align-items:center; gap:12px; justify-self:end; }
.menu-toggle{ display:none; }
.hamburger{ display:none; grid-column:3; justify-self:end; font-size:1.3rem; color:var(--ink); cursor:pointer; padding:8px; }
.mobile-menu{
  position:fixed; top:var(--nav-h); left:0; right:0;
  background:#fff; border-bottom:1px solid var(--line);
  padding:14px 22px 26px; box-sizing:border-box;
  transform:translateY(-140%); transition:transform .35s var(--ease);
  z-index:1999; max-height:calc(100vh - var(--nav-h)); overflow-y:auto;
  box-shadow:var(--shadow);
  font-family:'Helvetica Neue', Arial, sans-serif;
}
.menu-toggle:checked ~ .mobile-menu{ transform:translateY(0); }
.mobile-menu a{ display:block; text-decoration:none; }
.mobile-menu .nav-item{ padding:14px 6px; border-bottom:1px solid var(--line-2); border-radius:0; color:var(--ink); }
.mobile-menu .nav-item::after, .mobile-menu .nav-item::before{ display:none; }
.mobile-menu .create-btn{
  margin-top:18px; width:100%; padding:16px; border:none; border-radius:999px;
  color:#fff; font-weight:650; font-size:1rem; background:var(--grad); cursor:pointer;
}
.navbar--app .profile-dropdown,
.navbar--app .nav-create-dropdown,
.navbar--app .notification-modal{
  background:#fff !important;
  border:1px solid var(--line-2) !important;
  border-radius:18px !important;
  box-shadow:var(--shadow) !important;
}
.navbar--app .profile-dropdown,
.navbar--app .nav-create-dropdown{ padding:8px !important; }
.navbar--app .profile-dropdown a,
.navbar--app .nav-create-dropdown button{
  border-radius:12px !important;
  transition:background .16s ease, color .16s ease !important;
}
.navbar--app .profile-dropdown a:hover,
.navbar--app .nav-create-dropdown button:hover{
  background:var(--grad-soft) !important;
  color:#4b5bd5 !important;
}
.navbar--app .profile-dropdown a:hover i,
.navbar--app .nav-create-dropdown button:hover i{ opacity:.9; }
.navbar--app .icon-btn{ color:#6b7280; }
.navbar--app .icon-btn:hover{ background:rgba(0,14,51,.06) !important; color:#000e33 !important; box-shadow:none !important; }
.navbar--app .notification-modal{ padding:8px !important; }
.navbar--app .notification-header{ padding:6px 10px 10px !important; }
.navbar--app .notification-list{ padding:0 !important; margin:0; list-style:none; }
.navbar--app .notification-list li{ border-radius:12px; padding:10px 12px; transition:background .16s ease; }
.navbar--app .notification-list li:hover{ background:var(--grad-soft); }
.navbar--app .notification-empty{ color:var(--muted-2); font-size:.88rem; }
@media (max-width:900px){
  .navbar .nav-left{ display:none; }
  .navbar .hamburger{ display:block; }
  .navbar:not(.navbar--app){ grid-template-columns:1fr auto; padding:0 20px; }
  .navbar:not(.navbar--app) .nav-right{ display:none; }
  .navbar--app{ grid-template-columns:auto 1fr auto; padding:0 16px; }
  .navbar--app .nav-right{ display:flex; grid-column:2; justify-self:end; gap:8px; }
  .navbar--app .hamburger{ grid-column:3; }
}

/* ---- Notification entry sub-elements (rendered by blog-notifications.js) -- */
.monogram-avatar {
  width: 48px; height: 48px; border-radius: 50%; padding: 2px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.notification-avatar {
  width: 40px; height: 40px; border-radius: 50%; padding: 2px;
  background: linear-gradient(135deg, #0066ff, #c27aff);
  flex-shrink: 0; overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.notification-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.notification-avatar.monogram {
  border: 1px solid transparent;
  background:
    linear-gradient(135deg, #eef4ff 0%, #f5efff 55%, #f8f3ff 100%) padding-box,
    linear-gradient(135deg, #0066ff 0%, #c27aff 100%) border-box;
  color: #000e33; font-weight: 600; font-size: 0.9rem; text-transform: uppercase;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.notification-avatar.monogram::after {
  content: attr(data-initials);
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; border-radius: 50%;
  background:
    radial-gradient(circle at top left, rgba(0,102,255,0.22), transparent 45%),
    radial-gradient(circle at top right, rgba(194,122,255,0.28), transparent 45%),
    linear-gradient(135deg, #eef4ff 0%, #f5efff 55%, #f8f3ff 100%);
  color: #000e33;
}
.notification-meta { display: flex; flex-direction: column; gap: 4px; text-align: left; }
.notif-line { display: flex; flex-wrap: wrap; gap: 4px; }
.notif-name { font-weight: 600; color: #000e33; text-decoration: none; }
.notif-name:hover { text-decoration: underline; }
