/* Notifications: the header bell menu, the phone pop-up, the dashboard menu
   and the notifications page (partials/notification_items.html). Loaded by
   base.html and the dashboard base, so it only uses its own class names. */

.notif-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.notif-item {
  position: relative;
  border-bottom: 1px solid var(--border, #e8e8e8);
}

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

.notif-link {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  color: var(--heading, #232d3b);
  text-decoration: none;
  transition: background .15s ease;
}

.notif-link:hover,
.notif-link:focus-visible {
  background: var(--chalk, #f5f5f5);
  color: var(--heading, #232d3b);
  text-decoration: none;
}

.notif-item.is-unread .notif-link {
  background: var(--chalk, #f5f5f5);
  box-shadow: inset 3px 0 0 var(--primary, #0044bb);
}

.notif-icon {
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary, #0044bb);
  background: var(--chalk, #f5f5f5);
}

.notif-icon--message { color: var(--green, #11b76b); background: var(--chalk, #f5f5f5); }
.notif-icon--money   { color: var(--orange, #e86121); background: var(--chalk, #f5f5f5); }
.notif-icon--plan    { color: var(--purple, #b12fad); background: var(--chalk, #f5f5f5); }

.notif-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}

.notif-title {
  font-size: 14px;
  line-height: 1.35;
  font-weight: 500;
  overflow-wrap: anywhere;
}

.notif-item.is-unread .notif-title {
  font-weight: 700;
}

.notif-body {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text, #555555);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.notif-time {
  font-size: 12px;
  color: var(--gray, #777777);
}

.notif-dot {
  flex: 0 0 9px;
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary, #0044bb);
}

.notif-remove {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 28px;
  height: 28px;
  line-height: 26px;
  text-align: center;
  font-size: 20px;
  border-radius: 50%;
  color: var(--gray, #777777);
  text-decoration: none;
}

.notif-remove:hover {
  background: var(--border, #e8e8e8);
  color: var(--heading, #232d3b);
  text-decoration: none;
}

/* Leave room for the remove button on the page. */
.notif-page .notif-link {
  padding-right: 44px;
}

.notif-empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--gray, #777777);
}

.notif-empty p {
  margin: 8px 0 4px;
  font-weight: 600;
  color: var(--heading, #232d3b);
}

.notif-empty small {
  display: block;
  max-width: 260px;
  margin: 0 auto;
}

/* ── Header bell menu (desktop) ─────────────────────── */
.notif-card {
  width: 360px;
  padding-bottom: 0;
  overflow: hidden;
}

.notif-card .notif-list {
  max-height: 380px;
  overflow-y: auto;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border, #e8e8e8);
  background: var(--white, #ffffff);
}

.notif-head h5,
.notif-head .notif-heading {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--heading, #232d3b);
  text-transform: none;
}

.notif-head a {
  font-size: 13px;
  font-weight: 500;
  color: var(--primary, #0044bb);
  text-transform: none;
  letter-spacing: 0;
}

.notif-footer {
  display: block;
  padding: 12px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary, #0044bb);
  border-top: 1px solid var(--border, #e8e8e8);
  background: var(--chalk, #f5f5f5);
}

.notif-footer:hover {
  background: var(--chalk, #f5f5f5);
  text-decoration: none;
}

/* ── Phone pop-up: a sheet that slides up from the bottom ── */
.notif-modal .modal-content {
  border: 0;
  border-radius: 16px;
  overflow: hidden;
}

.notif-modal .notif-list {
  max-height: 60vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.notif-modal .notif-close {
  border: 0;
  background: none;
  font-size: 26px;
  line-height: 1;
  padding: 0 4px;
  color: var(--gray, #777777);
}

@media (max-width: 575px) {
  .notif-modal .modal-dialog {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    max-width: none;
    width: 100%;
  }
  .notif-modal .modal-content {
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }
  .notif-modal.fade .modal-dialog {
    transform: translateY(100%);
    transition: transform .25s ease-out;
  }
  .notif-modal.show .modal-dialog {
    transform: none;
  }
}

/* ── Notifications page ─────────────────────────────── */
.notif-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 16px 80px;
}

/* Keep the unread dot clear of the remove button on the page. */
.notif-page .notif-dot {
  margin-right: 4px;
}

.notif-page-card {
  background: var(--white, #ffffff);
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .06);
  overflow: hidden;
}

.notif-page-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.notif-page-top h1 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
}

.notif-tabs {
  display: flex;
  gap: 6px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, #e8e8e8);
}

.notif-tabs a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text, #555555);
  text-decoration: none;
}

.notif-tabs a.is-active {
  background: var(--primary, #0044bb);
  color: var(--white, #ffffff);
}

.notif-mark-all {
  font-size: 14px;
  font-weight: 600;
  color: var(--primary, #0044bb);
}

.notif-pager {
  display: flex;
  justify-content: space-between;
  padding: 14px 16px;
  border-top: 1px solid var(--border, #e8e8e8);
  font-size: 14px;
}
