/**
 * Velzon Toast Styles
 * Custom toast styling for SweetAlert2 to match Velzon theme
 */

/* Toast Popup */
.velzon-toast-popup {
  box-shadow: 0 0.75rem 1.5rem rgba(18, 38, 63, 0.15) !important;
  border-radius: 0.375rem !important;
  border: 1px solid #e9ebec !important;
}

.velzon-toast-container {
  margin: 0 !important;
  padding: 0 !important;
}

.velzon-toast {
  width: 100%;
}

/* Animation support */
@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translate3d(100%, 0, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes fadeOutRight {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate3d(100%, 0, 0);
  }
}

.animate__animated {
  animation-duration: 0.3s;
  animation-fill-mode: both;
}

.animate__faster {
  animation-duration: 0.3s;
}

.animate__fadeInRight {
  animation-name: fadeInRight;
}

.animate__fadeOutRight {
  animation-name: fadeOutRight;
}

/* Confirm Dialog */
.velzon-confirm-popup {
  border-radius: 0.5rem !important;
  box-shadow: 0 1rem 3rem rgba(18, 38, 63, 0.175) !important;
}

.velzon-confirm-dialog .avatar-lg {
  height: 5rem;
  width: 5rem;
}

.velzon-confirm-dialog .avatar-title {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
}

.bg-soft-warning {
  background-color: rgba(247, 184, 75, 0.18) !important;
}

.bg-soft-danger {
  background-color: rgba(240, 101, 72, 0.18) !important;
}

.bg-soft-primary {
  background-color: rgba(64, 81, 137, 0.18) !important;
}

.text-warning {
  color: #f7b84b !important;
}

.text-danger {
  color: #f06548 !important;
}

.text-primary {
  color: #405189 !important;
}

.rounded-circle {
  border-radius: 50% !important;
}

/* Button styles for confirm dialog */
.swal2-actions.gap-2 {
  gap: 0.5rem !important;
  margin-top: 1.5rem !important;
}

.swal2-actions .btn {
  margin: 0 !important;
  padding: 0.5rem 1.5rem !important;
  font-size: 0.875rem !important;
  font-weight: 500 !important;
  border-radius: 0.25rem !important;
}

.swal2-actions .btn-success {
  background-color: #0ab39c !important;
  border-color: #0ab39c !important;
  color: #fff !important;
}

.swal2-actions .btn-success:hover {
  background-color: #099885 !important;
  border-color: #099885 !important;
}

.swal2-actions .btn-ghost-danger {
  background-color: transparent !important;
  border: 1px solid #f06548 !important;
  color: #f06548 !important;
}

.swal2-actions .btn-ghost-danger:hover {
  background-color: rgba(240, 101, 72, 0.1) !important;
}

.swal2-actions .btn-danger {
  background-color: #f06548 !important;
  border-color: #f06548 !important;
  color: #fff !important;
}

.swal2-actions .btn-danger:hover {
  background-color: #e84a31 !important;
  border-color: #e84a31 !important;
}

.swal2-actions .btn-ghost-secondary {
  background-color: transparent !important;
  border: 1px solid #878a99 !important;
  color: #878a99 !important;
}

.swal2-actions .btn-ghost-secondary:hover {
  background-color: rgba(135, 138, 153, 0.1) !important;
}

/* Input styling for textarea in confirm dialog */
.velzon-confirm-popup .swal2-input,
.velzon-confirm-popup .swal2-textarea {
  border: 1px solid #ced4da !important;
  border-radius: 0.25rem !important;
  padding: 0.5rem 0.75rem !important;
  font-size: 0.875rem !important;
  color: #212529 !important;
}

.velzon-confirm-popup .swal2-input:focus,
.velzon-confirm-popup .swal2-textarea:focus {
  border-color: #405189 !important;
  box-shadow: 0 0 0 0.25rem rgba(64, 81, 137, 0.25) !important;
  outline: 0 !important;
}

.velzon-confirm-popup .swal2-validation-message {
  background-color: transparent !important;
  color: #f06548 !important;
  font-size: 0.875rem !important;
  padding: 0.5rem 0 0 0 !important;
}

/* Close button in toast */
.velzon-toast .btn-close {
  background: transparent;
  border: 0;
  opacity: 0.5;
  padding: 0;
  width: auto;
  height: auto;
}

.velzon-toast .btn-close:hover {
  opacity: 1;
}

/* Avatar styles for toast icons */
.avatar-sm {
  height: 2.5rem;
  width: 2.5rem;
}

.avatar-sm .avatar-title {
  align-items: center;
  display: flex;
  height: 100%;
  justify-content: center;
  width: 100%;
  font-size: 1.25rem;
}

/* Remove default SweetAlert2 styles that conflict */
.velzon-toast-popup .swal2-html-container {
  margin: 0 !important;
}

.velzon-toast-popup .swal2-close {
  display: none !important;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .velzon-toast-popup {
    width: calc(100vw - 2rem) !important;
    max-width: 420px !important;
  }
  
  .velzon-confirm-popup {
    width: calc(100vw - 2rem) !important;
    max-width: 400px !important;
  }
}

/* Ensure proper stacking */
.swal2-container {
  z-index: 9999 !important;
}

/* Toast container positioning */
.swal2-container.swal2-top-end {
  top: 1rem !important;
  right: 1rem !important;
}

/* Multiple toasts stacking */
.swal2-container.swal2-top-end > .swal2-popup {
  margin-bottom: 0.5rem;
}

