/* ═══════════════════════════════════════════
   HIGHPEX — Liquid Glass Toast System
   Apple-style animated notifications
   ═══════════════════════════════════════════ */

/* ── Toast Container ── */
.toast-container {
  position: fixed;
  top: 90px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 400px;
  width: 100%;
}

/* ── Base Toast ── */
.toast {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 20px;
  position: relative;
  pointer-events: auto;
  cursor: default;

  /* Liquid glass */
  background: rgba(20, 20, 35, 0.85);
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.03);

  /* Animation */
  opacity: 0;
  transform: translateX(120%) scale(0.85);
  animation: toastSlideIn 0.55s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Top shimmer */
.toast::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.25) 50%, transparent);
  pointer-events: none;
  z-index: 1;
}

/* Inner glow */
.toast::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  border-radius: 20px 20px 0 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), transparent);
  pointer-events: none;
}

/* ── Icon ── */
.toast-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
}

.toast-icon svg {
  display: block;
}

/* ── Content ── */
.toast-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 5;
  padding-top: 2px;
}

.toast-title {
  font-family: 'Sora', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
  line-height: 1.3;
}

.toast-message {
  font-size: 0.83rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.55;
}

/* ── Close ── */
.toast-close {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  position: relative;
  z-index: 5;
  margin-top: 1px;
}

.toast-close svg {
  display: block;
}

.toast-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

/* ── Progress ── */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 20px 20px;
  z-index: 6;
  opacity: 0.7;
}

/* ═══════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════ */

@keyframes toastSlideIn {
  0% {
    opacity: 0;
    transform: translateX(120%) scale(0.85);
  }
  40% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

@keyframes toastSlideOut {
  0% {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(120%) scale(0.85);
  }
}

@keyframes progressShrink {
  from { width: 100%; }
  to { width: 0%; }
}

.toast.toast-exit {
  animation: toastSlideOut 0.4s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

.toast:hover .toast-progress {
  animation-play-state: paused;
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 480px) {
  .toast-container {
    top: auto;
    bottom: 20px;
    right: 12px;
    left: 12px;
    max-width: none;
  }

  .toast {
    padding: 14px 16px;
    border-radius: 16px;
    gap: 12px;
  }

  .toast-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .toast-title { font-size: 0.85rem; }
  .toast-message { font-size: 0.78rem; }
}
