/*
 * Auth Flash Alert System Styles
 * 
 * Dedicated styles for flash messages in authentication forms (login, register, etc.)
 * These styles are specifically designed to work within the login-box context
 * without the positioning conflicts of the main app-alerts.css system.
 * 
 * Components:
 * - .app-flash-container: Container for alerts within auth forms
 * - .app-alert: Base alert styling
 * - .app-alert-{type}: Type-specific colors (success, danger, warning, info)
 * - .app-alert-icon: Icon styling for each alert type
 * - .app-alert-close: Close button styling
 */

/* Flash Message Container for Auth Forms */
.app-flash-container {
  position: relative;
  width: 100%;
  margin-bottom: 1.5rem;
  z-index: 10;
}

/* Base Alert Styles */
.app-alert {
  padding: 16px;
  margin-bottom: 12px;
  border-radius: 8px;
  background-color: #f8fafc;
  box-shadow: 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  position: relative;
  animation: auth-fade-in 0.3s ease-out;
  transition: all 0.3s ease;
}

/* Alert Type Colors */
.app-alert-success {
  color: #155724;
  background-color: #d4edda;
  border-color: #c3e6cb;
  border-left: 4px solid #28a745;
}

.app-alert-danger {
  color: #721c24;
  background-color: #f8d7da;
  border-color: #f5c6cb;
  border-left: 4px solid #dc3545;
}

.app-alert-warning {
  color: #856404;
  background-color: #fff3cd;
  border-color: #ffeeba;
  border-left: 4px solid #ffc107;
}

.app-alert-info {
  color: #0c5460;
  background-color: #d1ecf1;
  border-color: #bee5eb;
  border-left: 4px solid #17a2b8;
}

/* Alert Icon */
.app-alert-icon {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 16px;
  flex-shrink: 0;
}

.app-alert-success .app-alert-icon {
  color: #28a745;
}

.app-alert-danger .app-alert-icon {
  color: #dc3545;
}

.app-alert-warning .app-alert-icon {
  color: #ffc107;
}

.app-alert-info .app-alert-icon {
  color: #17a2b8;
}

/* Alert Text Content */
.app-alert-content {
  flex: 1;
  line-height: 1.4;
  font-size: 14px;
}

/* Alert Close Button */
.app-alert-close {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s;
  user-select: none;
  color: inherit;
  background: none;
  border: none;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-alert-close:hover {
  opacity: 1;
}

.app-alert-close:focus {
  outline: 2px solid currentColor;
  outline-offset: 1px;
  border-radius: 2px;
}

/* Alert Animations */
@keyframes auth-fade-in {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-fade-out {
  animation: auth-fade-out 0.3s ease-in forwards;
}

@keyframes auth-fade-out {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .app-alert {
    padding: 12px;
    font-size: 13px;
    margin-bottom: 10px;
  }
  
  .app-alert-icon {
    width: 20px;
    height: 20px;
    font-size: 14px;
  }
  
  .app-alert-close {
    top: 8px;
    right: 8px;
    font-size: 18px;
    width: 18px;
    height: 18px;
  }
  
  .app-alert-content {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .app-flash-container {
    margin-bottom: 1rem;
  }
  
  .app-alert {
    padding: 10px;
    font-size: 12px;
    margin-bottom: 8px;
  }
  
  .app-alert-icon {
    width: 18px;
    height: 18px;
    font-size: 12px;
  }
  
  .app-alert-content {
    font-size: 12px;
  }
}