/* Flash Messages */
.flash-messages {
  width: 100%;
  max-width: 600px;
  margin: 0.75rem auto 0;
  padding: 0 1rem;
}

.flash-message {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-1rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


.flash-content {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex: 1;
}

.flash-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.flash-text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  flex: 1;
}

.flash-close {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.flash-close:hover {
  opacity: 1;
}

.flash-close svg {
  width: 100%;
  height: 100%;
}

/* Notice (Success) Style */
.flash-notice {
  background-color: #d1fae5;
  border: 1px solid #86efac;
  color: #065f46;
}

.flash-notice .flash-icon {
  color: #10b981;
}

.flash-notice .flash-close {
  color: #065f46;
}

/* Alert (Error) Style */
.flash-alert {
  background-color: #fee2e2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

.flash-alert .flash-icon {
  color: #ef4444;
}

.flash-alert .flash-close {
  color: #991b1b;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .flash-messages {
    top: 60px;
    max-width: 100%;
    padding: 0 0.75rem;
  }

  .flash-message {
    padding: 0.875rem 1rem;
  }

  .flash-text {
    font-size: 0.875rem;
  }

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

/* Auto-hide animation (optional - can be triggered with JavaScript) */
.flash-message.fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-1rem);
  }
}
