/* Al-Fanar modern toast */
.aft-toast-host {
  position: fixed;
  z-index: 10050;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, calc(100vw - 28px));
  pointer-events: none;
}

.aft-toast {
  pointer-events: auto;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 16px 16px 18px;
  border-radius: 18px;
  color: #f4f7fb;
  background:
    linear-gradient(145deg, rgba(10, 22, 44, 0.96), rgba(6, 14, 30, 0.94));
  border: 1px solid rgba(244, 180, 0, 0.35);
  box-shadow:
    0 22px 50px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 0 40px rgba(11, 94, 215, 0.18);
  backdrop-filter: blur(18px);
  overflow: hidden;
  opacity: 0;
  transform: translateY(-18px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.aft-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.aft-toast.is-hiding {
  opacity: 0;
  transform: translateY(-12px) scale(0.98);
}

.aft-toast-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 1.15rem;
  color: #071a36;
  background: linear-gradient(145deg, #ffe58a, #f4b400);
  box-shadow: 0 8px 20px rgba(244, 180, 0, 0.35);
  animation: aftToastPulse 1.8s ease-in-out infinite;
}

.aft-toast[data-type="success"] .aft-toast-icon {
  background: linear-gradient(145deg, #7dffc8, #16a34a);
  color: #04301c;
  box-shadow: 0 8px 20px rgba(22, 163, 74, 0.35);
}

.aft-toast-copy {
  min-width: 0;
}

.aft-toast-copy strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  margin-bottom: 2px;
}

.aft-toast-copy span {
  display: block;
  color: #a8bdd7;
  font-size: 0.8rem;
  line-height: 1.35;
}

.aft-toast-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  color: #9fb1c8;
  background: rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: 0.2s;
}

.aft-toast-close:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.aft-toast-bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.aft-toast-bar > i {
  display: block;
  height: 100%;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, #0b5ed7, #f4b400, #16a34a);
  animation: aftToastBar linear forwards;
}

@keyframes aftToastPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@keyframes aftToastBar {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

@media (max-width: 520px) {
  .aft-toast-host { top: 16px; }
  .aft-toast { padding: 14px; gap: 12px; }
  .aft-toast-icon { width: 42px; height: 42px; font-size: 1rem; }
}
