/*
  Makes form validation alerts (error lists shown when a submission fails)
  and success messages clearly visible. Previously these had no styling at
  all anywhere in the site's CSS.
*/

.alert {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  margin: 0 0 1.5rem;
  padding: 1rem 1.25rem;
  background: #fdecea;
  border: 1px solid #f3b7b0;
  border-left: 5px solid #c0392b;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(192, 57, 43, 0.08);
}

.alert::before {
  content: "\26A0";
  flex-shrink: 0;
  font-size: 1.3rem;
  line-height: 1;
  color: #c0392b;
}

.alert ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.alert li {
  margin: 0 0 0.35rem;
  color: #7a251d;
  font-weight: 600;
  font-size: 0.95rem;
}

.alert li:last-child {
  margin-bottom: 0;
}

.alert li p {
  margin: 0;
}

/* Success state, e.g. <div class="alert success"> */
.alert.success {
  background: #eaf7ee;
  border-color: #a9dbb8;
  border-left-color: #1f8b3d;
  box-shadow: 0 2px 6px rgba(31, 139, 61, 0.08);
}

.alert.success::before {
  content: "\2713";
  color: #1f8b3d;
  font-weight: 700;
}

.alert.success h3 {
  margin: 0 0 0.35rem;
  color: #145c28;
}

.alert.success a {
  color: #145c28;
  font-weight: 600;
}

@media (max-width: 640px) {
  .alert {
    padding: 0.85rem 1rem;
  }
}
