/**
 * admin_nexus_moderation.css
 * Styles pour les croix de suppression sur les posts Nexus et communautés
 */

/* ================================================================
   CROIX DE SUPPRESSION SUR LES POSTS NEXUS
   ================================================================ */

.blx-delete-nexus-post {
  position: absolute !important;
  top: 5px !important;
  right: 5px !important; /* ← À DROITE */
  width: 28px !important;
  height: 28px !important;
  background: rgba(220, 38, 38, 0.95) !important;
  color: white !important;
  border: 2px solid white !important;
  border-radius: 50% !important;
  font-size: 16px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  z-index: 9999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  pointer-events: auto !important;
  transition: all 0.2s ease !important;
  
  /* MASQUÉ PAR DÉFAUT - APPARAÎT AU SURVOL */
  opacity: 0 !important;
  visibility: hidden !important;
  transform: scale(0.8) !important;
  
  box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
}

/* APPARAÎT AU SURVOL DU POST */
.reddit-post:hover .blx-delete-nexus-post {
  opacity: 1 !important;
  visibility: visible !important;
  transform: scale(1) !important;
}

/* Au survol de la croix elle-même */
.blx-delete-nexus-post:hover {
  transform: scale(1.15) !important;
  background: rgba(185, 28, 28, 1) !important;
}

/* Hover de la croix elle-même */
.blx-delete-nexus-post:hover {
  background: rgba(185, 28, 28, 1);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
}

.blx-delete-nexus-post:active {
  transform: scale(0.95);
}

/* ================================================================
   CROIX DE SUPPRESSION SUR LES COMMUNAUTÉS
   ================================================================ */

.blx-delete-community {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 32px;
  height: 32px;
  background: rgba(220, 38, 38, 0.9);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1000; /* ← AUGMENTÉ */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  pointer-events: auto; /* ← AJOUTÉ */
  
  /* MASQUÉ PAR DÉFAUT */
  opacity: 0;
  visibility: hidden;
  transform: scale(0.8);
}

/* APPARAÎT AU SURVOL DE LA COMMUNAUTÉ */
.community-result:hover .blx-delete-community,
.community-card:hover .blx-delete-community,
[data-community-id]:hover .blx-delete-community {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto; /* ← AJOUTÉ */
}

/* Hover de la croix elle-même */
.blx-delete-community:hover {
  background: rgba(185, 28, 28, 1);
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.5);
}

.blx-delete-community:active {
  transform: scale(0.95);
}

/* ================================================================
   RESPONSIVE - MOBILE
   ================================================================ */

@media (max-width: 768px) {
  /* Sur mobile, toujours visible mais plus petit */
  .blx-delete-nexus-post,
  .blx-delete-community {
    width: 28px;
    height: 28px;
    font-size: 14px;
    opacity: 0.7;
    visibility: visible;
    transform: scale(1);
  }
  
  .blx-delete-nexus-post:active,
  .blx-delete-community:active {
    opacity: 1;
    transform: scale(1.1);
  }
}

/* ================================================================
   DARK MODE / LIGHT MODE
   ================================================================ */

/* Mode nuit (par défaut) */
body[data-theme="dark"] .blx-delete-nexus-post,
body[data-theme="dark"] .blx-delete-community {
  background: rgba(220, 38, 38, 0.9);
  border-color: rgba(255, 255, 255, 0.3);
}

body[data-theme="dark"] .blx-delete-nexus-post:hover,
body[data-theme="dark"] .blx-delete-community:hover {
  background: rgba(185, 28, 28, 1);
  border-color: rgba(255, 255, 255, 0.8);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.6);
}

/* Mode jour */
body[data-theme="light"] .blx-delete-nexus-post,
body[data-theme="light"] .blx-delete-community {
  background: rgba(239, 68, 68, 0.95);
  border-color: rgba(0, 0, 0, 0.2);
}

body[data-theme="light"] .blx-delete-nexus-post:hover,
body[data-theme="light"] .blx-delete-community:hover {
  background: rgba(220, 38, 38, 1);
  border-color: rgba(0, 0, 0, 0.4);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
}

/* ================================================================
   ANIMATION D'ENTRÉE
   ================================================================ */

@keyframes deleteButtonAppear {
  from {
    opacity: 0;
    transform: scale(0.5) rotate(-180deg);
  }
  to {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Animation quand le post apparaît (optionnel) */
.reddit-post:hover .blx-delete-nexus-post {
  animation: deleteButtonAppear 0.2s ease;
}

.community-result:hover .blx-delete-community,
.community-card:hover .blx-delete-community,
[data-community-id]:hover .blx-delete-community {
  animation: deleteButtonAppear 0.2s ease;
}
