/* Toast Message System - Shared across all layouts */

/* Toast Container - Top Right */
.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 400px;
  pointer-events: none;
}

.toast-container > * {
  pointer-events: auto;
}

/* Toast Message */
.toast {
  background: #fff;
  border-radius: 0.5rem;
  padding: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: start;
  gap: 0.75rem;
  animation: slideIn 0.3s ease-out;
  border-left: 4px solid;
  min-width: 320px;
}

.toast.toast-success {
  border-left-color: #16a34a;
}

.toast.toast-error,
.toast.toast-danger {
  border-left-color: #dc2626;
}

.toast.toast-warning {
  border-left-color: #ea580c;
}

.toast.toast-info {
  border-left-color: #0284c7;
}

.toast-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-success .toast-icon {
  color: #16a34a;
}

.toast-error .toast-icon,
.toast-danger .toast-icon {
  color: #dc2626;
}

.toast-warning .toast-icon {
  color: #ea580c;
}

.toast-info .toast-icon {
  color: #0284c7;
}

.toast-content {
  flex: 1;
  font-size: 0.875rem;
  color: #09090b;
  line-height: 1.5;
}

.toast-close {
  background: none;
  border: none;
  color: #71717a;
  cursor: pointer;
  padding: 0;
  font-size: 1.125rem;
  line-height: 1;
  transition: color 0.15s ease;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.toast-close:hover {
  color: #09090b;
}

/* Show More Button */
.toast-show-more {
  background: #fff;
  border: 1px solid #e4e4e7;
  border-radius: 0.375rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.813rem;
  color: #71717a;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: center;
}

.toast-show-more:hover {
  background: #f4f4f5;
  color: #09090b;
  border-color: #d4d4d8;
}

.toast-show-more i {
  font-size: 0.75rem;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.toast.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* In-Page Alert (First Message Only) */
.alert-static {
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.875rem;
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 0.75rem;
  animation: slideInStatic 0.3s ease-out;
}

@keyframes slideInStatic {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.alert-static-content {
  display: flex;
  align-items: start;
  gap: 0.75rem;
  flex: 1;
}

.alert-static.alert-danger,
.alert-static.alert-error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-static.alert-success {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.alert-static.alert-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.alert-static.alert-info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
}

.alert-static-close {
  background: none;
  border: none;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
  transition: opacity 0.15s ease;
  flex-shrink: 0;
}

.alert-static-close:hover {
  opacity: 1;
}

@media (max-width: 768px) {
  .toast-container {
    right: 1rem;
    left: 1rem;
    max-width: none;
  }

  .toast {
    min-width: auto;
  }
}
