/* ===================================
   SISTEMA DE MENSAGENS ADMIN - ELEGANTE E LIMPO
   =================================== */

/* Container das mensagens - fixo no topo */
.admin-message {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -150%);
  z-index: 999999;
  opacity: 0;
  transition: all 0.4s ease-out;
  max-width: 550px;
  width: calc(100% - 40px);
  pointer-events: none;
}

.admin-message.show {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}

/* Múltiplas mensagens */
.admin-message:nth-child(2).show {
  top: 110px;
}

.admin-message:nth-child(3).show {
  top: 200px;
}

/* Layout interno */
.admin-message-content {
  padding: 18px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: relative;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12),
              0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
}

/* Ícone */
.admin-message-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.15);
}

/* Texto */
.admin-message-text {
  flex: 1;
  min-width: 0;
}

.admin-message-title {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.4;
  letter-spacing: -0.2px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

.admin-message-description {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: 0.9;
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

/* Link/Botão de ação */
.admin-message-link {
  flex-shrink: 0;
  padding: 9px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 13px;
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  cursor: pointer;
  border: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', sans-serif;
}

.admin-message-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-message-link:active {
  transform: translateY(0);
}

/* Botão fechar */
.admin-message-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(0, 0, 0, 0.1);
  border: none;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  font-weight: 400;
}

.admin-message-close:hover {
  background: rgba(0, 0, 0, 0.2);
  color: white;
}

/* ===================================
   ESTILOS POR TIPO - SUAVES E ELEGANTES
   =================================== */

/* INFO (azul suave) */
.admin-message-info .admin-message-content {
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  color: white;
}

.admin-message-info .admin-message-link {
  background: white;
  color: #4A90E2;
}

.admin-message-info .admin-message-link:hover {
  background: #f8fbff;
}

/* SUCCESS (verde suave) */
.admin-message-success .admin-message-content {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  color: white;
}

.admin-message-success .admin-message-link {
  background: white;
  color: #10B981;
}

.admin-message-success .admin-message-link:hover {
  background: #f0fdf4;
}

/* WARNING (amarelo/laranja suave) */
.admin-message-warning .admin-message-content {
  background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
  color: white;
}

.admin-message-warning .admin-message-link {
  background: white;
  color: #F59E0B;
}

.admin-message-warning .admin-message-link:hover {
  background: #fffbeb;
}

/* ERROR (vermelho suave) */
.admin-message-error .admin-message-content {
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: white;
}

.admin-message-error .admin-message-link {
  background: white;
  color: #EF4444;
}

.admin-message-error .admin-message-link:hover {
  background: #fef2f2;
}

/* ANNOUNCEMENT (roxo suave) */
.admin-message-announcement .admin-message-content {
  background: linear-gradient(135deg, #8B5CF6 0%, #7C3AED 100%);
  color: white;
}

.admin-message-announcement .admin-message-link {
  background: white;
  color: #8B5CF6;
}

.admin-message-announcement .admin-message-link:hover {
  background: #faf5ff;
}

/* UPDATE (azul claro) */
.admin-message-update .admin-message-content {
  background: linear-gradient(135deg, #06B6D4 0%, #0891B2 100%);
  color: white;
}

.admin-message-update .admin-message-link {
  background: white;
  color: #06B6D4;
}

.admin-message-update .admin-message-link:hover {
  background: #ecfeff;
}

/* MAINTENANCE (cinza elegante) */
.admin-message-maintenance .admin-message-content {
  background: linear-gradient(135deg, #6B7280 0%, #4B5563 100%);
  color: white;
}

.admin-message-maintenance .admin-message-link {
  background: white;
  color: #6B7280;
}

.admin-message-maintenance .admin-message-link:hover {
  background: #f9fafb;
}

/* ===================================
   RESPONSIVO
   =================================== */

@media (max-width: 768px) {
  .admin-message {
    max-width: calc(100% - 30px);
    width: calc(100% - 30px);
    top: 15px;
  }

  .admin-message-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 40px 16px 16px;
  }

  .admin-message-icon {
    font-size: 26px;
    width: 36px;
    height: 36px;
  }

  .admin-message-title {
    font-size: 14px;
  }

  .admin-message-description {
    font-size: 12px;
  }

  .admin-message-link {
    width: 100%;
    text-align: center;
    padding: 10px 16px;
  }

  .admin-message-close {
    top: 12px;
    right: 12px;
    width: 26px;
    height: 26px;
  }

  .admin-message:nth-child(2).show {
    top: 100px;
  }
}

@media (max-width: 480px) {
  .admin-message {
    max-width: calc(100% - 20px);
    width: calc(100% - 20px);
  }

  .admin-message-content {
    padding: 14px 36px 14px 14px;
  }
}

/* ===================================
   ANIMAÇÕES
   =================================== */

@keyframes slideIn {
  from {
    transform: translate(-50%, -150%);
    opacity: 0;
  }
  to {
    transform: translate(-50%, 0);
    opacity: 1;
  }
}

/* ===================================
   ACESSIBILIDADE
   =================================== */

.admin-message-link:focus,
.admin-message-close:focus {
  outline: 2px solid rgba(255, 255, 255, 0.8);
  outline-offset: 2px;
}

/* Alto contraste */
@media (prefers-contrast: high) {
  .admin-message-content {
    border: 2px solid currentColor;
  }
}

/* Reduz movimento */
@media (prefers-reduced-motion: reduce) {
  .admin-message {
    transition: opacity 0.3s ease;
  }
}

/* Loading no botão */
.admin-message-link.loading {
  pointer-events: none;
  opacity: 0.7;
}

.admin-message-link.loading::before {
  content: '⏳ ';
  display: inline-block;
  margin-right: 4px;
}