.flash {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.875rem 1.25rem;
  border-radius: 10px;
  border-left: 3px solid transparent;
  background: #ffffff;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1), 0 1px 4px rgba(0, 0, 0, 0.06);
  font-size: var(--font-size-sm);
  font-weight: 500;
  color: var(--primary-text-color);
  z-index: 9999;
  max-width: 360px;
  animation: flash-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.flash--hiding {
  animation: flash-out 0.22s ease-in forwards;
}

@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes flash-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(8px) scale(0.97);
  }
}

.flash--success {
  border-left-color: var(--accent-color);
}

.flash--success .flash__icon {
  color: var(--accent-color);
}

.flash__icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.flash__text {
  flex: 1;
  line-height: 1.4;
}

[data-theme="dark"] .flash {
  background: #1e293b;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
  color: #f1f5f9;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .flash {
    background: #1e293b;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4), 0 1px 4px rgba(0, 0, 0, 0.2);
    color: #f1f5f9;
  }
}

@media (max-width: 640px) {
  .flash {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    max-width: none;
  }
}
