/* Упрощенные стили для Drupal status messages */

.messages {
  /* Более компактный padding */
  padding: 0.75rem 1rem !important;
  border-radius: 8px !important;
  border: 1px solid !important;
  box-shadow: none !important;
  margin: 0.5rem 0 !important;
}

/* Скрыть громоздкий заголовок "Status message" */
.messages__header {
  display: none !important;
}

/* Убрать отступы для контента, т.к. заголовок скрыт */
.messages__content {
  margin-left: 0 !important;
  margin-inline-start: 0 !important;
  font-size: 14px;
  line-height: 1.4;
}

/* Упростить кнопку закрытия */
.messages .button--dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px !important;
  height: 20px !important;
  margin: 0 !important;
  background: rgba(255,255,255,0.2) !important;
  border-radius: 4px !important;
  opacity: 0.7;
  transition: opacity 0.2s ease;
}

.messages .button--dismiss:hover {
  opacity: 1 !important;
  background: rgba(255,255,255,0.3) !important;
}

.messages .button--dismiss .icon-close {
  width: 12px !important;
  height: 12px !important;
  margin: 4px !important;
}

/* Более приятные цвета для успешных сообщений */
.messages--status {
  background: #d4edda !important;
  border-color: #c3e6cb !important;
  color: #155724 !important;
}

.messages--status .button--dismiss {
  background: rgba(21, 87, 36, 0.1) !important;
}

.messages--status .button--dismiss:hover {
  background: rgba(21, 87, 36, 0.2) !important;
}

.messages--status .button--dismiss .icon-close {
  background-color: #155724 !important;
}

/* Более приятные цвета для предупреждений */
.messages--warning {
  background: #fff3cd !important;
  border-color: #ffeaa7 !important;
  color: #856404 !important;
}

.messages--warning .button--dismiss .icon-close {
  background-color: #856404 !important;
}

/* Более приятные цвета для ошибок */
.messages--error {
  background: #f8d7da !important;
  border-color: #f5c6cb !important;
  color: #721c24 !important;
}

.messages--error .button--dismiss .icon-close {
  background-color: #721c24 !important;
}

/* Более приятные цвета для информационных сообщений */
.messages--info {
  background: #d1ecf1 !important;
  border-color: #bee5eb !important;
  color: #0c5460 !important;
}

.messages--info .button--dismiss .icon-close {
  background-color: #0c5460 !important;
}

/* Анимация появления */
@keyframes messageSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.messages-list__item {
  animation: messageSlideIn 0.3s ease-out;
}

/* Упрощение для мобильных устройств */
@media (max-width: 768px) {
  .messages {
    padding: 0.5rem 0.75rem !important;
    margin: 0.25rem 0 !important;
  }

  .messages__content {
    font-size: 13px;
    padding-right: 30px; /* место для кнопки закрытия */
  }
}