/* ============================================
   通知模块 - 通知横幅、列表、详情弹窗
   ============================================ */

/* 通知横幅 */
.notification-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
  border-bottom: 1px solid #a5d6a7;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.notification-banner:hover {
  background: linear-gradient(135deg, #c8e6c9 0%, #a5d6a7 100%);
}
.notification-banner .banner-icon {
  font-size: 18px;
}
.notification-banner .banner-text {
  flex: 1;
  font-size: 14px;
  color: #2e7d32;
  font-weight: 500;
}
.notification-banner .banner-arrow {
  font-size: 20px;
  color: #66bb6a;
  font-weight: bold;
}
.notification-banner .banner-close {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(0,0,0,0.1);
  color: #666;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.2s;
}
.notification-banner .banner-close:hover {
  background: rgba(0,0,0,0.2);
}
.dark .notification-banner {
  background: linear-gradient(135deg, #1b3a1b 0%, #2d4a2d 100%);
  border-bottom: solid 1px #3a5a3a;
}
.dark .notification-banner .banner-text {
  color: #81c784;
}
.dark .notification-banner .banner-arrow {
  color: #66bb6a;
}
.dark .notification-banner .banner-close {
  background: rgba(255,255,255,0.1);
  color: #aaa;
}

/* Tab 角标 */
.tab-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ff4444;
  color: #fff;
  font-size: 10px;
  min-width: 16px;
  height: 16px;
  border-radius: 8px;
  padding: 0 4px;
  font-weight: bold;
  margin-left: 4px;
  vertical-align: middle;
  line-height: 1;
}

/* 通知底部弹窗 */
.notification-sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 300;
  display: flex;
  align-items: flex-end;
}
.notification-sheet-content {
  background: var(--card-bg);
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
  max-height: 75vh;
  border-radius: 16px 16px 0 0;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.25s ease-out;
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.notification-sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.notification-sheet-header span {
  font-weight: 600;
  font-size: var(--font-size);
  flex: 1;
}
.notification-sheet-header .mark-all-btn {
  border: none;
  background: none;
  color: #07c160;
  font-size: calc(var(--font-size) * 0.875);
  cursor: pointer;
  padding: 4px 8px;
}
.notification-sheet-header .sheet-close {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--comment-bg);
  color: var(--text-secondary);
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 8px;
}

/* 通知弹窗内容 */
.notification-modal .notification-content {
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

/* 通知列表 */
.notification-list {
  overflow-y: auto;
  flex: 1;
  padding: 0;
}
.notification-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #f0f0f0;
  cursor: pointer;
  transition: background 0.2s;
  position: relative;
}
.notification-item:hover {
  background: #f9f9f9;
}
.notification-item.unread {
  background: #f0f7ff;
}
.notification-item.unread:hover {
  background: #e6f2ff;
}
.notification-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
}
.notification-body {
  flex: 1;
  min-width: 0;
}
.notification-title {
  font-size: 14px;
  color: #333;
  margin-bottom: 4px;
}
.notification-title span {
  color: #666;
  font-weight: normal;
}
.notification-content-text {
  font-size: 13px;
  color: #888;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notification-time {
  font-size: 12px;
  color: #aaa;
}
.unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1e90ff;
  flex-shrink: 0;
  margin-top: 6px;
}

