/* Toast Notifications - styled to match TimeTracker UI (light + dark) */

#toast-notification-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 9999;
  pointer-events: none; /* clicks pass through except inside toasts */
}

@media (max-width: 640px) {
  #toast-notification-container {
    top: auto;
    right: 0.75rem;
    left: 0.75rem;
    bottom: 0.75rem;
  }
}

.toast-notification {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  width: 24rem;
  max-width: 90vw;
  background: #FFFFFF; /* card-light */
  color: #2D3748;      /* text-light */
  border: 1px solid #E2E8F0; /* border-light */
  border-left-width: 4px;
  border-radius: 0.5rem;
  padding: 0.75rem 0.75rem;
  box-shadow: 0 10px 20px rgba(0,0,0,0.12), 0 3px 6px rgba(0,0,0,0.08);
  opacity: 0;
  transform: translateX(8px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: auto; /* clickable */
}

.dark .toast-notification {
  background: #2D3748; /* card-dark */
  color: #E2E8F0;      /* text-dark */
  border-color: #4A5568; /* border-dark */
}

.toast-notification.hiding {
  opacity: 0;
  transform: translateX(8px) scale(0.98);
}

/* Icons */
.toast-icon { line-height: 1; font-size: 1.125rem; padding-top: 0.125rem; }
.toast-title { font-weight: 600; margin-bottom: 0.125rem; }
.toast-message { font-size: 0.9375rem; }

/* Close button */
.toast-close {
  margin-left: auto;
  background: transparent;
  border: 0;
  color: inherit;
  opacity: 0.7;
  cursor: pointer;
}
.toast-close:hover { opacity: 1; }

/* Progress bar */
.toast-progress {
  position: relative;
  height: 2px;
  overflow: hidden;
  border-bottom-left-radius: 0.5rem;
  border-bottom-right-radius: 0.5rem;
  margin-top: 0.5rem;
}
.toast-progress-bar {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  animation-name: toast-progress-shrink;
  animation-timing-function: linear;
  animation-fill-mode: forwards;
}

@keyframes toast-progress-shrink { from { width: 100%; } to { width: 0%; } }

/* Variants */
.toast-notification.toast-success { border-left-color: #10B981; }
.toast-notification.toast-error   { border-left-color: #EF4444; }
.toast-notification.toast-warning { border-left-color: #F59E0B; }
.toast-notification.toast-info    { border-left-color: #3B82F6; }

.toast-notification.toast-success .toast-icon { color: #10B981; }
.toast-notification.toast-error   .toast-icon { color: #EF4444; }
.toast-notification.toast-warning .toast-icon { color: #F59E0B; }
.toast-notification.toast-info    .toast-icon { color: #3B82F6; }

.toast-notification.toast-success .toast-progress-bar { background: #10B981; }
.toast-notification.toast-error   .toast-progress-bar { background: #EF4444; }
.toast-notification.toast-warning .toast-progress-bar { background: #F59E0B; }
.toast-notification.toast-info    .toast-progress-bar { background: #3B82F6; }


