/* ===== FLASH MESSAGE STYLES ===== */
.flash-message {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  margin: 0 0 8px;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  animation: flashSlideIn 0.35s ease forwards;
  position: relative;
  z-index: 999;
  border-left: 4px solid transparent;
  border-radius: 0 6px 6px 0;
  overflow: hidden;
}

/* Auto-close progress bar */
.flash-message::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: currentColor;
  opacity: 0.25;
  transform-origin: left;
  animation: flashProgress 5s linear forwards;
}

.flash-message.no-progress::after {
  display: none;
}

@keyframes flashSlideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flashProgress {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

@keyframes flashFadeOut {
  from { opacity: 1; transform: translateY(0); max-height: 100px; margin-bottom: 8px; }
  to   { opacity: 0; transform: translateY(-6px); max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; }
}

.flash-message.dismissing {
  animation: flashFadeOut 0.3s ease forwards;
  pointer-events: none;
}

.flash-success {
  background: #f0faf4;
  border-left-color: #22c55e;
  color: #166534;
}

.flash-error {
  background: #fff1f1;
  border-left-color: #C41230;
  color: #7f1d1d;
}

.flash-warning {
  background: #fffbeb;
  border-left-color: #f59e0b;
  color: #92400e;
}

.flash-info {
  background: #eff6ff;
  border-left-color: #3b82f6;
  color: #1e40af;
}

.flash-icon {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.flash-success .flash-icon { color: #22c55e; }
.flash-error .flash-icon { color: #C41230; }
.flash-warning .flash-icon { color: #f59e0b; }
.flash-info .flash-icon { color: #3b82f6; }

.flash-message span {
  flex: 1;
  line-height: 1.5;
}

.flash-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.flash-close {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  opacity: 0.5;
  padding: 4px;
  border-radius: 4px;
  transition: opacity 0.2s;
  flex-shrink: 0;
  font-size: 0.9rem;
}

.flash-close:hover {
  opacity: 1;
  background: rgba(0,0,0,0.05);
}
