/* Premium Toastify — responsive across devices */
.toastify.sj-toast {
  display: flex !important;
  align-items: flex-start;
  gap: 0;
  padding: 0 !important;
  min-width: min(360px, calc(100vw - 24px));
  max-width: min(420px, calc(100vw - 24px));
  border-radius: 16px !important;
  box-shadow:
    0 18px 50px rgba(15, 23, 42, 0.18),
    0 4px 14px rgba(15, 23, 42, 0.08) !important;
  background: #fff !important;
  color: #0f172a !important;
  border: 1px solid rgba(15, 23, 42, 0.06);
  overflow: hidden;
  cursor: default;
  font-family: Figtree, Afacad, system-ui, sans-serif;
  z-index: 100200 !important;
}

.sj-toast__inner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 14px 16px 14px 14px;
  box-sizing: border-box;
}

.sj-toast__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

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

.sj-toast__title {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin: 0 0 3px;
  line-height: 1.25;
}

.sj-toast__text {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
  color: #334155;
  word-break: break-word;
}

.toastify.sj-toast .toast-close {
  position: absolute;
  top: 10px;
  right: 10px;
  opacity: 0.45;
  padding: 4px 6px;
  font-size: 14px;
  font-weight: 700;
  color: #0f172a !important;
  background: transparent;
  border: none;
  cursor: pointer;
  line-height: 1;
}

.toastify.sj-toast .toast-close:hover {
  opacity: 0.85;
}

/* Types */
.sj-toast--error {
  border-color: rgba(165, 0, 0, 0.14) !important;
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 55%) !important;
}

.sj-toast--error .sj-toast__icon {
  background: rgba(165, 0, 0, 0.1);
  color: #a50000;
}

.sj-toast--error .sj-toast__title {
  color: #a50000;
}

.sj-toast--success {
  border-color: rgba(6, 97, 104, 0.16) !important;
  background: linear-gradient(180deg, #f0fdfa 0%, #ffffff 55%) !important;
}

.sj-toast--success .sj-toast__icon {
  background: rgba(6, 97, 104, 0.12);
  color: #066168;
}

.sj-toast--success .sj-toast__title {
  color: #066168;
}

.sj-toast--info {
  border-color: rgba(29, 78, 216, 0.14) !important;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 55%) !important;
}

.sj-toast--info .sj-toast__icon {
  background: rgba(29, 78, 216, 0.1);
  color: #1d4ed8;
}

.sj-toast--info .sj-toast__title {
  color: #1d4ed8;
}

.sj-toast--warning {
  border-color: rgba(180, 83, 9, 0.16) !important;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 55%) !important;
}

.sj-toast--warning .sj-toast__icon {
  background: rgba(245, 158, 11, 0.15);
  color: #b45309;
}

.sj-toast--warning .sj-toast__title {
  color: #b45309;
}

/* Mobile / small tablets — full-bleed friendly, centered */
@media (max-width: 767.98px) {
  .toastify.sj-toast {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
    transform: none !important;
    border-radius: 14px !important;
  }

  .toastify.sj-toast.on-center,
  .toastify.sj-toast.right,
  .toastify.sj-toast.left {
    left: 12px !important;
    right: 12px !important;
  }

  .sj-toast__inner {
    padding: 13px 36px 13px 12px;
    gap: 10px;
  }

  .sj-toast__icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    font-size: 0.92rem;
  }

  .sj-toast__title {
    font-size: 0.78rem;
  }

  .sj-toast__text {
    font-size: 0.86rem;
  }
}

/* Safe area for notched phones */
@supports (padding: max(0px)) {
  @media (max-width: 767.98px) {
    .toastify.sj-toast {
      top: max(12px, env(safe-area-inset-top)) !important;
    }
  }
}
