@keyframes feresSwalIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes feresSwalOut {
  from {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  to {
    opacity: 0;
    transform: scale(0.96) translateY(-8px);
  }
}

@keyframes feresBackdropIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.feres-swal-enter {
  animation: feresSwalIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.feres-swal-leave {
  animation: feresSwalOut 0.22s ease-in both;
}

.feres-swal-backdrop-enter {
  animation: feresBackdropIn 0.25s ease-out both;
}

.feres-swal-popup {
  border-radius: 14px !important;
  padding: 1.35rem 1.25rem 1.1rem !important;
  box-shadow: 0 22px 50px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.04) !important;
}

.feres-swal-popup.feres-swal-loading {
  min-width: 240px;
}

.feres-swal-title {
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  letter-spacing: -0.02em;
}

.feres-swal-text {
  font-size: 0.95rem !important;
  color: #475569 !important;
  line-height: 1.5;
}

.feres-swal-loading-text {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #64748b;
}

.feres-swal-actions {
  margin-top: 1.35rem !important;
  gap: 0.65rem !important;
}

.feres-swal-btn-confirm,
.feres-swal-btn-cancel {
  border-radius: 9px !important;
  font-weight: 600 !important;
  padding: 0.55rem 1.35rem !important;
  font-size: 0.9rem !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.feres-swal-btn-confirm:hover,
.feres-swal-btn-cancel:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(5, 150, 105, 0.25);
}

.swal2-loader {
  border-color: #059669 transparent #059669 transparent !important;
}

/* Error / payment notices — readable full text, scroll if long */
.feres-swal-error-dialog.swal2-popup {
  max-width: min(32rem, calc(100vw - 2rem)) !important;
  width: min(32rem, calc(100vw - 2rem)) !important;
}

.feres-swal-error-dialog.feres-swal-payment {
  border-top: 4px solid #dc2626 !important;
  background: linear-gradient(180deg, #fffefe 0%, #ffffff 28%) !important;
}

.feres-swal-error-dialog:not(.feres-swal-payment) {
  border-top: 4px solid #f59e0b !important;
}

.feres-swal-body-message {
  margin: 0.35rem 0 0;
  padding: 0.75rem 0.85rem;
  max-height: min(52vh, 22rem);
  overflow-y: auto;
  overflow-x: hidden;
  text-align: left;
  font-size: 0.98rem !important;
  line-height: 1.55 !important;
  color: #1e293b !important;
  word-break: break-word;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-weight: 500;
  background: rgba(248, 250, 252, 0.95);
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.feres-swal-payment .feres-swal-body-message {
  background: rgba(254, 242, 242, 0.55);
  border-color: rgba(248, 113, 113, 0.35);
}

.feres-swal-error-dialog .swal2-html-container {
  margin: 0.5rem 0 0 !important;
  padding: 0 !important;
  max-height: none !important;
  overflow: visible !important;
}

.feres-swal-error-dialog .swal2-title {
  padding-bottom: 0.15rem !important;
}

.feres-swal-footer-hint {
  margin-top: 0.5rem !important;
  padding-top: 0.35rem !important;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  width: 100%;
  text-align: center;
}

.feres-swal-error-dialog .swal2-icon.swal2-error {
  animation: feresSwalIconPulse 0.55s ease-out both;
}

@keyframes feresSwalIconPulse {
  0% {
    transform: scale(0.85);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}
