/* ===========================
   UnityPro Header Buttons — Facebook-like
   =========================== */

:root {
  --up-hdr-bg: #fff;
  --up-hdr-border: #e5e7eb;
  --up-hdr-muted: #6b7280;
  --up-hdr-shadow: 0 10px 20px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
}

/* When header is transparent, keep bar fixed unless JS sets inline mode */
body.header-transparent #up-header-root:not(.up-mode-inline),
body.elementor-header-transparent #up-header-root:not(.up-mode-inline),
header.elementor-header-transparent #up-header-root:not(.up-mode-inline) {
  position: fixed;
  top: 10px;
  right: 12px;
  opacity: 1;
  pointer-events: auto;
}

/* Header bar container */
.up-header-bar {
  z-index: 9999;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Modes */
.up-mode-fixed {
  position: fixed;
  top: 10px;
  right: 12px;
}
.up-mode-inline {
  position: static;
}

/* Base icon button (chat, bell, etc.) */
.up-hbtn {
  position: relative;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  color: #353535;
  width: 42px;
  aspect-ratio: 1 / 1;
  padding: 0;
  box-sizing: border-box;
  flex: 0 0 38px;
  border-radius: 9999px;
  background: #e4e5e9;
  line-height: 1;
  overflow: visible; /* IMPORTANT: allow badge to sit outside */
}

.up-hbtn:hover {
  background: #e1e2e4;
  outline: 2px solid #f3f4f6;
  color: #353535;
  outline-offset: 2px;
}

.up-hbtn:focus {
  background: #e1e2e4;
  outline: 2px solid #f5f5f5;
  color: #353535;
  outline-offset: 2px;
}

.up-hbtn .fa,
.up-hbtn .fa-solid {
  font-size: 18px;
  display: block;
}

/* Notification / unread badge */
.up-hbtn .up-hbadge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 13px;
  display: flex; 
  padding:6px;
  align-items: center;
  justify-content: center;
  z-index: 2; /* sit above button circle */
}

/* Avatar button */
.up-hbtn.avatar {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;   /* only avatar is clipped */
  border-radius: 50%;
  background: #fff;
  line-height: 0;     /* prevents stray gap inside inline buttons */
  /* ring(s): inner white buffer + outer brand color */
  box-shadow:
    0 0 0 1.5px #fff,
    0 0 0 4px var(--up-accent, #dcdcdc);
}

.up-hbtn.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.up-hbtn.avatar:hover,
.up-hbtn.avatar:focus-visible {
  box-shadow:
    0 0 0 2px #fff,
    0 0 0 5px var(--up-accent, #cdcdcd);
  transition: box-shadow .15s ease;
}

/* LOGIN button — wide pill, not round icon */
#up-header-root .up-hitem .up-hbtn.up-login-btn {
  width: auto !important;
  min-width: 96px;
  aspect-ratio: auto !important;
  flex: 0 0 auto !important;
  white-space: nowrap;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #d1d5db;
  padding: 12px 22px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  box-shadow: none;
  color: #4b5563;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 14px;
  line-height: 1.1;
}

#up-header-root .up-hitem .up-hbtn.up-login-btn:hover,
#up-header-root .up-hitem .up-hbtn.up-login-btn:focus-visible {
  background: #f9fafb;
  border-color: #cbd5e1;
  color: #1f2937;
  outline: none;
}

/* Hide icon inside login pill if any */
#up-header-root .up-hitem .up-hbtn.up-login-btn i {
  display: none !important;
}

/* Anchor each icon + dropdown so menu is relative to the icon */
.up-header-bar .up-hitem {
  position: relative;
  display: inline-flex;
}

/* Dropdown panels */
.up-dd {
  position:absolute;top:46px;right:0;background:var(--up-hdr-bg);border:1px solid var(--up-hdr-border);border-radius:12px;min-width:360px;max-width:92vw;box-shadow:var(--up-hdr-shadow);display:none
}

.up-dd.open {
  display: block;
}

.up-dd .up-dd-head {
  padding: 12px 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--up-hdr-border);
}

.up-dd .up-dd-body {
  max-height: 70vh;
  overflow: auto;
}

.up-dd .item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  align-items: center;
}

.up-dd .item:hover {
  background: #f9fafb;
}

