/* =========================================================
   NOTIFICATIONS
========================================================= */

/* =========================================================
   NOTIFICATION BUTTON
========================================================= */

.app-notification-btn {
  position: relative;

  width: 40px;
  height: 38px;

  display: flex;
  align-items: center;
  justify-content: center;
}

/* Bell icon */

.app-notification-btn > i {
  font-size: 17px;

  color: var(--app-text);

  transition:
    color 0.15s ease,
    transform 0.15s ease;
}

.app-notification-btn:hover > i {
  color: #252b4e;

  transform: translateY(-1px);
}

/* =========================================================
   NOTIFICATION BADGE
========================================================= */

.notification-badge {
  position: absolute;

  top: 2px;
  right: 2px;

  min-width: 17px;
  height: 17px;

  display: flex;
  align-items: center;
  justify-content: center;

  padding: 0 4px;

  border-radius: 9px;

  background: #252b4e;

  color: #ffffff;

  border: 2px solid var(--app-surface);

  font-size: 9px;
  font-weight: 700;

  line-height: 1;

  letter-spacing: -0.1px;
}

/* =========================================================
   NOTIFICATION MENU
========================================================= */

.app-notification-menu {
  width: 360px;

  max-width: calc(100vw - 20px);

  padding: 0;

  margin-top: 8px !important;

  overflow: hidden;

  border: 1px solid var(--app-border);

  border-radius: 14px;

  background: var(--app-surface);

  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.14);
}

/* =========================================================
   NOTIFICATION HEADER
========================================================= */

.notification-header {
  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 15px;

  padding: 14px 16px;

  border-bottom: 1px solid var(--app-border);
}

.notification-title {
  font-size: 14px;

  font-weight: 600;

  color: var(--app-text);
}

.notification-subtitle {
  margin-top: 2px;

  font-size: 11px;

  color: var(--app-muted);
}

/* Mark all read */

.notification-mark-read {
  border: 0;

  padding: 0;

  background: transparent;

  color: #252b4e;

  font-size: 10px;

  white-space: nowrap;

  cursor: pointer;
}

.notification-mark-read:hover {
  text-decoration: underline;
}

/* =========================================================
   NOTIFICATION ITEM
========================================================= */

.notification-item {
  width: 100%;

  display: flex;

  align-items: flex-start;

  gap: 11px;

  padding: 12px 16px;

  border: 0;

  border-bottom: 1px solid var(--app-border);

  background: transparent;

  color: var(--app-text);

  text-align: left;

  cursor: pointer;

  transition: background 0.15s ease;
}

.notification-item:hover {
  background: var(--app-hover);
}

/* =========================================================
   UNREAD
========================================================= */

.notification-item.unread {
  background: color-mix(in srgb, #252b4e 4%, var(--app-surface));
}

/* =========================================================
   NOTIFICATION ICON
========================================================= */

.notification-icon {
  width: 34px;
  height: 34px;

  min-width: 34px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 10px;

  font-size: 15px;
}

/* =========================================================
   ICON COLORS
========================================================= */

.notification-primary {
  background: rgba(37, 43, 78, 0.1);

  color: #252b4e;
}

.notification-warning {
  background: rgba(245, 158, 11, 0.1);

  color: #d97706;
}

.notification-success {
  background: rgba(34, 197, 94, 0.1);

  color: #16a34a;
}

.notification-secondary {
  background: rgba(107, 114, 128, 0.1);

  color: #6b7280;
}

/* =========================================================
   NOTIFICATION CONTENT
========================================================= */

.notification-content {
  min-width: 0;

  display: flex;

  flex-direction: column;

  gap: 2px;
}

.notification-content strong {
  font-size: 12px;

  font-weight: 600;

  color: var(--app-text);
}

.notification-content small {
  font-size: 11px;

  line-height: 1.4;

  color: var(--app-muted);
}

.notification-content time {
  margin-top: 3px;

  font-size: 9px;

  color: var(--app-muted);
}

/* =========================================================
   NOTIFICATION FOOTER
========================================================= */

.notification-footer {
  padding: 8px;

  background: var(--app-surface);
}

.notification-view-all {
  width: 100%;

  padding: 8px;

  border: 0;

  border-radius: 8px;

  background: transparent;

  color: #252b4e;

  font-size: 11px;

  font-weight: 600;

  cursor: pointer;

  transition: background 0.15s ease;
}

.notification-view-all:hover {
  background: var(--app-hover);
}

/* =========================================================
   DARK THEME
========================================================= */

html[data-theme="dark"] .app-notification-btn:hover > i {
  color: #aeb6e8;
}

html[data-theme="dark"] .notification-badge {
  background: #252b4e;

  border-color: var(--app-surface);

  color: #ffffff;
}

html[data-theme="dark"] .notification-mark-read,
html[data-theme="dark"] .notification-view-all {
  color: #aeb6e8;
}

html[data-theme="dark"] .notification-primary {
  background: rgba(174, 182, 232, 0.1);

  color: #aeb6e8;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 500px) {
  .app-notification-menu {
    position: fixed !important;

    top: 55px !important;

    right: 10px !important;
    left: 10px !important;

    width: auto;

    max-width: none;

    margin: 0 !important;
  }
}
