/* ============================================
   GoCheckin Rewards – Notifications Page
   ============================================ */

/* ---- Full-screen slide-in page ---- */
.notif-page {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: var(--color-theme-sub-surface, #fcfcfc);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.38s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.notif-page.open {
  transform: translateX(0);
}

/* ---- Header ---- */
.notif-page-header {
  display: flex;
  align-items: center;
  padding: 56px 16px 16px;
  gap: 0;
  flex-shrink: 0;
}

.btn-notif-back,
.btn-notif-mark-read {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* Glass button style */
  background: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 0 16px 0 rgba(102, 102, 102, 0.15),
    inset 0 1px 2px 0 rgba(255, 255, 255, 0.5),
    inset 0 16px 16px 0 rgba(123, 113, 130, 0.1);
  color: var(--color-content-main);
  transition: opacity 0.15s;
}

.btn-notif-back:hover,
.btn-notif-mark-read:hover { opacity: 0.8; }

.notif-page-title {
  flex: 1;
  text-align: center;
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 26px;
}

/* ---- Mark all read success banner ---- */
.notif-read-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 16px 12px;
  padding: 16px;
  border-radius: 32px;
  background: linear-gradient(to top, #e9f6ec, #ffffff);
  box-shadow: 0px 16px 24px 0px rgba(0, 0, 0, 0.1);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: #28a146;
  line-height: 20px;
  white-space: nowrap;
  /* Hidden by default */
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  max-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  transition: opacity 0.25s ease, transform 0.25s ease, max-height 0.25s ease, margin-bottom 0.25s ease;
}

.notif-read-banner.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: none;
  max-height: 80px;
  margin-bottom: 12px;
}

/* ---- Mark all read button: disabled state ---- */
.btn-notif-mark-read.disabled {
  pointer-events: none;
  cursor: default;
}

.btn-notif-mark-read.disabled svg {
  opacity: 0.3;
}

/* ---- Tab switcher ---- */
.notif-tabs-wrap {
  padding: 0 16px 16px;
  flex-shrink: 0;
}

.notif-tabs {
  display: flex;
  align-items: center;
  position: relative;
  background: var(--color-button-glass, rgba(255, 255, 255, 0.2));
  border-radius: 24px;
  padding: 4px;
  box-shadow: 0px 0px 16px 0px rgba(102, 102, 102, 0.15),
              inset 0px 1px 2px 0px rgba(255, 255, 255, 0.5),
              inset 0px 16px 16px 0px rgba(123, 113, 130, 0.1);
  backdrop-filter: var(--backdrop-blur-xs);
  -webkit-backdrop-filter: var(--backdrop-blur-xs);
}

.notif-tab {
  flex: 1;
  padding: 10px 16px;
  border-radius: 24px;
  border: none;
  cursor: pointer;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  line-height: 20px;
  text-align: center;
  background: transparent;
  color: var(--color-content-main);
  transition: background 0.2s;
}

.notif-tab.active {
  background: #f3dbff;
  color: var(--color-content-main);
}

/* ---- Scrollable list ---- */
.notif-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.notif-scroll::-webkit-scrollbar { display: none; }

/* ---- Section group ---- */
.notif-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}

.notif-section-label {
  padding: 0 16px;
  font-size: 16px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 24px;
}

.notif-group {
  display: flex;
  flex-direction: column;
}

/* ---- Notification row ---- */
.notif-item {
  display: flex;
  align-items: flex-start;
  padding: 12px 16px;
  gap: 16px;
  background: transparent;
  transition: background 0.15s;
}

.notif-item.unread {
  background: #faf0ff;
}

/* 40×40 store avatar */
.notif-avatar {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  flex-shrink: 0;
  object-fit: cover;
  display: block;
}

/* Avatar placeholder (initials) */
.notif-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: white;
  background: var(--color-primary);
}

/* Text block */
.notif-text {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.notif-body {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--color-content-main);
  line-height: 20px;
}

.notif-body strong {
  font-weight: var(--font-weight-semibold);
}

.notif-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  overflow: hidden;
}

.notif-store {
  font-size: 14px;
  font-weight: var(--font-weight-semibold);
  color: var(--color-content-main);
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notif-at {
  font-size: 14px;
  font-weight: var(--font-weight-regular);
  color: var(--color-content-main);
  line-height: 20px;
  flex-shrink: 0;
}

.notif-dot-sep {
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: var(--color-content-muted, #64646c);
  flex-shrink: 0;
}

.notif-time {
  font-size: 12px;
  font-weight: var(--font-weight-regular);
  color: var(--color-content-muted, #64646c);
  line-height: 16px;
  white-space: nowrap;
  flex-shrink: 0;
}

/* Unread dot indicator */
.notif-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
  flex-shrink: 0;
  margin-top: 6px;
}

/* Hidden when in Unread tab */
.notif-item.read.notif-tab-hidden {
  display: none;
}
