/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* Global body styles */
body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
  color: #212529;
  background-color: #f8f9fa;
}

/* Flash message styling */
.flash-messages {
  position: fixed;
  top: 5rem;
  right: 1rem;
  z-index: 10000;
  max-width: 500px;
  width: auto;
}

@media (max-width: 768px) {
  .flash-messages {
    top: 4.5rem;
    right: 0.5rem;
    left: 0.5rem;
    max-width: none;
  }
}

.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Default alert styling - red for errors */
.alert {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* Success messages - green (higher specificity to override .alert) */
.alert.alert-success,
.alert.notice,
.alert-success,
.notice {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

/* Danger/error messages - red */
.alert.alert-danger,
.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

.alert-warning {
  background-color: #fff3cd;
  border-color: #ffeaa7;
  color: #856404;
}

.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
}

/* Close button for alerts */
.alert .close {
  background: none;
  border: none;
  font-size: 1.5rem;
  font-weight: bold;
  line-height: 1;
  color: inherit;
  opacity: 0.5;
  cursor: pointer;
  padding: 0;
  margin-left: 1rem;
  flex-shrink: 0;
}

.alert .close:hover {
  opacity: 1;
}

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