/* ==============================
   TOP SECTION
============================== */
.top-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  position: relative;
}

.top-section h1 {
  margin: 0;
  font-size: 2rem;
  color: black;
  text-align: left;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.favicon {
  width: 60px;
  height: 60px;
  vertical-align: middle;
  margin-left: -3px;
  position: relative;
  top: 2px;
}

/* Right Icons */
.right-icons {
  display: flex;
  align-items: center;
}

/* Make icon container transparent (remove any visible square) */
.icon-box-container {
  display: flex;
  align-items: center;
  border-radius: 8px;
  background: transparent; /* important: remove background */
  padding: 0;
  gap: 8px;
}

/* The container around each icon (used for layout) */
.icon-box {
  position: relative;
  margin: 0 6px;
  cursor: pointer;
  background: transparent; /* ensure transparent */
  padding: 0;               /* move spacing to buttons if needed */
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Thin visual divider */
.divider {
  width: 1px;
  height: 36px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,105,180,0.12));
  margin: 0 10px;
  border-radius: 1px;
  align-self: center;
}

/* Tooltip */
.tooltip {
  visibility: hidden;
  position: absolute;
  top: 62px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(18,18,18,0.97);
  color: #fff;
  padding: 7px 14px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  opacity: 0;
  transition: opacity 0.15s ease;
  white-space: nowrap;
  border: 1px solid rgba(255,105,180,0.15);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  z-index: 100;
}
.icon-box:hover .tooltip,
.icon-box:focus-within .tooltip {
  visibility: visible;
  opacity: 1;
}

/* Prevent notif menu from flashing on hover/focus-within — only JS (aria-expanded) opens it */
#notifications-bell:hover #notif-menu.hidden,
#notifications-bell:focus-within #notif-menu.hidden {
  display: none !important;
}

/* Sign-in */
.sign-in {
  font-size: 16px;
  color: white;
  background-color: black;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
}
.sign-in:hover { background-color: purple; }

/* Icon button core (transparent, accessible focus ring)
   Increased size so icons render larger.
*/
.icon-button {
  -webkit-appearance: none;
  appearance: none;
  background: transparent !important;
  border: none;
  padding: 10px;
  margin: 0;
  width: 56px;   /* increased */
  height: 56px;  /* increased */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 140ms ease, box-shadow 160ms ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}

/* Remove UA inner focus visuals but keep keyboard focus via focus-visible */
.icon-button:focus { outline: none; }
.icon-button::-moz-focus-inner { border: 0; }

/* keyboard-only focus ring */
.icon-button:focus-visible {
  box-shadow:
    0 0 0 6px rgba(139,0,255,0.12),
    0 14px 40px rgba(139,0,255,0.12);
  transform: translateY(-3px);
}

/* inline SVG sizing - larger */
.icon-svg {
  width: 30px;   /* increased */
  height: 30px;  /* increased */
  display: block;
  pointer-events: none;
  fill: none; /* avoid default filling, paths set their own fills */
}

/* Notification badge (small round counter)
   Positioned slightly outside the top-right of the button so it doesn't overlay awkwardly.
*/
.hidden { display: none !important; }

.badge {
  position: absolute;
  top: -8px;      /* moved a bit further out to match larger button */
  right: -8px;    /* moved a bit further out to match larger button */
  min-width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(90deg,#ff69b4,#bf5fff);
  color: #000;
  font-weight: 800;
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0 6px;
  box-shadow: 0 6px 18px rgba(255,77,153,0.14), 0 0 8px rgba(139,0,255,0.08);
  border: 0;
  line-height: 1;
  transform: translate(0, 0);
}

/* small adjustment when count is single-digit to keep it centered */
.badge:empty { display: none; }

/* Hidden utility class (redeclared safe) */
.hidden { display: none !important; }

/* notifications menu
   Positioning changed so the menu sits lower under the bell and avoids overlapping.
   The menu is absolutely positioned relative to the .icon-box (notifications-bell),
   which already has position: relative in the current markup.
*/
.notif-menu {
  position: absolute;
  top: calc(100% + 14px); /* place menu below the button (increase to move lower) */
  right: 0;                /* align right edge of menu with right edge of bell */
  left: auto;
  margin: 0;
  background: rgba(10,10,10,0.96);
  border: 1px solid rgba(255,105,180,0.06);
  padding: 10px;
  border-radius: 12px;
  min-width: 260px;
  box-shadow: 0 18px 50px rgba(0,0,0,0.6);
  z-index: 1400;           /* ensure on top of other elements */
  transform-origin: top right;
}

/* Optional small downward offset for the little shadow edge if needed */
.notif-menu::before {
  content: "";
  position: absolute;
  top: -8px;      /* above the menu so it sits between button & menu */
  right: 20px;    /* tweak to align under bell center if desired */
  width: 12px;
  height: 12px;
  background: rgba(10,10,10,0.96);
  transform: rotate(45deg);
  box-shadow: -1px -1px 1px rgba(0,0,0,0.2);
  border-left: 1px solid rgba(255,105,180,0.02);
  border-top: 1px solid rgba(255,105,180,0.02);
  border-radius: 1px;
}

/* Notification list items */
#notif-list { max-height: 320px; overflow:auto; padding:0; margin:0; }
#notif-list li { padding:8px;border-radius:8px;margin-bottom:6px; color:#ffd9f7; background:rgba(255,255,255,0.01); border:1px solid rgba(255,255,255,0.02); }
#notif-list li.unread { background: linear-gradient(90deg, rgba(255,105,180,0.04), rgba(139,0,255,0.02)); box-shadow: 0 6px 20px rgba(255,105,180,0.03); }
#notif-list li:hover { background:rgba(255,255,255,0.01); box-shadow:none; transform:none; }

/* Visually-hidden helper for screen readers (duplicate safe if inlined elsewhere) */
.visually-hidden {
  position: absolute !important;
  height: 1px;
  width: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  white-space: nowrap;
}