/* =========================================================
   TAJRIVO - NOTIFICATIONS
========================================================= */


/* =========================================================
   PAGE
========================================================= */

.notifications-page {
  width: 100%;
  max-width: 1450px;
  margin: 0 auto;
  padding-bottom: 50px;
}


/* =========================================================
   PAGE HEADING
========================================================= */

.notifications-page-heading {
  margin-bottom: 22px;

  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.notifications-page-heading h1 {
  margin: 5px 0 7px;

  color: #0f172a;

  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  font-weight: 800;

  letter-spacing: -0.04em;
}

.notifications-page-heading p {
  max-width: 650px;
  margin: 0;

  color: #64748b;

  font-size: 14px;
  line-height: 1.7;
}


/* =========================================================
   TOPBAR POINTS MINI
========================================================= */

.notifications-points-mini {
  min-height: 46px;

  padding: 6px 13px;

  border: 1px solid #e2e8f0;
  border-radius: 14px;

  background: #ffffff;

  display: flex;
  align-items: center;
  gap: 10px;

  box-shadow:
    0 4px 15px rgba(15, 23, 42, 0.035);
}

.notifications-points-mini-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;

  border-radius: 10px;

  background: #fff8e8;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 14px;
}

.notifications-points-mini > div:last-child {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.notifications-points-mini span {
  color: #94a3b8;

  font-size: 10px;
  font-weight: 700;
}

.notifications-points-mini strong {
  color: #0f172a;

  font-size: 12px;
  font-weight: 800;
}


/* =========================================================
   MARK ALL
========================================================= */

.notifications-mark-all {
  min-height: 42px;

  padding: 0 15px;

  border: 1px solid #dbe7f7;
  border-radius: 12px;

  background: #eef5ff;
  color: var(--primary);

  font-family: inherit;
  font-size: 11px;
  font-weight: 800;

  cursor: pointer;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.notifications-mark-all:hover:not(:disabled) {
  background: #dbeafe;

  transform: translateY(-1px);
}

.notifications-mark-all:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}


/* =========================================================
   STATS
========================================================= */

.notifications-stats {
  display: grid;
  grid-template-columns:
    repeat(4, minmax(0, 1fr));
  gap: 14px;

  margin-bottom: 18px;
}

.notification-stat-card {
  min-width: 0;
  min-height: 108px;

  padding: 18px;

  border: 1px solid #e8edf5;
  border-radius: 20px;

  background: #ffffff;

  display: flex;
  align-items: center;
  gap: 14px;

  box-shadow:
    0 7px 22px rgba(15, 23, 42, 0.045);

  transition:
    transform 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.notification-stat-card:hover {
  transform: translateY(-2px);

  border-color: #dbe4f0;

  box-shadow:
    0 12px 30px rgba(15, 23, 42, 0.07);
}

.notification-stat-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;

  border-radius: 14px;

  background: #eef5ff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 19px;
}

.notification-stat-card:nth-child(2)
.notification-stat-icon {
  background: #f5f3ff;
}

.notification-stat-card:nth-child(3)
.notification-stat-icon {
  background: #effcf6;
}

.notification-stat-card:nth-child(4)
.notification-stat-icon {
  background: #fff8e8;
}

.notification-stat-card > div:last-child {
  min-width: 0;

  display: flex;
  flex-direction: column;
  gap: 5px;
}

.notification-stat-card span {
  color: #64748b;

  font-size: 11px;
  font-weight: 700;
}

.notification-stat-card strong {
  color: #0f172a;

  font-size: 20px;
  line-height: 1;
  font-weight: 800;
}


/* =========================================================
   MAIN CARD
========================================================= */

.notifications-card {
  padding: 22px;

  border: 1px solid #e8edf5;
  border-radius: 22px;

  background: #ffffff;

  box-shadow:
    0 10px 34px rgba(15, 23, 42, 0.05);
}


/* =========================================================
   CARD HEADER
========================================================= */

.notifications-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.notifications-card-header h2 {
  margin: 5px 0 0;

  color: #0f172a;

  font-size: 20px;
  font-weight: 800;

  letter-spacing: -0.02em;
}

.notifications-refresh-button {
  min-height: 40px;

  padding: 0 13px;

  border: 1px solid #e8edf5;
  border-radius: 11px;

  background: #f8fafc;
  color: #475569;

  font-family: inherit;
  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease;
}

.notifications-refresh-button:hover:not(:disabled) {
  border-color: #d7e3f3;

  background: #eef5ff;
  color: var(--primary);
}

.notifications-refresh-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}


