/* Header element - must be fixed and on top */
#header,
.header {
  position: fixed;
  top: 0;
  left: 0; 
  right: 0;
  height: 48px; /* match this with top below */
  background: white; /* or your header bg */
  z-index: 1100; /* above notifications */
}

/* Overlay covers viewport below header */
.fap-notification-overlay {
  position: fixed;
  top: 48px; /* height of header */
  left: 0;
  width: 100vw;
  height: calc(100vh - 48px);
  background: rgba(0, 0, 0, 0.4);
  z-index: 1000;
  display: none;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  overflow: hidden;
}

/* Notification panel container */
.fap-notification-panel {
  position: fixed;
  top: 48px; /* flush under header */
  right: 0;
  width: 400px;
  height: calc(100vh - 48px);
  background: #fff;
  box-shadow: -2px 0 12px rgba(0, 0, 0, 0.15);
  border-radius: 0 0 0 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  z-index: 1001; /* above overlay, below header */
}

/* Header inside panel */
.fap-notification-panel-header {
  flex-shrink: 0;
  padding: 16px 24px;
  font-weight: 700;
  font-size: 20px;
  color: #111;
  border-bottom: 1px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}

/* Close button (X) */
.fap-notification-close-btn {
  cursor: pointer;
  font-size: 28px;
  line-height: 1;
  color: #666;
  transition: color 0.2s ease;
}
.fap-notification-close-btn:hover {
  color: #ff4500;
}

/* Notification list scroll area */
#fap-notification-list {
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-y: auto;
  flex-grow: 1;
}

/* Individual notification item */
.fap-notification-item {
  padding: 16px 24px;
  border-bottom: 1px solid #eee;
  cursor: pointer;
  transition: background-color 0.2s ease;
  display: flex;
  flex-direction: column;
}
.fap-notification-item:last-child {
  border-bottom: none;
}
.fap-notification-item:hover {
  background-color: #f6f7f8;
}

/* Notification main text */
.fap-notification-message {
  font-weight: 600;
  font-size: 14px;
  color: #1c1c1c;
  margin-bottom: 6px;
  line-height: 1.3;
}

/* Notification timestamp */
.fap-notification-time {
  font-size: 12px;
  color: #6a6a6a;
}

/* Loading and error text */
.fap-notification-loading,
.fap-notification-error {
  padding: 16px 24px;
  text-align: center;
  font-size: 14px;
  color: #888;
}

/* Notification bell icon wrapper */
#fap-notification-btn {
  position: relative;
  display: none; /* Hide by default */
  align-items: center;
  justify-content: center;
}



/* Badge styling for unread count */
#fap-notification-count {
  background-color: #ff4500;
  color: white;
  font-weight: 700;
  font-size: 11px;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  border-radius: 9px;
  position: absolute;
  top: -4px;
  right: -4px;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  pointer-events: none;
  box-shadow: 0 0 2px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

/* Responsive for mobile: full width panel below header */
@media (max-width: 768px) {
  .fap-notification-panel {
    top: 0;
    left: 0;
    right: 0;
    width: 100vw;
    height: calc(100vh - 48px);
    border-radius: 0;
    box-shadow: none;
  }

  .fap-notification-overlay {
    top: 48px;
    height: calc(100vh - 48px);
  }
}