/* ========================================
   应用内消息通知横幅
   ======================================== */

.in-app-notif {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-100%);
  width: calc(100% - 16px);
  max-width: 380px;
  z-index: 99999;
  pointer-events: none;
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1),
              opacity 0.25s ease;
}

.in-app-notif.is-visible {
  transform: translateX(-50%) translateY(8px);
  opacity: 1;
  pointer-events: auto;
}

.in-app-notif__card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 14px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12),
              0 1px 4px rgba(0, 0, 0, 0.06);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

/* 深色模式 */
@media (prefers-color-scheme: dark) {
  .in-app-notif__card {
    background: rgba(44, 44, 46, 0.92);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3),
                0 1px 4px rgba(0, 0, 0, 0.15);
  }
  .in-app-notif__name {
    color: #f5f5f7 !important;
  }
  .in-app-notif__text {
    color: #a1a1a6 !important;
  }
  .in-app-notif__app {
    color: #86868b !important;
  }
}

.in-app-notif__avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  background: #e5e5ea;
}

.in-app-notif__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  flex-shrink: 0;
}

.in-app-notif__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.in-app-notif__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.in-app-notif__name {
  font-size: 15px;
  font-weight: 600;
  color: #1c1c1e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.in-app-notif__app {
  font-size: 11px;
  color: #8e8e93;
  white-space: nowrap;
  flex-shrink: 0;
}

.in-app-notif__text {
  font-size: 14px;
  color: #636366;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
}