.up-dd .item .media {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  overflow: hidden;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.up-dd .item .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.up-dd .item .text {
  flex: 1;
  font-size: 14px;
}

.up-dd .item .meta {
  font-size: 12px;
  color: var(--up-hdr-muted);
}

/* Account dropdown menu items */
.up-dd .menu {
  display: flex;
  flex-direction: column;
  padding: 8px;
}

.up-dd .menu .mitem {
  font-size: 15px !important;
  color: #494949;
  font-weight: 600 !important;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  text-decoration: none;
}

.mitem .micon--circle {
  background-color: #e1e1e1;
  border-radius: 999px;
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}

.up-dd .menu .mitem:hover {
  background: #f3f4f6;
}

.up-dd .menu .sep {
  height: 1px;
  background: var(--up-hdr-border);
  margin: 6px 8px;
}

/* Force ALL notification links to same color (initial + AJAX-loaded) */
.up-noti-item .msg a,
.up-noti-item .msg a:visited,
.up-noti-item .msg a:hover,
.up-noti-item .msg a:active {
  color: #111827 !important;   /* black-ish, same as first 10 */
  text-decoration: none;
}

/* Normal weight for whole message */
.up-noti-item .msg,
.up-noti-item .msg a {
  font-weight: 400 !important;
}

/* Only the name (inside <strong>) is bold */
.up-noti-item .msg strong {
  font-weight: 600;
}

/* Optional: make unread slightly darker but not bolder overall */
.up-noti-item.is-unread .msg,
.up-noti-item.is-unread .msg a {
  opacity: 1;
}

.up-noti-item:not(.is-unread) .msg,
.up-noti-item:not(.is-unread) .msg a {
  opacity: 0.8;
}

/* "See all" button */
.up-dd .seeall{display:block;margin:10px 12px;padding:10px 12px;border-radius:8px;border:1px solid var(--up-hdr-border);text-align:center;text-decoration:none;color:#111;background:#f9fafb}
.up-dd .seeall:hover{background:#f3f4f6}



/* Notifications: unread item highlight */
.up-dd-body .item.is-unread {
  background: #f9fafb;
}

/* When header is inline in layout, dropdown can align differently if needed */
.up-header-bar.up-mode-inline .up-hitem .up-dd {
  right: auto;
  left: 0;
}

/* OPTIONAL: If you want dropdowns to open to the left of the icon for fixed mode */

#up-header-root .up-hitem .up-dd {
  top: 46px;
  left: auto;
  right: calc(100% + -40px);
}
/* =========================================
   Notifications dropdown — Facebook style
   ========================================= */

.up-dd.up-noti-dd {
  padding-top: 0;
}

/* Head: title + 3-dots menu */
.up-noti-head {
  border-bottom: 1px solid var(--up-hdr-border);
  padding: 10px 12px 8px;
}

.up-noti-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.up-noti-title {
  font-size: 17px;
  font-weight: 700;
}
/* Make the notifications header a flex row and center items vertically */
.up-activity-header.up-noti-page-header {
  display: flex;
  align-items: center;
}

/* Right-side wrapper for the 3 dots */
.up-activity-header-more {
  margin-left: auto;
  position: relative;
  display: flex;
  align-items: center;
}

/* 3-dot button – centered vertically in the header */
.up-noti-head-more {
  position: relative;
  right: 0;
  top: 0;
  transform: none;

  width: 32px !important;
  height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  box-sizing: border-box;
  border-radius: 50% !important;
  background: transparent !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4b5563;
  line-height: 1 !important;
}

.up-noti-head-more:hover,
.up-noti-head-more:focus,
.up-noti-head-more:active {
  background: #e5e7eb !important;
  border-radius: 50% !important;
  color: #4b5563;
  box-shadow: none !important;
  outline: none !important;
}

/* Head 3-dot menu */
.up-noti-head-menu {
  position: absolute;
  top: 40px;
  right: 10px;
  min-width: 220px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--up-hdr-border);
  box-shadow: var(--up-hdr-shadow);
  padding: 6px 6px;
  display: none;
  z-index: 40;
}


.up-noti-head-menu.open {
  display: block;
}

.up-noti-head-menu .up-noti-act {
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  color: #111827;
}

.up-noti-head-menu .up-noti-act:hover {
  background: #f3f4f6;
}

/* Items */

.up-dd .up-noti-body {
  max-height: 70vh;
  overflow: auto;
}

.up-dd .up-noti-item,
.up-noti-page .up-noti-item {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  align-items: center;
  cursor: pointer;
  padding-right: 50px; /* room for 3-dots */
}

.up-dd .up-noti-item:hover,
.up-noti-page .up-noti-item:hover {
  background: #f9fafb;
}

.up-dd .up-noti-item .media,
.up-noti-page .up-noti-item .media {
  width: 40px;
  height: 40px;
  border-radius: 9999px;
  overflow: hidden;
  background: #eef2ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.up-dd .up-noti-item .media img,
.up-noti-page .up-noti-item .media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.up-dd .up-noti-item .text,
.up-noti-page .up-noti-item .text {
  flex: 1;
  font-size: 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}


.up-dd .up-noti-item .meta,
.up-noti-page .up-noti-item .meta {
  font-size: 12px;
  color: var(--up-hdr-muted);
}

/* unread highlight */
.up-dd .up-noti-item.is-unread,
.up-noti-page .up-noti-item.is-unread {
  background: #f9fafb;
}

/* show per-item 3 dots on hover in page view too */
.up-noti-page .up-noti-item:hover .up-noti-more-btn {
  opacity: 1;
  pointer-events: auto;
}


/* Unread blue dot */
.up-noti-dot {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2563eb;
}

/* Per-item 3-dots menu */

/* Per-item 3-dots menu */
.up-noti-more-btn {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;  padding: 0 !important;
  border-radius: 50%;
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #4b5563;
  opacity: 0;
  pointer-events: none;
}

/* keep it round on all interaction states */
.up-noti-more-btn:hover,
.up-noti-more-btn:focus,
.up-noti-more-btn:active {
  background: #e5e7eb !important;
  border-radius: 50% !important;
  color: #4b5563;
  padding: 0 !important;
  box-shadow: none !important;
  outline: none !important;
}



.up-dd .up-noti-item:hover .up-noti-more-btn {
  opacity: 1;
  pointer-events: auto;
}

.up-noti-more-menu {
  position: absolute;
  top: 130%;
  right: 40px;
  transform: translateY(-50%);
  min-width: 220px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--up-hdr-border);
  box-shadow: var(--up-hdr-shadow);
  padding: 6px 6px;
  display: none;
  z-index: 50;
}

.up-noti-more-menu.open {
  display: block;
}

.up-noti-more-menu .up-noti-act {
  width: 100%;
  text-align: left;
  padding: 8px 14px;
  border: 0;
  background: transparent;
  font-size: 14px;
  cursor: pointer;
  color: #111827;
}

.up-noti-more-menu .up-noti-act:hover {
  background: #f3f4f6;
}

/* Unread highlight background */
.up-dd .up-noti-item.is-unread {
  background: #f9fafb;
}

/* On mobile, keep it sane */
@media (max-width: 640px) {
  .up-noti-head-menu,
  .up-noti-more-menu {
    right: 8px;
    left: auto;
    min-width: 200px;
  }
}
/* Tabs for All / Unread */
.up-noti-tabs {
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.up-noti-tab {
  border: 0;
  background: transparent;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  color: #4b5563;
}

.up-noti-tab.is-active {
  background: #e5e7eb;
  color: #111827;
  font-weight: 600;
}

/* Section labels: New / Earlier */
.up-noti-section {
  padding: 8px 14px 4px;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
}









/* === MOBILE FOOTER MODE =============================== */
@media (max-width: 768px) {
  /* Pin bar to the bottom on mobile */
  #up-header-root.up-footer-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    top: auto;
    z-index: 9999;
    padding: 8px 10px;
    background: #ffffff;
    border-top: 1px solid var(--up-hdr-border);
    box-shadow: 0 -6px 16px rgba(15, 23, 42, 0.12);
    display: flex;
    justify-content: space-between;
    gap: 10px;
  }

  /* Spread icons evenly */
  #up-header-root.up-footer-fixed .up-hitem {
    position: relative;
    flex: 1 1 0;
    justify-content: center;
    display: inline-flex;
  }

  #up-header-root.up-footer-fixed .up-hbtn {
    width: 42px;
    aspect-ratio: 1 / 1;
  }

  /* Dropdowns should open upward above the bar */
  #up-header-root.up-footer-fixed .up-dd {
    top: auto;
    bottom: 52px; /* just above the footer bar */
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    max-width: 96vw;
  }

  /* Override transparent-header top rules when in footer mode */
  body.header-transparent #up-header-root.up-footer-fixed,
  body.elementor-header-transparent #up-header-root.up-footer-fixed,
  header.elementor-header-transparent #up-header-root.up-footer-fixed {
    top: auto;
    right: 0;
  }
}

/* Small-screen tweak for dropdown min width */
@media (max-width: 640px) {
  .up-header-bar {
    top: 8px;
    right: 8px;
    gap: 8px;
  }
  .up-dd {
    min-width: min(92vw, 360px);
  }
}
