/* MAPAYER modern notification toasts */
.mp-toast-stack {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 10060;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: min(380px, calc(100vw - 1.5rem));
  pointer-events: none;
}

.mp-toast {
  pointer-events: auto;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.85rem;
  align-items: start;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #122018;
  border: 1px solid rgba(15, 40, 25, 0.1);
  box-shadow:
    0 18px 40px rgba(6, 20, 12, 0.16),
    0 2px 0 rgba(255, 255, 255, 0.7) inset;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  cursor: pointer;
  transform: translateX(18px);
  opacity: 0;
  animation: mp-toast-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  overflow: hidden;
  position: relative;
}

html[data-theme="dark"] .mp-toast {
  background: rgba(12, 22, 17, 0.96);
  color: #f2f6f3;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4);
}

.mp-toast::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--mp-toast-accent, #1b6b35);
}

.mp-toast--chat { --mp-toast-accent: #1b6b35; }
.mp-toast--trade { --mp-toast-accent: #c9a227; }
.mp-toast--deal { --mp-toast-accent: #2f80ed; }
.mp-toast--alert { --mp-toast-accent: #e85d75; }
.mp-toast--success { --mp-toast-accent: #28c76f; }

.mp-toast__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  color: #fff;
  background: var(--mp-toast-accent, #1b6b35);
  flex-shrink: 0;
}

.mp-toast__body { min-width: 0; padding-top: 0.1rem; }
.mp-toast__eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--mp-toast-accent, #1b6b35);
  margin-bottom: 0.2rem;
}
.mp-toast__title {
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.25;
  margin: 0;
}
.mp-toast__msg {
  margin: 0.25rem 0 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #66736c;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
html[data-theme="dark"] .mp-toast__msg { color: #9aa8a0; }

.mp-toast__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.35rem;
}
.mp-toast__close {
  border: 0;
  background: transparent;
  color: #88948d;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}
.mp-toast__close:hover { background: rgba(0,0,0,0.05); color: #333; }
.mp-toast__cta {
  border: 0;
  background: rgba(27, 107, 53, 0.1);
  color: #1b6b35;
  font-size: 0.75rem;
  font-weight: 750;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
}
.mp-toast__cta:hover { background: #1b6b35; color: #fff; }

.mp-toast__progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(27, 107, 53, 0.12);
}
.mp-toast__progress > span {
  display: block;
  height: 100%;
  width: 100%;
  background: var(--mp-toast-accent, #1b6b35);
  transform-origin: left center;
  animation: mp-toast-progress linear forwards;
  animation-duration: var(--mp-toast-timeout, 8s);
}

.mp-toast.is-leaving {
  animation: mp-toast-out 0.25s ease forwards;
}

@keyframes mp-toast-in {
  to { opacity: 1; transform: translateX(0); }
}
@keyframes mp-toast-out {
  to { opacity: 0; transform: translateX(24px); }
}
@keyframes mp-toast-progress {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* Soft push-permission banner */
.mp-push-banner {
  position: fixed;
  left: 50%;
  bottom: 1.25rem;
  transform: translateX(-50%);
  z-index: 10040;
  width: min(480px, calc(100vw - 1.5rem));
  display: flex;
  gap: 0.85rem;
  align-items: center;
  padding: 0.9rem 1rem;
  border-radius: 16px;
  background: #0f1a14;
  color: #f4f7f5;
  box-shadow: 0 16px 40px rgba(0,0,0,0.28);
}
.mp-push-banner__text { flex: 1; font-size: 0.84rem; line-height: 1.35; }
.mp-push-banner__text strong { display: block; margin-bottom: 0.15rem; }
.mp-push-banner__btn {
  border: 0;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 700;
  font-size: 0.78rem;
  cursor: pointer;
}
.mp-push-banner__btn--primary { background: #1b6b35; color: #fff; }
.mp-push-banner__btn--ghost { background: transparent; color: #b7c4bc; }

@media (max-width: 560px) {
  .mp-toast-stack {
    top: auto;
    bottom: 1rem;
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }
  .mp-toast { transform: translateY(12px); }
  @keyframes mp-toast-in {
    to { opacity: 1; transform: translateY(0); }
  }
  @keyframes mp-toast-out {
    to { opacity: 0; transform: translateY(16px); }
  }
}

/* SweetAlert2 fine-tuning for MAPAYER trade modals */
.mp-swal-popup {
  border-radius: 18px !important;
  padding: 1.4rem 1.2rem 1.2rem !important;
  font-family: inherit !important;
}
.mp-swal-title {
  font-size: 1.2rem !important;
  font-weight: 750 !important;
  color: #122018 !important;
}
.mp-swal-confirm,
.mp-swal-cancel {
  border-radius: 999px !important;
  font-weight: 700 !important;
  padding: 0.55rem 1.15rem !important;
}
