.toast-container {
  position: fixed;
  z-index: 9999;
  padding: 1rem;
  max-width: 100%;
  box-sizing: border-box;
}

/* Position variants */
.toast-container[data-position="top-right"] {
  top: 0;
  right: 0;
}

.toast-container[data-position="top-left"] {
  top: 0;
  left: 0;
}

.toast-container[data-position="top-center"] {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.toast-container[data-position="bottom-right"] {
  bottom: 0;
  right: 0;
}

.toast-container[data-position="bottom-left"] {
  bottom: 0;
  left: 0;
}

.toast-container[data-position="bottom-center"] {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

/* Toast styles */
.toast {
  min-width: 300px;
  max-width: 500px;
  margin-bottom: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: slideIn 0.3s ease-out;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.toast-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.toast-message {
  flex: 1;
  margin-right: 1rem;
  font-size: 0.875rem;
  line-height: 1.4;
  font-weight: 600;
}

.toast-close {
  background: none;
  border: none;
  font-size: 1.25rem;
  cursor: pointer;
  opacity: 0.7;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

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

/* Toast types */
.toast-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.toast-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.toast-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeaa7;
  color: #856404;
}

.toast-info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

/* Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-100%);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .toast-container {
    padding: 0.5rem;
    width: 100%;
  }

  .toast {
    min-width: auto;
    max-width: none;
    width: calc(100vw - 1rem);
    margin-bottom: 0.5rem;
    padding: 0.875rem 1rem;
  }

  .toast-message {
    font-size: 0.8125rem;
  }

  /* On mobile, always position at top */
  .toast-container[data-position="bottom-right"],
  .toast-container[data-position="bottom-left"],
  .toast-container[data-position="bottom-center"] {
    top: 0;
    bottom: auto;
  }
}

@media (max-width: 480px) {
  .toast {
    padding: 0.75rem;
  }
  
  .toast-message {
    margin-right: 0.75rem;
  }
}

.toast:not(.show) {
  display: block !important;
}
