@tailwind base;
@tailwind components;
@tailwind utilities;

[hx-swap-oob='true'] {
  display: none;
}

main [hx-swap-oob='true'] {
  display: block;
}

.htmx-indicator {
  transition-delay: 200ms;
  transition-duration: 50ms !important;
}

.htmx-swapping {
  opacity: 0;
  transition: opacity 500ms ease-in;
}

details[open] summary {
  margin-bottom: 0.75rem;
}
details[open] {
  width: 100% !important;
}

.position-relative > details[open] {
  position: absolute;
  z-index: 999;
  background-color: white;
  padding: 3rem;
}

.position-relative > details[open] summary {
  position: absolute;
  bottom: 0;
  right: 0;
}

details summary:empty::after {
  content: ' Voir plus';
}

details[open] summary:empty::after {
  content: ' Annuler les modifications';
}

#notifications dialog .alert-success {
  animation-name: notificationFadeOut;
  animation-delay: 3s;
  animation-duration: 350ms;
  animation-fill-mode: forwards;
}

@keyframes notificationFadeOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

:root {
  --primary: #151515;
}