/* 通知页面 */
.notification-page {
  padding: 0;
}
.notification-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.notification-page-header span {
  font-weight: 600;
  font-size: var(--font-size);
}
.notification-page-header .mark-all-btn {
  border: none;
  background: none;
  color: #07c160;
  font-size: calc(var(--font-size) * 0.875);
  cursor: pointer;
  padding: 4px 8px;
}
.notification-page-list {
  padding: 0;
}
.notification-page-list .notification-item {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

/* 通知详情页（全屏页面） */
.notification-detail-page {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  animation: slideInRight 0.25s ease-out;
}
.notification-detail-page .detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--card-bg);
  flex-shrink: 0;
}
.notification-detail-page .detail-back {
  border: none;
  background: none;
  color: var(--text-link);
  font-size: calc(var(--font-size) * 1.071);
  cursor: pointer;
  padding: 4px 8px;
}
.notification-detail-page .detail-title {
  font-weight: 600;
  font-size: var(--font-size);
}
.notification-detail-page .detail-spacer {
  width: 60px;
}
.notification-detail-page .detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    -webkit-overflow-scrolling: touch;
}
.notification-detail-page .detail-memo {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}
.notification-detail-page .detail-avatar {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  flex-shrink: 0;
}
.notification-detail-page .detail-memo-content {
  flex: 1;
  min-width: 0;
}
.notification-detail-page .detail-nickname {
  font-weight: 600;
  color: var(--text-link);
  margin-bottom: 6px;
  font-size: calc(var(--font-size) * 1.071);
}
.notification-detail-page .detail-text {
  font-size: calc(var(--font-size) * 1.071);
  line-height: 1.6;
  word-break: break-word;
  margin-bottom: 8px;
}
.notification-detail-page .detail-text a { color: var(--text-link); }
.notification-detail-page .detail-time {
  font-size: calc(var(--font-size) * 0.75);
  color: var(--text-secondary);
}
.notification-detail-page .detail-memo .image-grid {
  margin-top: 8px;
  margin-bottom: 8px;
}
.notification-detail-page .detail-comments {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
.notification-detail-page .detail-comments-title {
  font-size: calc(var(--font-size) * 0.929);
  color: var(--text-secondary);
  margin-bottom: 12px;
  font-weight: 600;
}
.notification-detail-page .detail-comments .comment-list {
  margin-bottom: 0;
}
.notification-detail-page .detail-comments .comment-item {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}
.notification-detail-page .detail-comments .comment-item:last-child {
  border-bottom: none;
}
.notification-detail-page .detail-comments .comment-item.comment-highlight {
  background: #fff3e0;
  margin: 0 -16px;
  padding: 10px 16px;
  border-radius: 8px;
}
.notification-detail-page .detail-comments .comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
}
.notification-detail-page .detail-comments .comment-body {
  flex: 1;
  min-width: 0;
}
.notification-detail-page .detail-comments .comment-nickname {
  font-weight: 600;
  color: var(--text-link);
  font-size: calc(var(--font-size) * 0.929);
  margin-bottom: 2px;
}
.notification-detail-page .detail-comments .comment-text {
  font-size: calc(var(--font-size) * 0.929);
  line-height: 1.5;
  word-break: break-word;
}
.notification-detail-page .detail-comments .comment-item.comment-reply {
  background: rgba(0,0,0,0.02);
  border-left: 3px solid #07c160;
}
.notification-detail-page .detail-comments .comment-item.depth-1 { padding-left: 42px; }
.notification-detail-page .detail-comments .comment-item.depth-2 { padding-left: 62px; }
.notification-detail-page .detail-comments .comment-item.depth-3 { padding-left: 82px; }
.notification-detail-page .detail-comments .comment-item.depth-4 { padding-left: 102px; }
.notification-detail-page .detail-comments .comment-foot {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.notification-detail-page .detail-comments .comment-reply-to {
  font-weight: 400;
  color: var(--text-secondary);
  font-size: calc(var(--font-size) * 0.85);
}
.notification-detail-page .detail-comments .comment-reply-btn {
  font-size: calc(var(--font-size) * 0.8);
  color: var(--text-link);
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 10px;
  transition: background 0.2s;
}
.notification-detail-page .detail-comments .comment-reply-btn:hover {
  background: rgba(0,0,0,0.06);
}
.notification-detail-page .detail-reply {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--border);
    background: var(--card-bg);
    flex-shrink: 0;
}
.notification-detail-page .detail-reply .reply-input-row {
    display: flex;
    gap: 8px;
    align-items: center;
}
.notification-detail-page .detail-comments .comment-empty {
  text-align: center;
  color: var(--text-secondary);
  padding: 20px 0;
  font-size: calc(var(--font-size) * 0.929);
}
.notification-detail-page .detail-reply .reply-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: calc(var(--font-size) * 0.82);
  color: var(--text-secondary);
  padding: 4px 0;
}
.notification-detail-page .detail-reply .reply-cancel {
  color: #07c160;
  cursor: pointer;
  padding: 2px 8px;
}
.notification-detail-page .detail-reply input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 8px 14px;
  font-size: calc(var(--font-size) * 0.875);
  outline: none;
  background: var(--bg);
  color: var(--text);
  transition: border-color 0.2s;
}
.notification-detail-page .detail-reply input:focus {
  border-color: #07c160;
}
.notification-detail-page .detail-reply button {
  border: none;
  background: #07c160;
  color: #fff;
  font-size: calc(var(--font-size) * 0.875);
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 20px;
  cursor: pointer;
  transition: background 0.2s;
  white-space: nowrap;
}
.notification-detail-page .detail-reply button:hover {
  background: #06ad56;
}
.notification-detail-page .detail-reply button:disabled {
  background: #ccc;
  cursor: not-allowed;
}
@keyframes slideInRight {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}
