/**
 * Flash Messages Styles - Stylish toast-style notifications
 */

/* Container for flash messages */
.flash-message-container {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-width: 420px;
  width: calc(100% - 2rem);
  pointer-events: none;
}

/* Individual flash message */
.flash-message {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-radius: 0.75rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.15), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  background: white;
  border-left: 4px solid;
  pointer-events: auto;
  transform: translateX(110%);
  opacity: 0;
  transition: all 0.3s ease-out;
}

.flash-message-show {
  transform: translateX(0);
  opacity: 1;
}

.flash-message-closing {
  transform: translateX(110%);
  opacity: 0;
}

/* Message icon */
.flash-message-icon {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

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

/* Message content */
.flash-message-content {
  flex: 1;
  min-width: 0;
}

.flash-message-text {
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
  color: #374151;
  word-wrap: break-word;
}

/* Close button */
.flash-message-close {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: #9ca3af;
  transition: color 0.2s;
  margin-left: 0.5rem;
}

.flash-message-close:hover {
  color: #374151;
}

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

/* Success variant */
.flash-message-success {
  border-left-color: #10b981;
  background: linear-gradient(to right, #ecfdf5, white);
}

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

.flash-message-success .flash-message-text {
  color: #065f46;
}

/* Error variant */
.flash-message-error {
  border-left-color: #ef4444;
  background: linear-gradient(to right, #fef2f2, white);
}

.flash-message-error .flash-message-icon {
  color: #ef4444;
}

.flash-message-error .flash-message-text {
  color: #991b1b;
}

/* Warning variant */
.flash-message-warning {
  border-left-color: #f59e0b;
  background: linear-gradient(to right, #fffbeb, white);
}

.flash-message-warning .flash-message-icon {
  color: #f59e0b;
}

.flash-message-warning .flash-message-text {
  color: #92400e;
}

/* Info variant */
.flash-message-info {
  border-left-color: #3b82f6;
  background: linear-gradient(to right, #eff6ff, white);
}

.flash-message-info .flash-message-icon {
  color: #3b82f6;
}

.flash-message-info .flash-message-text {
  color: #1e40af;
}

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

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

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

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .flash-message {
    background: #1f2937;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  }

  .flash-message-text {
    color: #e5e7eb;
  }

  .flash-message-close {
    color: #6b7280;
  }

  .flash-message-close:hover {
    color: #d1d5db;
  }

  .flash-message-success {
    background: linear-gradient(to right, #064e3b, #1f2937);
  }

  .flash-message-success .flash-message-text {
    color: #a7f3d0;
  }

  .flash-message-error {
    background: linear-gradient(to right, #7f1d1d, #1f2937);
  }

  .flash-message-error .flash-message-text {
    color: #fecaca;
  }

  .flash-message-warning {
    background: linear-gradient(to right, #78350f, #1f2937);
  }

  .flash-message-warning .flash-message-text {
    color: #fde68a;
  }

  .flash-message-info {
    background: linear-gradient(to right, #1e3a8a, #1f2937);
  }

  .flash-message-info .flash-message-text {
    color: #bfdbfe;
  }
}
