/* ============================================================
   Paripulse notification stack
   Stripe-style stacked toasts with hover expansion.
   ============================================================ */

:root {
  --pp-toast-bg: #ffffff;
  --pp-toast-line: #e4e7ec;
  --pp-toast-text: #171a1f;
  --pp-toast-muted: #6e6a61;
  --pp-toast-success: #2d6a4f;
  --pp-toast-error: #b42318;
  --pp-toast-warning: #9a5b12;
  --pp-toast-info: #5c6b7a;
}

.pp-toast-stack {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 2100;
  width: min(360px, calc(100vw - 32px));
  height: 0;
  pointer-events: auto;
  transition:
    height 0.34s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.16s ease,
    visibility 0.16s ease;
}

body.pp-notify-center-open .pp-toast-stack {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.pp-toast-card {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 26px;
  gap: 12px;
  align-items: start;
  padding: 13px 13px 15px;
  overflow: hidden;
  border: 1px solid var(--pp-toast-line);
  border-radius: 8px;
  background: var(--pp-toast-bg);
  box-shadow:
    0 16px 36px -18px rgba(23, 26, 31, 0.28),
    0 2px 6px rgba(23, 26, 31, 0.06);
  color: var(--pp-toast-text);
  pointer-events: auto;
  transform-origin: bottom right;
  transition:
    transform 0.28s cubic-bezier(0.23, 1, 0.32, 1),
    opacity 0.22s cubic-bezier(0.23, 1, 0.32, 1),
    box-shadow 0.2s ease;
  z-index: calc(30 - var(--pp-stack-index, 0));
}

.pp-toast-card::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: var(--pp-accent, var(--pp-toast-info));
  content: "";
  opacity: 0.28;
  transform-origin: left center;
  animation: pp-toast-progress var(--pp-duration, 5000ms) linear forwards;
}

.pp-toast-card[data-type="success"] {
  --pp-accent: var(--pp-toast-success);
}

.pp-toast-card[data-type="error"] {
  --pp-accent: var(--pp-toast-error);
}

.pp-toast-card[data-type="warning"] {
  --pp-accent: var(--pp-toast-warning);
}

.pp-toast-card[data-type="info"] {
  --pp-accent: var(--pp-toast-info);
}

.pp-toast-card.is-sticky::after {
  display: none;
}

.pp-toast-card.is-entering {
  opacity: 0;
  transform: translateY(18px) scale(0.96);
}

.pp-toast-card.is-visible {
  opacity: calc(1 - var(--pp-stack-index, 0) * 0.08);
  transform: translateY(calc(var(--pp-stack-index, 0) * -10px))
    scale(calc(1 - var(--pp-stack-index, 0) * 0.035));
  z-index: calc(30 - var(--pp-stack-index, 0));
}

.pp-toast-card.is-leaving {
  opacity: 0 !important;
  transform: translateX(26px) scale(0.96) !important;
  pointer-events: none;
}

.pp-toast-stack.is-expanded .pp-toast-card {
  opacity: 1;
  transform: translateY(calc(var(--pp-expanded-y, 0) * -1px)) scale(1);
}

.pp-toast-stack.is-expanded .pp-toast-card::after {
  animation-play-state: paused;
}

.pp-toast__icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--pp-accent, var(--pp-toast-info)) 11%, #ffffff);
  color: var(--pp-accent, var(--pp-toast-info));
}

.pp-toast__icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.pp-toast__body {
  min-width: 0;
  padding-top: 1px;
}