/* =========================================================
   FILTERS
========================================================= */

.notifications-filters {
  margin-top: 18px;

  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notification-filter {
  min-height: 38px;

  padding: 0 13px;

  border: 1px solid transparent;
  border-radius: 11px;

  background: #f3f6fb;
  color: #64748b;

  font-family: inherit;
  font-size: 11px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.notification-filter:hover {
  background: #eef5ff;
  color: var(--primary);

  transform: translateY(-1px);
}

.notification-filter.active {
  border-color: var(--primary);

  background: var(--primary);
  color: #ffffff;
}


/* =========================================================
   STATES
========================================================= */

.notifications-state {
  min-height: 280px;

  padding: 30px 20px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
}

.notifications-state[hidden] {
  display: none !important;
}

.notifications-state-icon {
  width: 58px;
  height: 58px;

  margin-bottom: 12px;

  border-radius: 18px;

  background: #eef5ff;
  color: var(--primary);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 22px;
  font-weight: 800;
}

.notifications-state strong {
  color: #0f172a;

  font-size: 14px;
  font-weight: 800;
}

.notifications-state > span {
  max-width: 390px;

  margin-top: 6px;

  color: #64748b;

  font-size: 11px;
  line-height: 1.6;
}


/* =========================================================
   LOADER
========================================================= */

.notifications-loader {
  width: 35px;
  height: 35px;

  margin-bottom: 14px;

  border: 3px solid #e5e7eb;
  border-top-color: var(--primary);
  border-radius: 50%;

  animation:
    notifications-spin
    0.8s
    linear
    infinite;
}

@keyframes notifications-spin {

  to {
    transform: rotate(360deg);
  }

}


/* =========================================================
   RETRY
========================================================= */

.notifications-retry-button {
  min-height: 40px;

  margin-top: 15px;
  padding: 0 15px;

  border: 0;
  border-radius: 11px;

  background: var(--primary);
  color: #ffffff;

  font-family: inherit;
  font-size: 11px;
  font-weight: 800;

  cursor: pointer;
}


/* =========================================================
   LIST
========================================================= */

.notifications-list {
  margin-top: 18px;

  display: flex;
  flex-direction: column;
  gap: 10px;
}

.notifications-list[hidden] {
  display: none !important;
}


/* =========================================================
   NOTIFICATION ITEM
========================================================= */

.notification-item {
  position: relative;

  min-height: 84px;

  padding: 14px;

  border: 1px solid transparent;
  border-radius: 16px;

  background: #f8fafc;

  display: flex;
  align-items: flex-start;
  gap: 12px;

  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.notification-item:hover {
  border-color: #dceaff;

  background: #f5f9ff;

  transform: translateY(-1px);
}

.notification-item.unread {
  border-color: #d9eaff;

  background: #f2f7ff;
}

.notification-item.unread::before {
  content: "";

  position: absolute;

  top: 18px;
  right: 18px;

  width: 8px;
  height: 8px;

  border-radius: 50%;

  background: var(--primary);

  box-shadow:
    0 0 0 4px
    rgba(37, 99, 235, 0.08);
}


/* =========================================================
   ICON
========================================================= */

.notification-icon {
  width: 46px;
  height: 46px;
  flex: 0 0 46px;

  border-radius: 14px;

  background: #eef5ff;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 19px;
}

.notification-icon.topup {
  background: #effcf6;
}

.notification-icon.giftcard {
  background: #fff8e8;
}

.notification-icon.referral {
  background: #fff8e8;
}

.notification-icon.reward {
  background: #f5f3ff;
}

.notification-icon.promo {
  background: #fff7ed;
}

.notification-icon.system {
  background: #f1f5f9;
}


/* =========================================================
   CONTENT
========================================================= */

.notification-content {
  min-width: 0;
  flex: 1;
}

.notification-content strong {
  display: block;

  padding-right: 18px;

  overflow: hidden;

  color: #0f172a;

  font-size: 13px;
  font-weight: 800;

  white-space: nowrap;
  text-overflow: ellipsis;
}

.notification-content p {
  margin: 4px 0 0;

  color: #64748b;

  font-size: 11px;
  line-height: 1.6;
}

.notification-meta {
  margin-top: 8px;

  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.notification-date {
  color: #94a3b8;

  font-size: 9px;
}

.notification-type {
  min-height: 21px;

  padding: 0 7px;

  border-radius: 999px;

  background: #eef5ff;
  color: var(--primary);

  display: inline-flex;
  align-items: center;

  font-size: 9px;
  font-weight: 700;

  text-transform: capitalize;
}

.notification-type.topup {
  background: #ecfdf5;
  color: #15803d;
}

.notification-type.giftcard {
  background: #fff8e8;
  color: #d97706;
}

.notification-type.referral {
  background: #fff8e8;
  color: #d97706;
}

.notification-type.reward {
  background: #f5f3ff;
  color: #7c3aed;
}

.notification-type.promo {
  background: #fff7ed;
  color: #ea580c;
}

.notification-type.system {
  background: #f1f5f9;
  color: #475569;
}


/* =========================================================
   ACTIONS
========================================================= */

.notification-actions {
  flex-shrink: 0;

  display: flex;
  align-items: center;
  gap: 7px;
}

.notification-read-button,
.notification-delete-button {
  width: 34px;
  height: 34px;

  padding: 0;

  border: 1px solid #e8edf5;
  border-radius: 10px;

  background: #ffffff;
  color: #64748b;

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 13px;

  cursor: pointer;

  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.notification-read-button:hover {
  border-color: #d7e3f3;

  background: #eef5ff;
  color: var(--primary);

  transform: translateY(-1px);
}

.notification-delete-button:hover {
  border-color: #fecaca;

  background: #fef2f2;
  color: #dc2626;

  transform: translateY(-1px);
}


/* =========================================================
   TOAST
========================================================= */

.notifications-toast {
  position: fixed;

  left: 50%;
  bottom: 28px;

  z-index: 3000;

  min-height: 44px;

  padding: 0 15px;

  border-radius: 13px;

  background: #0f172a;
  color: #ffffff;

  display: flex;
  align-items: center;
  gap: 8px;

  box-shadow:
    0 16px 38px rgba(15, 23, 42, 0.22);

  transform: translateX(-50%);
}

.notifications-toast[hidden] {
  display: none !important;
}

.notifications-toast > span {
  color: #86efac;

  font-size: 12px;
  font-weight: 900;
}

.notifications-toast strong {
  font-size: 11px;
  font-weight: 700;
}


/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {

  .notifications-stats {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
  }

}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

  .notifications-page {
    padding-bottom: 30px;
  }


  .notifications-page-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .notifications-page-heading h1 {
    font-size: 27px;
  }

  .notifications-page-heading p {
    font-size: 12px;
  }


  .notifications-mark-all {
    width: 100%;
  }


  .notifications-points-mini {
    display: none;
  }


  .notifications-stats {
    grid-template-columns:
      repeat(2, minmax(0, 1fr));
    gap: 10px;
  }


  .notification-stat-card {
    min-height: 100px;

    padding: 14px;

    border-radius: 17px;
  }


  .notification-stat-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;

    border-radius: 12px;

    font-size: 16px;
  }


  .notifications-card {
    padding: 17px;

    border-radius: 18px;
  }


  .notifications-filters {
    flex-wrap: nowrap;

    overflow-x: auto;

    padding-bottom: 4px;

    scrollbar-width: none;
  }

  .notifications-filters::-webkit-scrollbar {
    display: none;
  }

  .notification-filter {
    flex-shrink: 0;
  }


  .notification-item {
    padding: 13px;
  }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

  .notifications-stats {
    grid-template-columns: 1fr;
  }


  .notifications-card-header {
    align-items: flex-start;
  }


  .notification-item {
    flex-direction: column;
  }


  .notification-content strong {
    padding-right: 18px;
  }


  .notification-actions {
    width: 100%;

    justify-content: flex-end;
  }

}


/* =========================================================
   HIDDEN
========================================================= */

[hidden] {
  display: none !important;
}