/* Flash Messages */
.flash-messages {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1200;
  max-width: 460px;
  width: calc(100% - 2rem);
}

.flash-message {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 0.5rem;
  padding: 1rem;
  border-radius: 0.75rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid transparent;
  transform: translateX(0);
  transition: all 0.3s ease-in-out;
}

.flash-message.flash-dismissing {
  transform: translateX(100%);
  opacity: 0;
}

.flash-content {
  flex: 1;
  margin-right: 0.75rem;
  font-weight: 500;
}

.flash-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.125rem;
  border-radius: 0.25rem;
  transition: background-color 0.2s ease;
  flex-shrink: 0;
}

.flash-close:hover {
  background-color: rgba(255, 255, 255, 0.16);
}

.flash-close svg {
  width: 1rem;
  height: 1rem;
}

.flash-close-icon {
  width: 1.25rem;
  height: 1.25rem;
}

/* Flash message types */
.flash-notice {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}

.flash-alert {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #7f1d1d;
}

.flash-warning {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #78350f;
}

.flash-info {
  background: #cffafe;
  border-color: #67e8f9;
  color: #164e63;
}

html.dark .flash-notice {
  background: #14532d;
  border-color: #22c55e;
  color: #dcfce7;
}

html.dark .flash-alert {
  background: #7f1d1d;
  border-color: #ef4444;
  color: #fee2e2;
}

html.dark .flash-warning {
  background: #78350f;
  border-color: #f59e0b;
  color: #fef3c7;
}

html.dark .flash-info {
  background: #164e63;
  border-color: #06b6d4;
  color: #cffafe;
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .flash-messages {
    top: 0.5rem;
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
    width: auto;
  }

  .flash-message {
    padding: 0.75rem;
  }

  .flash-content {
    margin-right: 0.5rem;
    font-size: 0.875rem;
  }
}
