/**
 * @file
 * Enhanced styling for Drupal status messages with close button.
 */

.messages {
  position: relative;
  padding-right: 40px !important;
}

.messages__close {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.messages__close:hover {
  opacity: 1;
}

.messages__close:focus {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

/* Auto-dismiss animation */
@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.messages--dismissing {
  animation: fadeOut 0.3s ease-out forwards;
}