.pp-toast__title {
  margin: 0 0 2px;
  color: var(--pp-toast-text);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.pp-toast__message {
  margin: 0;
  color: #475467;
  font-size: 12.5px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.pp-toast__action {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  margin-top: 8px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: color-mix(in srgb, var(--pp-accent, var(--pp-toast-info)) 10%, #ffffff);
  color: var(--pp-accent, var(--pp-toast-info));
  cursor: pointer;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 650;
}

.pp-toast__action:hover {
  background: color-mix(in srgb, var(--pp-accent, var(--pp-toast-info)) 16%, #ffffff);
}

.pp-toast__close {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.pp-toast__close:hover {
  background: #f2f4f7;
  color: #171a1f;
}

.pp-toast__close:active {
  transform: scale(0.95);
}

.pp-toast__close:focus-visible {
  outline: 2px solid #c8322b;
  outline-offset: 1px;
}

.pp-toast__close svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 2;
}

@keyframes pp-toast-progress {
  from {
    transform: scaleX(1);
  }

  to {
    transform: scaleX(0);
  }
}

/* When the notification runtime is active, inline feedback is mirrored into
   the toast stack. Keep it in the DOM as a no-JavaScript fallback, but do not
   render duplicate success/error banners. */
body.pp-notifications-ready .request-feedback,
body.pp-notifications-ready .form-feedback,
body.pp-notifications-ready .auth-alert,
body.pp-notifications-ready .deposit-error {
  display: none !important;
}

/* Toasts are silent now, so errors keep their text inline. */
body.pp-notifications-ready .request-feedback.is-error:not([hidden]),
body.pp-notifications-ready .form-feedback.is-error:not([hidden]),
body.pp-notifications-ready .auth-alert:not([hidden]),
body.pp-notifications-ready .deposit-error:not([hidden]) {
  display: block !important;
}

@media (max-width: 575.98px) {
  .pp-toast-stack {
    right: 16px;
    bottom: 16px;
    left: 16px;
    width: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pp-toast-stack,
  .pp-toast-card {
    transition: none;
  }

  .pp-toast-card::after {
    animation: none;
  }

  .pp-toast-card.is-entering,
  .pp-toast-card.is-visible,
  .pp-toast-card.is-leaving,
  .pp-toast-stack.is-expanded .pp-toast-card {
    transform: none;
  }
}

/* ============================================================
   Notification centre
   A session-scoped inbox opened from the dashboard topbar.
   ============================================================ */

.pp-notify__trigger {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-right: 6px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #344054;
  cursor: pointer;
  box-shadow: none;
  transition:
    background-color 0.16s ease,
    color 0.16s ease;
}

.pp-notify__trigger:hover {
  background: #f8fafc;
  color: #171a1f;
}

.pp-notify__trigger:focus-visible {
  outline: 2px solid #c8322b;
  outline-offset: 2px;
}

.pp-notify__trigger svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.pp-notify__badge {
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  border: 2px solid #ffffff;
  border-radius: 8px;
  background: #c8322b;
  color: #ffffff;
  font-size: 9.5px;
  font-weight: 700;
  line-height: 1;
  box-sizing: border-box;
}

.pp-notify__badge[hidden] {
  display: none;
}

.pp-notify__backdrop {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(16, 23, 34, 0.32);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.pp-notify__backdrop[hidden],
.pp-notify__panel[hidden] {
  display: none;
}

.pp-notify__backdrop.is-open {
  opacity: 1;
}

.pp-notify__panel {
  position: fixed;
  top: 76px;
  right: 24px;
  z-index: 2201;
  display: flex;
  flex-direction: column;
  width: min(400px, calc(100vw - 32px));
  max-height: min(680px, calc(100dvh - 100px));
  overflow: hidden;
  border: 1px solid var(--pp-toast-line);
  border-radius: 8px;
  background: var(--pp-toast-bg);
  box-shadow:
    0 28px 60px -30px rgba(23, 26, 31, 0.5),
    0 2px 8px rgba(23, 26, 31, 0.06);
  opacity: 0;
  transform: translateY(-6px) scale(0.985);
  transform-origin: top right;
  transition:
    opacity 0.16s ease,
    transform 0.18s cubic-bezier(0.23, 1, 0.32, 1);
}

.pp-notify__panel.is-open {
  opacity: 1;
  transform: none;
}

.pp-notify__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 14px;
  border-bottom: 1px solid var(--pp-toast-line);
}

.pp-notify__heading {
  min-width: 0;
}

.pp-notify__title {
  margin: 0;
  color: var(--pp-toast-text);
  font-family: "Poppins", "Poppins Fallback", "Instrument Sans", "Instrument Sans Fallback", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.pp-notify__summary {
  margin: 4px 0 0;
  color: var(--pp-toast-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.pp-notify__head-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 4px;
}

.pp-notify__mark,
.pp-notify__close,
.pp-notify__filters button,
.pp-notify__foot button {
  font-family: inherit;
}

.pp-notify__mark {
  min-height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #c8322b;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.pp-notify__mark:hover {
  background: #fef3f2;
}

.pp-notify__mark:disabled {
  color: #98a2b3;
  cursor: not-allowed;
  background: transparent;
}

.pp-notify__close {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #667085;
  cursor: pointer;
}

.pp-notify__close:hover {
  background: #f2f4f7;
  color: #171a1f;
}

.pp-notify__close svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.9;
}

.pp-notify__filters {
  display: flex;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--pp-toast-line);
  background: #ffffff;
}

.pp-notify__filters button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0;
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--pp-toast-muted);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
}

.pp-notify__filters button:hover {
  color: #171a1f;
}

.pp-notify__filters button.is-active {
  border-bottom-color: #c8322b;
  background: transparent;
  color: #171a1f;
}

.pp-notify__filters button span {
  min-width: 16px;
  color: #667085;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.pp-notify__list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #ffffff;
}

.pp-notify__item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 8px;
  align-items: start;
  gap: 10px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-bottom: 1px solid var(--pp-toast-line);
  background: #ffffff;
  color: inherit;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  text-decoration: none;
  transition: background-color 0.14s ease;
}

.pp-notify__item:last-child {
  border-bottom: 0;
}

.pp-notify__item:hover {
  background: #f9fafb;
}

.pp-notify__item.is-unread {
  background: #fffafa;
}

.pp-notify__item.is-unread:hover {
  background: #fff5f5;
}

.pp-notify__item:focus-visible {
  position: relative;
  z-index: 1;
  outline: 2px solid #c8322b;
  outline-offset: -2px;
}

.pp-notify__item-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: #f2f4f7;
  color: #667085;
}

.pp-notify__item-icon[data-type="success"] {
  background: #eef5f0;
  color: #2d6a4f;
}

.pp-notify__item-icon[data-type="error"] {
  background: #fbeeec;
  color: #b42318;
}

.pp-notify__item-icon[data-type="warning"] {
  background: #fbf3e7;
  color: #9a5b12;
}

.pp-notify__item-icon[data-type="info"] {
  background: #eef2f7;
  color: #5c6b7a;
}

.pp-notify__item-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.pp-notify__item-body {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}

.pp-notify__item-title {
  color: #171a1f;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
}

.pp-notify__item-message {
  color: #475467;
  font-size: 11.5px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.pp-notify__item-meta {
  margin-top: 3px;
  color: #667085;
  font-size: 10.5px;
  line-height: 1.4;
}

.pp-notify__unread-dot {
  width: 6px;
  height: 6px;
  margin-top: 5px;
  border-radius: 50%;
  background: #c8322b;
}

.pp-notify__empty {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 28px;
  text-align: center;
}

.pp-notify__empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: #f2f4f7;
  color: #667085;
}

.pp-notify__empty-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.pp-notify__empty h3 {
  margin: 0 0 4px;
  color: #171a1f;
  font-family: "Poppins", "Poppins Fallback", "Instrument Sans", "Instrument Sans Fallback", system-ui, sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.pp-notify__empty p {
  max-width: 28ch;
  margin: 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.pp-notify__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  border-top: 1px solid var(--pp-toast-line);
  background: #ffffff;
  color: #667085;
  font-size: 10.5px;
}

.pp-notify__foot button {
  min-height: 28px;
  padding: 0 7px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b42318;
  cursor: pointer;
  font-size: 11px;
  font-weight: 650;
}

.pp-notify__foot button:hover {
  background: #fef3f2;
}

.pp-notify__foot button:disabled {
  color: #98a2b3;
  cursor: not-allowed;
  background: transparent;
}

.pp-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  border: 0;
  white-space: nowrap;
}

@media (max-width: 575.98px) {
  .pp-notify__panel {
    inset: 0;
    width: 100%;
    max-height: none;
    height: 100dvh;
    border: 0;
    border-radius: 0;
    transform: translateY(10px);
  }

  .pp-notify__head {
    padding-top: max(18px, env(safe-area-inset-top));
  }

  .pp-notify__foot {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}

@media (prefers-reduced-motion: reduce) {
  .pp-notify__backdrop,
  .pp-notify__panel,
  .pp-notify__item,
  .pp-notify__trigger,
  .pp-toast__close {
    transition: none;
  }

  .pp-toast__close:active {
    transform: none;
  }
}


