/* ===== Flash Messages - Shared Component ===== */
/* Fixed position in top-right corner, above all content */

.flash-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 400px;
  width: calc(100% - 40px);
  pointer-events: none;
}

.flash-toast {
  padding: 14px 44px 14px 16px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  pointer-events: auto;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  animation: flash-slide-in 0.3s ease-out;
}

.flash-toast.flash-dismissing {
  animation: flash-slide-out 0.3s ease-out forwards;
}

@keyframes flash-slide-in {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes flash-slide-out {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(100%);
  }
}

/* Success / Notice */
.flash-toast.flash-notice,
.flash-toast.flash-success {
  background: var(--status-success-bg);
  border: 1px solid var(--status-success-border);
  color: var(--status-success-darker);
}

/* Error / Alert */
.flash-toast.flash-alert,
.flash-toast.flash-error {
  background: var(--status-error-bg);
  border: 1px solid var(--status-error-border);
  color: var(--status-error-darker);
}

/* Warning */
.flash-toast.flash-warning {
  background: var(--status-warning-bg);
  border: 1px solid var(--status-warning-border);
  color: var(--status-warning-darker);
}

/* Info */
.flash-toast.flash-info {
  background: rgba(107, 63, 160, 0.1);
  border: 1px solid rgba(107, 63, 160, 0.3);
  color: var(--victor-grape);
}

/* Icon */
.flash-toast svg.flash-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  margin-top: 1px;
}

/* Message content */
.flash-toast .flash-content {
  flex: 1;
  line-height: 1.4;
}

/* Close button */
.flash-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s, background 0.2s;
  color: currentColor;
  padding: 0;
}

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

.flash-close-btn svg {
  width: 16px;
  height: 16px;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .flash-container {
    top: 12px;
    right: 12px;
    left: 12px;
    width: auto;
    max-width: none;
  }

  .flash-toast {
    padding: 12px 40px 12px 14px;
    font-size: 13px;
  }
}
