/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 1100;
  max-width: 350px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  border: 2px solid #fff !important;
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.25);
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  width: 100%;
  max-width: 350px;
  pointer-events: auto;
  background-clip: padding-box;
  opacity: 0;
}

.toast.show {
  opacity: 1;
}

.toast-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  background-color: rgba(34, 34, 34, 0.95) !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-top-left-radius: calc(0.5rem - 1px);
  border-top-right-radius: calc(0.5rem - 1px);
}

.toast-body {
  padding: 1rem;
  background-color: #222 !important;
  border-bottom-left-radius: calc(0.5rem - 1px);
  border-bottom-right-radius: calc(0.5rem - 1px);
  color: #fff !important;
}

/* Toast Colors - force white text for visibility */
.toast, .toast .toast-header, .toast .toast-body {
  color: #fff !important;
  background: #222 !important;
}

.toast .toast-header {
  background: transparent !important;
  border-bottom: none !important;
}

.toast.bg-success {
  background-color: #218838 !important;
}
.toast.bg-danger {
  background-color: #c82333 !important;
}
.toast.bg-warning {
  background-color: #e0a800 !important;
  color: #222 !important;
}
.toast.bg-info {
  background-color: #117a8b !important;
}

/* Animation */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

.toast.show {
  animation: slideInRight 0.3s ease-out;
}

.toast.hide {
  animation: fadeOut 0.3s ease-in;
  opacity: 0;
}

/* Close Button */
.btn-close {
  opacity: 0.9;
  filter: invert(1) grayscale(1) brightness(2);
  transition: opacity 0.2s ease-in-out;
}

.btn-close:hover {
  opacity: 1;
}

/* Make close button visible on dark backgrounds */
.toast .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
  opacity: 0.95;
}
