/**
 * Enhanced notifications styling
 */

/* Toast container positioning */
.toast-container {
  z-index: 1050; /* Ensure it's above most elements */
}

/* Toast styling */
.toast {
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
  transform: translateY(20px);
  min-width: 250px;
  max-width: 350px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  margin-bottom: 0.75rem;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Color styles for toasts */
.toast.bg-success {
  background-color: rgba(40, 167, 69, 0.95) !important;
}

.toast.bg-danger {
  background-color: rgba(220, 53, 69, 0.95) !important;
}

.toast.bg-warning {
  background-color: rgba(255, 193, 7, 0.95) !important;
}

.toast.bg-info {
  background-color: rgba(23, 162, 184, 0.95) !important;
}

.toast.bg-primary {
  background-color: rgba(0, 123, 255, 0.95) !important;
}

/* Enhance toast body content */
.toast-body {
  padding: 0.75rem 1rem;
  word-break: break-word;
  font-size: 0.95rem;
}

/* Side notification container */
.side-notification-container {
  position: fixed;
  top: 20px;
  right: 20px;
  max-width: 320px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Individual side notification */
.side-notification {
  background: white;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateX(120%);
  transition: transform 0.3s ease-out;
  max-width: 100%;
  position: relative;
  border-left: 4px solid #0d6efd;
}

.side-notification.show {
  transform: translateX(0);
}

/* Side notification types */
.side-notification.bg-success {
  border-left-color: #28a745;
}

.side-notification.bg-danger {
  border-left-color: #dc3545;
}

.side-notification.bg-warning {
  border-left-color: #ffc107;
}

.side-notification.bg-info {
  border-left-color: #17a2b8;
}

.side-notification.bg-primary {
  border-left-color: #0d6efd;
}

/* Icons and content */
.side-notification-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(13, 110, 253, 0.1);
  color: #0d6efd;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
  font-size: 16px;
}

.bg-success .side-notification-icon {
  background: rgba(40, 167, 69, 0.1);
  color: #28a745;
}

.bg-danger .side-notification-icon {
  background: rgba(220, 53, 69, 0.1);
  color: #dc3545;
}

.bg-warning .side-notification-icon {
  background: rgba(255, 193, 7, 0.1);
  color: #ffc107;
}

.bg-info .side-notification-icon {
  background: rgba(23, 162, 184, 0.1);
  color: #17a2b8;
}

/* Message content */
.side-notification-message {
  flex-grow: 1;
  font-size: 0.95rem;
  padding-right: 20px;
  word-break: break-word;
}

/* Close button */
.side-notification-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: transparent;
  border: none;
  color: #6c757d;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-notification-close:hover {
  color: #343a40;
}

/* Animations */
@keyframes notification-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0.4);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(13, 110, 253, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(13, 110, 253, 0);
  }
}

.toast.show {
  animation: notification-pulse 1.5s 1;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .toast-container {
    width: 100%;
    padding-right: 10px;
    padding-left: 10px;
  }
  
  .toast {
    max-width: 100%;
    margin-right: auto;
    margin-left: auto;
  }
  
  .side-notification-container {
    width: calc(100% - 40px);
    max-width: none;
  }
}
