body:has(.modal-container) {
  overflow: hidden;
}

.modal-background {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0003;
  z-index: 1025;
  opacity: 0;
  animation: fadeModal 0.1s ease-in-out forwards;
  backdrop-filter: blur(1px);
}

.modal-container {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 0.375rem;
  margin: 1rem;
  padding: 1rem;
  width: clamp(300px, 10vw, 400px);
  max-height: calc(100vh - 2rem);
  box-shadow: 0 1px 1px #0000000b, 0 2px 2px #0000000b, 0 4px 4px #0000000b, 0 8px 8px #0000000b, 0 16px 16px #0000000b,
    0 -2px 4px #0000000b;

  transform: scale(0);
  opacity: 0;
  animation: fadeInModal cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.225s forwards;
}

.overflow-x-auto {
  overflow-x: auto;
}

.modal-container .modal-titulo {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

.modal-container .modal-mensaje {
  font-size: 0.85rem;
  margin: 0;
  margin-bottom: 0.5rem;
}

.modal-container .modal-botones {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

.modal-container .boton-cancelar,
.modal-container .boton-confirmar {
  flex: 1;
  font-size: clamp(0.85rem, 1vw, 1rem);
  padding: 0.5rem 1rem;
  line-height: normal;
}

.modal-container p,
.modal-container label {
  font-size: 0.85rem;
  margin: 0;
}

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

@keyframes fadeInModal {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
