/* ==========================================================================
   141 HQ — Enterprise Notifications & Web Push Design System
   Strict Minimalism • High Contrast • Big Tech Typography
   ========================================================================== */

/* Topbar Notification Bell Wrapper */
.topbar-notif-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

/* Bell Trigger Button */
.topbar-notif-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--border-light, #272727);
  background: var(--bg-panel, #161616);
  color: var(--zinc-300, #d4d4d8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.topbar-notif-btn:hover {
  background: var(--bg-card-hover, #272727);
  border-color: var(--zinc-600, #52525b);
  color: #ffffff;
}

.topbar-notif-btn:focus-visible {
  outline: 2px solid var(--brand-500, #e50914);
  outline-offset: 1px;
}

.topbar-notif-btn .material-symbols-outlined {
  font-size: 20px;
  line-height: 1;
}

/* Subtle Unread Badge */
.topbar-notif-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--brand-500, #e50914);
  color: #ffffff;
  font-family: var(--font-sans, 'Inter', -apple-system, sans-serif);
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
  border: 2px solid var(--bg-dark, #0f0f0f);
  display: none;
  pointer-events: none;
  box-sizing: border-box;
}

.topbar-notif-badge.active {
  display: inline-block;
}

/* Interactive Dropdown Panel */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 24px);
  max-height: 520px;
  background: var(--bg-panel, #161616);
  border: 1px solid var(--border-subtle, #272727);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  display: none;
  flex-direction: column;
  z-index: 1100;
  overflow: hidden;
}

.notif-dropdown.open {
  display: flex;
}

/* Dropdown Header */
.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle, #272727);
  background: var(--bg-panel, #161616);
}

.notif-dropdown-title-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.notif-dropdown-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--zinc-100, #f4f4f5);
  letter-spacing: -0.01em;
}

.notif-dropdown-count {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  background: rgba(229, 9, 20, 0.15);
  color: var(--brand-400, #f87171);
  border-radius: 10px;
}

.notif-mark-read-btn {
  background: none;
  border: none;
  color: var(--zinc-400, #aaaaaa);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.15s ease, background-color 0.15s ease;
}

.notif-mark-read-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.05);
}

/* Scrollable List */
.notif-dropdown-list {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
  overscroll-behavior: contain;
}

/* Notification Item */
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: background-color 0.15s ease;
}

.notif-item:last-child {
  border-bottom: none;
}

.notif-item:hover {
  background: var(--bg-card-hover, #272727);
}

.notif-item.unread {
  background: rgba(255, 255, 255, 0.03);
}

.notif-item.unread:hover {
  background: rgba(255, 255, 255, 0.06);
}

/* Unread Indicator Bar */
.notif-unread-dot {
  position: absolute;
  left: 6px;
  top: 18px;
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--brand-500, #e50914);
  display: none;
}

.notif-item.unread .notif-unread-dot {
  display: block;
}

/* Icon Container */
.notif-icon-wrap {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1f1f1f;
  border: 1px solid var(--border-light, #272727);
  color: var(--zinc-300, #d4d4d8);
  margin-top: 2px;
}

.notif-icon-wrap.type-order {
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  border-color: rgba(56, 189, 248, 0.2);
}

.notif-icon-wrap.type-security {
  color: #f87171;
  background: rgba(248, 113, 113, 0.1);
  border-color: rgba(248, 113, 113, 0.2);
}

.notif-icon-wrap.type-promo {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.1);
  border-color: rgba(251, 191, 36, 0.2);
}

.notif-icon-wrap.type-system {
  color: #a78bfa;
  background: rgba(167, 139, 250, 0.1);
  border-color: rgba(167, 139, 250, 0.2);
}

.notif-icon-wrap .material-symbols-outlined {
  font-size: 18px;
}

/* Item Content */
.notif-content {
  flex: 1;
  min-width: 0;
}

.notif-title-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.notif-item-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--zinc-200, #e4e4e7);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-item.unread .notif-item-title {
  font-weight: 600;
  color: #ffffff;
}

.notif-item-time {
  font-size: 11px;
  color: var(--zinc-500, #71717a);
  white-space: nowrap;
}

.notif-item-message {
  font-size: 12px;
  color: var(--zinc-400, #aaaaaa);
  line-height: 1.4;
  margin: 3px 0 0 0;
  word-break: break-word;
}

.notif-item.unread .notif-item-message {
  color: var(--zinc-300, #d4d4d8);
}

/* Empty State */
.notif-empty {
  padding: 36px 20px;
  text-align: center;
  color: var(--zinc-500, #71717a);
}

.notif-empty .material-symbols-outlined {
  font-size: 32px;
  margin-bottom: 8px;
  opacity: 0.6;
}

.notif-empty p {
  margin: 0;
  font-size: 13px;
}

/* Dropdown Footer */
.notif-dropdown-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-subtle, #272727);
  background: var(--bg-panel, #161616);
  text-align: center;
}

.notif-view-all-link {
  display: inline-block;
  color: var(--zinc-300, #d4d4d8);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.15s ease;
}

.notif-view-all-link:hover {
  color: #ffffff;
}

/* Native Push Permission Prompt Card (Deflashed) */
.push-permission-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  background: var(--bg-card, #1f1f1f);
  border: 1px solid var(--border-subtle, #272727);
  border-radius: 8px;
  margin-bottom: 20px;
}

.push-permission-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.push-permission-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  border-radius: 6px;
  background: rgba(229, 9, 20, 0.15);
  color: var(--brand-400, #f87171);
  display: flex;
  align-items: center;
  justify-content: center;
}

.push-permission-icon .material-symbols-outlined {
  font-size: 20px;
}

.push-permission-text h4 {
  margin: 0 0 2px 0;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
}

.push-permission-text p {
  margin: 0;
  font-size: 12px;
  color: var(--zinc-400, #aaaaaa);
  line-height: 1.35;
}

.push-permission-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.btn-push-enable {
  background: var(--brand-500, #e50914);
  color: #ffffff;
  border: none;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.btn-push-enable:hover {
  background: var(--brand-600, #dc2626);
}

.btn-push-dismiss {
  background: transparent;
  color: var(--zinc-400, #aaaaaa);
  border: 1px solid var(--border-light, #272727);
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.btn-push-dismiss:hover {
  color: #ffffff;
  border-color: var(--zinc-500, #71717a);
}

@media (max-width: 640px) {
  .notif-dropdown {
    width: calc(100vw - 20px);
    right: -10px;
  }
  .push-permission-card {
    flex-direction: column;
    align-items: flex-start;
  }
  .push-permission-actions {
    width: 100%;
    justify-content: flex-end;
  }
}
